-
Notifications
You must be signed in to change notification settings - Fork 2
For Modders
RimPsyche allows mods to assign Thought Tags to ThoughtDefs through XML.
Tagged thoughts can respond differently depending on a pawn's personality when Individual Mood feature is used.
The list of available Thought Tags and their calculation / meaning are documented in the Thought sheet of the Documentation. Look for the FormulaName column.
Create a new ThoughtTagMappingDef in your XML to give tags to thoughts.
The defname can be anything, but you should make it unique enough so that it would not overlap with some other mapping tag from a different mod.
The label should be your mod's name, as it is displayed in RimPsyche's startup log to indicate which mods registered Thought Tags.
<Maux36.RimPsyche.Disposition.ThoughtTagMappingDef>
<defName>MyMod_ThoughtTags</defName>
<label>My Mod Name</label>
<thoughtMaps>
...
</thoughtMaps>
<stageThoughtMaps>
...
</stageThoughtMaps>
</Maux36.RimPsyche.Disposition.ThoughtTagMappingDef>Both thoughtMaps and stageThoughtMaps are optional. Use whichever is appropriate for your thoughts.
Use thoughtMaps for single-stage thoughts.
It allows multiple ThoughtDefs to be tagged under a single block.
Example:
<thoughtMaps>
<li>
<tag>Tag_Empathy</tag>
<defNames>
<li>KnowColonistDied</li>
<li>PawnWithGoodOpinionDied</li>
</defNames>
</li>
<li>
<tag>Tag_Empathy_Bond</tag>
<defNames>
<li>BondedAnimalDied</li>
</defNames>
</li>
</thoughtMaps>Each listed ThoughtDef is treated as a single-stage thought and is assigned the specified tag.
If a multi-stage thought is tagged using thoughtMaps, only its first stage (stage index = 0) will be tagged.
Use stageThoughtMaps when a single ThoughtDef has multiple stages.
Example:
<stageThoughtMaps>
<li>
<defName>KnowGuestExecuted</defName>
<stageTags>
<li>Tag_JustifiedGuilt</li> <!--justified execution-->
<li>Tag_Empathy</li> <!--someone was euthanized-->
<li>Tag_Empathy_M</li> <!--someone was executed-->
<li>Tag_Empathy_M</li> <!--someone was organ-murdered-->
<li MayRequire="Ludeon.RimWorld.Biotech">Tag_Empathy_M</li> <!--someone was ripscanned-->
</stageTags>
</li>
<li>
<defName>ExampleThoughtDef</defName>
<stageTags>
<li>Tag_Judgemental</li>
<li>Tag_None</li>
<li>Tag_None</li>
<li>Tag_Judgemental</li>
<li>Tag_None</li>
</stageTags>
</li>
</stageThoughtMaps>Each entry in stageTags corresponds to the matching stage of the ThoughtDef. If the original ThoughtDef uses MayRequire attributes on its stages, your stageTags list must mimic the same conditional setup to ensure the match.
The number of entries must exactly match the number of stages defined by the thought. If the counts do not match, RimPsyche will log an error and ignore that mapping.
Use Tag_None to skip stages that you don't wish to tag.