Traits are used to provide changes to gameplay rules. Many of these are tied to basic things like a numeric modifier. This guide shows all of the effects that are available by default, and how to make use of them to get the effect you want.
If a default effect can not cover what you'd like to do, then the trait system can be extended via script, or start a suggestion thread on the forums to build a consensus about other ideas for effects we could build in support for, and I will consider extending the default pool in the future!
For each of these, the name in bold is the exact string you would use as the value for the sDefaultEffect property. Below that will list any of the DefaultEffects section of your trait's properties that are used by that effect type.
When dealing with numbers, most of the time a negative number indicates a bad effect, while a positive number indicates a good effect. Exceptions will be documented for the specific effects that have them.
MaxVisitors: Changes the max number of visitors a settlement can have. The default value is 10.
- fDefaultEffectModifier: Number to modify by. Negative or positive whole numbers only.
MaxSettlerPets: Changes the max number of settlers that will potentially show up or gain pets. The default value is 5.
- fDefaultEffectModifier: Number to modify by. Negative or positive whole numbers only.
SettlersArriveWithPetsChance: Changes the chance new settlers will arrive with a pet already. The default value is 10%.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the chance by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the chance by 5%).
AutoWinAttackChance: Changes the chance any offscreen vanilla raids will be instantly defeated without any losses. The default value is 0%.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the chance by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the chance by 5%).
NonPlotMaintenanceCosts: Adds a multiplier to the Maintenance Costs of non-plot items that have them.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the costs by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the costs by 5%).
PlotOperatingCosts: Adds a multiplier to the Daily Operating Costs of plots that have them.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the costs by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the costs by 5%).
SalvageTeamSearchTime: Adds a multiplier to the time required for Caravan teams set to collect salvage Beacons must spend at the location to acquire everything.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the time by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the time by 5%). WARNING: Effect is reversed from most others, so negative numbers represent the positive effect.
SalvageTeamTravelSpeed: Adds a multiplier to the time required for Caravan teams set to collect salvage from Beacons take to travel between locations.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the time by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the time by 5%). WARNING: Effect is reversed from most others, so negative numbers represent the positive effect.
CaravanTravelSpeed: Adds a multiplier to the time required for Caravan teams to Fast Travel the player between locations.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the time by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the time by 5%). WARNING: Effect is reversed from most others, so negative numbers represent the positive effect.
SalvageSearchDiscoveryChance: Changes the chance a settler makes available Discoveries while on a Mark 1 Beacon salvage run. The default value is 10%.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the chance by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the chance by 5%).
SettlementResourceModifier: Applies a modifier to a settlement resource.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Numbers greater than 1 or less than -1 are treated as flat modifiers (ex. 10 will increase the resource by 10). Numbers between -1.0 and 1.0 are treated as percentages (ex. -0.05 will reduce the resource by 5%).
- DefaultEffectForm01: This should point to the ActorValue form you want to modify on the settlement. The most common to modify are Food, Water, Safety, and WorkshopRatingHappiness, though many other values will work if you understand the workshop system. There are also unique AVs available thanks to Workshop Framework that you can find by filtering for WSFW_WorkshopAV_.
SettlerNeeds: Applies a modifier to Food, Water, or Safety requirement of a settlement.
- fDefaultEffectModifier: Number to modify by. Negative or positive whole numbers only.
- DefaultEffectForm01: This should point to the ActorValue form you want to modify on the settlement. The only three valid values are: WSFW_ExtraFoodNeeds, WSFW_ExtraSafetyNeeds, and WSFW_ExtraWaterNeeds.
CityPlanUpgradeSpeed: Adds a multiplier to the time it takes for a City to be eligible to upgrade to the next level.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the upgrade speed by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the upgrade speed by 5%).
SPECIALStatAdjustment: Adds or alters a settlement resource based on a particular SPECIAL Stat of a settler to a Plot Type or Building Class.
This trait effect is difficult to describe without an example.
Example: by default each point of Endurance on assigned NPCs increases Food output of Agricultural Plots by 1; So a settler with 5 endurance, increases the output of their Agricultural Plot by 5.
This effect could modify the impact of Endurance by cutting it in half, or doubling it - so in our example, if it cut it in half, their 5 Endurance would instead increase Food by only 2.5, or doubling it would cause their Endurance to increase Food by 10.
It can also tie in new stats to resources, for example the Trait SS2_LeaderTrait_Major_MeleeTrainer, adds Strength to Martial Plot defense output. So that trait makes for a great example to follow if you're looking to achieve a similar effect.
This effect type can have a dramatic impact on the settlement if you are not careful with the numbers, so be sure to test this before releasing.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Numbers greater than or equal to 1, or less than or equal to -1 are treated as direct multipliers. Whereas if the number is a decimal less than 1 and greater than -1, this is treated as a percentage modifier.
Examples: If this is set to 2, than for every point of the corresponding SPECIAL stat, the settlement resource would be increased by 2.
If this is set to 0.5, than the change would be amplified by 50% of normal, or if this is a new effect, than a settlement resource increase of half of the corresponding SPECIAL stat value would be applied. If the number was -0.25, than the change would be decreased by 25%, or if this is a new effect, the settlement will suffer a penalty of 25% of the corresponding SPECIAL stat.
- DefaultEffectForm01: This should point to the Plot Type or Building Class Keyword to be impacted by this SPECIAL stat. The Plot Type keywords are prefixed with SS2_PlotType_, plus there is a special keyword for this system called SS2_Special_AllPlotTypes which would apply the effect to all Plots. The Building Class Keywords start with SS2_PlotTypeSubClass_.
Due to how powerful this effect is, I would recommend that if you are making this a Minor Trait, you stick to Building Class modifiers, instead of entire Plot Types, so that the effect is more narrowly focused to just some building plans in that settlement.
- DefaultEffectForm02: This should point to the ActorValue representing the appropriate SPECIAL stat: Strength, Perception, Endurance, Charisma, Intelligence, Agility, or Luck. Any other AV here will be ignored currently.
- DefaultEffectForm03: This should point to the ActorValue form you want to modify on the settlement. The most common to modify are Food, Water, Safety, and WorkshopRatingHappiness, though many other values will work if you understand the workshop system. There are also unique AVs available thanks to Workshop Framework that you can find by filtering for WSFW_WorkshopAV_.
PlotConstructionCosts: Adds a multiplier to the Construction/Upgrade Costs of Building Plans.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the costs by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the costs by 5%).
PlotUpgradeSpeed: Adds a multiplier to the time it takes for a Plot Building Plan to be eligible to upgrade to the next level.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the upgrade speed by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the upgrade speed by 5%).
- DefaultEffectForm01: This should point to the Plot Type or Building Class Keyword to be impacted by this effect. The Plot Type keywords are prefixed with SS2_PlotType_, plus there is a special keyword for this system called SS2_Special_AllPlotTypes which would apply the effect to all Plots. The Building Class Keywords start with SS2_PlotTypeSubClass_.
The following strings can be used for sDefaultEffect to modify the output of a plot's settlement resources (the ActorValue based numbers that impact a settlement, such as Food, Water, PowerGenerated, Safety, etc) based on what its class normally produces: PlotWaterRating, PlotFoodRating, PlotDefenseRating, PlotVirtualProduction, PlotScavGeneralRating, PlotHappinessBonusRating.
So even if you use PlotWaterRating for Martial Plots, it will still modify the Safety value of them due to how these effects are configured. These are effectively all the same effect in code, the different strings were to make it easy to see in the Trait configuration what specifically we were trying to boost when we were initially designing this system.
This effectively works the same as SettlementResourceModifier, except for each plot that matches the keyword you set in DefaultEffectForm01.
- fDefaultEffectModifier: Numbers greater than 1 or less than -1 are treated as flat modifiers (ex. 10 will increase the resource provided per matching plot by 10). Numbers between -1.0 and 1.0 are treated as percentages (ex. -0.05 will reduce the resource provided per matching plot by 5%).
- DefaultEffectForm01: This should point to the Plot Type or Building Class Keyword to be impacted by this effect. The Plot Type keywords are prefixed with SS2_PlotType_, plus there is a special keyword for this system called SS2_Special_AllPlotTypes which would apply the effect to all Plots. The Building Class Keywords start with SS2_PlotTypeSubClass_.
PlotProducedItems: Applies a modifier to the produced items of plots that match the keyword. This includes Virtual item production you see in your HUD, as well as physical goods produced by special building plans that provide them, such as the Production Class of Industrial.
- fDefaultEffectModifier: Number to modify by. Negative or positive number. Max change is +/- 100%. Whole numbers representing percent (ex. 10 will increase the produced amount by 10%), or decimal represented percentage between -1.0 and 1.0 (ex. -0.05 will reduce the produced amount by 5%).
- DefaultEffectForm01: This should point to the Plot Type or Building Class Keyword to be impacted by this effect. The Plot Type keywords are prefixed with SS2_PlotType_, plus there is a special keyword for this system called SS2_Special_AllPlotTypes which would apply the effect to all Plots. The Building Class Keywords start with SS2_PlotTypeSubClass_.
Guards: Provides guards that will patrol the settlement, and in some City Plans, the guards will even be posted in predetermined locations as well.
- DefaultEffectForm01: This should point to an ActorBase or Formlist of ActorBase records, to be used as the Light Guard type.
- DefaultEffectForm02: This should point to an ActorBase or Formlist of ActorBase records, to be used as the Heavy Guard type.
SettlerTypes: Alternate settler forms are introduced to replace normal settlers based on a percent chance defined here.
- fDefaultEffectModifier: Chance that DefaultEffectForm01 type of settler is spawned instead of a normal settler. Positive numbers only. Whole numbers representing percent (ex. 10 will set the chance to 10%), or decimal represented percentage between 0.0 and 1.0 (ex. 0.05 will set the chance to 5%).
- DefaultEffectForm01: This can point to an ActorBase, or a Formlist of ActorBase records, to be used as the form to replace the normal settlers fDefaultEffectModifier percent of the time.
VirtualResourceModifier: Generate or consume virtual resources on a daily basis.
- fDefaultEffectModifier: Number to modify by. Negative or positive number.
- DefaultEffectForm01: This should point to one of the Virtual Resource Actor Values with daily in the name. Eligible values can be found by filtering for SS2*Virtual*Daily. Note that the entries for Food, Water, and Power are not currently used by SS2 (to increase food water or power, use the SettlementResourceModifier type explained higher up in this document), and those with Supplies will not be used until Chapter 3.
It is highly recommended that you use this to increase virtual resource production at the component level, for example, SS2_VirtualResourceDaily_BuildingMaterials_Aluminum, as opposed to the categories. SS2 will dynamically detect if the player is playing in a simpler resource complexity, and change the resource production to match their setting.
VirtualResourceStorageModifier: Modify the max Virtual Storage for the settlement.
- fDefaultEffectModifier: Number to modify by. Negative or positive number.
- DefaultEffectForm01: This should point to the Actor Value SS2_VirtualResourceCategory_Scrap. After Chapter 3 is released, there will be an additional storage type available to choose from: SS2_VirtualResourceCategory_Supplies.