Adding hediffs on item equip

Started by xxxdenisxxx7, June 24, 2023, 06:39:30 AM

Previous topic - Next topic

xxxdenisxxx7

Im making an armor mod and i've created a custom infection,
I want to make an armor cause this hediff but can seem to find how to add the hediff on equip.
searched over the internet and checked some mods but cant seem to find anything that helps me,
thanks.

Kopp

The torture crown added by Ideology DLC gives a hediff when equiped.

    <comps>
      <li Class="CompProperties_CauseHediff_Apparel">
        <hediff>TortureCrown</hediff>
        <part>Head</part>
      </li>
    </comps>

Iirc Vanilla Factions Expanded - Vikings adds crypto armor (and other stuff) which gives a hediff, too.

Not sure if this is helpful because I guess the hediff gets removed as soon as you remove the armor from a pawn.
Maybe you have to write your own comp class to achieve exactly what you want.