Space Engineers

Space Engineers

54 ratings
Terminal Block Explosions
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script
File Size
Posted
Updated
510.133 KB
28 Mar, 2017 @ 5:43am
8 Apr, 2017 @ 7:20pm
5 Change Notes ( view )

Subscribe to download
Terminal Block Explosions

Description
This mod adds explosive damage to most terminal blocks: when they are destroyed by any damage type other than grinding, they will explode.

This does NOT mean that with two hits from a small gatling your enemy's capital ship will disappear in a flurry of particles; you still have to completely destroy the target block, and the explosions are scaled so that sensibly designed ships (nine large reactors in a 9x9x9 space is NOT sensibly designed!) will not be incapacitated from just a missile or two. In my opinion it feels more realistic that, upon destroying a large thruster, you see damage to surrounding blocks and a nice little explosion effect.

You can configure your own block damage amounts! But first, here is the default list of total damage output by abbreviated block Subtype, for large blocks:

SolarPanel 25
Assembler 50
CryoChamber 50
RemoteControl 50
GatlingTurret 100
Furnace 100
Cockpit 100
OxygenTank 100
Gyro 100
OxygenFarm 100
Grinder 100
Welder 100
OxygenGenerator 150
BatteryBlock 200
MissileTurret 200
Refinery 200
Launcher 200
VirtualMass 200
SpaceBall 200
HydrogenTank 250
JumpDrive 500

SmallGenerator 200
LargeGenerator 1000

SmallThrust 100
LargeThrust 400
SmallAtmosphericThrust 100
LargeAtmosphericThrust 400
SmallHydrogenThrust 200
LargeHydrogenThrust 800

For the equivalent small blocks, the damage is 1/5th that shown above. For modded blocks: if their SubtypeID contains one of the search strings above, they'll also trigger the effect (e.g. Miniaturized Jump Drives.)

In terms of the physical size of the explosion, i.e. how far the shrapnel flies: you can determine the radius by dividing the total damage by twenty. So when a jump drive is destroyed, 500 points total damage will be delivered over a 25m radius, with closer blocks damaged more than distant blocks. As a comparison, a vanilla 200mm missile also delivers 500 points damage, but over just four metres' radius, so the damage per block is higher (as you would expect from a missile!)

As I mentioned, grind damage is exempt so you should be safe-ish relocating that misplaced reactor. I tested it out with a couple of awesome Star Wars blueprints which were here on the workshop, and I can tell you clusters of thrusters are not ideal (the chain reaction, as pictured, was fun to watch even with the lag!) Make sure your large reactors (that's the LargeGenerator SubtypeID) are shielded and go wreak havoc on poorly designed enemies!

CHANGING THE CONFIGURATION ON YOUR MACHINE: On first run, this mod will create a config.cfg file (find your game directory, it should be in /Storage/893208775.sbm_IndustrialAutomaton_TerminalBlockExplosions/) which contains the settings for each default block type. By changing the Damage field, you can customise the mod to suit your server. Note: to have a block do nil explosion damage, just set the damage amount to zero, as default block types will get reset if you just delete an entry! You CAN add more types to the list, including modded blocks - just tack the subtypeid and a damage count on the bottom following the same format. If the mod detects the file is corrupted it will rebuild it, so don't stress too much about editing it.

MAINTENANCE NOTE: The 1.181 update which brought multithreaded physics to the game, also brought massive performance drops on my systems. The continuous stream of minor updates and hotfixes since has done nothing to improve performance over 1.180.600, and have solved less issues than they have caused. My own server has been reverted (via subscribing to the 1.180 Beta) to the stable, smooth and enjoyable experience SE gave me back then, and as this mod works well with this reversion I have no plans to keep it maintained for broken later versions.
Please don't use comments below to engage in criticism of the game, and the best of luck to the Keen developers who hopefully will eventually give us the SE experience we all hope for. I'll continue to read comments and respond when I can.
Apologies if this decision affects your enjoyment of the game.
37 Comments
lord.riker 11 Apr @ 4:24am 
Hey, do you mind if I upload a modified version of this mod?
Farro 17 Sep, 2020 @ 6:45pm 
@Squidtank my cfg file doesn't even have that many lines in it lol
Suddenly, Melons 14 Aug, 2020 @ 9:31pm 
@Squidtank where is the location of the file that needs to be modified? is it the .cfg mentioned in the description?
Squidtank 10 Aug, 2020 @ 12:35pm 
@Ferrin It's line 166, put in a few lines for reference:
Vector3D myPos = grid.GridIntegerToWorld(slimBlock.Position);
BoundingSphereD sphere = new BoundingSphereD(myPos, maxRange);
MyExplosionInfo bomb = new MyExplosionInfo(maxDamage, maxDamage, sphere, MyExplosionTypeEnum.BOMB_EXPLOSION, myTB!=null, true);
bomb.CreateParticleEffect = false;
MyExplosions.AddExplosion(ref bomb, true);

Sorry for late reply, i think the comma you put after my name stopped it from pinging me.
Ferrin 16 Jul, 2020 @ 4:18pm 
@squidtank, where did you add that to the script?
Squidtank 24 May, 2020 @ 8:26am 
I was able to suppress the effect by adding bomb.CreateParticleEffect = false; to the script which I saw the Shrapnel script had and things blow up plenty good still but without the weird lines. Thanks for making this script, makes combat go from making ships fall apart to making them go kaboom.
Squidtank 24 May, 2020 @ 7:02am 
This mod does still work and I think it makes combat a lot better. There is a particle problem where its showing some colored lines instead of explosions when you are shooting blocks. If anyone knows how to tweak the script to fix that it would be appreciated!
troubled_offspring 14 Apr, 2019 @ 10:33am 
Does this mod still work??
[TPA] RavenousViper 25 Sep, 2018 @ 1:28pm 
is this compatible with latest version of the game?