By following this tutorial, all characters adopted or married into the royal family will be more varied, as they'll get a trait based on who their parents were, with some small effects.
Files Affected


  • Export_descr_character_traits.txt
  • Export_VnVs.txt

Part 1 - Making the traits
First, you want some traits and effects. Start by creating a base trait:
Code:
Trait SoTellMeAboutYourParents
    Characters family
Then add some levels, one for each type of parent, each with the threshold set to 1 more than the previous. Example:
Code:
    Level FarmerSon
        Description FarmerSon_desc
        EffectsDescription FarmerSon_effects_desc
        Threshold 1
        
        Effect Farming 1
        Effect TaxCollection -2
        Effect Trading 2
        Effect Construction 2
        Effect Mining -2
When you're satisfied with your traits, go on to part 2.
Part 2 - Making the triggers
Now you want the traits to trigger on adoption and marriage, so you need 3 triggers for the first and second level:
Code:
Trigger FarmerParents1
 WhenToTest OfferedForAdoption

 Affects SoTellMeAboutYourParents 1 Chance 100
 Affects SoTellMeAboutYourParents 1 Chance 95

;------------------------------------------
Trigger FarmerParents2
 WhenToTest LesserGeneralOfferedForAdoption

 Affects SoTellMeAboutYourParents 1 Chance 100
 Affects SoTellMeAboutYourParents 1 Chance 95

;------------------------------------------
Trigger FarmerParents3
 WhenToTest OfferedForMarriage

 Affects SoTellMeAboutYourParents 1 Chance 100
 Affects SoTellMeAboutYourParents 1 Chance 95
This will make the character always get the first level of the trait, and have a chance of going to the second level.
You then need 3 more triggers for each level:
Code:
Trigger CrafterParents1
 WhenToTest OfferedForAdoption

 Condition Trait SoTellMeAboutYourParents = 2
 
 Affects SoTellMeAboutYourParents 1 Chance 85

;------------------------------------------
Trigger CrafterParents2
 WhenToTest LesserGeneralOfferedForAdoption

 Condition Trait SoTellMeAboutYourParents = 2
 
 Affects SoTellMeAboutYourParents 1 Chance 95

;------------------------------------------
Trigger CrafterParents3
 WhenToTest OfferedForMarriage

 Condition Trait SoTellMeAboutYourParents = 2
 
 Affects SoTellMeAboutYourParents 1 Chance 90
For each level, the condition has to be increased by 1, so that it'll only trigger if the character got to the previous level.
Part 3 - Making some descriptions
Just make some descriptions for each level:
Code:
{FarmerSon}Son of a Farmer
{FarmerSon_desc}Due to being the son of a farmer, he learned farming and the importance of saving money at an early age. He did not, however, get much of a education on math.
{FarmerSon_effects_desc}+1 Farming Output, +2% Trade Income, -2% Construction Costs, -2% Tax Income, -2% Mining Income
Part 4 - tweaking the numbers
To get the distribution you want, you'll have to tweak the numbers. Attached is a spreadsheet where you can enter the chance of getting each level to find out what the distribution will be like.
Note that you can have the chances on adoption, military adoption, and marriage completely independent of each other.
After you've gotten the distribution you want, you should have a fully working system where all adopted characters have some skills based on what kind of parents they had.