The Leader Card system design opened up the doors for a lot more ideas about how we could kind of "remotely" alter or engage with NPCs from any source and add more functionality.
With SS2 we introduced a few new systems to tap into this idea and allow you interact with any NPC in the base game, DLCs, or mods, without needing to require them be a part of your mod!
Want to pick some Sim Settlements 2 jobs or homes that your favorite Tales from the Commonwealth settlers use, no problem! Want to fix the ridiculous stats that many of Bethesda's NPCs have - done (lookin at you Mama Murphy with 19 strength...)! Want to ensure that Longfellow always opens a Bar when left to his own devices - you can do that!
The first type we'll cover is establishing preferences for groups of building Classes, Plans, and Skins.
For this type, you pick an NPC and then any combination of those building records and when the NPC is assigned to a plot, the NPC will pick a plan/skin that matches one of the entries. Note: If player's manually set the plan, this will not override what they chose, this system is meant to affect the automated building choice.
First thing you have to do is decide which NPC you want to use, and then which building classes, plans, and skins you want them to prefer. You can have as many or as few as you like, and any that are unlocked at the time will be randomly pulled from. You can have them for every assignment type or just some assignment types.
We use the phrases "prefer" and "Preference" because their preference must be unlocked for them to use it, and their preference is ignored when the Player manually sets a plan. So this phrasing was to help make it clearer that this mechanic wasn't a guarantee - it would just make it more likely the NPC would end up in one of those choices.
For example, you could put in SS2_BuildingPlanClass_Rec_Training_Endurance and SS2_BuildingPlan_Rec_2x2_CentralPark, which would make them prefer Endurance Training building plans or specifically the Central Park plan for their Recreational Plot buildings. You could then have additional entries for their Job and Home assignment preferences.
In our example, when assigned to an unbuilt Recreational Plot, the system would put all Endurance Training building plans, and Central Park in a pool, and randomly pick one for that NPC to build.
You can find Building Class types under Miscellaneous > Keywords, by filtering for SS2_PlotTypeSubClass_. Building Plans, can be found under Items > Weapon, by filtering for BuildingPlan, though watch out for those that have mention of lvl or level in the IDs. Skins can be found under Items > Weapon as well, generally by filtering for Skin, and looking for those with root in the ID, or at least those without any mention of level.
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.
If you would like to set up any Class preferences, which would include all building plans within that class, add an entry to PreferredBuildingPlans, select Keyword in the first dropdown, and then pick one of the keywords starting with SS2_PlotTypeSubClass_.
These currently only accept Forms, and not UniversalForms, meaning you can only choose SS2 plans/skins, or those in your own Addon.
This might be changed in the future, I have honestly forgotten why we set it up this way instead of using UniversalForm in the first place, but I know it was for a reason that was not documented in code.
Once your NPC Preference forms are set up, it's time to tell SS2 about them so they can function.
If this is your first time working on an addon, or you haven't created addon configuration data yet, check out this tutorial).
Note, if multiple NPC Preference cards are defined for a single NPC across multiple installed addons, all of them will be merged by SS2 so that NPC can choose any plan/skin across all of them.
These allow you to set a Unique NPCs initial SPECIAL stats to particular values. I specificy "initial", because training after the fact through our Recreational training plots and gear can increase those stats through gameplay.
By default, this feature prevents lowering of stats, so if you are attempting to fix some overpowered NPCs, you would want to encourage players to override that feature when using your addon if you create any of these. The option can be found under Gameplay > NPCs > SPECIAL Stat Cards Can Lower Stats.
When this is enabled, SS2 will monitor for the player to arrive in settlements, find all unique NPCs, check for a corresponding Character Stat Card, and if found, change their SPECIAL stats to match what is defined in the stat card.
First step is to identify the character you would like to set up, and figure out what SPECIAL stats you want to give them.
You can look at existing stats in-game via the Vit-o-Matic, or in the CK by looking at the Stats tab of their Actor record.
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.
Warning: If you leave any unset, they will be set to 1 for that character.
Once your Character Stat Card forms are set up, it's time to tell SS2 about them so they can function.
If this is your first time working on an addon, or you haven't created addon configuration data yet, check out this tutorial).
Note, if multiple Character Stat Cards are defined for a single NPC across multiple installed addons, one of them will be chosen at random for each NPC.
Hop in game, and try assigning the Unique NPC to a settlement to trigger the Character Stat Card, and then zap them with the Vit-o-Matic (don't forget to check your settings to confirm both "Allow Stat Cards To Reduce Stats" and "SPECIAL Stats Adjusted For Uniques" are enabled).
Once they are assigned to the settlement, build the appropriate plot types you set up preferences for and assign them to confirm one of your expected plans/skins was used. (If this is a fresh save, be sure those plans/skins are unlocked!)
You don't have to do both! This was just shortcutting the explanation to talk about you doing both.