I made a new Relbit, but it wasn't really working when I tried. It has to have a DATA file paired with it, but even then it didn't really work. It could be that I tested it wrong.
Maybe it has to be used as a 'social_context_preference' in a social interaction to be properly loaded? I doubt though.
Just don't even ask how long I worked on this tonight for a new mod I'm working on, and I'm not even 100% sure I'll like the mod once I'm done!
Anyway, the relbits tuning appears to use the hash of the class name (RelationshipBit) for the resource id, and not the hash of the instance type (relbit). So when extracting that resource (at least with my XML Extractor) it ends up getting the resource id number wrong.
Once I changed that in testing my mod, persistence works fine with a 32 bit instance id, but using a 64 bit value will cause a ValueError exception when trying to save the game.
So yeah, long story short you need to use resource id 0x0904DF10 instead of 0x074DFB83 and use a 32 bit instance id and Bob's your uncle - or maybe Scumbumbo's your uncle, whatever.
I guess I'll have to write a special case into XML Extractor to handle that so it gets numbered properly in the future. But not today, I'm tired.
ETA - Uploaded v3.5.4 of XML Extractor to MTS with a fix to number that resource type properly.
Can confirm about using a 32 bit instance id for your custom relationshipbit. Was using a 64 bit value before but was getting the save errors. Changed it to 32 bit and no issues anymore.
Comments
I made a new Relbit, but it wasn't really working when I tried. It has to have a DATA file paired with it, but even then it didn't really work. It could be that I tested it wrong.
Maybe it has to be used as a 'social_context_preference' in a social interaction to be properly loaded? I doubt though.
It worked fine when printing the sims4.resources.Types.TRAIT for example, where a simple custom one appeared fine, but not for relbits.
I tried with or without a DATA file, with FNV64 and FNV32, with a high bit group or not, but nothing so far.
No, I found another way to achieve what I wanted to do without using custom relationship bits.
Anyway, the relbits tuning appears to use the hash of the class name (RelationshipBit) for the resource id, and not the hash of the instance type (relbit). So when extracting that resource (at least with my XML Extractor) it ends up getting the resource id number wrong.
Once I changed that in testing my mod, persistence works fine with a 32 bit instance id, but using a 64 bit value will cause a ValueError exception when trying to save the game.
So yeah, long story short you need to use resource id 0x0904DF10 instead of 0x074DFB83 and use a 32 bit instance id and Bob's your uncle - or maybe Scumbumbo's your uncle, whatever.
I guess I'll have to write a special case into XML Extractor to handle that so it gets numbered properly in the future. But not today, I'm tired.
ETA - Uploaded v3.5.4 of XML Extractor to MTS with a fix to number that resource type properly.