I actually wanted to start writing a few tutorials for MTW2 earlier, but you know how it is, something else leaps in every time.
So, I think I'll start a batch of tutorials with the basics. These can be quoted or linked to in modding questions or more advanced tutorials. But please don't mirror them (this is required in order to have discussion go on in a single thread)
All of these tutorials will carry a tag that signifies the required skill level for using them, too, so that new modders know where to start.
Most of them will also have a prerequisite section before the actual tutorial, that contains other threads and tutorials the apt reader should have under his belly beforehand.
To be easily accessible, I will also add them to the Tutorials DB
Ok, enough of the pre-speech:
Prerequisites
In order to be able to follow this tutorial, you should be confident with the following:
- Either the files released by CA(here) or the files export_descr_character_traits.txt, export_descr_ancillaries.txt, text/export_VnVs.txt and text/export_ancillaries.txt unpacked from the packs - for the latter two you need to convert them from the unpacked .strings.bin files using my .strings.bin converter
- A working mod folder, or a config using file_first. See this tutorial for instructions
Character Traits
One of the most important factors for immersion, as well as completely governing the character's attributes, are the personality traits (also referred to as Vices and Virtues sometimes).
You all know them from the game, prominent examples are GoodCommander, Noctophilia, GoodDiplomat and GoodPrincess.
Now, how do you edit those? Well the first step I'd always propose to a newbie, is to have a good look at the associated files, in this case export_descr_character_traits.txt and text/export_VnVs.txt, and try to make sense out of what you see there. If you get stuck with anything, you can return here for some explanations.
Go on ahead, do that now :)
Are you still here?
MOVE IT, OPEN THOSE FILES!
1. Overview
Well, I assume you had a good look at those files (if you didn't, scroll back up a bit and read again carefully), so I'll start explaining them now.
Each trait consists of these entities in export_descr_character_traits.txt:
- A trait definition
- One or more trait levels
- zero or more triggers that actually award the trait
Further, each trait level has a few (at least three) entries in text/export_VnVs.txt that determine which text actually shows up in the game (and is localised).
In the following tutorial, I will explain these points one by one. I hope you will enjoy it and, above all, learn something.
2. The Trait Definition
The trait definition is the first part of the trait that you see when looking at export_descr_character_traits.txt (from now on, edct), it always starts with the keyword Trait (<~~ keywords are always blue), followed by the internal trait name, the scope (keyword Characters) and then some settings. I will explain these later, but let's first have a look at a basic example:
Well, obviously, this is as easy as it gets. This describes the Trait line VictorVirtue (found in line 1436), a trait which is accessible to all family members (which means only male named generals).Code:Trait VictorVirtue Characters family
As you can see, the Characters keyword governs which character types have access to the trait you are editing.
For more information on the Characters keyword, click on show:
2.1 Settings
The trait header also allows you to set some optional flags. However, they have to be used in a specific order or the game will crash. For more information on these, click on show:
3. Levels
As you hopefully saw while browsing through edct, each trait consists of multiple sub-entries, the so-called trait levels.
Each trait will successively go through the trait levels when points are assigned to it. How fast it reaches the next level is determined by the Threshold keyword, but you can read more about that below.
The basic skeleton for a trait level is:
Level Unproven_Commander
Description Unproven_Commander_desc
EffectsDescription Unproven_Commander_effects_desc
Threshold 2
Effect Command -1
Now, what do these do?
Before I tell you any more, please have a look again at text/export_VnVs.txt (I will refer to that file as eve from now on).
In this file, you will be able to find all of the above entries, except for Threshold and Effect.
This means that half of what the trait level definition does is to control which text appears in the game for the trait:
Level: What follows this keyword is the internal name of the trait level. This has to have an entry in eve, which is what the player can directly see in the character details scroll.
Description: This is the internal tag for the trait description (or tooltip) - again, this has to match an entry in eve
EffectsDescription: This describes the tag for the effects description in eve. In our example, it is "-1 Command"
Other allowed entries that describe things in eve are:
Threshold: One of the most important entries for each level. In short, this governs how many cumulative points in this trait a character must have gained to bear this level.
In case you didn't understand this, take an example (the full GoodCommander trait):
Effect: Ah, the all-important effects. This is the other half of what the trait definition does, and, in essence, the more important one.
The quite easy basic idea behind this keyword is, that each accessible character attribute has a numerical value assigned to it. This numerical value is exclusively influenced by traits and ancillaries, through the Effect statement.
Allowed attributes are:
4. Text entries
After creating the trait levels, what still remains to do is opening text/export_VnVs.txt and adding the appropriate text entries.
All entries in this file consist of a tag (in curly brackets) and the localized screen text.
The first thing you have to add is a title for each level.
Then you should add all entries that you described for each level, which usually includes the trait description (mouse-over details text) and effects description (the last line in the mouse-over text) and can include an epithet (things like "the Conqueror" displayed after the name), a gain-message and a lose-message. For example, for the LegendaryCommander level (the highest level of the GoodCommander chain), it looks like this:
This is all fairly straightforward, and I think you can figure the rest out yourself. Just be aware that by setting the same tag in the level description, you can use the same text for different levels. I usually have a tag calledCode:¬-------------------- {Legendary_Commander} Legendary Commander {Legendary_Commander_desc} Countless victories have made this man is a legendary commander, respected by both his own troops and those that oppose him. {Legendary_Commander_gain_desc} This great field general has earned another Command star, his continued success not going unrecognised. {Legendary_Commander_epithet_desc} the Mighty {Legendary_Commander_effects_desc} +5 CommandI link all trait levels without effect (they can be useful when you just want to show the player something, for example) to this tag by supplyingCode:{no_effect} No effectCode:EffectsDescription no_effect
Well this is it for the tutorial on traits. You know everything you need to know about the trait definition - now please proceed to the trigger tutorial to get some info about the second part of the file.
Bookmarks