Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - GreatAlucard

#1
Help / I require some assistance on modding a trait.
January 22, 2017, 08:47:58 PM
I'm currently attempting to modify the thoughts on a trait and I've managed to get most things working, although there are still some that I can't figure out.

The explanation will work better with an example:

<ThoughtDef>
    <defName>AteHumanlikeMeatDirectCannibal</defName>
      <showBubble>true</showBubble>
      <icon>Things/Mote/ThoughtSymbol/Food</icon>
      <durationDays>1.0</durationDays>
    <stackedEffectMultiplier>0.25</stackedEffectMultiplier>
    <stackLimit>1</stackLimit>
    <requiredTraits>
     <li>Cannibal</li>
    </requiredTraits>
    <stages>
      <li>
        <label>raw cannibalism</label>
        <description>I ate the meat of another human, raw, like an animal. It was so... succulent.</description>
        <baseMoodEffect>20</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>

This is a thought related to eating raw humanlike meat that gets applied to pawns with the cannibal trait, overriding the other thoughts related to this behavior which would give negative mood impact.

What I am trying to do is make this work for another trait while still working for cannibal.

If I add my trait on the required traits it appears that it just stops working (I assume because that would mean both traits are required).

And if I create a new thought but change the end of the defname from cannibal to my trait's name (Vampire in this case), and adjust the required trait, nothing appears to happen.

Lastly, If I just create a new thought, exactly equal but with a different required thought, it appears that there is a defname conflict or something like it because it stops working.

If I change only the required trait to mine neither cannibal or my trait works, which leads me to believe this needs to be changed somewhere else, but I didn't really found anywhere to do that.

Also, I found no mods that do anything similar to that to reverse engineer so I'm a little bit out of ideas.


What I would like to do is either make that thought work for both my trait AND cannibal, or to make a new thought that would actually work when a pawn with my trait ate humanlike raw meat, the second piece of knowledge I'd want more because it would allow for a mod friendly version of the trait.

I'm stuck on a few other thoughts as well but learning how to do this one will likely mean that I'm able to do all the rest.


Thank you in advance for any assistance.