[Mod] Walking Light [0.6] [walking_light]

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

[Mod] Walking Light [0.6] [walking_light]

by Echo » Tue Jul 31, 2012 08:31

Hold a torch in your hand and light up the night and cave!

When a torch is wielded, a transparent lighting node is placed on players position (and removed from the old position).

License
Code: WTFPL, textures: CC BY-SA

Mod dependencies
default

Download
0.6 walking_light_0_6.zip
0.5 walking_light_0_5.zip
0.4 walking_light_0_4.zip
0.3 walking_light_0_3.zip
0.2 walking_light_0_2.zip
0.1 walking_light.zip


Version History
  • 0.6 fixed server crash when a player leaves (thanks to Nubelite)
  • 0.5 thanks to the trick from worldedit, no more lost light
  • 0.4 added the "Lighting mese pickaxe". Just put a torch above a mese-pick
  • 0.3 torch lights when wading through water / code cleanup / seems to be a problem in the minetest engine with the light update, sometimes the voxel based dynamic lighting stays although there is no light source
  • 0.2 torch lights directly when selected / minor bugfixes
  • 0.1 first release

Edit: added word "license" for sfan5s squealer-script
Last edited by Echo on Sat Feb 09, 2013 13:15, edited 1 time in total.
 

User avatar
LolManKuba
Member
 
Posts: 939
Joined: Fri Feb 10, 2012 22:36

by LolManKuba » Tue Jul 31, 2012 08:38

Nice! Finally there's a mod like this.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Tue Jul 31, 2012 08:49

Haha, nice!
 

User avatar
Splizard
Member
 
Posts: 220
Joined: Wed Jan 25, 2012 07:20
GitHub: Splizard
IRC: Splizard
In-game: Splizard

by Splizard » Tue Jul 31, 2012 08:51

Cool mod! It's a bit buggy though (sometimes the lighting is not removed).
Games: The Hungry Games.
Mods: Lifters (Simple Lifts), Snow Biomes and Gates.
Also checkout my texture pack Gridtoon!
View all of them plus more at http://minetest.splizard.com! (may not always be online).
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Tue Jul 31, 2012 12:11

Great mod!

I tried the following 2 additions (line 36 and 38) and they worked too:

if is_air ~= nil and (is_air.name == "air" or is_air.name == "default:water_source" or is_air.name == "walking_light:light")then
-- print('set '..minetest.pos_to_string(ontop))
if (is_air.name == "air" or is_air.name == "default:water_source") then

Thanks again :-)
 

User avatar
kddekadenz
Member
 
Posts: 323
Joined: Mon Jun 27, 2011 17:21
GitHub: tinyworlds

by kddekadenz » Tue Jul 31, 2012 15:39

Could you please mirror this on another site?
 

User avatar
LolManKuba
Member
 
Posts: 939
Joined: Fri Feb 10, 2012 22:36

by LolManKuba » Tue Jul 31, 2012 16:41

Splizard wrote:Cool mod! It's a bit buggy though (sometimes the lighting is not removed).

Kind've obvious if it's the first version.
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Tue Jul 31, 2012 17:31

Topywo wrote:Great mod!

I tried the following 2 additions (line 36 and 38) and they worked too:

if is_air ~= nil and (is_air.name == "air" or is_air.name == "default:water_source" or is_air.name == "walking_light:light")then
-- print('set '..minetest.pos_to_string(ontop))
if (is_air.name == "air" or is_air.name == "default:water_source") then

Thanks again :-)


Feel free to modify whatever you want. I suggest you invent a waterproofed burning torch ;-)

And make sure that you do not make air-holes in the water...
 

User avatar
cactuz_pl
Member
 
Posts: 874
Joined: Tue Jun 05, 2012 16:34

by cactuz_pl » Tue Jul 31, 2012 18:11

Idea:
Lighting mese pickaxe (craft: torch + mese pickaxe), this would be very handy while mining.
Nope
 

User avatar
LolManKuba
Member
 
Posts: 939
Joined: Fri Feb 10, 2012 22:36

by LolManKuba » Tue Jul 31, 2012 18:25

cactuz_pl wrote:Idea:
Lighting mese pickaxe (craft: torch + mese pickaxe), this would be very handy while mining.

+2
 

User avatar
Liandri
Member
 
Posts: 29
Joined: Tue Jan 10, 2012 12:20

by Liandri » Tue Jul 31, 2012 18:58

+ 1 for the mod :D

cactuz_pl wrote:Idea:
Lighting mese pickaxe (craft: torch + mese pickaxe), this would be very handy while mining.


+ 1!. Some sort of a "mining helmet" with a light attached would be nice too :D
 

User avatar
Ragnarok
Member
 
Posts: 213
Joined: Thu Mar 22, 2012 12:56

by Ragnarok » Tue Jul 31, 2012 19:21

Amazing mod =)

cactuz_pl wrote:Idea:
Lighting mese pickaxe (craft: torch + mese pickaxe), this would be very handy while mining.


LOL - Tactical Pickaxe :D
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Tue Jul 31, 2012 19:46

Ragnarok wrote:Amazing mod =)

cactuz_pl wrote:Idea:
Lighting mese pickaxe (craft: torch + mese pickaxe), this would be very handy while mining.


LOL - Tactical Pickaxe :D


Reminds me of "doom 3". You want the "duct tape" mod :-)
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Thu Aug 09, 2012 10:55

Updated the mod.

The problem with the "not removed" lighting is still there.
The lighting node is removed but the voxel based dynamic lighting isn't always updated properly. Seems to be a problem in the minetest engine (ok, minetest isn't made for this "dynamic" dynamic lighting).

Anybody any idea?
 

User avatar
RandomBot
Member
 
Posts: 164
Joined: Sun May 20, 2012 03:46

by RandomBot » Thu Aug 09, 2012 12:30

so its like terraria torches, +1
"Everyone has a plan, until they get punched in the face"
- Mike Tyson
 

Ghost_of_tino
 

by Ghost_of_tino » Thu Aug 09, 2012 16:53

Echo wrote:Updated the mod.

The problem with the "not removed" lighting is still there.
The lighting node is removed but the voxel based dynamic lighting isn't always updated properly. Seems to be a problem in the minetest engine (ok, minetest isn't made for this "dynamic" dynamic lighting).

Anybody any idea?

I heard that in the latest WorldEdit, they had a lightfix command. You may want to see how they pulled it off.
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Tue Aug 14, 2012 17:20

Echo wrote:
Ragnarok wrote:Amazing mod =)

cactuz_pl wrote:Idea:
Lighting mese pickaxe (craft: torch + mese pickaxe), this would be very handy while mining.


LOL - Tactical Pickaxe :D


Reminds me of "doom 3". You want the "duct tape" mod :-)


added the tactical pickaxe :)
 

User avatar
Ragnarok
Member
 
Posts: 213
Joined: Thu Mar 22, 2012 12:56

by Ragnarok » Tue Aug 14, 2012 22:48

Heh, so cool :) Nice inventory texture.
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Fri Aug 17, 2012 12:29

Ghost_of_tino wrote:[...]
I heard that in the latest WorldEdit, they had a lightfix command. You may want to see how they pulled it off.


They add a non-transparent node and remove it to enforce the recalculation of the light. So do I in the new version. No more lost light, so far...
 

Nubelite
Member
 
Posts: 161
Joined: Mon Jul 16, 2012 23:10

by Nubelite » Thu Aug 23, 2012 03:30

I ran into a small issue using this mod on my server. to resolve it i had to add

if player ~= nil then

above line 28. No more crashing for me now. lol
 

Nubelite
Member
 
Posts: 161
Joined: Mon Jul 16, 2012 23:10

by Nubelite » Thu Aug 23, 2012 05:02

Still getting the error and the server crashes

ERROR: An unhandled exception occurred: ServerError: LuaError: error: ...t Server/bin/../mods/minetest/walking_light/init.lua:29: bad argument #2 to 'remove' (number expected, got userdata)
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Thu Aug 23, 2012 18:12

Nubelite wrote:I ran into a small issue using this mod on my server. to resolve it i had to add

if player ~= nil then

above line 28. No more crashing for me now. lol

Nubelite wrote:Still getting the error and the server crashes

ERROR: An unhandled exception occurred: ServerError: LuaError: error: ...t Server/bin/../mods/minetest/walking_light/init.lua:29: bad argument #2 to 'remove' (number expected, got userdata)


Thank you for your note. I was able to fix the bug. I totally misused the function table.remove, which is not visible in singleplayer. Also repaired that a leaving player could leave his light.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Tue Oct 16, 2012 02:12

Just looking for your thoughts on this. I love this mod, but it breaks the water sounds in the immersive sounds mod because that checks what is at the users head, body and feet. If it's air, at the head, then the user could be treading water, if it's water, then gurgling bubbles. But when I have a torch in my hand, and use this mod, the logic is all screwed up. I was wondering if you could put the lightsource node just to the right of the user, this would be logical because they are holding the torch in their right hand. I don't check what is directly to the right of the player for the water logic. I don't know how difficult this would be to do in your mod, but it would take a lot of if then or logic in the immersive sounds mod, which I'd prefer not to get into if I don't have to.
 

User avatar
prof-turbo
Member
 
Posts: 518
Joined: Mon May 07, 2012 17:02

by prof-turbo » Tue Oct 23, 2012 16:38

Cool, a little slowly but that's not really a problem.
You should take a look at http://www.xorhub.com
 

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

by RealBadAngel » Mon Oct 29, 2012 04:16

Im using the idea in Technic mod for Flashlight. Yesterday i rewrote the code, and believe its faster and more reliable:
https://github.com/RealBadAngel/technic/blob/master/flashlight.lua
 

Slain
Member
 
Posts: 18
Joined: Tue Jun 25, 2013 20:20

by Slain » Mon Jul 01, 2013 19:54

is it possible for a mod like this to be made compatible with the crafting mod?
 

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

by Mito551 » Mon Jul 01, 2013 21:54

how is this one isn't? and try dwarves for new, improved version of this mod
 

User avatar
nfsprodriver
Member
 
Posts: 41
Joined: Sun Nov 10, 2013 18:25

by nfsprodriver » Sun Nov 10, 2013 19:15

Hello everybody!

This is my first post. First I want to say, I do not understand much of programming mods, but a little bit:

This release is for everybody needing a bit more speed with the walking light. In my version I:

-removed the cobble as smoke or whatever
-compressed the walking_light texture to 1x1px (there's no difference I think)

I think, it would speed up the fps when you use the walking_light, by the way a fantastic mod!!!
'Hope you enjoy...

My English might not be very good ;) .
Attachments
walking_light high speed.zip
(2.8 KiB) Downloaded 128 times
 

dgm5555
Member
 
Posts: 244
Joined: Tue Apr 08, 2014 19:45

Re: [Mod] Walking Light [0.6] [walking_light]

by dgm5555 » Sun Apr 27, 2014 11:16

is there some odd way you've zipped the files. I can't extract them (Ubuntu 14.04, default unzip)
 

sloantothebone
Member
 
Posts: 26
Joined: Thu Aug 28, 2014 18:42

Re: [Mod] Walking Light [0.6] [walking_light]

by sloantothebone » Sun Sep 21, 2014 21:31

your mod produces a stone block which is visible when I walk backwards and removed half my door in voxelgarden. You might try making it be overwritten by things like doors and signs, etc and overwrite water blocks, instead of being overwritten by water blocks and overwriting doors.
 

Next

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 20 guests

cron