Sim Settlements 2 allows you to assign anyone to run a settlement for you and handle the construction. Beyond the City Plan, for most NPCs, this also results in some minor changes, such as recruitment favoring NPCs with similar primary stats.
To really take advantage of the Leader system, an NPC must have a Leader Card. This identifies that NPC as being especially influential, and their personality and background can dramatically impact the rules that settlement operates under.
These impacts are defined by forms called Leader Traits, which come in three flavors:
Each leader may have one Major trait, and then for each Minor trait they have, they must have a corresponding Weakness. This makes leaders flavorful, and powerful, yet the Minor/Weakness tie prevents anyone from going too over the top with the system to leave the player feel like they are cheating.
Of course, since we've introduced custom Leader Traits with SS2, you can absolutley create cheaty mechanics. Hopefully by the time you've finished reading this document, you'll be convinced not to though!
First step is to think about who you want to set up as a leader. Literally any NPC with the Unique flag is eligible.
This includes those in the base game, DLCs, SS2 itself, your own mod, or even 3rd party mods with characters (think companion mods, or even quest mods like Tales from the Commonwealth). You don't even have to make those mods required. The Leader system can dynamically detect whether those characters are loaded for you - no scripting required.
You then need to start thinking about how their backstory and personality could be reflected in gameplay so you can choose their traits. We've got a large collection you can choose from already, or later in this document you'll learn to create your own.
You can have one Major Trait, or none if you think your character is too minor to deserve a powerful effect. Then for each Minor Trait you give them, be prepared to pick a Weakness as well as SS2 will only use as many Minor Traits as you give Weaknesses. For the SS2 leader cards we included, we went with 1 of each. You could go with as many as you like, or none at all.
If you read through the available traits and descriptions, you'll start to get a feel for the types of phrasing we use, and the possibilities in gameplay mechanics. Filter for SS2_LeaderTrait in the Object Window under Items > MiscItem.
Beyond creating fully custom traits, you can also approach it from a middle-ground, and create renamed copies of existing traits. So if you have a great name for a trait, but believe it would work well as a mechanic we've already figured out you can make that happen as well!
Now that you've decided which NPC you want to use, and the traits you want to provide them, it's time to set it up for the game.
To use an NPC from some other plugin, read about UniversalForms to fill out the iFormID and sPluginName instead of the BaseForm, so you can have SS2 automatically detect and load the NPC from the other mod or DLC.
Dynamic Flags can be found under Items > Armor by filtering for SS2_ThemeDefinition_Flags. There are several in SS2 for the major factions. There are also several in SS2Extended, which is a PC only mod.
Of course you can always make your own as well! Even if you're no texture artist, it's easy to setup images as new Dynamic Flags following this guide.
For the sake of your Leader Card though, this is a completely optional property!
Be sure only to select those set up as Major Traits or the mod will ignore your choice for this field, and be careful not to select the _Description version.
Why did you make the traits all use the UniversalForm system?
This way, if a clever designer (perhaps someone with the coding skills to take advantage of the extension system) wanted to make a pack of traits. Other addon authors could tap into those without making that addon a requirement!
By default, leaders and their cards, only become available when that NPC is a commandable settler in one of the player's settlements. This prevents the player from assigning an NPC they don't even know yet in their playthrough, or that are normally not yet available - such as Preston during the early parts of the Minutemen questline, where he isn't technically controllable until you do a few quests.
In Sim Settlements 1, addon authors could actually make anyone a leader with the appropriate settings, even if they weren't a settler. In SS2, you must first make them a settler. For NPCs that are not normally a settler, you can actually use the Unlock system, in particular check out the Unlockable Characters section, to force an NPC to become a settler in response to certain events. At which point your Leader Card could become eligible for them!
This can be overridden in a variety of ways using some of the other properties on the LeaderCard we didn't discuss yet. When these other properties are used, it will change when the Leader Card shows up for the player in the interface for selecting a leader.
To access these, double-click the blue word Advanced on the properties screen of your LeaderCard form.
Be sure to test this thoroughly with any character you do this to, to ensure it doesn't break quests.
To access these, double-click the blue word Requirements on the properties screen of your LeaderCard form.
Now that your Leader Cards are finished, it's time to inject them so they become available at the City Planner's Desk.
If this is your first time working on an addon, or you haven't created addon configuration data yet, check out this tutorial).
There are three ways you can design new traits. The first is very simple, and requires no understanding of the complexities of SS2. The second two require you to have a fairly detailed knowledge of how SS2 operates under the hood or you will likely create broken and unbalanced gamestates for players.
So let's start with the rename methodology before moving into the more complex stuff.
Anyone can use this method without worrying about introducing issues. It's a great way to give your leader some unique flavor.
The reason for this naming scheme, is that we can always remember which trait it was based on. Which could be useful to know in the future, because if that trait changes, we would need to update our renamed traits to match!
It also reminds us why we don't have a corresponding _Description record.
That's it! All of the complicated stuff is in the script properties which you just avoided. Since it's a copy, you don't even have to set up a new description - as we intentionally avoided referencing the trait name in the description records!
The next type of trait is one that involves no programming, but does demand you understand some of the way SS2 and the Workshop system function.
By default, SS2 includes dozens of effects you can tap into to generate a trait. Check out this list for the eligible effects, what they do, and how to use them. Once you found the one you like, return here to continue.
You're back, so presumably you now have a name and effect in mind and are ready to create!
SS2 does not limit the numbers you plug into this system. If you opt to go way beyond the realm of what we did for the base of SS2, be sure to be extremely clear about that in your description, or a lot of players will be turned off by your mod when they find out after the fact that you did so.
If you want to keep things relatively balanced, look at the traits SS2 defines, and try and use those as guidelines.
You're done! You can now go use this new trait on any of your Leader Cards, and other addon authors can use your new trait as well due to the UniversalForm system!
Traits do not need to be injected into Sim Settlements 2, as they are always referenced on the Leader Cards that need them.
For those of you scripters who want to get crazy, the trait system is actually designed to be extended. So keep an eye out for the source to be released (or just decompile) and check out the SimSettlementsV2:MiscObjects:LeaderTrait_MadScientist script for an example of how you can extend this system to do practically anything you can imagine.
To test your new card in game, load into a save that has your leader as a Settler, or if not, then recruit them by whatever means necessary. Then, activate the Blueprint on a City Planner's Desk and choose Assign City Leader. You should be presented with a Barter menu where you'll find all available Leader Cards.
If you set up no Requirements, or they are all met, you should see your new Leader Card available to select!
After selecting it and confirming, you should get a follow-up prompt stating the NPC was successfully put in charge.