Space Engineers

Space Engineers

Shrapnel Damage (Performance Friendly)
68 Comments
Deapri 10 Mar, 2024 @ 7:08am 
Defense shields requires Weapon Core, any other version is not officially supported and is using very old code.
kinngrimm 21 Jan, 2024 @ 7:38pm 
Also no, for both types of viable shield mods i found?
"Energy Shield"
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2976604125
and "Defensiv Shields"
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1365616918
The later being the one usually used with weapon core but also has a vanilla version as far as i am aware.

and then there is the new kid on the block Structural Reinforcement
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3029470356
Is that one compatible?
Bodyboarder2528 30 May, 2021 @ 6:42pm 
Ok cheers
Gauge  [author] 30 May, 2021 @ 9:25am 
If you are running vanilla weapons it will work as described.

If shields are present they will take all the damage and spread will never happen. So yes they work with shields?

Weapon core uses its own projectiles so this mod is not needed. If you are mixing weapon core and vanilla weapons this mod will work as intended for vanilla but i have no idea if it will mess with WC damage.

Easy answer is no, you dont need this mod with weapon core.
Bodyboarder2528 30 May, 2021 @ 1:22am 
no for both?
Gauge  [author] 29 May, 2021 @ 11:53pm 
No
Bodyboarder2528 29 May, 2021 @ 10:30pm 
does this work with shields and weaponcore?
Mux 28 Dec, 2020 @ 9:13am 
@Revan your words are like poetry
Revan 28 Oct, 2020 @ 3:57am 
i dont know if anyone pointed this out yet but your cover image looks like a gundams cock
Talik 26 Oct, 2020 @ 12:23pm 
I've been using this mod as part of AQD-Combat Rebalanced, however I recently swapped to his no dependency version to remove Shrapnel. It kept crashing my server with a fatal output listed on Torch's log:
at Shrapnel.Core.UpdateBeforeSimulation()
at Sandbox.Game.World.MySession.UpdateComponents()
at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime)
at Sandbox.MySandboxGame.Update()
at Sandbox.Engine.Platform.Game.UpdateInternal()
at Sandbox.Engine.Platform.Game.RunSingleFrame()
at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0()
at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
at Sandbox.Engine.Platform.Game.RunLoop()

I think it's called as part of a render loop which then does a fatal exit. I did notice lots of X-Y-Z graph style square particles in my game after large explosions. Really like your mod so thought I would post to help it out. Also I truncated most of the output since it doesn't fit in the post.
Gauge  [author] 4 Sep, 2020 @ 8:21pm 
it does
Karma Knight 4 Sep, 2020 @ 6:33pm 
does this mod still work?
fishsta12 14 Jul, 2020 @ 6:38pm 
I have noticed green, red, and blue square particles whilst using this mod, no idea how to fix
76561198040172855 11 Jan, 2020 @ 1:13am 
Also, why is all my ammunition infinite now?
76561198040172855 11 Jan, 2020 @ 1:12am 
@Gauge

Does it work with the Ravenbolt's Compact Weapon System? I'd rather use it if possible.
Gauge  [author] 10 Jan, 2020 @ 9:52pm 
oh, use the PDC cannon mod too!
Gauge  [author] 10 Jan, 2020 @ 9:51pm 
single player was working great but MP had issues where bullets were not being synced right.
Gauge  [author] 10 Jan, 2020 @ 9:50pm 
@CONSTIPATED SCREECHING APE


Check out: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1598924014

It should still work. Use the OKI mod too.
76561198040172855 20 Dec, 2019 @ 6:32pm 
Very cool mod, just wondering, do you have any plans to release that ricochet mod that you posted about a year ago? I really liked the idea of sloped armor actually working as intended.
troubled_offspring 11 Nov, 2019 @ 4:53pm 
they just wanted to be together inside the same c# file i guess lol
troubled_offspring 11 Nov, 2019 @ 4:52pm 
it was having issues until i combined them into 1 script file. once i made sure all the Usings calls were up there i copy and pasted deformation under schrapnel and they both started working
Gauge  [author] 11 Nov, 2019 @ 4:25pm 
Yes, i also find nothing wrong with the script itself.

offspring try the Shift+F11 page and see what error are coming up. it may be a class conflict cause i use the class "Core" in most of my mods.
troubled_offspring 11 Nov, 2019 @ 3:47pm 
ya it does not seem to play well with other scrips in the scripts folder even if they all have their own subfolder. it will work with some but if i also have balanced deformation in there or the relative speed mod it stops working, even if they have their own folders. im assuming i don't know a mechanic the game uses in order to load and run scripts
troubled_offspring 11 Nov, 2019 @ 3:28pm 
which i find weird because if i give it its own local mod folder it works great, just doesn't like being in with another mod
troubled_offspring 11 Nov, 2019 @ 3:26pm 
ok i found the problem, it works perfectly as its own mod, but when i try to integrate it into my overhaul (move it from its own mod folder into the scripts folder of my mod) it does not seem to work anymore even if i keep it in its own folder. do you have any idea what could be doing this?
troubled_offspring 9 Nov, 2019 @ 8:17am 
yes, and the blocks around those ones are always at 100% like no splash damage was transfered to them. i use this mod with your balanced deformation mod to beef up armor and balance out my weapons mod. its good stuff :)
Gauge  [author] 9 Nov, 2019 @ 12:37am 
That sounds off. I'll take a look this weekend.
troubled_offspring 8 Nov, 2019 @ 7:19pm 
or maybe im just miss understanding how its working lol
troubled_offspring 8 Nov, 2019 @ 7:17pm 
@gauge is this script still functional, ive been testing it and if i set a projectile to 8 million damage against a 5 layer deep heavy armor wall it only takes out about 4 blocks. Its making my weapons balancing not work as intended lol. if you get some time to check out if its working properly id be in your favor!
BlackRedDead 27 Oct, 2019 @ 4:29pm 
and especially often goes the "easy way" instead of thinkering trough!
BlackRedDead 27 Oct, 2019 @ 4:28pm 
to be fair, balancing never is an easy task - even using well proven math models & excel doesn't solve it, in the end you're microadjusting until it feels "right"!^^ - and serveradmins often use mods wich at variables to be thinkered with too! - so even if SE would had a "baseline" we would still see custom balanced servers! - but yea, it's sad that KeenSWH lacks sense for balancing -.-#
Gauge  [author] 27 Oct, 2019 @ 4:15pm 
Yeah SE is particularly bad because the game has no base level balance and every server admin has a different idea of how to balance things.
BlackRedDead 27 Oct, 2019 @ 3:40pm 
@Gauge
thx for the fast Reply - yea, needs testing what makes sense and what not - as always!^^
About reupload yea - always an issue with this workshop xP (i wish you could just have more control over your work not getting pirated but also able to allow others to simply update outdated mods even without the creators action! - a bit like a wiki works... - but for now we're stick with this method of C&P reuploads xP - dependent on the reuploaders sanity to label/differentiate his version and giving proper credit!)
Gauge  [author] 27 Oct, 2019 @ 3:06pm 
If you are unhappy with the default amount feel free to create your own version of the mod. I only request that you do not use the same image and that you reference this mod in the description.
Gauge  [author] 27 Oct, 2019 @ 3:01pm 
Yes, there is a fall off. Overkill damage only spreads 80% damage per step.

Say we have 1000 overkill damage. Only 800 damage will be split between neighboring blocks.
If there are 4 neighbors that would be 200 damage per neighor.
A neighbor dies it also spreads 80% overkill damage.

Essentially no matter how strong the weapon it can only spread up to 5 times.
BlackRedDead 27 Oct, 2019 @ 12:58pm 
Is there a falloff included in the script? - so that if someone is hit by a overpowered railgun it is not exploding the whole ship but rather just makes the hole bigger than in vanilla! ;-)
(i have an increasing factor in mind, after the first block is destroyed 33-50% of the remaining dmg is dealt to the adjacent blocks, after they got destroyed another 50-66% of the remaining dmg is applyed and a third time max 66-80% of dmg is applyed befor the rest get's cut off (if there is dmg remaining!)
Erythion 18 Oct, 2019 @ 7:26am 
That sounds better, although I understand how a laser should just drill one hole where the laser beams.
Gauge  [author] 16 Oct, 2019 @ 8:27am 
That is because the laser weapon script applies very low damage numbers 60 times a second (3-11 damage per tick if I recall correctly).

Shrapnel only spreads overkill damage so it would only spread the remaining 5-11 damage from the last tick divided between neighbours.

If you want I can modify and release a mod that spreads all incoming damage a bit.
Erythion 16 Oct, 2019 @ 7:08am 
I tried testing this mod with Directed Energy Weapons (plus steel plate & metal grid health increase, heavy armor has 33k health), the heavy lasers on that just drills holes and not deal any splash damage...
enenra 11 Aug, 2019 @ 3:52pm 
Thanks!
Gauge  [author] 11 Aug, 2019 @ 3:44pm 
Go for it.
enenra 11 Aug, 2019 @ 2:33pm 
Hi Gauge

I'm putting together a modpack for combat balance, much like my other modpack for quality of life. I'd like to list this mod as a dependency in it, if that's alright with you. I'd also be listing all contained mods in the description of the modpack, along with a small blurb about what each mod does plus attribution and link. :)
Vatruvius 31 Jul, 2019 @ 9:42am 
I see, so your mod is a more precise shrapnel mod that tries to reduce the chance of lag as much as possible while the other didn't take that into account. Thanks for the reply, this clears things up greatly.
Gauge  [author] 31 Jul, 2019 @ 5:58am 
That mod spawns an explosion when killing a block

[code]
BoundingSphereD sphere = new BoundingSphereD(pos, deltaDamage/500f);
MyExplosionInfo bomb = new MyExplosionInfo(deltaDamage*0.6f, deltaDamage*0.6f, sphere, MyExplosionTypeEnum.BOMB_EXPLOSION, false, false);
[/code]

My code does the following:

[code]
// total over kill damage devided by the number of neighbours
// that times the reduction multiplier 0 to 1
// that times the blocks general reduction multiplier 0 - 1
float damage = ((OverKill / neighbourCount) * ReductionMult * generalMult);
neighbour.DoDamage(damage, MyDamageType.Bullet, true);
[/code]
Gauge  [author] 31 Jul, 2019 @ 5:55am 
There are some trade offs to be made on both sides. When choosing their mod:

You gain area of effect damage.

You take a large performance hit. An explosion is expensive. Having one trigger each time a block is destroyed is bound to cause performance issues.

You are also loosing any ability to control how much damage is being done to blocks. Explosions apply deformation damage not direct HP damage. From my testing with explosions it doesn't matter if the damage you set is 1 or 100,000 things will deform and take damage roughly the same way.


When choosing this mod:

Spread is limited to the grid.

Damage is predicable and can be effectively balanced around.

The performance cost is as low as i could make it.


In both cases overkill has a chain reaction.
Vatruvius 30 Jul, 2019 @ 8:15pm 
Hello Gauge, I was looking into your deformation mod and found you also had a shrapnel mod. I saw this question was asked before but perhaps you can elaborate? What is the difference between your mod and this one: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=900678366

As far as I can tell both spread out remaining "overkill" damage to surrounding blocks. Is it how the two mods spreads out the damage? Your mod and comment section clearly state the mod spreads out the remaining damage to adjacent, connected blocks. The other mod, at least in the pictures, seems to have a larger radius of affect or is it the same? Chain reaction?Thank you for your time.
troubled_offspring 1 Jul, 2019 @ 4:19pm 
sounds about right hahaha i would change all my projectiles to missiles but i already over-wrote it's particles effects and turned it into a photon torpedo, so everything launching photon torpedo's would look rather strange lol guess im stuck at 0.1 deformation until Keen does a weapons update lol
Gauge  [author] 1 Jul, 2019 @ 3:48pm 
Currently Keen has F****** deformation. The issue is that deformation is applied before damage and if a block dies to deformation it passes deformation along and deletes itself without first going though the damage handler. The only solution is to disable deformation but then grids bounce off each other instead of deforming. It's a trade off till keen tries to make more weapons and realizes how broken their code is.
troubled_offspring 1 Jul, 2019 @ 3:05pm 
ah nevermind i think your mod was infact working, i just discovered even at 0.1 deformation a 6000 damage round was still causing a 6x2 hole. if i grinded the block to before it was complete and thus had no deformation on it it could take that hit like a champ lol so technically vanilla in game half built armor blocks are superior because they wont cause deformation damage to things hahah. This will be fun to balance around if i want to maintain the look of deformation when armor is hit
troubled_offspring 1 Jul, 2019 @ 2:14pm 
I also see your deformation mod references the armor blocks general damage multiplier, does it already apply that resistance line to all armor blocks?