Hello,
I am working on a mod : http://steamcommunity.com/sharedfiles/filedetails/?id=1240656304
I want to create a stat for my shield that is not the vanilla one. ( StatDefOf.EnergyShieldEnergyMax / StatDefOf.EnergyShieldRechargeRat )
Therefor i need to declare something like that : https://github.com/josh-m/RW-Decompile/blob/3a7cd955b574c183405cc8065b15f1c231c7da08/RimWorld/StatDefOf.cs
But when i declare my own thing i end up overwriting the vanilla declarations which is bad(!)
I guess that's when i should use something like patching. Is that it ? I am a poo OOP coder ???, i could need some help.
Thank you.
You should be able to grab the stat by using StatDef.Named("statName") instead of a StatDefOf. The only problem AFAIK is that it won't autocomplete or detect a typo on compile. (I assume Rimworld will very quickly detect it when it tries to load...)
It worked fined. I realized i already used that way to call a stat but forgot. Thank you.