How do you code in...

Started by GamerGuy, March 14, 2015, 04:33:43 AM

Previous topic - Next topic

GamerGuy

I wanted to know how would someone make a mod and a bit of it is. You know how bloodloss and hypothermia come up in big text on the health tab and slowly goes up how do you code that for a new one called decay


UMK

Unclear answer for unclear question.
pawn.healthTracker.hediffSet contains all hediffs (health diffs?), such as injuries, prothesics, drunk state, blood loss and hypothermia. Hediffs applied to null body part are shown as 'Whole body'. What can you do: copy-paste existing hediff def, rename and do whatever you want (add stages, severity and such), then apply it using
pawn.healthTracker.AddHediff(HediffDef.Named("YourWonderfulHediffDefName", null, null)
somewhere in your code.

GamerGuy

Thanks I am now on the finishing touches of my mod