Forum Announcement, Click Here to Read More From EA_Cade.

Custom Relationship Bit

NeiaNeia Posts: 4,190 Member
edited March 5 in Nominated Threads
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.
Post edited by EA_Cade on

Comments

  • TURBODRIVERTURBODRIVER Posts: 68 Member
    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.
  • NeiaNeia Posts: 4,190 Member
    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.
  • TriplisTriplis Posts: 3,048 Member
    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.
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • NeiaNeia Posts: 4,190 Member
    Triplis 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.
  • TriplisTriplis Posts: 3,048 Member
    Neia wrote: »
    Triplis 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.
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • ScumbumboScumbumbo Posts: 148 Member
    edited January 2018
    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.
    Post edited by Scumbumbo on
  • krullehoofdkrullehoofd Posts: 6 New Member
    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.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file
Return to top