Results 1 to 5 of 5

Thread: How to make family/clan/tribe traits for your faction

  1. #1

    Default 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.

    Files required:

    data/export_descr_character_traits.txt
    data/text/export_VnVs.txt
    data/world/maps/campaign/imperial_campaign/descr_strat.txt
    data/world/maps/campaign/imperial_campaign/campaign_script/txt

    Step 1:

    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.

    Spoiler Alert, click show to read: 
    ;---------------------------------------------------------------

    Trait ruling_family
    Characters all

    Level ruling_family
    Description ruling_family_desc
    EffectsDescription ruling_family_desc
    Threshold 1

    Effect Authority 1

    ;---------------------------------------------------------------

    Trait loyal_opposition
    Characters all

    Level loyal_opposition
    Description loyal_opposition_desc
    EffectsDescription loyal_opposition_desc
    Threshold 1

    Effect TroopMorale 1
    Effect Command 1

    ;---------------------------------------------------------------

    Trait rival_clamaints
    Characters all

    Level rival_clamaints
    Description rival_clamaints_desc
    EffectsDescription rival_clamaints_desc
    Threshold 1

    Effect Loyalty -2
    Effect Authority 1


    ;===============================================================
    ;===============================================================
    ;===============================================================
    ;===============================================================
    ;===============================================================
    ;===============================================================
    ;===============================================================
    ;== TRIGGER DATA STARTS HERE ==
    ;===============================================================
    ;===============================================================
    ;===============================================================
    ;===============================================================
    ;===============================================================
    ;===============================================================


    Step 2:

    Now, at the bottom of the file put in trigger entries for your new traits like this to make the traits heritable father to son:

    Spoiler Alert, click show to read: 
    ;------------------------------------------
    Trigger dads_ruling_family
    WhenToTest CharacterComesOfAge

    Condition FatherTrait ruling_family>= 1

    Affects ruling_family 1 Chance 100

    ;------------------------------------------
    Trigger dads_loyal_opposition
    WhenToTest CharacterComesOfAge

    Condition FatherTrait loyal_opposition >= 1

    Affects loyal_opposition 1 Chance 100

    ;------------------------------------------
    Trigger dads_rival_claimants
    WhenToTest CharacterComesOfAge

    Condition FatherTrait rival_claimants >= 1

    Affects rival_claimants 1 Chance 100

    Then this, to assign a family trait to adopted generals:
    Spoiler Alert, click show to read: 
    ;------------------------------------------
    Trigger ruling_family_adoption
    WhenToTest OfferedForAdoption

    Condition FactionType venice

    Affects ruling_family 1 Chance 33

    ;------------------------------------------
    Trigger loyal_opposition_adoption
    WhenToTest OfferedForAdoption

    Condition FactionType venice
    and Trait ruling_family = 0

    Affects loyal_opposition 1 Chance 50

    ;------------------------------------------
    Trigger rival_claimants_adoption
    WhenToTest OfferedForAdoption

    Condition FactionType venice
    and Trait ruling_family = 0
    and Trait loyal_opposition = 0

    Affects rival_claimants 1 Chance 100

    Then this, to assign a family trait to adopted captains (Man of the Hour!):
    Spoiler Alert, click show to read: 
    ;------------------------------------------
    Trigger ruling_family_lesser_adoption
    WhenToTest LesserGeneralOfferedForAdoption

    Condition FactionType venice

    Affects ruling_family 1 Chance 33

    ;------------------------------------------
    Trigger loyal_opposition_lesser_adoption
    WhenToTest LesserGeneralOfferedForAdoption

    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):
    Spoiler Alert, click show to read: 
    ;------------------------------------------
    Trigger ruling_family_marriage
    WhenToTest OfferedForMarriage

    Condition FactionType venice

    Affects ruling_family 1 Chance 33

    ;------------------------------------------
    Trigger loyal_opposition_marriage
    WhenToTest OfferedForMarriage

    Condition FactionType venice
    and Trait ruling_family = 0

    Affects loyal_opposition 1 Chance 50

    ;------------------------------------------
    Trigger rival_claimants_marriage
    WhenToTest OfferedForMarriage

    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.

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default 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).

    Code:
    Trigger ruling_family_adoption        
        WhenToTest OfferedForAdoption          
    
        Condition FactionType venice
        and FatherTrait ruling_family>= 1
    
    Affects ruling_family 1  Chance 100
    Last edited by Gigantus; September 17, 2012 at 11:13 PM.










  3. #3

    Default 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.

  4. #4

    Default Re: How to make family/clan/tribe traits for your faction

    there were some spelling mistakes which caused crash...i tried to correct it

  5. #5

    Default Re: How to make family/clan/tribe traits for your faction

    btw i play as turks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •