[Mod] TNT [tnt]
- Tedypig
- Member
- Posts: 286
- Joined: Tue Mar 05, 2013 12:33
- IRC: Piggybear87
- In-game: Piggybear
- Location: Largo, FL, USA
Is there a way to make it drop 100% of removed nodes as items?PilzAdam wrote:1/3 of all nodes are dropped as items.Tedypig wrote:Is there a way to make it drop Mese and Diamonds? As of now it just destroys/removes them when it explodes.
01010100 01100101 01100100 01111001 01110000 01101001 01100111
Yes, at least this seemed to work for me when I just tried it. In the init.lua file, lines 10, 11 and 12 need to be commented out so it looks like this.Tedypig wrote:Is there a way to make it drop 100% of removed nodes as items?PilzAdam wrote:1/3 of all nodes are dropped as items.Tedypig wrote:Is there a way to make it drop Mese and Diamonds? As of now it just destroys/removes them when it explodes.
Code: Select all
-- if math.random(1,3) == 3 then
-- return
-- end
Last edited by LionsDen on Fri Jul 05, 2013 04:39, edited 1 time in total.
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
Is there any way to make it more powerful? I was thinking of doing a mod which includes an explosive and I was wondering how to make the explosion of this bigger. I will give credit to PilzAdam and whoever can help.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
I have looked and tested and think I have found out the answer. You may not like it though. Lines 63, 64 and 65 control the size of the damage. they are part of the boom function in init.lua. They look like the following:Dan Duncombe wrote:Is there any way to make it more powerful? I was thinking of doing a mod which includes an explosive and I was wondering how to make the explosion of this bigger. I will give credit to PilzAdam and whoever can help.
Code: Select all
for dx=-2,2 do
for dz=-2,2 do
for dy=2,-2,-1 do
I next tried a smaller number, 4 in place of each 2 and that was far more reasonable. That still gave me an area 9 by 9 by 9 or 729 nodes to check for. This ran much smoother. So if you want really big explosions, you will need to change quite a bit of code and likely at least remove the node drops and velocity calculations or something.
P.S. If you want to remove every node in the area affected, you will need to delete line 79 through 82, look below, but that just leaves a cube.
Code: Select all
else
if math.random(1,5) <= 4 then
destroy(pos)
end
Hope this helps you out.
EDIT: Had to remove one line of code or it would have not been good. I accidentally put line 83 in the last code segment I was showing, you don't want to delete that if you do delete it.
EDIT #2: Just realized, if you do delete those lines, you wont remove any nodes at all. lol You do need them, just modify the numbers to be 5 and 5 or 1 and 1 and it will always remove a node.
Last edited by LionsDen on Fri Jul 05, 2013 08:01, edited 1 time in total.
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
It's the step size for the `for' loop.LionsDen wrote: I haven't played with the -1 value in the dy variable so I'm not sure what that does
If you look, both x and z increase the value each iteration (from -2 to 2), but y does the inverse (from 2 to -2), so the "step" (increment) must be negative (default is 1 if not specified). For more info, I suggest you read the Lua Manual (see §2.4.5).
Last edited by kaeza on Fri Jul 05, 2013 08:37, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
Thankyou! I will probably make it not drop many items. Just so you know, the idea is going to be a part of my mod that only loads if this mod is installed, that adds 'condensed explosives'. i.e. Several TNT compacted into one.
Quick Question: Is there any way of making it not fall when lit? My explosive is intended to be like c4 in MW3- so it sticks to whatever surface you put it on, then blows up.
Quick Question: Is there any way of making it not fall when lit? My explosive is intended to be like c4 in MW3- so it sticks to whatever surface you put it on, then blows up.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
I have the TNT mod installed and the TNT stays wherever I put it. I have yet to have it fall whether it is lit or unlit.Dan Duncombe wrote:Thankyou! I will probably make it not drop many items. Just so you know, the idea is going to be a part of my mod that only loads if this mod is installed, that adds 'condensed explosives'. i.e. Several TNT compacted into one.
Quick Question: Is there any way of making it not fall when lit? My explosive is intended to be like c4 in MW3- so it sticks to whatever surface you put it on, then blows up.
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
Oh! I didn't know that! Thanks for all this help, everyone!
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
- BrunoMine
- Member
- Posts: 1082
- Joined: Thu Apr 25, 2013 17:29
- GitHub: BrunoMine
- Location: SP-Brasil
- Contact:
The TNT makes everything disappear. The blocks should be put in place where it exploded disassembled
Last edited by BrunoMine on Sat Jul 06, 2013 16:04, edited 1 time in total.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
Comunidade Minetest Brasil
www.minetestbrasil.com
- darthvader
- Member
- Posts: 119
- Joined: Sun Sep 08, 2013 14:35
- Location: Death Star
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
Re: [Mod] TNT [tnt]
Hi,
i'm workin on a Minetest - Game and i have your tnt turn in to a Terrabomb.
There dosnt destroy blocks but removed it to default dirt.
simply insert Line
minetest.set_node(pos, {name="default:dirt"})
and delete the dropsection
I hope ist ok for you?
A have a lot of other questions.. because i use other Mods from you like Mobs. But i cant send PM...
There write "conntact a Admin" when u cant send a pm..but how i can conntact when i cant send pm's?
My english is so poor and i cant figure it out
So i try it on this way to conntact you.
Sorry
So pls pm me..an do it on german ;)
i'm workin on a Minetest - Game and i have your tnt turn in to a Terrabomb.
There dosnt destroy blocks but removed it to default dirt.
simply insert Line
minetest.set_node(pos, {name="default:dirt"})
and delete the dropsection
I hope ist ok for you?
A have a lot of other questions.. because i use other Mods from you like Mobs. But i cant send PM...
There write "conntact a Admin" when u cant send a pm..but how i can conntact when i cant send pm's?
My english is so poor and i cant figure it out
So i try it on this way to conntact you.
Sorry
So pls pm me..an do it on german ;)
Re: [Mod] TNT [tnt]
Awesome mod
Re: [Mod] TNT [tnt]
I noticed the 0.4.10 standard game includes a variation of this mod. I'm wondering where all that radius code came from.
Re: [Mod] TNT [tnt]
Hi Adam (not calling you Pilz <--- please take note of this), anyone else who knows,
Is there a way to make other nodes respond to burning gunpowder? I'm working on a mod that logically should go boom if in contact with a string of burning gunpowder, see... (well, according to cartoon logic, anyway, which is the best kind of logic).
I mean, I know there are ways, there always are ways... but is there something you specifically recommend I do?
Solutions like checking adjacent nodes ever n ticks seem kinda... lag-inducing...
TIA!
Greetz.
DD.
Is there a way to make other nodes respond to burning gunpowder? I'm working on a mod that logically should go boom if in contact with a string of burning gunpowder, see... (well, according to cartoon logic, anyway, which is the best kind of logic).
I mean, I know there are ways, there always are ways... but is there something you specifically recommend I do?
Solutions like checking adjacent nodes ever n ticks seem kinda... lag-inducing...
TIA!
Greetz.
DD.
- Wuzzy
- Member
- Posts: 4804
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] TNT [tnt]
KzoneDD, you can use ABMs for that. I don't know how well they perform but that's the way how the tnt mod does it.
Besides, the tnt mod already has a “string” of gunpowder (it does not look like a string but behaves like one), just place gunpowder on the ground and ignite it with torch. I don't know why you want to make another mod for the same feature.
Note that Minetest Game also has a tnt mod. In this one there are actual gunpowder strings.
By the way:
I just looked into the Minetest Game tnt mod and noticed that gunpowder is actually only ignited by lava and fire, hardcoded. It would have been better if groups are used IMO.
Besides, the tnt mod already has a “string” of gunpowder (it does not look like a string but behaves like one), just place gunpowder on the ground and ignite it with torch. I don't know why you want to make another mod for the same feature.
Note that Minetest Game also has a tnt mod. In this one there are actual gunpowder strings.
By the way:
I just looked into the Minetest Game tnt mod and noticed that gunpowder is actually only ignited by lava and fire, hardcoded. It would have been better if groups are used IMO.
-
- Member
- Posts: 1084
- Joined: Sat Apr 18, 2015 15:50
- IRC: poke
- In-game: poke
- Location: Somewhere in the Universe, on a weird planet called Earth/
Re: [Mod] TNT [tnt]
ACDC-TNT
BOOOOOOM!
Can you make it respond to mesecon, or is it already?
BOOOOOOM!
Can you make it respond to mesecon, or is it already?
ARE YOU A NYAN CAT?????
--ABJ
--ABJ
Re: [Mod] TNT [tnt]
I actually want to use the existing mod. :)
An ABM seems like an 'always-on' solution, which in my limited understanding == extra lag.
That's why I was wondering if there was a 'on demand' solution.
An ABM seems like an 'always-on' solution, which in my limited understanding == extra lag.
That's why I was wondering if there was a 'on demand' solution.
-
- Member
- Posts: 3015
- Joined: Sun Jan 18, 2015 13:02
- GitHub: ABJ-MV
- In-game: ABJ
- Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.
Re: [Mod] TNT [tnt]
Check this out guys!
Realistic TNT explosion demo
I will continue improving it, I know there is still room, but I feel the devs really should take a look.
Also, don't talk about lag before actually testing my mod. I personally find it less laggy than many default blasts I've experienced.
Realistic TNT explosion demo
I will continue improving it, I know there is still room, but I feel the devs really should take a look.
Also, don't talk about lag before actually testing my mod. I personally find it less laggy than many default blasts I've experienced.
- Andrey01
- Member
- Posts: 2579
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: [Mod] TNT [tnt]
Simple red TNT has default in game
Re: [Mod] TNT [tnt]
hi!!!
this mod doesn't work for me, i enable it, then when i click to join the server immediately shuts down
2022-02-23 15:14:29: ERROR[Main]: ModError: Failed to load and run script from C:\Users\whyulookinPC\Downloads\minetest-5.4.1-win64\minetest-5.4.1-win64\bin\..\mods\pilzadam_tnt_d6a0b7d\init.lua:
2022-02-23 15:14:29: ERROR[Main]: ...64\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:65: Name tnt:tnt does not follow naming conventions: "pilzadam_tnt_d6a0b7d:" or ":" prefix required
2022-02-23 15:14:29: ERROR[Main]: stack traceback:
2022-02-23 15:14:29: ERROR[Main]: [C]: in function 'error'
2022-02-23 15:14:29: ERROR[Main]: ...64\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:65: in function 'check_modname_prefix'
2022-02-23 15:14:29: ERROR[Main]: ...64\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:115: in function 'register_item'
2022-02-23 15:14:29: ERROR[Main]: ...64\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:208: in function 'register_node'
2022-02-23 15:14:29: ERROR[Main]: ...st-5.4.1-win64\bin\..\mods\pilzadam_tnt_d6a0b7d\init.lua:112: in main chunk
2022-02-23 15:14:29: ERROR[Main]: Check debug.txt for details.
2022-02-23 15:14:29: ACTION[Main]: Server: Shutting down
this mod doesn't work for me, i enable it, then when i click to join the server immediately shuts down
2022-02-23 15:14:29: ERROR[Main]: ModError: Failed to load and run script from C:\Users\whyulookinPC\Downloads\minetest-5.4.1-win64\minetest-5.4.1-win64\bin\..\mods\pilzadam_tnt_d6a0b7d\init.lua:
2022-02-23 15:14:29: ERROR[Main]: ...64\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:65: Name tnt:tnt does not follow naming conventions: "pilzadam_tnt_d6a0b7d:" or ":" prefix required
2022-02-23 15:14:29: ERROR[Main]: stack traceback:
2022-02-23 15:14:29: ERROR[Main]: [C]: in function 'error'
2022-02-23 15:14:29: ERROR[Main]: ...64\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:65: in function 'check_modname_prefix'
2022-02-23 15:14:29: ERROR[Main]: ...64\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:115: in function 'register_item'
2022-02-23 15:14:29: ERROR[Main]: ...64\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:208: in function 'register_node'
2022-02-23 15:14:29: ERROR[Main]: ...st-5.4.1-win64\bin\..\mods\pilzadam_tnt_d6a0b7d\init.lua:112: in main chunk
2022-02-23 15:14:29: ERROR[Main]: Check debug.txt for details.
2022-02-23 15:14:29: ACTION[Main]: Server: Shutting down
Who is online
Users browsing this forum: No registered users and 3 guests