Forum Discussion

benjiu's avatar
8 years ago

Custom Relationship Bit

Has anybody managed to add a new custom relationship bit (0x074DFB83) ?

Even using a simple duplicate of an existing relbit and changing just the instance key/name, I can't get it to show up in-game.
  • 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.
  • MR_TURBODRIVER's avatar
    MR_TURBODRIVER
    Seasoned Newcomer
    I would like to know that too.

    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.
  • I used a little Python script to test if the ressources were loaded :


    @sims4.commands.Command('test_relationship',command_type=sims4.commands.CommandType.Live)
    def TestRelationship(*args,_connection=None):
    output = sims4.commands.CheatOutput(_connection)

    manager = services.get_instance_manager(sims4.resources.Types.RELATIONSHIP_BIT)
    for bit in manager.types.values():
    output('Bit : {}'.format(bit))

    output('==================== done ====================')
    return True


    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.
  • Did you ever have any luck figuring this out? Curious to know if it's a possible thing to do. Sounds like it's not supported for modding.
  • "Triplis;c-16021915" wrote:
    Did you ever have any luck figuring this out? Curious to know if it's a possible thing to do. Sounds like it's not supported for modding.


    No, I found another way to achieve what I wanted to do without using custom relationship bits.
  • "Neia;c-16022640" wrote:
    "Triplis;c-16021915" wrote:
    Did you ever have any luck figuring this out? Curious to know if it's a possible thing to do. Sounds like it's not supported for modding.


    No, I found another way to achieve what I wanted to do without using custom relationship bits.

    That's too bad. Glad you figured out a way around it though.

About The Sims 4 Mods & Custom Content

Find expert tips, troubleshooting help, tutorials for mods and custom content, and The Sims 4 patch files in our forum.4,690 PostsLatest Activity: 3 hours ago