Page 1 of 2 12 LastLast
Results 1 to 30 of 33

Thread: Guide: The complete traits/ancillaries guide

  1. #1
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Guide: The complete traits/ancillaries guide

    Modding Resource Header
    Title: The Complete EDCT/EDA Guide for RTW (inc. BI)
    Posted by: Squid
    Modding area: Characters (traits, ancillaries)
    Required programmes: Notepad (or other text editor)
    Recommended programs: ATVTW (trait/ancillary validator)
    Summary: An in-depth explanation of the export_descr_character_traits, export_descr_ancillaries files, which is the primary base for all traits and ancillaries in the game.






    The Complete EDCT/EDA Guide for Rome: Total War:



    Understanding & Coding Export_Descr_Character_Traits.Txt (EDCT) and Export_Descr_Ancillaries (EDA) files

    by Squid

    THIS IS A WORK IN PROGRESS AND WILL UPDATED AS NEEDED

    Modders: Please help make this the one-stop source for edu-related information. You can post your comments, corrections and additions on its associated thread at the Modding Questions Forum at: https://forums.totalwar.org/vb/showthread.php?t=96457

    Last update: 04/02/2008

    CONTENTS
    • Introduction
    • EDCT Breakdown
    • EDA Breakdown

    Introduction:

    When I started to work for the Roma Surrectum team on the traits and ancillaries files, I went to all the resources both here at totalwar.org, and at twcenter.net, and sadly found them incomplete, not giving complete details on what could be done within the files. I found this disappointing as traits and ancillaries can add a huge amount of depth to any mod and yet without a more complete resource available every modder who tries their hand at the traits and ancillaries has no complete resource to refer to. I'm hoping that with this guide I can fill in many of the gaps that the current information available has. As you read through this guide you will notice Bug Alert, and CTD Alert starting paragraphs at various points, these paragraphs are there to bring two kinds of issues to a modders attention, Bug Alert highlights areas where the game engine allows certain things to go through but that actually cause problems in the game or cause things not to work as expected. CTD Alert highlights CTDs that I've bumped into. For each CTD Alert, where the solution isn't obvious I've listed the solution if I've found it.

    Comments in EDCT/EDA

    In both files a line with comment on it must begin with a ; (semi-colon)

    EDCT Breakdown

    EDCT contains all the information about traits and how they can be acquired. The file is split into 2 sections. The first section is the Trait Section, this section contains the information about the individual traits, including which characters types can acquire a trait, which cultures are precluded from acquiring a trait, if the trait can be seen, which traits are mutually exclusive (i.e. both traits can't be had on the same character), what effects the trait has at its various levels, as well it lists which text entries from the related export_VnVs.txt file are to be used when displaying the trait.

    Some of the lines are optional lines and aren't present in every trait, those optional lines will have OPTIONAL at the beginning of the description of what the lines do.

    Each trait is broken into two distict sections the header section, and the levels section. First we'll go through the header section.

    Trait Header:

    Sample Trait Header:

    Code:
    Trait Trait_Name
        Characters Character_Type
        Hidden
        ExcludeCultures Excluded_Culture(s)
        NoGoingBackLevel  No_Going_Back_Level
        AntiTraits Anti_Trait(s)
    So let's examine the Trait Header line by line:

    Code:
    Trait Trait_Name
    This is the name of the trait, it must be unique, no two traits can share the same name. The name of the trait can be used in the AntiTraits line below, in an Affects line in the trigger section, or as part of a condition for a trigger in either EDCT or EDA, the one other place where Trait_Name will be used is in descr_stat.txt to specifiy the starting traits for the various characters.

    Code:
        Characters Character_Type(s)
    This line specifies which character type(s) are able to acquire a trait. The current character types are: spy, assassin, diplomat, admiral, family and all. The current docudemon files show general and named character as additional character types, but I haven't tested these or seen them in an existing trait.

    Note: Recruited generals are considered the family character type and can acquire traits limited to family members.

    Bug Alert: Although the game engine allows you to specifiy a comma seperated list of character types only the first character type from your list will be able to acquire the trait. There are two workarounds for this bug, one is to create additional traits for each character type that you want to acquire this trait, the second it to use character type all and use the triggers to limit which characters can acquire the trait. I prefer the second method but both will work.

    CTD Alert: If the second line of the trait is not the Characters line you will get the following CTD.

    Code:
    Script Error in data/export_descr_character_traits.txt, at line X, column Y
    
    Unknown identifier for trait(Trait_Name) level (Trait_Name) when expecting characters.
    Code:
        Hidden
    Optional, this line is added when you don't want the trait to be listed on the character information screen (i.e. recruitment screen, right-click character portrait, etc).

    Code:
        ExcludeCultures Excluded_Culture(s)
    Optional, this line is added when you want to exclude certain culture group(s) from being able to acquire a trait. The cultures on the list should be taken from the descr_sm_cultures.txt file. If listing more than one culture they must be listed as a comma seperated list of cultures.

    Code:
        NoGoingBackLevel  No_Going_Back_Level
    Optional, the line NoGoingBackLevel No_Going_Back_Level means that once you hit the level No_Going_Back_Level, you can only gain points for the trait, points towards any antitraits will no longer reduce your points for the trait.

    NoGoingBackLevel should be used whenever a trait has an antitrait and you expect the trait to actually acquire points of its own and not just reduce the points of its' AntiTraits, see the bug alert below for details. In other words if you have trait that is an antitrait to second trait for the purpose of reducing the second trait to 0 points then a NoGoingBackLevel is not needed.

    Example: If you have a trait A with an antitrait B and A has a NoGoingBackLevel of 2, then once you get enough points to get the second level of trait A, points you acquire towards trait B will no longer reduce your points in trait A, but any points you get towards trait A will continue to accumulate.

    Bug Alert:There is a nasty bug with AntiTraits, I'd explain it, but Player1's explanation is much better, so I'm just going to quote it from his BUG-FIXER:

    Quote Originally Posted by Player1
    Workaround for the bug when gaining an anti-trait would reset trait value to zero

    This is one nasty bug. It does not happen often, but when it happens it's not pretty. For example, if your Assassin had 4 points in GoodAssassin (Superior Assassin), and after one failed kill got 1 point of BadAssassin, instead getting left with 3 points (Murderer), he'll lose all points in GoodAssassin. Careful inspection shows that this bug only happens with traits that have no "NoGoingBackLevel". Just giving virtual "NoGoingBackLevel" to all problematic traits will fix the bug. By virtual, I mean giving levels that are not possible to achieve, like 6th level for GoodAssassin (which has just 5 levels).
    Code:
        AntiTraits Anti_Trait(s)
    Optional, this list should include those traits where it doesn't make sense for one character to have both traits (e.g. Pious & Atheist should be antitraits because it doesn't make sense for someone to be both Pious & Atheist). There is a hard-coded limit of 10 antitraits(1.2)/20(1.5/1.6). Listing too many antitraits will cause a CTD.

    Note: Although not a hard and fast rule, your antitraits should go both ways, so using the example above Pious should have Atheist as an antitrait and Atheist should have Pious as an antitrait.

    Bug Alert: The game engine does not check for the validity of your anti-traits list, so an undefined or misspelt antitrait will still let the game load. Misspelt traits will obviously cause problems as both traits can be acquired by one character. I do not know if undefined trait in the antitraits list causes any issues.

    CTD Alert:
    One CTD in the header that gave me fits trying to solve was that I'd inadvertantly misordered the lines in the header section. I got the following error from -show_err:

    Code:
    Script Error in data/export_descr_character_traits.txt, at line X, column Y
    
    Trait not recognized
    The line the error was refering to, was the first instance where I had a condition of the form Trait ABC = # or FatherTrait ABC = # in either EDCT or EDA. What misordering the lines had done was to make the engine not recognize any trait that came after the trait with the misordered lines even though it parsed them without any error. The not recognized trait may even have been in an Affects line before the line in question but that wouldn't get caught.

    Trait Level:

    All traits will have between 0 and 9 levels. 9 levels is a hardcoded limit. Although I haven't tried to have a trait without the Hidden line have 0 levels, a trait with the Hidden line is not required to have any levels.

    Note: Any trait without a level might as well be hidden since it won't ever be acquired and the only use they have is to make other traits go back to 0 points.

    If you look at the following image, you'll see how some of the trait information actually looks in game:



    If some of this doesn't yet make sense, keep reading and I'll fill in the details as I go along.

    Sample Trait Level:

    Code:
        Level Level_Name
            Description Level_Description
            EffectsDescription Level_Effects_Description
            GainMessage Level_Gain_Message
            LoseMessage Level_Lose_Message
            Epithet Level_Epithet_Description
            Threshold Trait_Points
    
            Effect Attribute Attribute_Points
    File Linkage: For each of the lines up to (but not including) Threshold, you will have to have a corresponding line in the export_VnVs.txt file of the form:

    {Level_Name}<tab>Displayed Level Name
    or
    {Level_Description}
    Description of the Level

    Typically Level_Name & Epithet follow the first format, while the other four follow the second format.

    CTD Alert: For any of Level_Name, Level_Description, Level_Effects_Description, Level_Epithet_Description if the corresponding entry in export_VnVs.txt does not exist (or is misspelt), then if a character acquires the trait with a missing/incorrect entry a CTD will occur if you try and view the character details screen (i.e. right-click on character portrait, open recruitment window, etc).

    Note: If you look at the sample trait level none of the lines from Level to Epithet need to be unique. This means that multiple levels in the same trait, or levels in different traits can have the same values for any or all of those lines. This is a great way to cut down on the size your export_VnVs.txt file.

    So let's examine a Trait Level line by line:

    Code:
        Level Level_Name
    This is the line that you see in the trait window (when you right-click on a character portrait, open the recruitment screen, etc).

    Code:
             Description Level_Description
    This is the line that provides the description of this level of the trait. It is visible in the trait window when you mouse over the Level_Name on a character's trait screen.

    Code:
             EffectsDescription Level_Effects
    This is the line that provides the list of effect that this level of the trait provides. It is visible in the trait window when you mouse over the Level_Name on a character's trait screen.

    Code:
            GainMessage Level_Gain_Message
    Optional, if the GainMessage line is included with the level of a trait, then when a character acquires that level an event message will appear with the text from this message.

    Code:
             LoseMessage Level_Lose_Message
    Optional, if the LoseMessage line is included with the level of a trait, then when a character has reached a level of trait with a LoseMessage line, and the character acquires enough points in an antitrait that it reduces the number of points they have in the trait below the Threshold value, then an event message will appear with the text from this message.

    Note:
    • If you have a gain/lose message for a level of a hidden trait, the event message will still be displayed even though the trait remains hidden. All appropriate VnV entries need to exist.

    Code:
             Epithet Level_Epithet_Description

    Optional
    , if the Epithet line is included with the level of a trait, then when the character acquires the level of the trait with the Epithet line that characters name will change to be their first name plus the contents of the Epithet line message.

    Code:
             Threshold  Trait_Points
    The value given for trait points, is the number of points a character needs to accumulate in order to acquire that particular level of trait. The hardcoded minimum threshold value is 1.

    Code:
    Effect Attribute Attribute_Points
    Optional, Each trait can have zero or more Effect lines. Each Effect line
    can have a positive or negative effect on the associated attribute.

    The list of known attributes is:
    • MovementPoints
    • Command
    • Loyalty
    • TroopMorale
    • Influence
    • Management
    • Fertility
    • PersonalSecurity
    • PublicSecurity
    • Negotiation
    • Subterfuge
    • HitPoints
    • Attack
    • Defence
    • Ambush
    • Law
    • SiegeAttack
    • SiegeDefence
    • Unrest
    • Construction
    • LineOfSight
    • Trading
    • Squalor
    • BribeResistance
    • Bribery
    • TrainingAgents
    • Farming
    • Mining
    • SiegeEngineering
    • NightBattle
    • NavalCommand
    • InfantryCommand
    • CavalryCommand
    • Combat_V_Roman
    • Combat_V_Greek
    • Combat_V_Slave
    • Combat_V_Carthaginian
    • Combat_V_Eastern
    • Combat_V_Barbarian
    • Combat_V_Egyptian
    • Combat_V_Nomad
    • Combat_V_Hun
    • TaxCollection
    • PopularStanding
    • SenateStanding
    • LocalPopularity
    • Electability
    • Looting
    • TrainingAnimalUnits
    • BodyguardValour
    • BattleSurgery
    • TrainingUnits
    • SlaveTrading
    • Health
    • GrainTrading

    Notes:
    • Not all of the attributes listed above are usable in both RTW and BI, at least without some modification of the game files.
    • Even if a level does not have an effect, it still needs an EffectsDescription line. The corresponding line in export_VnVs.txt file can be blank.
    • Combat_V_faction_name is not a valid attribute
    • Combat_V_culture_name does not support gaining negative points in a trigger

    Trigger Section:

    The trigger section is read sequentially by the game engine, meaning that triggers earlier in the trigger section will trigger before those that appear later.

    The file BI_docs.zip contains much of the information that will be required for use in the triggers, it contains a list of all events and conditions that are available in the game as of 1.5/1.6 patch. Not all the information included is accurate and where known I will point out events and conditions that don't work.

    Sample Trigger:

    Code:
    Trigger Trigger_Name
        WhenToTest Event_Name
    
        Condition Condition_1
               and Condition_2
    
        Affects Trait_Name  Trait_Points_Assigned  Chance  Percentage
    Code:
    Trigger Trigger_Name
    This is the name of the trigger, no two triggers can share the same name.

    CTD Alert: If two triggers share the same name, when one of the triggers is triggered by the game, an errorless CTD will result.

    Code:
        WhenToTest Event_Name
    The Event_Name indicates when the trigger should be tested. The list of possible events are located in the docudemon_events.txt file. Not all events listed in this file can be used in EDCT/EDA. An examination of the events used in EDCT/EDA seems to indicate that the usable events are those for which in the Exports line lists character_record or nc_character_record.

    Non-Functional Events: The following is a list of events which, while exporting the correct record, do not work or do not work as expected for traits:

    PreBattle
    CharacterMarries
    Code:
         Condition Condition_1
                and Condition_2
    Optional, the condition(s) that can be used to limit when the Affects of the trigger are implemented. Every condition in the condition list must be met in order for the Affects line(s) to kick in. The list of conditions are located in the docudemon_conditions.txt file. Not all conditions can be used with all events. A condition can be used with an event if the Trigger requirements line for the condition is listed on the Exports line of the Event_Name in the docudemon_events.txt file.

    Notes:

    • If there are no conditions for a trigger the Affects line(s) will always be implemented.
    • Affects accepts negative points for traits

    Quote Originally Posted by BozosLivesHere
    I'm pretty sure that once I tested it and assigning negative points for traits overruled NoGoingBackLevel.
    • An invalid condition will always evaluate to true.


    Non-Functional Conditions:
    The following is a list of conditions which, while do not work or do not work as expected for traits:

    FactionwideAncillaryExists - works in EDA
    WorldwideAncillaryExists - works in EDA
    NumEnemiesInBattle - may cause a CTD with PostBattle event in reinforcement battles


    CTD Alert: Certain conditions make reference to items defined in other files, such as EDB, sm_cultures, etc. Some of these conditions will produce CTDs if the items are undefined in the external files. Here are the CTDs that can be produced:

    Undefined/Incorrect Building Name:
    Code:
    Script Error in data/export_descr_character_traits.txt, at line X, column Y
     
    Building level name building_level_name not found in building database
    Undefined/Incorrect Culture:
    Code:
    Script Error in data/export_descr_character_traits.txt, at line X, column Y  
    
    culture type not recognized
    Undefined/Incorrect Faction:
    Code:
    Script Error in data/export_descr_character_traits.txt, at line X, column Y
       
    faction type not recognized
    Undefined/Incorrect Character Type:
    Code:
    Script Error in data/export_descr_character_traits.txt, at line X, column Y
      
    character type not recognized
    Code:
         Affects Trait_Name  Trait_Points_Assigned  Chance  Percentage
         Religious_Belief religion religion_belief_points_assigned
         Religious_Order religion religion_order_points_assigned
    Each trigger must have one or more Affects, Religious_Belief, or Religious_Order line. In practice I've only ever seen either one or the other of Religious_Belief and Religious_Order, and never two in the same level, whether two+ beliefs, two+ orders, or some combination.

    The Trait_Name will be given Trait_Points_Assigned towards reaching the Threshold of the next level of the trait Percentage of the time. Percentage is always a whole number (i.e. no decimals, no fractions, etc) between 1 and 100.

    The religion must be one of the defined religions in descr_beliefs.txt, while the points assigned affect the conversion rate, and provide and order bonus respectively.

    Example: Affect Trait_Name 5 Chance 50 will increase Trait_Name (or decrease it's AntiTraits) by 5 points 50% of the time.

    CTD Alert: Using an undefined trait in either the Affects line(s) or the Condition section will result in the following CTD:

    Code:
    Script Error in data/export_descr_character_traits.txt, at line X, column Y
    
    Trait not recognized
    Last edited by Squid; 06-23-2008 at 18:40. Reason: Added link to ATVTW validator

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

    Member thankful for this post:



  2. #2
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Guide: The complete traits/ancillaries guide

    . . . Continued from previous post

    EDA Breakdown

    The EDA contains all information regarding the ancillaries, or retinue members as they are refered to ingame. This file is split into two distinct sections, the Ancillary section, and the trigger section. The ancillary section contains all the information about the ancillaries, their names, which picture to use to represent them, which cultures cannot acquire an ancillary as well as the description and effects associated with an ancillary, as well it lists which entries from the related export_ancillaries.txt file are to be used when displaying the ancillary.

    Ancillary Section

    Sample Ancillary:

    Code:
    Ancillary ancillary_name
        Image ancillary_image.tga
        Unique
        ExcludedAncillaries ancillary_name(s)
        ExcludeCultures excluded_culture(s)
        Description ancillary_description
        EffectsDescription ancillary_effects_description
        Effect Attribute  Attribute_points
    File Linkage: For each of ancillary_name, ancillary_description and ancillary_effects_description, you will have to have a corresponding line in the export_ancillaries.txt file of the form:

    {ancillary_name}<tab>Displayed Ancillary Name
    or
    {ancillary_description}
    Description of the Level

    Typically ancillary_name follows the first format, while ancillary_description,ancillary_effects_description follow the second format.

    Note: Neither ancillary_description norancillary_effects_description are required to be unique entries in export_ancillaries.txt; however, ancillary_name is required to be unique as the name of the ancillary must be unique.

    CTD Alert: For any of ancillary_name, ancillary_description and ancillary_effects_description, if the corresponding entry in export_ancillaries.txt does not exist (or is misspelt), then upon acquiring the ancillary, or trying to view the character screen of a character with an ancillary with a missing/incorrect entry an errorless CTD will occur.

    So let's examine an ancillary line by line:

    Code:
    Ancillary ancillary_name
    This is the name of the ancillary, ancillary_name must be unique. No two ancillaries can have the same value for ancillary_name. The name of the ancillary can be used in the ExcludedAncillaries line below, in the trigger section of EDA on the AcquireAncillary line, or in the conditions section of a trigger. The one other place you will use ancillary_name is in descr_stat.txt to give an ancillary to a character that starts on the campaign map.

    Code:
         Image ancillary_image.tga
    This line specifies the image file to be used on the character screen. By default the ancillary images are located data/ui/ancillaries, the contents of this folder are in a pak file by default.

    Code:
         Unique
    Optional, this line is used to specify that a particular ancillary is unique, in other words the ancillary can only ever be acquired once.

    Code:
         ExcludedAncillaries ancillary_name(s)
    Optional, this line gives the list of ancillaries that prevent the given ancillary from being acquired. So if an ancillary A has ancillary B on it's ExcludedAncillaries list then if a character has ancillary B they cannot get ancillary A. The list of ExcludedAncillaries is a comma seperated list

    Notes:
    • For any ancillary that has the Unique line, it seems to require that the ancillary list itself on the ExcludedAncillaries list
    CTD Alert: There is a hardcoded limit of 3 ExcludedAncillaries. If more than 3 are listed an errorless CTD is produced.

    Code:
         ExcludeCultures excluded_culture(s)
    Optional, this line is added when you want to exclude certain culture group(s) from being able to acquire a trait. The cultures on the list should be taken from the descr_sm_cultures.txt file. If listing more than one culture they must be listed as a comma seperated list of cultures.

    Code:
         Description ancillary_description
    This is the line that provides the description of the ancillary. It is visible in the character info window when you mouse over the Ancillary_Name.

    Code:
         EffectsDescription ancillary_effects_description
    This is the line that provides the list of effect that the ancillary provides. It is visible in the character info window when you mouse over the Ancillary_Name.

    Code:
         Effect Attribute  Attribute_points
    Optional, Each ancillary can have zero or more Effect lines. Each Effect line can have a positive or negative effect on the associated attribute.

    The list of known attributes is:
    • MovementPoints
    • Command
    • Loyalty
    • TroopMorale
    • Influence
    • Management
    • Fertility
    • PersonalSecurity
    • PublicSecurity
    • Negotiation
    • Subterfuge
    • HitPoints
    • Attack
    • Defence
    • Ambush
    • Law
    • SiegeAttack
    • SiegeDefence
    • Unrest
    • Construction
    • LineOfSight
    • Trading
    • Squalor
    • BribeResistance
    • Bribery
    • TrainingAgents
    • Farming
    • Mining
    • SiegeEngineering
    • NightBattle
    • NavalCommand
    • InfantryCommand
    • CavalryCommand
    • Combat_V_Roman
    • Combat_V_Greek
    • Combat_V_Slave
    • Combat_V_Carthaginian
    • Combat_V_Eastern
    • Combat_V_Barbarian
    • Combat_V_Egyptian
    • Combat_V_Nomad
    • Combat_V_Hun
    • TaxCollection
    • PopularStanding
    • SenateStanding
    • LocalPopularity
    • Electability
    • Looting
    • TrainingAnimalUnits
    • BodyguardValour
    • BattleSurgery
    • TrainingUnits
    • SlaveTrading
    • Health
    • GrainTrading
    Notes:
    • Not all of the attributes listed above are usable in both RTW and BI, at least without some modification of the game files.
    • Even if an ancillary does not have an effect, it still needs an EffectsDescription line. The corresponding line in export_ancillaries.txt file can be blank.
    • Combat_V_faction_name is not a valid attribute
    • Combat_V_culture_name does not support gaining negative points in a trigger
    EDA Trigger Section:

    The EDA triggers are mostly like their counterparts in EDCT but there are a few key differences.

    Sample Trigger:

    Code:
    Trigger Trigger_Name WhenToTest Event_Name Condition Condition_1 and Condition_2 Affects Trait_Name Trait_Points_Assigned Chance Percentage AcquireAncillary ancillary_name Chance Percentage
    Code:
    Trigger Trigger_Name
    This is the name of the trigger, no two triggers can share the same name.

    CTD Alert: If two triggers share the same name, when one of the triggers is triggered by the game, an errorless CTD will result.

    Code:
     
    WhenToTest Event_Name
    The Event_Name indicates when the trigger should be tested. The list of possible events are located in the docudemon_events.txt file. Not all events listed in this file can be used in EDCT/EDA. An examination of the events used in EDCT/EDA seems to indicate that the usable events are those for which in the Exports line lists character_record or nc_character_record.

    Non-Functional Events: The following is a list of events which, while exporting the correct record, do not work or do not work as expected for traits:
    • PreBattle
    • CharacterMarries
    • OfferedForMarriage - works in EDCT
    Code:
     
    Condition Condition_1 and Condition_2
    Optional, the condition(s) that can be used to limit when the Affects of the trigger are implemented. Every condition in the condition list must be met in order for the Affects line(s) to kick in. The list of conditions are located in the docudemon_conditions.txt file. Not all conditions can be used with all events. A condition can be used with an event if the Trigger requirements line for the condition is listed on the Exports line of the Event_Name in the docudemon_events.txt file.

    Notes:
    • If there are no conditions for a trigger the Affects/AcquireAncillary line(s) will always be implemented.
    • Affects accepts negative points for traits
    Quote Originally Posted by "[B
    BozosLivesHere"[/b]] I'm pretty sure that once I tested it and assigning negative points for traits overruled NoGoingBackLevel.
    • An invalid condition will always evaluate to true.
    Non-Functional Conditions: The following is a list of conditions which, while do not work or do not work as expected for traits:

    • NumEnemiesInBattle - may cause a CTD with PostBattle event in reinforcement battles
    CTD Alert: Certain conditions make reference to items defined in other files, such as EDB, sm_cultures, etc. Some of these conditions will produce CTDs if the items are undefined in the external files. Here are the CTDs that can be produced:

    Undefined/Incorrect Building Name:
    Code:
     
    Script Error in data/export_descr_character_traits.txt, at line X, column Y Building level name building_level_name not found in building database
    Undefined/Incorrect Culture:
    Code:
     
    Script Error in data/export_descr_character_traits.txt, at line X, column Y culture type not recognized
    Undefined/Incorrect Faction:
    Code:
     
    Script Error in data/export_descr_character_traits.txt, at line X, column Y faction type not recognized
    Undefined/Incorrect Character Type:
    Code:
     
    Script Error in data/export_descr_character_traits.txt, at line X, column Y character type not recognized
    Code:
     
    Affects Trait_Name Trait_Points_Assigned Chance Percentage AcquireAncillary ancillary_name Chance Percentage
    Each EDA trigger must have one or more Affects, Religious_Belief, Religious_Order and/or AcquireAncillary lines. The ancillary_name ancillary will be acquired Percentage of the time. For how an affects, religious_belief or religious_order line works see the trait version of the trigger section.

    Example: AcquireAncillary ancillary_name Chance 50 will acquire the ancillary ancillary_name 50&#37; of the time.

    CTD Alert: Using an undefined Ancillary in either the AcquireAncillary line(s) or the Condition section will result in the following CTD:

    Code:
     
    Script Error in data/export_descr_ancillaries.txt, at line X, column Y Ancillary not recognized


    Notes:
    • You can't trigger a trait directly from what ancillary a general has, but you can give ancillaries for generals a NavalCommand bonus that doesn't show up, and use that attribute level as a trigger condition in the trait file. (from Makanyane)
    • If you have a mixed trigger (i.e. both affects and acquireancillary are present), then the affects lines must come before the acquireancillary lines or the traits are not assigned even with chance of 100. BUT if you have a mixed trigger, then you don't get a message saying the ancillary was acquired.
    Last edited by Squid; 06-23-2008 at 19:08. Reason: Undid adition as it doesn't work in it's current form

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

    Member thankful for this post:



  3. #3

    Default Re: Guide: The complete traits/ancillaries guide

    That's great, Squid!

    Question: Is it possible to make every level of a trait non-going-back? So if one gets the 4th level of the trait, he can't go back to the 3rd. But then if he gets the 5th one, he then can't go back from that one to the 4th and so on. Multiple NoGoingBack lines will cause a CTD iirc.

    Norman Invasion - The fate of England lies in your hands...

    Viking Invasion II - Unite Britain in the best TW campaign ever!

    Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland

  4. #4
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: Guide: The complete traits/ancillaries guide

    Well done, Squid - good work.


    I knew I should have patented the "Complete Guide" series
    "One of the most sophisticated Total War mods ever developed..."

  5. #5
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Guide: The complete traits/ancillaries guide

    Quote Originally Posted by Aradan
    That's great, Squid!

    Question: Is it possible to make every level of a trait non-going-back? So if one gets the 4th level of the trait, he can't go back to the 3rd. But then if he gets the 5th one, he then can't go back from that one to the 4th and so on. Multiple NoGoingBack lines will cause a CTD iirc.
    I'm obviously going to have going to have to reword that, as that is exactly what I was attempting to say. My understanding is that NoGoingBackLevel means that once you hit the indicated level, you can only gain points for the trait, points towards any antitraits will no longer reduce your points for the trait.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  6. #6
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Guide: The complete traits/ancillaries guide

    Great guide Squid well done

    Before anyone asks, this has been added to the characters section in the database, it's just not showing up as last thing posted....

    Edit: a couple of remembered things worth mentioning; it's not on the known attribute list anyway but Combat_V_Faction definitely doesn't work, and Combat_V_Culture with a minus value didn't seem to have any effect either when I tested it.

    You can't trigger trait directly from what ancillary a general has, but you can give ancillaries for generals a NavalCommand bonus that doesn't show up, and use that attribute level as a trigger condition in the trait file.
    Last edited by Makanyane; 09-06-2007 at 17:58.
    Not used mods before? Looking for something small and fun?!
    Download the:

  7. #7
    EB Traitor Member BozosLiveHere's Avatar
    Join Date
    Jan 2006
    Location
    Uqbar, Tlön
    Posts
    3,662

    Default Re: Guide: The complete traits/ancillaries guide

    A few things off the top of my head:

    1)Neither FactionwideAncillaryExists nor WorldwideAncillaryExists will work in EDCT, but they will work in EDA.

    2)You can use Affects lines in triggers placed in EDA and they'll work fine. The only caveat seems to be that if you use mixed triggers - i.e. have both AcquireAncillary and Affects lines in the same trigger - they have to be placed before the "normal" triggers in the file.

    3)Affects accepts negative points for traits, and I'm pretty sure that once I tested it and it overruled NoGoingBackLevel.

    4)The trigger section of EDCT is read sequentially. This is useful in a lot of ways.

    5)Using the NumEnemiesInBattle conditional in PostBattle triggers may result in a CTD if there are multiple armies involved in the battle.

    I'll try to remember more stuff later.
    Last edited by BozosLiveHere; 09-06-2007 at 16:44.

  8. #8

    Default Re: Guide: The complete traits/ancillaries guide

    Sorry for the stupidity, Squid! Here's what I originally wanted to say (but rushed typing and having many things in mind can cause typos and dump things like that to happen):

    How can you make a trait to be unable to decrease below a certain level, but from the next level and higher it *can* decrease to that certain limit. For example the good general trait cannot go below level 3, but if it is, say, 5, then it can decrease to 4 or 3 again; but not lower.

    Norman Invasion - The fate of England lies in your hands...

    Viking Invasion II - Unite Britain in the best TW campaign ever!

    Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland

  9. #9
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Guide: The complete traits/ancillaries guide

    Judging by what BozosLivesHere posted about negative points allowing you to decrease a trait even if it has exceeded its NoGoingBackLevel you would have a trigger that if the trait is over the NoGoingBackLevel (using Trait A > #) it gives a negative bonus to the trait. If it works let us know.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  10. #10

    Default Re: Guide: The complete traits/ancillaries guide

    Very nice guide! However, is there any way to give captains traits? Also, is there a list of which conditions in the docudemon files work with traits?

  11. #11
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Guide: The complete traits/ancillaries guide

    Quote Originally Posted by SSJVegetaTrunks
    Very nice guide! However, is there any way to give captains traits? Also, is there a list of which conditions in the docudemon files work with traits?
    To the first question, no. To the second question here's the relevant part of the guide:

    Quote Originally Posted by Complete EDCT/EDA
    The list of conditions are located in the docudemon_conditions.txt file. Not all conditions can be used with all events. A condition can be used with an event if the Trigger requirements line for the condition is listed on the Exports line of the Event_Name in the docudemon_events.txt file.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  12. #12

    Default Re: Guide: The complete traits/ancillaries guide

    Great guide Squid!
    I'm coder/scripter for LOTR-TW and I didn't know about this NoGoingBackLevel bug. Thanks to this guide, we will be able to fix it before the release. :)

    I'd want to describe an special bug that cost me a lot of time (maybe it is useful for someone else). I wrote wrong the entry "condition" in one of the triggers. Oddly there was no ctds, all the traits worked right, but the triggers below the wrong trigger stoped working. If it happens to one of your lower triggers, it is really difficult to notice it, so I suggest to test periodically if the trigger at the bottom is working properly.

    I also want to remember that there is a great Trait/Ancillary validator made by Tamur that automatically checks for most of the possible ctd causes pointed in this guide. You can find it here. It have saved me a lot of time and I'm afraid some modders do not know this useful tool.

    Finally a question: is there any difference between making 2 triggers with 1 "affects" each, compared to 1 unique trigger with the same 2 "affects" lines? Example:

    Code:
    Trigger random_adoption1
        WhenToTest OfferedForAdoption
    
        Affects GoodCommander  1  Chance  4
        Affects BadCommander  1  Chance  2
    
    Trigger random_adoption2
        WhenToTest OfferedForAdoption
    
        Affects GoodAttacker  1  Chance  4
        Affects BadAttacker  1  Chance  2
    
    ---------- Compared To -----------------------
    
    Trigger random_adoption1
        WhenToTest OfferedForAdoption
    
        Affects GoodCommander  1  Chance  4
        Affects BadCommander  1  Chance  2
        Affects GoodAttacker  1  Chance  4
        Affects BadAttacker  1  Chance  2
    I guess there is no difference, but I would like to confirm it.
    Thank you.

  13. #13
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Guide: The complete traits/ancillaries guide

    There is no difference between the two trigger version and the one trigger version.

    For you error, you misentered which part of the trigger, the WhenToTest bit or one of the Condition (or and lines) bits?

    As for the

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  14. #14

    Default Re: Guide: The complete traits/ancillaries guide

    Sorry, I'm not sure which was the exact error. I know it was something related to the "condition" entry: I think it was I wrote twice the line condition, or I misspelled the word condition, or I forgot the "and" at the start of the line.

    However, I have been testing again trying to recreate the bug, and in all these cases the -show_err always sends this error message:

    Code:
    Script Error in data/export_descr_character_traits.txt, at line X, column Y
    
    Unknow identifier for trigger when expecting an Affect, Advice or Ancillary.
    As I said there is no ctd and the triggers after the wrong line stop working. But, since there is an error message, the bug is not so important.
    This error message might be masked when I had this problem :/ ...


    As for the ?
    Squid, I think the end of your message has been missed.

  15. #15
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Guide: The complete traits/ancillaries guide

    Added in the ancillary stuff to the second post, some of it is a rehash of the trait stuff because they are reasonably close to the same. I also fixed some minor spelling and formating errors in the traits post.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  16. #16

    Default Re: Guide: The complete traits/ancillaries guide

    Is there a limit to the number of effects of a trigger? Would this trigger work?

    Code:
    ;------------------------------------------
    Trigger random_birth1
        WhenToTest CharacterComesOfAge
    
    
        Affects Aesthetic  1  Chance  2 
        Affects Coward  2  Chance  2 
        Affects GoodSiegeAttacker  1  Chance  2 
        Affects Anger  1  Chance  2 
        Affects Hypochondriac  1  Chance  2 
        Affects GoodSiegeDefender  1  Chance  2 
        Affects GoodTaxman  1  Chance  2 
        Affects DeceiverVirtue  1  Chance  4 
        Affects TouchedByTheGods  1  Chance  2 
        Affects ArchitectSkill  1  Chance  2 
        Affects Deranged  1  Chance  2 
        Affects GoodTrader  12  Chance  2
    If there is a limit, what is it? If there isn't, why did the creators of the game make so many random birth triggers?

    PS: I also just realized that in random_birth4, it says "Affects GoodTrader 12". Strange, must have been an error.

  17. #17

    Default Re: Guide: The complete traits/ancillaries guide

    The threshold for the first level of Trader is 24, so 12 looks perfectly normal..

    No, there seems to be no limit in the number of trigger effects or it is very high. Your trigger should work perfectly.

    They made so many ebcause they felt it would not be right if a character was inclined to so many things, probably.

    Norman Invasion - The fate of England lies in your hands...

    Viking Invasion II - Unite Britain in the best TW campaign ever!

    Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland

  18. #18

    Default Re: Guide: The complete traits/ancillaries guide

    Whath do you mean "inclined to so many things"?

  19. #19

    Default Re: Guide: The complete traits/ancillaries guide

    A character can't have predisposition (sort of natural talent or a liking for) towards anger, trade, defending, rhetorics, music, architecture etc all together. That's what I believe they were thinking when making all those triggers. And of course also to add diversity, as this allows for more combinations of traits. Pure speculation though...

    Norman Invasion - The fate of England lies in your hands...

    Viking Invasion II - Unite Britain in the best TW campaign ever!

    Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland

  20. #20

    Default Re: Guide: The complete traits/ancillaries guide

    But Squid said that it doesn't make a difference if they are in different triggers.

  21. #21

    Default Re: Guide: The complete traits/ancillaries guide

    I think we have a misunderstanding there, but I can't figure out exactly where.

    With "can't" I don't mean that the game doesn't allow for it. It just doesn't 'feel right' in terms of logic. And with the "more combinations" I just say that having more triggers with fewer effects allows for more diversity.

    The point here is that there is no limit to the number of Traits a trigger can affect, right?

    Norman Invasion - The fate of England lies in your hands...

    Viking Invasion II - Unite Britain in the best TW campaign ever!

    Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland

  22. #22

    Default Re: Guide: The complete traits/ancillaries guide

    I still don't know what you mean. I'm asking "Why do they have so many triggers when the triggers have the same conditions?" It simply doesn't make any sense, since according to Squid, these are the same:

    Code:
    rigger random_adoption1
        WhenToTest OfferedForAdoption
    
        Affects GoodCommander  1  Chance  4
        Affects BadCommander  1  Chance  2
    
    Trigger random_adoption2
        WhenToTest OfferedForAdoption
    
        Affects GoodAttacker  1  Chance  4
        Affects BadAttacker  1  Chance  2
    
    ---------- Compared To -----------------------
    
    Trigger random_adoption1
        WhenToTest OfferedForAdoption
    
        Affects GoodCommander  1  Chance  4
        Affects BadCommander  1  Chance  2
        Affects GoodAttacker  1  Chance  4
        Affects BadAttacker  1  Chance  2
    What do you mean by "adding diversity"? It doesn't add any diversity... Apparently, anyone who is adopted goes through all of the "random adoption" triggers, not just one. How does it add diversity?

  23. #23
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Guide: The complete traits/ancillaries guide

    It was probably done for legibility, too many affects lines in one trigger makes it harder to read.

    Code:
    trigger random_adoption1
        WhenToTest OfferedForAdoption
    
        Affects GoodCommander  1  Chance  4
        Affects BadCommander  1  Chance  2
    
    Trigger random_adoption2
        WhenToTest OfferedForAdoption
    
        Affects GoodCommander  1  Chance  4
        Affects BadCommander  1  Chance  2
    
    ---------- Compared To -----------------------
    
    Trigger random_adoption1
        WhenToTest OfferedForAdoption
    
       Affects GoodCommander  2  Chance  8
       Affects BadCommander  2  Chance  4
    
    However remember that the above will actually produce diffrerent results. So not all combinations are equal. The bold is what I changed from your example.
    Last edited by Squid; 10-26-2007 at 07:17.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  24. #24

    Default Re: Guide: The complete traits/ancillaries guide

    Yes, I know. The first way will have a chance of getting the second level of the trait. The second way only increases the chances of getting the first level of the trait.

  25. #25
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Guide: The complete traits/ancillaries guide

    Actually the second way will have a higher percentage chance of getting 8 points and 4 points in good commander/bad commander respectively. Both methods can net you 8 points in good commander or 4 points in bad commander. The first one allows for the possibility of only smaller number of points for both.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  26. #26
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

    Default Re: Guide: The complete traits/ancillaries guide

    couldnt find anything about this while skimming the tutorial..

    I'm getting the impression that campaign-difficulty also impacts the traits/ancillaries your characters get, I've been testing things on VH and all AI governors have (almost)8 ancillaries after ~10 turns while my governors may be lucky to get 2 at average, a lucky one gets 3 ....

    not that I'm complaining, I like the added difficulty but was rather surprised by the results, didnt expect it ..


    G

  27. #27
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Guide: The complete traits/ancillaries guide

    I'd be highly suprised if it did, simply because all acquisition percentages are specified by the file and not the engine, so you'd have to do extra calculations every time a trigger was running to make it work that way; however, it would be good to know if that was the case.

    If someone does some more testing, say by using only 5 or 10 triggers and see many ancillaries a group of both AI characters and non-AI characters get after X turns it might shed some light. The number of turns and the number of characters would have to be sufficiently large (or the test run sufficiently often) to make the results statistically significant.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  28. #28
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

    Default Re: Guide: The complete traits/ancillaries guide

    well with 18 Roman factions with identical starting empires (one bigger than the other though), each with some unborn childern coming at age after 8 turns, seeing that after ~12 turns pretty much each AI general has some ancillaries while mine hardly have, specially not the ones outside a settlement, I'd have to say I've been pretty darn unlucky compared to 17 AI factions for 4 test-runs .... ;)

    not sure what or how, but I'm pretty temped to say there is something else that has an impact on when the local faction gets ancillaries (havent really tested traits, concentrated more on ancillaries as I quickly noticed the diff. between mine and the AI's generals)


    G

  29. #29
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Guide: The complete traits/ancillaries guide

    It may just be the AI behaviour makes it more likely to do things which allow it to acquire ancillaries. A lot of ancillaries (if you're using the vanilla, or mostly the vanilla set) require a character to not move for a turn in order to acquire an ancillary. I've noticed the AI tends to leave its characters in settlements a lot more than the average human player which may at least partially explain the difference.

    Also, were you always testing as the same faction, as the buildings present at the start along with above would probably also have a large effect on which and how many ancillaries are acquired.
    Last edited by Squid; 11-16-2007 at 19:48.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  30. #30
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

    Default Re: Guide: The complete traits/ancillaries guide

    Squid, seems that you are correct (or I'm incorrect ... or both ..:D)

    I've had like 2 more testruns with similair results as above where the AI seemed to get at least more ancillaries, the game after that 3 turns in game and my factionleader and heir where both swamped by new ancillaries, next game same thing and now I noticed the Senate being relativly forgotten, so it seems that the game is very random or not random at all

    Anyway thats what you get from thinking that 10% means that your character gets the traits after 10turns, it just means someone will have gotten it most likelly and that someone could just as well get it a 2nd time after and other 10 times the trigger has been used


    ps; I found that triggers do have a maximum they can do, I've had 40+ "affects" in my comingofage trigger and ~40 in marriage/adoption and got nothing but errorless CTD's at loading the game (the game itself)
    now I've got 5*8 for marriage/adoption and 6*8 for comingofage and everything is fine
    So I dont know the exact maximum, I do know there is a maximum and its above 8 and below 40 affects ..


    G

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO