PDA

View Full Version : HOWTO Mod Traits/ VnV



fenir
10-21-2004, 15:37
Not sure if anyone has done this yet, doesn’t look like too many howtos are happening, so my contribution mainly to help new modders, and those doing other parts.

The file you need is "export_descr_character_traits" this is located in your data folder, near the bottom.
F:\Program Files\Activision\Rome - Total War\Data

F:\ being my test drive install, please look to your own install drive to locate the game.

Now the first trait we see at the top of the notepad is that of "Good Commander". So we will decipher this first.

Insert
================================================== ======
Trait GoodCommander
Characters family
AntiTraits BadCommander

Level Confident_Commander
Description Confident_Commander_desc
EffectsDescription Confident_Commander_effects_desc
GainMessage Confident_Commander_gain_desc
Threshold 1

Effect Command 1

================================================== ======


Trait GoodCommander
This is the trait title name, it is the title to which the AI will re-refer when doing a look up. It can be thought of as the group name for a list of traits, 5 in this case, when each level has been obtained.
As your character obtains each level, the AI will allocate the level of trait applied to the character in question.

Characters family
This refers to the group that will be allocated these traits. In this case it can only be applied to the named members, ei: your family members.
It cannot be applied to spies, assassins, Diplomats, or Captains.
So in essence this tells us that the application group is Family members.

AntiTrait
Now this here is only what we suppose happens, as myself, and Lord Gnome have come up with several thoughts on this.
My testing has shown it can be allocated after one good battle, or a build up of battles, that Lord Gnome and I suspect form a points system. So there must be a system of hard-coded points value, which correspond to the allocation of each trait or anti-trait.
Now if winning a battle gains you a point’s value to obtain the trait, losing the battle can gain points in the opposite direction, which will gain in the anti-trait direction.

So lets suppose you win a battle, you gain a “Confident Commander” +1 Command Trait. Then winning battles after this gains you points towards the Trait “Good Command” +2 Command; which is second on the “GoodCommander” levels;
However, if you lose battles after this, points are taken to gain the “BadCommander” Trait, (anti-Trait), which will result in a –1 Command.
If you lose a battle without a “Confident Commander” Trait +1 Command, then you will build on points to a “BadCommander” –1 Command Trait.

Level Confident_Commander
This relates to the first level of the “GoodCommander” Trait family. By winning a battle, you gain points towards this trait for your family member.
If you however gain more points by winning more battles, you will gain the second level and become a “Good Commander” +2 Command at level 2. Then More points after this, you will gain level 3 “SuperiorCommander” +3 Command.

Insert, Lord Gnomes thoughts.
But to be explicit if a trait has an antitrait(s) then gaining points in the antitrait(s) deducts points from the trait value (unless the trait has gone beyond the 'no going back' level). So if you have some points in the romanhero trait and you get a point towards the coward trait (the antitrait for romanhero) then you lose a point of romanhero rather than go straight to being a coward. If you had no points in romanhero then you would gain a point in the coward trait.

I have included this below for you to look over.

Level Good_Commander
Description Good_Commander_desc
EffectsDescription Good_Commander_effects_desc
GainMessage Good_Commander_gain_desc
Threshold 2

Effect Command 2

Level Superior_Commander
Description Superior_Commander_desc
EffectsDescription Superior_Commander_effects_desc
GainMessage Superior_Commander_gain_desc
Threshold 4

Effect Command 3


Description Confident_Commander_desc
Now the Description, is that of Confident Commander. The Insert is that of “Confident_Commander_desc” which you will find mirrored on the lists lookup in the file "export_descr_VnVs_enums" which is located just down from the "export_descr_character_traits" file we are now looking at.

This is the description look up for the AI. I do suspect this is also the name you see on your character listing of family members in game.
The AI then looks for the description for this trait in "export_VnVs" file located in F:\Program Files\Activision\Rome - Total War\Data\text
This description is actually what you will see in game.


Example:

Insert
================================================== ===========

{Confident_Commander} Confident Commander

{Confident_Commander_desc}
This man is definitely developing his skills as a general.

{Confident_Commander_gain_desc}
This man has gained a Command star thanks to his battle skills.

================================================== ===========

The first line is that of the description, which must correspond to the lookup in export_descr_VnVs_enums, the second line.
This is the description you see in game when you mouse over the traits on your family members character listings.
And the third line we will now deal with.



{Confident_Commander_gain_desc}
This man has gained a Command star thanks to his battle skills.


This is the message you receive at the end of each turn, (drops down the left hand side of the screen), when the family member has obtained the level of a confident commander +1 command.
This is what is actually shown in the message box.




You can play with both of these quite a bit, Example: "This man is definitely developing his skills as a general" is what the AI is supposed to say.

But

Add, "Like he needed too." to the end of the message.
Or
Change to, "Wins one battle gets a star! Don’t figure!"

But more on that another time. You can play with these as you see fit. Just remember to back up all files before changing them.




EffectsDescription Confident_Commander_effects_desc
Now this is what the AI will look at to determine the description of your advancement. This can be found in the “export_VnVs” file as well.
This lets the AI inform you of the effect, In this case, +1 command.



Threshold

Now this relates to say the number of points you need to gain to achieve this level. It is a threshold level needed to gain the trait.
The threshold level for this is “1” so lets say you need 1 point to obtain this level, maybe only 1 battle.
Where as you need “2” points to obtain the 2nd level. Then 4 points to obtain the 3rd level.
These can be changed, to allow a harder or easier/quicker advancement.

Insert from Lord Gnome.
So VictorRomanVirtue, (inserted below), trait (applies to family members - excludes all cultures but roman) has 3 levels. The threshold for each level is 5, 10, 15, respectively. This means you can get points in this trait but until you hit the threshold for the next level you won't get the appropriate trait-level.
One trigger for VictorRomanVirtue is postbattle, and you always get a point if you win, but it will take 5 wins to advance each level as you only get 1 point awarded each time (and the gap between thresholds is 5 each time);


Effect
Here we have the effect of your advancement. +1 command. This is the effect of gaining the points to the level 1 or Confident commander.
This tells the Ai how to treat your advancement, by giving you a +1 command.



Now, there are two other inserts that are not included in the above description so I will attempt to bring them now to complete the overall picture.

ExcludeCultures
This tells the AI what cultures cannot obtain this trait. Quite simply, the factions/Cultures listed here cannot obtain, or gain points to the trait listed.



Note below.

Trait VictorRomanVirtue
Characters family
ExcludeCultures barbarian, greek, eastern, egyptian, carthaginian

Level Vanquisher
Description Vanquisher_desc
EffectsDescription Vanquisher_effects_desc
Threshold 5

Effect SenateStanding -5
Effect PopularStanding 10

Level Great_Vanquisher
Description Great_Vanquisher_desc
EffectsDescription Great_Vanquisher_effects_desc
Threshold 10

Effect SenateStanding -10
Effect PopularStanding 20

Level Conqueror
Description Conqueror_desc
EffectsDescription Conqueror_effects_desc
Epithet Conqueror_epithet_desc
Threshold 15

Effect SenateStanding -15
Effect PopularStanding 30


If you look on the third line, there is a “ExcludeCultures” line. This is telling us and the AI that all Cultures/factions listed here cannot obtain, or gain points to this trait.
It is totally excluding them from the trait.



The second point

NoGoingBack
This is the second listings, this means that after a certain level, the character cannot lose points in a trait, they can only remain static, very unlikely, or advance further.


Trait Drink
Characters family
NoGoingBackLevel 5
AntiTraits Sobriety

Level Social_Drinker
Description Social_Drinker_desc
EffectsDescription Social_Drinker_effects_desc
LoseMessage Social_Drinker_lose_desc
Threshold 1

Effect Command 1

Level Likes_a_Drink
Description Likes_a_Drink_desc
EffectsDescription Likes_a_Drink_effects_desc
Threshold 2

Effect Management -1

Level Drunkard
Description Drunkard_desc
EffectsDescription Drunkard_effects_desc
Threshold 4

Effect Influence -1
Effect Command -1
Effect Management –1

As you will see on the Second line, there is a “NoGoingBack” insert. This is telling us the after reaching Level 5, your family member cannot go backwards.
Therefore, cannot become “AntiTraits Sobriety” or lessen the effects of become a absolute drunk.




I have included below a insert that allows us to see all the workings of traits and the various lines involved.

Trait BadDisciplinarian
Characters family
ExcludeCultures barbarian, eastern, egyptian, carthaginian
NoGoingBackLevel 2
AntiTraits Disciplinarian

Level Poor_Disciplinarian
Description Poor_Disciplinarian_desc
EffectsDescription Poor_Disciplinarian_effects_desc
Threshold 2

Effect TroopMorale 1
Effect MovementPoints –2



Now, we can look at this and list the order in which they go.

First

1. Trait name
2. Who the Trait can be assigned to.
3. Which culture it will exclude
4. Whether you can be redeemed.
5. The opposite trait. Or anti-trait.

6. The level of trait. Trait name.
7. The trait Description.
8. The Effect Description of the trait.
9. The traits name description.
10.The Threshold needed to obtain trait.
11. The Effect.






Additional
I did however go a little further, when playing around, I made the follwing and got it to work. quite simple really, but effective.

The Trigger

;------------------------------------------
Trigger dads_energetic
WhenToTest CharacterComesOfAge

Condition FatherTrait Energetic >= 1
and romans_julii

Affects Energetic 3 Chance 100

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

I noted Julii having a Lively trait, so did a search, and came up with the Energetic trait.
I added the Energetic trigger into the dads Trigger
So when a Father Named member has the trait, they can pass it on.

So when Dad has Lively trait.
And his son "comes of Age", the AI knows to check the triggers for traits.
As i have told it to test when Character comes of age.

The Condition of this, is,
The Father must have the trait Energetic >=1 (which is equal to or great than level 1 in the trait listings).
And the Condition is, the Son and father have to be of the Julii faction of Romans.

Now i have also included, the Affect
Which is to rank the son up to a Level 3 energetic trait which i have inserted below.

Now the Chance of this being assigned, is 100%. you can change this to whatever just remember that it is a percentage chance.

So the Son will come of age with, +3 management, +2 (20%) movement, and -15% Construction costs).

The outcome

================================================== =======
Level Energetic
Description Energetic_desc
EffectsDescription Energetic_effects_desc
Threshold 4

Effect Management 3
Effect MovementPoints 2
Effect Construction 15
================================================== ========




Well I hope that helps.



Fenir

With thank you to Alpaca and Lord Gnome.

Lord Xelous
11-10-2004, 22:36
Here's a work in progress. :charge:

http://www12.brinkster.com/thelordz/toolz/traiteditor.html

It's available for download, please don't moan about it too much, I'm working on it. :furious3:

Visit www.thelordz.co.uk for further details.

Regards

Lord Xelous

~:cheers:


P.S. v1.03 out now, since the initial posting.