[Mod] Night Vision Goggles! See Day In The Dark! [4.1] [night_vision]

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

[Mod] Night Vision Goggles! See Day In The Dark! [4.1] [night_vision]

by Aqua » Tue Jan 01, 2013 00:34

Image
Happy New Year Everyone!! Best wishes for 2013!! This adds Night Vision Goggles as requested by Josh! This will be my last mod! This is also a revamped and improved version of Echo's Walking Light! I need better crafting recipes, will accept better ones!

BE A SAM FISHER FROM SPLINTER CELL WITH THESE AWESOME NIGHT VISION GOGGLES!
Image

Features:
-No more torches!
-You can see in the dark using these awesome Night Vision Goggles!
-Now you don't need to hold it just have it in your first 8 slots to make light(Thanks to RealBadAngel)! Also light increased!

Crafting:
SUGGEST BETTER RECIPES!
4.1:
Image
4.0:
Image
3.0 and lower:
Image

Omploader:
Download 1.0.zip Initial Release
Download 2.0.zip No need to hold Night Vision Goggles(Thanks to RealBadAngel)! Also light increased!
Download 3.0.zip NO MORE FLYING COBBLE AND GLITCHES! I registered a new node with an invisible texture...Also changed name to "night_vision"! Less buggy code!
Download 4.0.zip New texture(more like Sam Fisher's thanks to Josh)! Light increased! Power decreased! New crafting! Smaller file size(4KB).
Download 4.1.zip New crafting!

Code: WTFPL
Textures: WTFPL

NOTE: Currently it is using code from Echo's Walking Light Mod. I am making my own code right now instead of using his.

Screenshots:

4.0 and higher:
Image

Image

3.0 and lower:
Image

Image

Before
Image

After
Image
Last edited by Aqua on Sun Mar 03, 2013 07:57, edited 1 time in total.
Hi there ^.~
 

User avatar
davidpace
Member
 
Posts: 685
Joined: Wed Oct 17, 2012 11:09

by davidpace » Tue Jan 01, 2013 00:38

Nicey! +1
Taking a break for a while see ya guys!

In some of my posts I will be putting "Secret" White sentences.. Tell me if you see them!!! :D
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Tue Jan 01, 2013 00:44

No why your last mod and that texture looks like a butterfly
Great mod btw
Last edited by Chinchow on Tue Jan 01, 2013 00:46, edited 1 time in total.
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Tue Jan 01, 2013 00:51

Chinchow wrote:No why your last mod and that texture looks like a butterfly
Great mod btw


So many people says it looks like a butterfly, lol.
And it is my last mod because I'm going to take a long break from minetest.
Hi there ^.~
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Tue Jan 01, 2013 01:03

Oh well be sure to come back
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
cornellius
Member
 
Posts: 82
Joined: Sat Dec 01, 2012 05:08

by cornellius » Tue Jan 01, 2013 02:03

Sorry To Say This Maybe Night Vision Goggles need more light when used thank you
one more when we use it maybe it we can see heat signature
Last edited by cornellius on Tue Jan 01, 2013 02:08, edited 1 time in total.
All Humans Need Is Forgiveness, God Is The First One Who Forgive All Humans So Humans Must Forgive Other Humans
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Tue Jan 01, 2013 02:05

cornellius wrote:Sorry To Say This Maybe Night Vision Goggles need more light when used thank you

yes make the light 15
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

Josh
Member
 
Posts: 1146
Joined: Fri Jun 29, 2012 23:11

by Josh » Tue Jan 01, 2013 02:24

Yes!!!!!!!!!!!!!!!! Now i can be Sam Fisher :) +30
I see you took a look at my idea!
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Tue Jan 01, 2013 04:02

jojoa1997 wrote:
cornellius wrote:Sorry To Say This Maybe Night Vision Goggles need more light when used thank you

yes make the light 15

Uh, the maximum for light_source is 14... But I will make an alternate one with higher light if you want..
Hi there ^.~
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Tue Jan 01, 2013 04:05

ok thanks and you can set light to 15. it works this way for me
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Tue Jan 01, 2013 07:44

uhmm, i don't want to seem to be rude but something like this has been done before, hasn't it?
http://minetest.net/forum/viewtopic.php?id=2621
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Tue Jan 01, 2013 07:49

It would be cool if we didn't need to hold the goggles so we can do other things
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
RealBadAngel
Member
 
Posts: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Tue Jan 01, 2013 08:34

Chinchow wrote:It would be cool if we didn't need to hold the goggles so we can do other things


local hotbar=inv:get_list("main")
for index=1,8,1 do

if hotbar[index]:get_name() ==

just use this to check if item is put on the hotbar (first 8 inventory slots). Then it hasnt to be wielded.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Tue Jan 01, 2013 08:59

Mito551 wrote:uhmm, i don't want to seem to be rude but something like this has been done before, hasn't it?
http://minetest.net/forum/viewtopic.php?id=2621


But there are no similarities in the code... Wait, what??
Walking light:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    if wielded_item ~= "default:torch" and wielded_item ~= "walking_light:pick_mese" then
        -- Neuberechnung des Lichts erzwingen
        minetest.env:add_node(rounded_pos,{type="node",name="default:cobble"})
        minetest.env:add_node(rounded_pos,{type="node",name="air"})
    end

Night goggles:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    if wielded_item ~= "night_goggles:night_vision_goggles" then
        minetest.env:add_node(rounded_pos,{type="node",name="default:cobble"})
        minetest.env:add_node(rounded_pos,{type="node",name="air"})
    end

Caught you! Why would you put "type=node"?

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    player_positions[player_name]["x"] = rounded_pos.x;
    player_positions[player_name]["y"] = rounded_pos.y;
    player_positions[player_name]["z"] = rounded_pos.z;

Also is just the same in your code. You cannot have written that from scratch, noone would randomly use such a strange construction if he didn't just copypaste it.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.env:add_node(old_pos,{type="node",name="default:cobble"})
minetest.env:add_node(old_pos,{type="node",name="air"})

That doesn't even make sense, but you copied it. You could have used dig_node or remove_node instead I guess.
Basically the whole code is copied,

I know, walking light's license is WTFPL and you are allowed copy it, but you should give credit, that's good manner. I'm sure you can do better than just stealing other people's work.
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Tue Jan 01, 2013 09:03

Mito551 wrote:uhmm, i don't want to seem to be rude but something like this has been done before, hasn't it?
http://minetest.net/forum/viewtopic.php?id=2621

Yes I know, but that was being buried in the forums(on page 6 of mod releases) so I wanted to remake it and improve on it(revamp)!
Hi there ^.~
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Tue Jan 01, 2013 09:08

Jeija wrote:(...)

Your right Jeija, I'm starting this from scratch and writing my own code. I was just trying to revive Echo's Walking Light in a different way.
Last edited by Aqua on Tue Jan 01, 2013 09:12, edited 1 time in total.
Hi there ^.~
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Tue Jan 01, 2013 09:24

RealBadAngel wrote:
Chinchow wrote:It would be cool if we didn't need to hold the goggles so we can do other things


local hotbar=inv:get_list("main")
for index=1,8,1 do

if hotbar[index]:get_name() ==

just use this to check if item is put on the hotbar (first 8 inventory slots). Then it hasnt to be wielded.

Where do I put this?
Hi there ^.~
 

User avatar
RealBadAngel
Member
 
Posts: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Tue Jan 01, 2013 11:33

Aqua wrote:
RealBadAngel wrote:
Chinchow wrote:It would be cool if we didn't need to hold the goggles so we can do other things


local hotbar=inv:get_list("main")
for index=1,8,1 do

if hotbar[index]:get_name() ==

just use this to check if item is put on the hotbar (first 8 inventory slots). Then it hasnt to be wielded.

Where do I put this?


make a function like this:

function check_for_googles (player)
if player==nil then return false end
local inv = player:get_inventory()
local hotbar=inv:get_list("main")
for index=1,8,1 do
if hotbar[index]:get_name() == "night_goggles:night_vision_goggles" then
return "night_goggles:night_vision_goggles"
end
end
return false
end

and replace:
local wielded_item = player:get_wielded_item():get_name()
with:
local wielded_item = check_for_googles(player)
Last edited by RealBadAngel on Tue Jan 01, 2013 11:35, edited 1 time in total.
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Tue Jan 01, 2013 11:36

Works great! Thank you!
Last edited by Aqua on Tue Jan 01, 2013 11:46, edited 1 time in total.
Hi there ^.~
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Tue Jan 01, 2013 11:42

Josh wrote:Yes!!!!!!!!!!!!!!!! Now i can be Sam Fisher :) +30
I see you took a look at my idea!

Cool I'll try to make the textures more like Sam's..!

Version 2.0 released!
New features:
-No need to hold just have it in your first 8 slots!(Thanks to RealBadAngel)!
-Light increased!
Last edited by Aqua on Tue Jan 01, 2013 11:57, edited 1 time in total.
Hi there ^.~
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Tue Jan 01, 2013 12:03

@Jeija I am writing my own code...
But I have a question:
Can abm be used with a craftitem? If not is it possible to make it so?

EDIT: dig_node and remove_node don't work..
Last edited by Aqua on Wed Jan 02, 2013 08:53, edited 1 time in total.
Hi there ^.~
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Wed Jan 02, 2013 02:00

Request move to mod releases!
Hi there ^.~
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Wed Jan 02, 2013 09:15

cornellius wrote:Sorry To Say This Maybe Night Vision Goggles need more light when used thank you
one more when we use it maybe it we can see heat signature


Nice Idea!

Version 3 Released:
-NO MORE FLYING COBBLE AND GLITCHES!! I registered a new node with an invisible texture!!
-Less buggy and faster code!
Hi there ^.~
 

User avatar
Dopium
Member
 
Posts: 233
Joined: Sat Jun 09, 2012 15:43

by Dopium » Wed Jan 02, 2013 13:52

Nice mod! Installed on singleplayer and it works very well, very interesting
Running @1.19 MHz, 128 bytes of RAM and interchangeable 4kb ROM carts!
 

User avatar
nomohakon
Member
 
Posts: 207
Joined: Fri Aug 10, 2012 16:34
IRC: nomohakon
In-game: nomohakon

by nomohakon » Wed Jan 02, 2013 19:32

Night vision enhances all light it catches, so this is more like cheap key-light.
"To learn who rules over you, simply find out who you are not allowed to criticize." - Voltaire
"Knowledge, like air, is vital to life. Like air, no one should be denied it." - Alan Moore, V for Vendetta
- - -
"To never die... and to conquer all, that is winning." ―Illyria
 

Decon03
New member
 
Posts: 1
Joined: Wed Jan 02, 2013 19:45

by Decon03 » Wed Jan 02, 2013 19:48

WHAT ON EARTH IS THE FIRST PICTURE SUPPOSE TO BE!?
 

Josh
Member
 
Posts: 1146
Joined: Fri Jun 29, 2012 23:11

by Josh » Wed Jan 02, 2013 21:59

Decon03 wrote:WHAT ON EARTH IS THE FIRST PICTURE SUPPOSE TO BE!?

It's Sam Fisher.
P.S: I can make some better textures for the night vision goggles later, more like Sam Fisher's :)
Last edited by Josh on Wed Jan 02, 2013 22:07, edited 1 time in total.
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Thu Jan 03, 2013 00:18

@nomohakon. There is no other way in lua to make it like that.
@Decon03. That's Sam Fisher from a game. I tried to make my textures like his.
@Josh. Sure if you can make better textures. I'll add you to the credit list!
EDIT: Poll Added! No need to continue a mod no one wants.
Last edited by Aqua on Thu Jan 03, 2013 00:41, edited 1 time in total.
Hi there ^.~
 

Josh
Member
 
Posts: 1146
Joined: Fri Jun 29, 2012 23:11

by Josh » Thu Jan 03, 2013 02:12

 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Thu Jan 03, 2013 09:56

Looks great will add it in next version and add your name in the credits ;-)
Hi there ^.~
 

Next

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 26 guests