[Mod] Explosives [WIP] [git] [explosives]

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

[Mod] Explosives [WIP] [git] [explosives]

by vitalie » Sat May 21, 2016 15:52

When they invented explosives, they thought they were helping miners. Put a TNT block, add a gunpowder trail, touch it with a torch and get a nicely shaped explosion crater, all from a safe distance. However, their peaceful invention turned into deadly weapons -- bombs, grenades, and mines. All it took was a fuze.

Imagine yourself doing your usual tasks: digging some stuff, placing some other stuff. You thrust your shovel into the dirt, but instead of the usual earthly sound you hear ... a click. A fuze! You have just touched a land mine, and all you have left is a short moment before it explodes... Boom!!!

ImageImage
ImageImage

Mod details
This mode is build on top of the standard TNT mod (it's part of the standard subgame, but you still need to enable it in minetest.conf). It adds mines and techniques to conceal them in the ground. Punch a mine -- boom. Step on it -- boom. Place something on it -- boom.

Attach a bottle and some cable to a land mine and you get a naval mine. It will float in water and acoustically detect nearby players.

Attach a DIY clock to a land mine and you get a time bomb. You can set the time (1 second to 1 hour) and it will blow up right in time.

Warning: A placed mine needs to be armed (by right-clicking and pressing the 'Arm' button). It takes 30 seconds, and can be canceled. After a mine is armed, there is no way to disarm it. Same with time bombs, after the timer was started, there's no way to stop it (you can git the bomb though).

New items
  • Fuze ('explosives:fuze')
  • Land mine ('explosives:landmine')
  • Land mine concealed in dirt ('explosivese:landmine_dirt')
  • Land mine concealed in dirt with grass ('explosives:landmine_dirt_with_grass')
  • Naval mine
  • Cable reel for naval mines ('explosives:navalmine_cable')
  • Time bomb
  • Hourglass for time bombs
  • A warning sign ('explosives:minefield_sign')
  • more to come

Crafting recipes:
+ Spoiler


Mod dependencies: default, tnt, intllib (optional), dye (optional), vessels (optional)
Download latest dev branch
GitHub https://github.com/ciubotaru/explosives

License
  • Code: GPLv3 or later
  • Resources: CC-BY-SA 4.0 or later

ToDO
  • More concealed mines (sand, gravel etc.) -- suggested by Naj
  • 'Anti-personnel mine' style, doing more damage to players and less to the terrain

+ FYI

------
Last updated: June 2, 2016
Attachments
2016-05-26-235033_802x630_scrot.png
(184.75 KiB) Not downloaded yet
2016-05-22-005026_802x630_scrot.png
(159.19 KiB) Not downloaded yet
Last edited by vitalie on Tue Jun 28, 2016 05:57, edited 8 times in total.
 

User avatar
Krock
Developer
 
Posts: 4141
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Mod] Land mines [WIP] [git] [landmine]

by Krock » Sat May 21, 2016 15:57

This is a bombastic good mod. Are there plans for stronger landmines? Perhaps to make sure that someone's really dead.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
Nathan.S
Member
 
Posts: 807
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Land mines [WIP] [git] [landmine]

by Nathan.S » Sat May 21, 2016 21:42

This looks great for PVP gameplay.

Would there be anyway to make the land mines explode when a player walks on top of them? I know Mesecons has pressure plates which can detect when a player stands on them, maybe some of that code could be used to make the mines detonate when a player walks on them.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

Re: [Mod] Land mines [WIP] [git] [landmine]

by vitalie » Sun May 22, 2016 15:01

Krock wrote:Are there plans for stronger landmines? Perhaps to make sure that someone's really dead.
No specific plans. Everything depends on users' feedback.

Currently, the explosion functionality is identical to TNT (a detonated landmine turns into burning TNT and explodes).
 

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

Re: [Mod] Land mines [WIP] [git] [landmine]

by vitalie » Sun May 22, 2016 15:08

Nathan.S wrote:Would there be anyway to make the land mines explode when a player walks on top of them?
They do explode when a player walks on them. However:
* It's being checked by ABM once a second. So if a player moves over a landmine quickly enough, the landmine might miss him.
* The detection radius is a bit less then one block. This means that a landmine will not detonate if the player only steps on the corner.
* Detonation is not immediate. The player has about 3 seconds to run away after the landmine locked ("clicked").
 

User avatar
Nathan.S
Member
 
Posts: 807
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Land mines [WIP] [git] [landmine]

by Nathan.S » Sun May 22, 2016 22:55

I guess I should have tried it out before leaving my comment. ;)
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
 

User avatar
ExeterDad
Member
 
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
Location: New Hampshire U.S.A
In-game: ExeterDad

Re: [Mod] Land mines [WIP] [git] [landmine]

by ExeterDad » Mon May 23, 2016 00:39

This is a fun mod for sure :D
It did feel a bit cruel placing "grass blocks" in the area of my kids houses. They blend right in.

I love being me sometimes!
 

User avatar
Nathan.S
Member
 
Posts: 807
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Land mines [WIP] [git] [landmine]

by Nathan.S » Wed May 25, 2016 15:12

Is there a reason that the grass turns into the mine once triggered and then turns into tnt? I guess I understand it turning into the mine as a visual cue for players, but why turn it into TNT?
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
 

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

Re: [Mod] Land mines [WIP] [git] [landmine]

by vitalie » Thu May 26, 2016 03:39

Nathan.S wrote:Is there a reason that the grass turns into the mine once triggered and then turns into tnt? I guess I understand it turning into the mine as a visual cue for players, but why turn it into TNT?
1. Yes, it goes click as a sound clue and turns into a normal mine block as a visual clue for players to run away.
2. Currently the mod lacks the explosion functionality. So in order to blast a mine, I had to shortly turn it into a burning TNT block and set timer to 0. Of course, it doesn't have to stay this way. Moreover, besides visual inconsistency, this mechanism has another drawback -- a landmine is a 'falling node', so if the mine is falling down, sometimes the TNT block will not replace it, but will appear above it.

Update: now the mod calls the explosion function directly from TNT mod (who knew it's a public function?!), without replacing mines with TNT blocks.

Naj wrote:Two ideas :
- Make landmines explose even if they are hidden one block below surface (allow to hide normal lanmines under a bloc of dirt, sand or whatever) when player walks on the above block.
- Make it possible to have random landmines (that does not explode everytime a player walks on it).

And why not also sea mines ?
Thank you for the ideas.
#1 is doable, but I think it's not realistic. One block is supposed to be 1 meter deep. Hiding a landmine 1 meter deep and expecting it to explode doesn't sound natural to me. I would rather create more camouflage options (like sand, gravel.
#2 is sort of implemented. The mine checks for players once a second, so if a player normally walk over a landmine without stopping, it might not 'notice' him/her.

Krock wrote:Are there plans for stronger landmines? Perhaps to make sure that someone's really dead.
I guess I will have to change the explosion mechanics to deal more damage to players and less to surrounding blocks.
A naval mine sounds great! That should be an acoustic naval mine, that explodes when a player moves in water around it. Thank you!!!
Last edited by vitalie on Thu May 26, 2016 14:44, edited 2 times in total.
 

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

Re: [Mod] Land mines [WIP] [git] [landmine]

by vitalie » Thu May 26, 2016 03:48

A question to everyone: should landmines react to other (non-player) objects?

Scenario 1: A player drops something on a land mine. Should it explode? If yes, should it destroy the object?

Scenario 2: A mob (think sheep or rat) walks over a land mine. Should it explode? If yes, should it destroy the mob?
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

Re: [Mod] Land mines [WIP] [git] [landmine]

by vitalie » Sun May 29, 2016 16:54

Updates:
  • Mines are crafted unarmed (sorta harmless). After placing, they need to be armed (right-click button). It takes 30 seconds for a landmine to arm (can be canceled/unarmed).
  • Landmines (armed and unarmed alike), just like TNT blocks, will explode if punched by a torch.
 

User avatar
DS-minetest
Member
 
Posts: 1021
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Land mines [WIP] [git] [landmine]

by DS-minetest » Mon May 30, 2016 16:26

  • the mines take a too much time to explode after a player walks on it
  • (the explosion should maybe go further along the y axis)
  • +a mine, when you walk on it its ok, but if you go away then, it explodes
  • disarm:click with screwdriver 10 times, wait 10-20 seconds between clicks, if less than 10 seconds, it explodes, if more 20 seconds, you have to begin again
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

Re: [Mod] Land mines [WIP] [git] [landmine]

by vitalie » Mon May 30, 2016 16:55

DS-minetest, thank you for the comments.
DS-minetest wrote:the mines take a too much time to explode after a player walks on it
Yeah, I guess 3 seconds is too long for a typical player in normal circumstances. On the other hand, if it explodes immediately and instantly kills the player, he/she won't even understand what happened (which is not fair). Maybe 1 second would be more balanced.

DS-minetest wrote:(the explosion should maybe go further along the y axis)
Good idea, but a lot of work.

DS-minetest wrote:+a mine, when you walk on it its ok, but if you go away then, it explodes
Yeah, but we can do "/home", "/spawn", "/teleport" etc., or just log out. On a related note, naval mines with acoustic detonation are underway -- they explode even if you simply pass by.

DS-minetest wrote:disarm:click with screwdriver 10 times, wait 10-20 seconds between clicks, if less than 10 seconds, it explodes, if more 20 seconds, you have to begin again
Great idea!
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Land mines [WIP] [git] [landmine]

by azekill_DIABLO » Mon May 30, 2016 17:18

@Ds-Minetest, i prefer running like a KAMIKAZE and to have luck than waiting two hour for disamring a bomb!LOL
 

User avatar
DS-minetest
Member
 
Posts: 1021
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Land mines [WIP] [git] [landmine]

by DS-minetest » Tue May 31, 2016 16:19

azekill_DIABLO wrote:@Ds-Minetest, i prefer running like a KAMIKAZE and to have luck than waiting two hour for disamring a bomb!LOL

well, 100-200 seconds, so only ~2-3 minutes..., yeah, but it would be unfair for the player who placed the mine to simply let other players remove it
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

Re: [Mod] Land mines [WIP] [git] [landmine]

by vitalie » Wed Jun 01, 2016 17:01

Announcing naval mines.

Image

Attach a bottle and some cable to a land mine and you get a naval mine! The bottle works as a flotation device, i.e. makes it float (sometimes even drift) just under the surface of water, and as an acoustic sensor, i.e. detects players around and detonates if someone comes too close. The reel of cable attaches the mine to the seabed.

To craft a reel of cable place a block of wood in the middle and 8 steel ingots around.
To craft a naval mine, randomly place a bottle (or any other vessel), a reel of cable and a land mine.

To arm a naval mine, place it on seabed and activate. After arming it will go up to the surface and stabilize there. If you destroy the cable, the mine will randomly drift.

Disclaimer: Don't attempt this at home.
Attachments
2016-06-02-015826_802x630_scrot.png
(128.14 KiB) Not downloaded yet
 

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

Re: [Mod] Land mines [WIP] [git] [landmine]

by sofar » Wed Jun 01, 2016 17:51

If you use a NodeTimer instead of an ABM, it's possible to achieve much higher accuracy detecting players. If the server owner changes the minetest.conf setting nodetimer_interval to e.g. 0.1, then node timers can be executed 10x per second. ABM's have a maximum frequency of 1/second, but nodetimers have no frequency limit and can get executed 10s of times per second if configured properly.
 

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

Re: [Mod] Land mines [WIP] [git] [landmine]

by vitalie » Thu Jun 02, 2016 03:21

sofar wrote:If you use a NodeTimer instead of an ABM, it's possible to achieve much higher accuracy detecting players. If the server owner changes the minetest.conf setting nodetimer_interval to e.g. 0.1, then node timers can be executed 10x per second. ABM's have a maximum frequency of 1/second, but nodetimers have no frequency limit and can get executed 10s of times per second if configured properly.
Thank you for the hint! I didn't know ABMs can not fire up more than once per second.

Actually I think once per second is just enough for our purpose (some false negatives make it more realistic). Moreover, early explosion is undesirable -- the player will never get close enough to sustain high damage.

A more important issue is CPU usage -- if timers are more efficient than ABMs then I would rewrite the code.
 

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

Re: [Mod] Land mines [WIP] [git] [landmine]

by vitalie » Thu Jun 02, 2016 14:59

Is a mesh any better than a nodebox?

Image

b3d model 54 kiB + one texture 159 kiB sounds like too heavy to me.
Attachments
2016-06-02-235504_802x630_scrot.png
(106.99 KiB) Not downloaded yet
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
DS-minetest
Member
 
Posts: 1021
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Land mines [WIP] [git] [landmine]

by DS-minetest » Thu Jun 02, 2016 17:09

the good old nodebox was nicer
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
Nathan.S
Member
 
Posts: 807
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Land mines [WIP] [git] [landmine]

by Nathan.S » Thu Jun 02, 2016 23:29

Obj might be smaller than the b3d file.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
 

vitalie
Member
 
Posts: 66
Joined: Wed Feb 24, 2016 07:38
GitHub: ciubotaru

Re: [Mod] Land mines [WIP] [git] [landmine]

by vitalie » Wed Jun 08, 2016 15:56

Nathan.S wrote:Obj might be smaller than the b3d file.
Yes, .obj turned out to be smaller. Let it be .obj then.
 

Next

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 8 guests

cron