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

MoNTE48
Member
Posts: 323
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
Location: Internet

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

by MoNTE48 » Post

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>

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Post

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.

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

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

by jp » Post

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

MoNTE48
Member
Posts: 323
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
Location: Internet

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

by MoNTE48 » Post

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.

MoNTE48
Member
Posts: 323
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
Location: Internet

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

by MoNTE48 » Post

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

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Post

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.

MoNTE48
Member
Posts: 323
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
Location: Internet

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

by MoNTE48 » Post

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

User avatar
rpgsniper2452
New member
Posts: 8
Joined: Mon May 16, 2016 15:04
GitHub: rpgsniper2452
IRC: rpgsniper2452
In-game: rpgsniper2452

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

by rpgsniper2452 » Post

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.

User avatar
xeranas
Member
Posts: 162
Joined: Fri Feb 05, 2016 11:06

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

by xeranas » Post

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).

User avatar
Diamond knight
Member
Posts: 475
Joined: Sun Apr 19, 2015 19:50
GitHub: Diamondknight
In-game: Ferrumprinceps
Location: Chilling in Constantinople
Contact:

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

by Diamond knight » Post

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

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

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

by Dopium » Post

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

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Post

I tested latest lightning, MT and mymonths. Watched several lightning strikes and had no errors or crashes.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Post

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.

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

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

by Dopium » Post

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

britt
New member
Posts: 8
Joined: Tue Aug 09, 2016 00:42

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

by britt » Post

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.

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

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

by ErrorNull » Post

cool. i would love to see the changes you've made to this lightening mod. i alsi use it with my mods.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Post

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!

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

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

by texmex » Post

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!

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Post

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?

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

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

by GreenXenith » Post

Are the thunder sounds real thunder samples?
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Post

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/juskidd ... ds/101948/
thunder.3.ogg - CC-BY-SA - IllusiaProductions - http://www.freesound.org/people/Illusia ... ds/249950/

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

User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

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

by Wuzzy » Post

Please list all dependencies in first post, thank you.

robert2
New member
Posts: 1
Joined: Sat Aug 25, 2018 07:10
GitHub: --
IRC: --
In-game: robert2

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

by robert2 » Post

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
})

Astrobe
Member
Posts: 570
Joined: Sun Apr 01, 2018 10:46

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

by Astrobe » Post

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.

paulvdv
Member
Posts: 20
Joined: Sat Sep 22, 2018 11:01

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

by paulvdv » Post

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?

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests