[Mod] exploding chest [explodingchest]

Post Reply
Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

[Mod] exploding chest [explodingchest]

by Coder12 » Post

This mod provides a framework to make a volatile chest or storage nodes which explode if it contains any registered explosive materials.
License: MIT
Mod dependencies: tnt
Optional mod dependencies: tnt_revamped Make chest volatile

By setting the chest's group to volatile it will be able to explode, Also it can be made into a trap chest.

Example:

Code: Select all

groups = {volatile = 1}

Setting explosive materials


On any node or item that is to be explosive, set its group to explosive = [insert number]. The number is the radius of the explosion.

Example:

Code: Select all

groups = {explosive = 3}

Trap chest


To make a trap chest place the explodingchest:trap craftitem into any volatile chest. If the chest contains any explosive materials it will blow up on right click.
explodingchest:trap Has no crafting receipt. You have to give it one. These settings can be changed in advanced settings.

To limit the size of the explosion.

Code: Select all

explodingchest.explosion_max = 11
The way the explosion is calculated.
Multiply means explosive material is multiplied.
Reduce means the initial explosion size is set to the biggest explosive material then the rest is dividend by reduce.

Code: Select all

explodingchest.radius_comput = "multiply"
The amount to divide by. (this is only in use if radius_comput is set to reduce)

Code: Select all

explodingchest.reduce = 288

Blast Type


Instant blast type means the volatile container will blow up in 0 seconds.
Entity blast type means the volatile container will turn into a entity (You need tnt_revamped mod turn on for this)
Timer blast type means the volatile container will have a delay before blowing up.

Code: Select all

explodingchest.blast_type (Blast type) = "timer"
This setting is for when the volatile container is opened and theres a trap craftitem inside.
Instant blast type means the volatile container will blow up in 0 seconds.
Entity blast type means the volatile container will turn into a entity (You need tnt_revamped mod turn on for this)
Timer blast type means the volatile container will have a delay before blowing up.

Code: Select all

explodingchest.trap_blast_type (Trap blast) = "instant"
Blast delay timer (only works for entity and timer)
If timer is set to zero then the timer is auto set to the blast radius size.

Code: Select all

explodingchest.timer = 0
Image ContentDB
Browse Code
Download
Attachments
screenshot_20190519_185837.png
screenshot_20190519_185837.png (359.52 KiB) Viewed 1201 times
Last edited by Coder12 on Mon Sep 06, 2021 00:09, edited 18 times in total.

Mineminer
Member
Posts: 325
Joined: Mon Mar 05, 2018 04:05

Re: [Mod] exploding chest [explodingchest]

by Mineminer » Post

Gotta admit that is pretty neat little "extra" type of mod. :)

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

Re: [Mod] exploding chest [explodingchest]

by xeranas » Post

Does explosion size depends on how much powder is on chest?

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: [Mod] exploding chest [explodingchest]

by Coder12 » Post

xeranas wrote:Does explosion size depends on how much powder is on chest?
Yes.

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [Mod] exploding chest [explodingchest]

by TechNolaByte » Post

Coder12 wrote:
xeranas wrote:Does explosion size depends on how much powder is on chest?
Yes.
what's the max? and does it have a limit so if i use a /giveme command to give a stack with over 99 items in it or change the stack max will it still have a bigger explosion?
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: [Mod] exploding chest [explodingchest]

by Coder12 » Post

RSLRedstonier wrote:
Coder12 wrote:
xeranas wrote:Does explosion size depends on how much powder is on chest?
Yes.
what's the max? and does it have a limit so if i use a /giveme command to give a stack with over 99 items in it or change the stack max will it still have a bigger explosion?
All right I updated the mod. You can now limit the size of the explosion. Just go to settings.lua file. And plus get ready for exploding cabinets I add more container types.

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: [Mod] exploding chest [explodingchest]

by ChimneySwift » Post

Huh. Neat. +1. Everybody make sure you keep your gunpowder storage away from the edge of your protection. :P
A spoon is basically a tiny bowl with a stick on it

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: [Mod] exploding chest [explodingchest]

by Coder12 » Post

I am working on trap chest's for the next update. If you try to open the chest it goes Ka-Boom :). If there is a chest mod I missed or something you want added just leave a reply.

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: [Mod] exploding chest [explodingchest]

by ChimneySwift » Post

Coder12 wrote:If there is a chest mod I missed or something you want added just leave a reply.
How about technic_chests?
A spoon is basically a tiny bowl with a stick on it

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: [Mod] exploding chest [explodingchest]

by Coder12 » Post

ChimneySwift wrote:
Coder12 wrote:If there is a chest mod I missed or something you want added just leave a reply.
How about technic_chests?
okay that will be added too.

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] exploding chest [explodingchest]

by Linuxdirk » Post

Coder12 wrote:Just go to settings.lua file.
Better use settingtypes.txt for that.

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: [Mod] exploding chest [explodingchest]

by Coder12 » Post

Allright I updated the mod it now has support for technic chests and I added craftable trap chests that explode when right-clicked. And I added settingtypes.txt so you can change the settings through the game software. Thanks Linuxdirk for suggesting that.

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

Re: [Mod] exploding chest [explodingchest]

by azekill_DIABLO » Post

this is awesome! Does they explode when fire is near? it should technically!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: [Mod] exploding chest [explodingchest]

by Coder12 » Post

The mod was updated. It now has more storage containers being mailboxes and locked chest. Plus I added two new settings.

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: [Mod] exploding chest [explodingchest]

by Coder12 » Post

I re-done the mod. alot of dependencies where removed. Read the topic you now do things through node groups.

User avatar
TenPlus1
Member
Posts: 3721
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] exploding chest [explodingchest]

by TenPlus1 » Post

Great idea :)

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: [Mod] exploding chest [explodingchest]

by Coder12 » Post

W.I.P changes. I'm gonna allow the volatile container to become a entity (You will need the tnt_revamped mod turned on for that)
Heres a video to show you what I am talking about :)
Last edited by Coder12 on Wed May 05, 2021 06:01, edited 1 time in total.

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: [Mod] exploding chest [explodingchest]

by Coder12 » Post

Done but there seems to be a bug with the volatile container's on_blast function, it keeps using the default one even tho its overridden.

Coder12
Member
Posts: 162
Joined: Sat Sep 30, 2017 00:15

Re: [Mod] exploding chest [explodingchest]

by Coder12 » Post

I fixed it. does anyone know how to rotate the entity by the nodes param2?

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests