Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Export descr character traits.txt (RTW Modding)

From TWC Wiki
Jump to navigationJump to search
RTW Modding Index


This article is based on the first part of The Complete EDCT/EDA Guide for Rome:Total War the original article was written by Squid and imported with his permission. The article may have been altered since import - please refer to the history page for details of changes, or reference the original document.

This is an in-depth explanation of the export_descr_character_traits.txt file, which is the primary base for modding buildings and determining which units can be recruited from them.

Squid put the original article together for his own reference, but decided to open it up to all, with the request that they also aid in improving and adding to it. If you are not at all familiar with the basics of the EDCT file then you should become so before reading this. The file works alongside a good few other files and may not have the desired effect if these associated files are not modded.

Please help make this the one-stop source for EDCT-related information. This Wiki article can be updated to include further information but please also post your comments, corrections and additions in the general forum of the Org RTW Workshop in this discussion thread.

Introduction to EDCT

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.

Comments in EDCT

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

Trait Section

Trait Header

Sample Trait Header:

Trait Trait_Name
    Characters Character_Type
    ExcludeCultures Excluded_Culture(s)
    NoGoingBackLevel No_Going_Back_Level
    AntiTraits Anti_Trait(s)

So let's examine the Trait Header line by line:

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_strat.txt to specifiy the starting traits for the various characters.

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.

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.

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

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_cultures.txt file. If listing more than one culture they must be listed as a comma seperated list of cultures.

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:

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

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:

Edct example trait.jpg

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:

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
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:

Level Level_Name

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

Description Level_Description

The Description line 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.

EffectsDescription Level_Effects

Th EffectsDescription line 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.

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.

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.

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.

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.

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.

For the complete list of attributes go to: Trait/Ancillary Attributes (RTW)


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

Trigger Section

The trigger section is read sequentially by the game engine. This means that for two triggers with the same event (WhenToTest Event_Name) the one located closer to the top of the file will trigger first.

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:

Trigger Trigger_Name
WhenToTest Event_Name
Condition Condition_1
      and Condition_2

Affects Trait_Name Trait_Points_Assigned Chance Percentage

Let's examine these one at a time.

Trigger Trigger_Name

This is the name of the trigger, no two tiggers 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.

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
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_Namein the docudemon_events.txt file.


  • If there are no conditions for a trigger the Affects line(s) will always be implemented.
  • Affects accepts negative points for traits (assigning negative points will bypass NoGoingBackLevel settings)
  • 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:

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:

Script Error in data/export_descr_character_traits.txt, at line X, column Y

culture type not recognized

Undefined/Incorrect Faction:

Script Error in data/export_descr_character_traits.txt, at line X, column Y

faction type not recognized

Undefined/Incorrect Character Type:

Script Error in data/export_descr_character_traits.txt, at line X, column Y 

character type not recognized
Affects Trait_Name Trait_Points_Assigned Chance Percentage

Each trigger must have one or more Affects lines. 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.

CTD Alert: There is a maximum of 11 Affect lines. 12 or more Affect lines will cause a CTD at game start. (Confirmation request)

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:

Script Error in data/export_descr_character_traits.txt, at line X, column Y

Trait not recognized

Tools & Other Resources

Required program: Notepad (or other text editor)

Recommended program: ATVTW(Trait/Ancillary Validator)

Recommended download: BI_docs.zip (Complete list of conditions/events)

External Links

Related Posts:

Initial content for this article was based on: Org Scriptorium Article

Posted here with the permission of the original author: Squid

Please note that the content may have been altered since import. Subsequent amendments are welcome but are not the responsibility of the original author.
YOU can help us improve this Wiki! ~ Look for Ways to Help and Things to Do. ~ If you need further advice, please post here.