How to make family/clan/tribe traits for your faction
This tutorial will show you how to make a set of inheritable traits for your generals that will assign every general to a specific family bloodline, clan, or ethnic group to represent competing subfactions. I came up with this for my Unite the Clans! submod for TATW.
Open export_descr_character_traits and scroll down to the triggers section. Right above the triggers section add a new trait entry for each of the families/ethnic groups/clans that you want to portray. In my example (in red) I want all of the generals for my faction (Venice) to be a member of one of three families: the Ruling Family, the Loyal Opposition, or the Competing Claimants to the throne. You can assign any effects to theses traits that you wish.
Condition FactionType venice
and Trait ruling_family = 0
Affects loyal_opposition 1 Chance 50
;------------------------------------------
Trigger rival_claimants_lesser_adoption
WhenToTest LesserGeneralOfferedForAdoption
and Trait ruling_family = 0
and Trait loyal_opposition = 0
Condition FactionType venice
Affects rival_claimants 1 Chance 100
Then this, to assign a family trait to generals who marry into the family (you can leave this one out if you want generals who marry in from other factions to remain unassigned):
Condition FactionType venice
and Trait ruling_family = 0
and Trait loyal_opposition = 0
Affects rival_claimants 1 Chance 100
The way this works is that 1/3 of all new generals are assigned to the first family, 1/2 of the remainder (another third) are assigned to the second family, and the rest are by default assigned to the last family. You can do this with as many different subfactions/families as you want, and wieght the probabilities for each trait to adjust the mix, as long as the last one has the "Chance 100" part so that every general gets assigned to one or the other.
Important: If you want to restrict adoptions across families/clans/whatever, you need to include the FatherTrait condition in those triggers as well. See Gigantus' post below.
Step 3:
Now open data/text/export_VnVs and scroll down to the bottom. Add entries for each of your new traits:
Spoiler Alert, click show to read:
{ruling_family}Ruling Family
{ruling_family_desc}This man is a member of the ruling family.
{ruling_family_effects_desc}+1 Authority, +1 Command
{loyal_opposition}Loyal Opposition
{loyal_opposition_desc}This man is a member of the loyal opposition family.
{loyal_opposition_effects_desc}+1 Troop Morale, +1 Command
{rival_claimants}Rival Claimants
{rival_claimants_desc}This man is a member of the rival claimants.
{rival_claimants_effects_desc}+1 Authority, -2 Loyalty
You can use whatever text suits the story you're trying to tell here.
Step 4:
Open descr_strat and assign a family trait to each of the starting generals for your faction. The entries should look something like this (new trait in red):
Spoiler Alert, click show to read:
character Luigi, named character, male, leader, age 45, x 356, y 191, portrait Luigi
traits ruling_family 1, Factionleader 1 , hero_ability19 1 , NaturalMilitarySkill 1 , GoodDefender 1 , PoliticsSkill 3 , GoodAdministrator 2 , Austere 1 , ReligionStarter 1 , GoodAttacker 1 , Cultured 1 , HaleAndHearty 2
ancillaries king_rhun, king_gathmarig, apothecary
army
unit Kataphracts Bodyguard exp 2 armour 0 weapon_lvl 0
Obviously, if you use my example the starting faction leader and faction heir should be members of the ruling_family. Remember that you have to delete data/world/maps/base/map.rwm before any changes in descr_strat will show up in the game.
Step 5:
If you have any spawning generals for your faction in the campaign script you'll also have to add the appropriate family traits as in descr_strat.
That's it. Now all of your starting generals and every general that joins your faction through coming of age, marriage, or adoption will be assigned to one of the competing subfactions.
This technique can be especially useful if you plan on allowing a rebel faction or barrons_alliance type faction to emerge.
Last edited by Spice Master; September 19, 2012 at 11:21 PM.
Re: How to make family/clan/tribe traits for your faction
Should be interesting to see a family tree with opposing\different family traits - which will easily happen with adoptions here. Unless the FatherTrait condition works with it (it should, given that the event exports the character_record).
Re: How to make family/clan/tribe traits for your faction
Well, it wasn't an issue in the context of the mod I developed the idea for originally. (I actually wanted adoptions across clans to be allowed). For the example used above though, your right I can see how it could make more sense to restrict this. Depends on the application. Thanks!
I think (haven't checked) that you could even use the FatherTrait in combination with a probability less that 100%, so that a general is more likely to adopt a member of his own subfaction, (but not necessarily guaranteed).
Last edited by Spice Master; September 19, 2012 at 11:20 PM.