[Patch] Add randomness to Sfan5's nuke mod

lkjoel
Member

Posts: 779
Joined: Wed Feb 29, 2012 19:27
Location: Gallifrey

[Patch] Add randomness to Sfan5's nuke mod

Well, I tried the nuke mod, and sfan5 did a great job, but the explosions were too spherical, so I decided to use my friend: Math.random!
So here is the new explosion (Hardcore MESE TNT), Before:

After:

I like that better than circles :P
So here is the patch:
Code: Select all
`0a1,4> -- Math.random variables> mrmin = -5> mrmax = 5> 116c120<             if x*x+y*y+z*z <= IRON_TNT_RANGE * IRON_TNT_RANGE + IRON_TNT_RANGE then--->             if x*x+y*y+z*z <= (IRON_TNT_RANGE + math.floor(math.random(mrmin,mrmax))) * (IRON_TNT_RANGE + math.floor(math.random(mrmin,mrmax))) + (IRON_TNT_RANGE + math.floor(math.random(mrmin,mrmax))) then229c233<             if x*x+y*y+z*z <= MESE_TNT_RANGE * MESE_TNT_RANGE + MESE_TNT_RANGE then--->             if x*x+y*y+z*z <= (MESE_TNT_RANGE + math.floor(math.random(mrmin,mrmax))) * (MESE_TNT_RANGE + math.floor(math.random(mrmin,mrmax))) + (MESE_TNT_RANGE + math.floor(math.random(mrmin,mrmax))) then`

Note that each TNT can have an explosion from 5 blocks shallower to 5 blocks deeper (this can be changed with the mrmin and mrmax variables).
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.

jordan4ibanez
Member

Posts: 1895
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez
THATS AWESOME! :D
I've been gone for a long time

sfan5
Moderator

Posts: 3829
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5
Amazing! :D
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

lkjoel
Member

Posts: 779
Joined: Wed Feb 29, 2012 19:27
Location: Gallifrey
Thanks! It looks really cool when you start making a huge crater out of many hardcore mese's:
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.

jordan4ibanez
Member

Posts: 1895
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez
ikjoel do you mind if i include this into my repo? :)
I've been gone for a long time

lkjoel
Member

Posts: 779
Joined: Wed Feb 29, 2012 19:27
Location: Gallifrey
sure! Where is your repo? EDIT: wow, I never look at people's signatures. I found it
Last edited by lkjoel on Tue Apr 10, 2012 20:44, edited 1 time in total.
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.

LolManKuba
Member

Posts: 939
Joined: Fri Feb 10, 2012 22:36
lkjoel wrote:Thanks! It looks really cool when you start making a huge crater out of many hardcore mese's:

Nice.

bgsmithjr
Member

Posts: 436
Joined: Thu Mar 08, 2012 23:21
Location: USA,Michigan
I like spherical, it is more realistic, your nukes have nails in them, lol.

Mito551
Member

Posts: 1271
Joined: Sat Jun 16, 2012 15:03
how do i install this?

Topywo
Member

Posts: 1721
Joined: Fri May 18, 2012 20:27
Mito551 wrote:how do i install this?

I'm not 100% sure, but I think you have to open init.lua. Then jump to the number 116 and 229 and replace the < sentence with the > sentence. For both the Iron and the mese TNT.

Mito551
Member

Posts: 1271
Joined: Sat Jun 16, 2012 15:03
oh, that makes it easy, thanks!

cosarara97
Member

Posts: 180
Joined: Tue Nov 01, 2011 18:53
I think the explosion should destroy weak materials (trees, fences, etc.) in a bigger range than stone or dirt, because it's still unrealistic now.
:D