Page 2 of 3

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Fri Mar 25, 2016 10:55
by MoNTE48
Code: Select all
2016-03-25 12:53:52: ERROR[Main]: ServerError: Runtime error from mod 'lightning' in callback environment_Step(): Runtime error from mod 'lightning' in callback node_on_construct(): ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:41: Invalid core.after invocation
2016-03-25 12:53:52: ERROR[Main]: stack traceback:
2016-03-25 12:53:52: ERROR[Main]:    [C]: in function 'assert'
2016-03-25 12:53:52: ERROR[Main]:    ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:41: in function 'after'
2016-03-25 12:53:52: ERROR[Main]:    ....1.0-win64\bin\..\games\default\files\lightning\init.lua:203: in function <....1.0-win64\bin\..\games\default\files\lightning\init.lua:201>
2016-03-25 12:53:52: ERROR[Main]:    [C]: in function 'set_node'
2016-03-25 12:53:52: ERROR[Main]:    ....1.0-win64\bin\..\games\default\files\lightning\init.lua:153: in function 'func'
2016-03-25 12:53:52: ERROR[Main]:    ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:34: in function <...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:11>
2016-03-25 12:53:52: ERROR[Main]:    ...\MultiCraft-1.1.0-win64\bin\..\builtin\game\register.lua:369: in function <...\MultiCraft-1.1.0-win64\bin\..\builtin\game\register.lua:349>
2016-03-25 12:53:52: ERROR[Main]: stack traceback:
2016-03-25 12:53:52: ERROR[Main]:    [C]: in function 'set_node'
2016-03-25 12:53:52: ERROR[Main]:    ....1.0-win64\bin\..\games\default\files\lightning\init.lua:153: in function 'func'
2016-03-25 12:53:52: ERROR[Main]:    ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:34: in function <...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:11>
2016-03-25 12:53:52: ERROR[Main]:    ...\MultiCraft-1.1.0-win64\bin\..\builtin\game\register.lua:369: in function <...\MultiCraft-1.1.0-win64\bin\..\builtin\game\register.lua:349>

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Fri Mar 25, 2016 17:00
by sofar
Martin_Devil wrote:
Code: Select all
2016-03-25 12:53:52: ERROR[Main]: ServerError: Runtime error from mod 'lightning' in callback environment_Step(): Runtime error from mod 'lightning' in callback node_on_construct(): ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:41: Invalid core.after invocation


MultiCraft-1.1.0-win64, what is that?

No seriously, go away. Try it on minetest instead, I can't possibly know or want to support clones or forks.

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Fri Mar 25, 2016 17:30
by jp
sofar wrote:MultiCraft-1.1.0-win64, what is that?

An unethical fork from which Martin_Devil (aka "MoNTE48") is the author : viewtopic.php?f=14&t=14057

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Fri Mar 25, 2016 17:53
by MoNTE48
sofar wrote:
Martin_Devil wrote:
Code: Select all
2016-03-25 12:53:52: ERROR[Main]: ServerError: Runtime error from mod 'lightning' in callback environment_Step(): Runtime error from mod 'lightning' in callback node_on_construct(): ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:41: Invalid core.after invocation


MultiCraft-1.1.0-win64, what is that?

No seriously, go away. Try it on minetest instead, I can't possibly know or want to support clones or forks.

This is Minetest 0.4.13-master.

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Fri Mar 25, 2016 17:55
by MoNTE48
jp wrote:
sofar wrote:MultiCraft-1.1.0-win64, what is that?

An unethical fork from which Martin_Devil (aka "MoNTE48") is the author : viewtopic.php?f=14&t=14057


You can bring proof of his words? Or is it silly nonsense person who does not know what permissions gives LGPL

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Fri Mar 25, 2016 19:13
by sofar
Martin_Devil wrote:
sofar wrote:
Martin_Devil wrote:
Code: Select all
2016-03-25 12:53:52: ERROR[Main]: ServerError: Runtime error from mod 'lightning' in callback environment_Step(): Runtime error from mod 'lightning' in callback node_on_construct(): ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:41: Invalid core.after invocation


MultiCraft-1.1.0-win64, what is that?

No seriously, go away. Try it on minetest instead, I can't possibly know or want to support clones or forks.

This is Minetest 0.4.13-master.


Is it 0.4.13, or is it master? It can't be both.

If you really want to *seriously* help out find bugs, then DO US ALL A FAVOR, and stop reporting bugs against your fork. Make a clean checkout of minetest and minetest_game from *git*, and then re-test your problematic test case. If you find a bug in there, then you've found a bug.

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Fri Mar 25, 2016 19:18
by MoNTE48
sofar wrote:
Is it 0.4.13, or is it master? It can't be both.

If you really want to *seriously* help out find bugs, then DO US ALL A FAVOR, and stop reporting bugs against your fork. Make a clean checkout of minetest and minetest_game from *git*, and then re-test your problematic test case. If you find a bug in there, then you've found a bug.


I'll do it later. I use the master, my changes are superficial, no change api

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Mon May 16, 2016 18:07
by rpgsniper2452
Very nice mod. But it's a shame you couldn't control the lightning to make it hit only a certain spot if desired. If that was the case though you could have a staff that will strike anyone who is hit by the staff.

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Mon May 16, 2016 19:55
by xeranas
rpgsniper2452 wrote:Very nice mod. But it's a shame you couldn't control the lightning to make it hit only a certain spot if desired. If that was the case though you could have a staff that will strike anyone who is hit by the staff.

Any mod can control strike location if they want it by using `lightning.strike(pos)`. It would be relative simple to implement buildin command, but it would be just one variation. For e.g. server oriented admin mod only needs lightning dependecy and they can define variations whatever they want (e.g. lightning strike on player pos + kick player - with single command).

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Wed May 18, 2016 13:15
by Diamond knight
minetest.register_craftitem("lightningrod:rod",{
description = "lightning rod",
inventory_image = "default_stick.png",
stack_max = 1,
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type == "node" then
local p = pointed_thing.above
lightning.strike(p) if minetest.setting_getbool("cat") then itemstack:take_item() end
return itemstack
end
end,
})


boom, i do not know how to upload to github so it takes hour to upload so here is code

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Sat Jul 09, 2016 10:09
by Dopium
With the latest dev build this mod is crashing minetest to desktop. Im using xeranus's weather mod and when it begins to strike lightening, the program will crash. Problem im having is the debug log isn't showing any errors, it did once awhile back but im still searching through the log to find it. Not a hundred percent sure but i think since the changes of particles behavior may have something to do with it.

The most i can find is this error that looks to be caused from the weather mod however only happens when lightening begins striking.
Code: Select all
2016-07-08 12:19:45: WARNING[Server]: Undeclared global variable "dtime" accessed at ...160707\bin\..\games\minetest_2.0\mods\weather\rain\init.lua:143

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Sat Jul 09, 2016 15:55
by Don
I tested latest lightning, MT and mymonths. Watched several lightning strikes and had no errors or crashes.

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Sat Jul 09, 2016 22:11
by sofar
Dopium wrote:
Code: Select all
2016-07-08 12:19:45: WARNING[Server]: Undeclared global variable "dtime" accessed at ...160707\bin\..\games\minetest_2.0\mods\weather\rain\init.lua:143


Seems like the crash is not in *this* mod, but the *rain* mod.

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Sun Jul 10, 2016 00:36
by Dopium
Yeah that's what i though however it is strange that it only happens when raining and i get about two lightening strikes until it crashes. I can have it raining for over an hour with no problems but whenever the lightening starts the two mods are clashing. This also began when i started using the latest dev build which has some changes to particles.

You're most likely right it maybe a bug with xeranus's weather mod therefor i will post the issue there aswell. There is also another bug i noticed with xeranus's weather mod anyway i might aswell bring to his attention. Thanks for having a look anyway

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Sat Nov 19, 2016 05:09
by britt
sofar,

I've used your Lightning mod as a dependency of a mod of my own and had to make a few changes to your mod. If you are interested in these changes, I'll figure out how to create a pull request.

Changes:
  • Fixed a bug that would leave the player's sky permanently white after two lightning strikes occur in rapid succession.
  • Added ability to optionally specify the strength of a lightning strike (light, medium, heavy), with a default of "light".
  • Added variation in the damage a player takes based on how close he is to the strike point.

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Sat Nov 19, 2016 16:36
by ErrorNull
cool. i would love to see the changes you've made to this lightening mod. i alsi use it with my mods.

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Mon Nov 21, 2016 03:04
by sofar
britt wrote:sofar,

I've used your Lightning mod as a dependency of a mod of my own and had to make a few changes to your mod. If you are interested in these changes, I'll figure out how to create a pull request.

Changes:
  • Fixed a bug that would leave the player's sky permanently white after two lightning strikes occur in rapid succession.
  • Added ability to optionally specify the strength of a lightning strike (light, medium, heavy), with a default of "light".
  • Added variation in the damage a player takes based on how close he is to the strike point.


Yup, go ahead and make a pull request! Check the github help - it's quite well explained!

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Tue Apr 18, 2017 18:50
by texmex
stu wrote:It's a real shame the particles cannot emit light

This will become possible in the next release, am I right? Just found out and thought of this mod. Perhaps I can create a PR, but I'm no developer.
Use particle glow to brighten up the lightning.

You're already on it I see!

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Tue Apr 18, 2017 23:31
by sofar
texmex wrote:
Use particle glow to brighten up the lightning.

You're already on it I see!


yes, I think I added that 2 months ago already?

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Tue Apr 25, 2017 03:56
by GreenDimond
Are the thunder sounds real thunder samples?

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Tue Apr 25, 2017 05:06
by sofar
GreenDimond wrote:Are the thunder sounds real thunder samples?


From the README:

Sounds:
thunder.1.ogg - CC-BY-SA - hantorio - http://www.freesound.org/people/hantorio/sounds/121945/
thunder.2.ogg - CC-BY-SA - juskiddink - http://www.freesound.org/people/juskiddink/sounds/101948/
thunder.3.ogg - CC-BY-SA - IllusiaProductions - http://www.freesound.org/people/IllusiaProductions/sounds/249950/

Click those links and you can see about the origin yourself!

Re: [Mod]Lightning[Weather,environment,fire]

PostPosted: Tue May 30, 2017 14:52
by Wuzzy
Please list all dependencies in first post, thank you.

Re: [Mod]Lightning[lightning] (weather|environment|fire)

PostPosted: Sat Aug 25, 2018 07:34
by robert2
very need to make chat code to enable / disable lighting.
I try make to code but its only disable lighting ( when write /light false ) but when write /light true its still wont make any strike.... maybe someone can explain why this code dont work ? :)

minetest.register_chatcommand("light", {
params = "<lighting>",
description = "lighting on off",
privs = {lighting= false},

func = function(name, param)

if param == "true" then
lightning.auto = true
minetest.chat_send_player(name,
"lighting enabled")

else
lightning.auto = false
minetest.chat_send_player(name,
"lighting disabled")

return
end
end
})

Re: [Mod]Lightning[lightning] (weather|environment|fire)

PostPosted: Sat Aug 25, 2018 17:19
by Astrobe
That's because the mod uses a timer which is not rearmed once you have set lightning.auto to false.
lightning.strike will rearm it if lightning.auto is true, so all you have to do is call manually lightning.strike() once.

Re: [Mod]Lightning[lightning] (weather|environment|fire)

PostPosted: Thu Oct 11, 2018 20:28
by paulvdv
Thanks for this mod! After some time using it, I find there is too often lightning. How can I control how often there is lightning?