Ludeon Forums

RimWorld => Mods => Help => Topic started by: Nimrod on May 30, 2015, 10:04:58 AM

Title: <damageMultipliers> - possible to set this in <Resources>?
Post by: Nimrod on May 30, 2015, 10:04:58 AM
Hello,

My idea:
I want defs from <Resources> to carry the <damageMultipliers> setting (the ones you can set in <Buildings>) and pass them down to whatever def in <Buildings> is made from said <Resources>. Just like <statFactors> works right now actually.

example for easier understanding :
Glass (takes 8 times standard damage from Bomb):
<damageDef>Bomb</damageDef>
<multiplier>8</multiplier>

Steel (takes 0.9 times standard damage from Bomb) :
<damageDef>Bomb</damageDef>
<multiplier>0.9</multiplier>

Plasteel (takes 0.5 times standard damage from Bomb):
<damageDef>Bomb</damageDef>
<multiplier>0.5</multiplier>

so I could define a single building "Wall" that can be made from these 3 resources and have different <damageMultipliers> depending on the base material
pros:
.) consistent and easy to manage <damageMultipliers> - just add/remove/change them in <Resources> and it carries down the whole chain
.) only one icon in the build menu

Right now I would have to define a "glass wall" "steel wall" "plasteel wall" if I wanted different <damageMultipliers> for each of them.

I have been experimenting the last three hours but I am not getting positive results so far.

Any constructive input is welcome! ;)

Thank you!