This week, I began work on creating a new part of the mod: Subjects Of Ymir. There were two main options for me to go about this: as a <healthDef> or a <Trait>.
To begin creating this part of the project, I first took a look at what <healthDefs> exist. There are several, ranging from injuries and infections, to missing limbs and artificial implants. Any body modification beyond the aforementioned "baseline" is listed under the Health tab of a character.
This screenshot shows the Subject Of Ymir <healthDef> in game: affecting the pawn as a permenant health condition.
However, I also wanted to attempt to create Subjects Of Ymir through Traits, as they have slightly more interaction with how other pawns and the game as a whole can interact with them. Traits are also attatched to the player, but have a level of interactivity with the rest of the game and specifically, the character who has these traits that health conditions do not.
I was able to create a Subject Of Ymir trait, and to apply it to pawns. However, the functionality that I intended to work here did not.
This XML code is a <ThoughtDef>, XML values that the AI for humanoid characters call on in order to process information such as the pawn's mental state, current surroundings and opinions of other pawns. My original plan was to utilise the Ugly <ThoughtDef> and modify it, so that a similar effect would occur when a pawn had the Subject Of Ymir trait; so that anyone who is not a Subject Of Ymir themselves, or in possession of the Kind trait, would have a <baseOpinionOffset> of this pawn.
Despite multiple attempts and lots of testing, this was not possible to achieve with the skillset I currently have. As such, the functionality for the Subject Of Ymir as a trait is currently on hold and moved to a stretch goal.
This is a major issue for the project, that being that the interactivity with traits and external components being far less optimal than originally thought. Where there is a lot of functionality with traits, almost all of them exist as functionality within the hard code of the game itself, not XML, an area that I am not confident with using, let alone learning this far into development. For example, the Ugly <ThoughtDef> can not be reused to create a <baseOpinionOffset> for Subjects Of Ymir, as the functionality for this is hard-coded into vanilla Rimworld. It is possible, albeit requiring a new learning process that I am unaware if I have the time or scope for in this project. As such, I will continue to have the Subject Of Ymir <healthDef> for now, unless I can achieve having it as a Trait as a stretch goal.