Rookie modder needs help! Damage types and damage values.

Started by captain_shrug, November 17, 2018, 01:32:40 AM

Previous topic - Next topic

captain_shrug

I've done very, very little modding in Rimworld- usually just editing an existing XML value, and a bit of bad pixel art. We're talking starting from scratch and still reading the wiki.

But I had an idea for more types of IED mines. Two, in fact. Both with a reduced radius but one that has a higher damage output, and one that has the standard damage output but also causes fires.

Thing is, when I bust open the XML and read, I see damage type bomb and damage type incendiary. And no actual values by themselves.

Would I have to create a new damage type entirely for each one? Also, the radii for the stock mines is 3.9, which is odd to me. I figured from placing them it'd be either 4 (if it counted center grid) or 3 (if it didn't.) Would reducing it to 2.9 simply knock one off all around, or would it screw up the math?

Wildfire628

All damage types are defined under <YourRimworldPath>\Mods\Core\Defs\DamageDefs\ if you want to see how much default damage they do, who they do it to, and how they do it.
I don't have a lot of experience with buildings, but I believe IDE's use the CompProperties_Explosive class to achieve the desired effect when sprung. You can try to use damageAmountBase to modify how much damage you want it to do, but I'm not sure that is valid as I've never tried to use it under CompProperties_Explosive. Otherwise, you could use the BombSuper damage def and lower the explosiveRadius. If BombSuper is too powerful and damageAmountBase doesn't work then you might just want to define new damage types so you can set it exactly how you want it.
As for the whole 3.9 thing I don't have a good answer for you, I've been using ranges that way and mentally rounding it up because I figure there's some reason for it even if I don't know what it is. Anyway, going from 3.9->2.9 shouldn't mess with anything unless you are using damageFalloff.