Drugs - modify how long they last - and stacking effects

Started by mattyboof, September 07, 2017, 05:35:42 PM

Previous topic - Next topic

mattyboof

Hi everyone.

I made a new drug and whilst it works great I cant seem to find the parameter which determines how long the effects last.

I have downloaded a few mods do deconstruct and looked over the wiki but nothing jumps out as obvious. Can anyone tell me the parameter I should add / modify?

I basically want the drug to last 3-5 days before another administration is needed.

Distman

The duration of a Hediff is based on this comp
<li Class="HediffCompProperties_SeverityPerDay">
<severityPerDay>-0.20</severityPerDay>
</li>


This makes a 1.0 severity hediff go away in 5 days.

mattyboof

Thank you very much my friend and please excuse my ignorance, where abouts in the file should these lines be placed?


Distman

Between the <comps> tags under the hediff def.

/Distman

mattyboof


mattyboof

#5
I hope it's ok that I edited the title to encompass an additional question? I thought as they are related may keep things tidy for searches for others.

Is there any way I can get the effects (good and bad) to stack at all? I tried changing the MaxHediff to say 3 and then went in game and did three hits of the drug but all the effects remained the same?

Edit...

Ok, so I think I was looking at this far too simplistically. From looking at a couple of other chemicals I think I need to be playing around with these factors in order to get my doses to stack:

<initialSeverity>

and multiple <stages> of severity within my <comps>

Am I on the right track with this?

--------

Also whilst I have your attention is there any way I can make a drug alter body size? I'm thinking of a drug that enhances performance in melee combat by making the user slightly larger. I could use the same drug to beef up (no pun intended) my cattle for greater meat/leather yield.

Thanks for all your help so far.


Distman

Yes, your definitely on the right track. Look at Alcohol hediff def for inspiration on stages.
You can also have a HediffGiver under a stage which could trigger another hediff. Look at flake or yayo for this.