Skip to content

Update AmmoThing.cs - #4699

Open
RichardRamirez-TommyArashikage wants to merge 1 commit into
CombatExtended-Continued:Developmentfrom
RichardRamirez-TommyArashikage:patch-5
Open

RichardRamirez-TommyArashikage wants to merge 1 commit into
CombatExtended-Continued:Developmentfrom
RichardRamirez-TommyArashikage:patch-5

Conversation

@RichardRamirez-TommyArashikage

@RichardRamirez-TommyArashikage RichardRamirez-TommyArashikage commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Additions

#4698
Source .cs alternative to my older PR request. So a lot less bloated.

Changes

Forces ammo to explode on external damage so stacks of dozens/hundreds of explosives don't magically disappear when damaged.

References

https://steamcommunity.com/sharedfiles/filedetails/?id=3784849472
https://www.youtube.com/watch?v=YIR8ab-s9-Y
Same effect as my bug fix mod and old video except instead of .xml based it just uses CE's pre-existing ammo explosion logic. so it is simpler and doesn't make all explosives explode in the same way. It uses CE's better 0.333 multiplier to simulate square cube explosion size increases instead of vanilla RimWorld's "explosiveExpandPerStackcount" which is pretty bad.

Reasoning

https://www.youtube.com/watch?v=q2x9d6viDW4
Just to fix the bug of CE's ammo being destroyed by damage and making large stacks of explosives magically disappear.

Alternatives

#4692
#4698
Only these 2 older PRs which are obviously not as good, the 1st one was .xml based using vanilla RimWorld's flawed logic. The 2nd was just patching CE itself so it was obviously more bloated.

Testing

https://www.youtube.com/watch?v=q2x9d6viDW4
This old first video shows what happens in the current version of CE when you detonate an IED next to a stack of 1 and a stack of over 100 HE shells.

https://www.youtube.com/watch?v=JehoQzFOK4Y
This new video shows my little test comparing a stack of 1 and a stack of 100 HE shells next to an IED detonation. Obviously it removes the bug of the extra HE shells magically disappearing.

The test load order was just:
Harmony
Core
Combat Extended (my modified version)
CE IED RemoteDetonation
Stack By Weight

And obviously I use the modified behaviour for my own gameplay when I play RimWorld day-to-day. Haven't noticed any visible bugs so far.

@github-actions

Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-32720690840.zip

@github-actions github-actions Bot added the Download in Comments This PR has a zipfile download available. label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Download in Comments This PR has a zipfile download available.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant