[traits] how to get started


Had a request for a tutorial, so here we go! This tutorial gives an overview of what each family trait means and how to add them. For this I'm going to use the Pancakes family as they appear on the gallery. [pose]

Overview

The main point of family traits is to keep track of your sims' legacies - you can use console commands to add, remove, and list sims with these traits. There are five types of family traits, for eight families from A to H (I'll use X to mean any family):

  • founderX (founder of X) - Given to exactly one sim who will be the head of your legacy.
  • famX (family member of X) - Given to every descendant of founderX. If you haven't got a founderX ingame, you'll have to set these individually (though as you'll see below, famX is given to descendants by default, so you can make life easier by starting as far up the family tree as possible)
  • incX (included in X) Given to any sim who is part of the family, but not related to the founder,  such as spouses, parents, or close friends.
  • excX (excluded from X) - Given to any sim who is kicked out of the family. Applying this trait will remove all of the family traits they already have, and prevent them from gaining any more. You'll have to remove this trait to add them back.
  • heirX (heir of X)Given to any past or present heir of the family. The only restriction is that the sim must have famX / incX first; you're not limited to one per generation. If they're an heir of family A, then they get a few interactions to add traits to other sims; for the other families, this is solely for categorising sims.

Traits will automatically be added to sims based on your settings in "riv_rel - overall settings.cfg" (this file is created in the same folder as riv_rel when the game is launched):

  • riv_auto_inc_parent [default False] - if true, any parent of a sim with the famX trait will be given the incX trait
  • riv_auto_inc_heir_parent  [default True] - if true, any parent of heirX will be given incX
  • riv_auto_inc_spouse  [default False] - if true, any spouse of famX will be given incX
  • riv_auto_inc_heir_spouse [default True] - if true, any spouse of heirX will be given incX
  • riv_auto_fam_child [default True] - if true, any child of famX will be given famX

If you have Get Together, then you can use famX and incX for club requirements with the GT addon! This comes with my eternal gratitude to Scumbumbo for making so many tutorials and pieces of code available to modders.

Adding traits

I'm going to use family A in this, which is more fleshed out than B-H. Technically I don't need to put the letter A in commands (since this is treated as the default family), but I'll include them just so it's clear where the family letter should go.

We're going to start off by making Bob the founder of family A, by using the "riv_add_founder sim_x X" command. This also adds the heirA trait (so he has the power to add traits to other sims), as well as the famA trait (since he's related to himself).

I've previously set riv_auto_inc_heir_spouse to True, so Bob gaining the heir trait means that Eliza gains the inc trait:


riv_auto_fam_child is also set to True, so Bob gaining the fam trait means that Iggy gains the fam trait:

Depending on your settings, these traits will be automatically added to other sims later - all of Bob's descendants will be added to famA.

Besides these automatic additions, you can also use the following console commands, where sim_x is a sim (either their full name or their sim ID) and X is a letter from A to H (if excluded, it defaults to A):

  • riv_include_in_family sim_x X - gives sim_x the incX trait
  • riv_add_to_family sim_x X - gives sim_x the famX trait
  • riv_exclude_from_family sim_x X - gives sim_x the excX trait
  • riv_make_heir sim_x X - gives sim_x the heirX trait

Each of the above commands will stop you if it's something that shouldn't happen - for example, a sim with excX can't be given any other family traits, and a sim who isn't part of the family at all (i.e. they don't have famX or incX) can't be given heirX.

HeirA interactions (all non-autonomous, family A only)

Since Bob is an heir of family A, he gets a mean interaction to exclude other sims from the family. This interaction appears when an heirA sim is talking to a sim that is a child or older without excA and will give the target sim the excA trait (as well as removing any other family traits they might have).

(I forgot to actually use the interaction ngl, but it'll give a negative moodlet based on whether the target sim was in the family or not).

Bob can also include other sims in the family, a friendly interaction that appears if the target sim is not already in the family (i.e. incA or famA) and they're not excluded from the family (excA). Geoffrey just so happened to be jogging past, so now he's dragged into this mess...

To make Iggy an heir, I had to age him up to a child and... uh... no idea where his hair went. But anyway! Bob can invite any sim that's part of the family (famA or incA) but not already an heir (heirA) to be an heir of the family. This gives the target sim the heirA trait, unlocking these interactions for them as well.


Removing traits

Having five separate commands to add traits already seemed like too much, so my commands to remove traits will take away all traits. You can remove traits from one sim, one family, or all families.

Use the command riv_clear_fam_sim sim_x to remove all family traits from that sim. It'll also display the commands that you need to enter to re-add any traits, just in case you didn't want to remove all of them. Unlike adding traits, this will not have a knock-on effect on other sims. It also won't remove any actual relations, just the traits.


If you want to clear family traits for an entire family, use riv_clear_fam X (here I just made Bella the heir of family B and then cleared that family so the Pancakes family would still be set up):


If you want to clear every single family, use riv_clear_fam_all - this will run riv_clear_fam for families A through H.

Viewing traits and families

You can see all members of family X (and also excluded sims) using the command riv_traits_by_fam X - this will prioritise the "more important" traits such as founder/heir as you can see below.

The command riv_traits will do the same but for every family!

You can see the traits that one sim has with the command riv_traits_by_name sim_x - this shows their membership across all families.


There's also a newer addition with the command riv_show_family X that lists the founder and their descendants. For this to work, your founder must still be ingame (doesn't matter if they're dead, they just can't be culled). This command groups sims first by generation, and then by their traits: heirX, famX, excX, no family traits, or culled.

If you have a complicated family tree and sims have multiple connections to the founder (say, their great(x10)-grandparent as well as their great(x11)-grandparent), then the generation is taken as the greatest distance.

As always, you can refer back to riv_help for a brief list of these commands, and use the computer help menu for individual explanations.


That concludes the tutorial/overview! Hope this helped, and please let me know (in comments here, on the main mod page, or my discord) if you have any more questions or tutorial requests!

I'm planning on doing one for .json files - technically all you need to do is enter "riv_auto <keyword>" and possibly redo that if the save number changes, but I do want to go over troubleshooting, what the files store, and what they're used for.

Get [unsupported] riv_rel - genealogy mod for sims 4

Comments

Log in with itch.io to leave a comment.

(+1)

I set up my games with a lot of families - this seems a bit rough to grasp and a bit tedious to set up when so many of us leave the default townies and families in - I'm just getting into the mod, but if there was an auto command to at least handle the existing families and relations in a current save, that'd be great. Anything that can automate and scan the entire population with existing relationships.

Examples: A script that would auto assign and process the Goths to a finished family. This would make setting up or maintaining a save much faster.

autosetup_Goths X -> builds the Goth family into family X.

autosetup_Landgraab X -> builds the Landgraab family into family X.

autosetup_Flex X-> Builds the Flex Family into family X.

autosetup_current X-> Builds the current selected Sim's family into Family X.

Keep up the good work! This is otherwise very awesome.

Hey, so I'm not quite sure how these would work - having a separate command for each family would add a lot of extra lines of code for something that's not very configurable or reliable (e.g. for autosetup_Goths, I'd need to decide for the player whether Bella or Mortimer would be famX or incX, and I'd need to identify the sims by name since their ID can be different for each save, which could cause issues if they happened to have some other sim named Bella Goth). The same could be achieved by entering "riv_add_founder Bella Goth A", which would add the following traits:

  • founderA, heirA, famA to Bella
  • incA to Mortimer
  • famA to Cassandra and Alexander

or the same but with Bella and Mortimer swapped.

And with autosetup_current X, there would be no way for the mod to know which sims you want to be actual blood family members and which should just be included, even if it's as simple as just a couple.

I hope that makes sense and doesn't sound like a bunch of excuses - I just feel like those commands would require too much of me making decisions for the player or guesswork for the code itself.

It's definitely fiddly setting traits up for the first time (someday I'll figure out how to make it a sim picker menu, but I'm really struggling with the tuning for it), but the idea is that you should only need to do most of those things once and it's done, e.g. making one sim a founder will automatically make any of their existing or future descendants part of the family (famX), and any of their existing or future spouses included in the family (incX).

Understandable. It's easy enough for a single player family, but maybe a picker for sims like in some of the existing action options is a good way to go for some features. I'm just looking to shorten the setup time of a new save without having to play each select family in the game.