Tutorial - Custom Traits in rel-Panel (Patreon)
Content
Sheila Lobert asked me to investigate this "problem"
Some custom traits you can download that are made with the Constructor do not show in the relationship panel, they show as Unknown Trait. So, I looked into it and the problem lies in the way the Constructor gives the Instance id to the trait. We're going to use Kiara's Independent trait. Let's open it in the Studio and look for the xml with the type Trait Tuninig:
As you can see the instance is a 16 digits Hex number ( AC1BAA976370C9CC ) this is the FNV 64 hash of the name KiaraSimsMods_Independent_Independent
Now, before we do anything else let's select all the tunings apart from the strings tables inside the package and batch export them into a folder:
Now, sort the files in the package for INSTANCE:
Find the SimData file with the same INSTANCE as the Trait Tuning
The Constructor exports all the SimData Files with the name Constructor, but since we need to change the Instance ID of both the tuning and the SimData we need to copy the name from the tuning:
Paste it into the SimData (so we will not lose it):
Now, with an Hash generator, let's Hash the name:
We need the FNV 32 Key or the FNV 32 High Bit key (even better)
Let's move in the Data tab of the Trait Tuning:
Let's copy the Tuning ID number:
and paste it on a text file:
we'll need it later. Now, we need to replace the AC1BAA976370C9CC in the Data tab of the trait tuning with eight 0:
The last eight digits of our new instance ID are the FNV 32 number we got from the Hash generator:
Now let's grab this new 16 digits Instance ID and move in the Data tab of the SimData file with the same name of the trait tuning and paste it in there so that the trait tuning and the SimData have the same Instance and name:
Back in the trait tuning let's copy the new Tuning Id the Studio gave us:
and paste it into the s="...." field where the old number is:
Now, I made you export the XMLs because we need to see if the old Tuning ID was referenced in other XML inside the mod, so let's make a search for the old Tuning ID I made you copy into the text file:
We only found two files, the trait itself and an action, let's search the action in the mod:
And replace the old tuning id referenced there with the new one:
That's it, you can now get rid of the exported xmls and save the mod:
It seems like a lot of work but it takes more to write this tutorial than to do it.