Now we will be doing traits, ancillaries, and triggers. The traits can be made from any combination of the 51 vices and virtues on the VnVs tab of my Ultimate Docudemons. We will be building a trait that contains at least 2 VnVs and has at least 3 levels. A vanilla trait looks like this:
Code:
Trait Coward
Characters family
NoGoingBackLevel 3
AntiTraits Brave
Level Faltering_Courage
Description Faltering_Courage_desc
EffectsDescription Faltering_Courage_effects_desc
GainMessage Faltering_Courage_gain_desc
LoseMessage Faltering_Courage_lose_desc
Threshold 2
Effect TroopMorale -1
Level Fears_Conflict
Description Fears_Conflict_desc
EffectsDescription Fears_Conflict_effects_desc
Threshold 4
Effect TroopMorale -2
The Trait name must be unique, other than that you can name it whatever you wish.
The characters line specifies which characters the trait applies to. You can either use all or separate the types with a comma. These are the allowed types:
The NoGoingBackLevel simply specifies that once a level is hit the character cannot go below that level no matter what.
The AntiTraits line is also simple. Whenever the AntiTrait fires true for a character that has this trait, then this trait will go down 1 level.
The Description and EffectsDescription reference the lines that show in game descriptions in export_vnvs.txt
The GainMessage and LoseMessage are optional but also reference export_vns.txt. These will show when your character moves up or down a level.
The Threshold confuses some people. What this is is a built in counter. Every time one of your triggers fires true for this trait, that counter goes up by one. When the counter hits the Threshold the trait will be applied. So even if you have a trigger set at 100% you can prevent the trait from being applied by setting the Threshold higher.
The effect line references one of the abilities listed in the Ultimate Docudemons on the VnVs tab. You can stack several Effects in a single trait, I believe the limit is 8.
The code for Ancillaries works in much the same way:
Code:
Ancillary accomplice
Type Security
Transferable 0
Image sex_yangman.tga
Unique
ExcludeCultures mesoamerican
Description accomplice_desc
EffectsDescription accomplice_effects_desc
Effect Subterfuge 1
The Ancillary name must once again be unique.
For Type you can use one of the 17 vanilla types or you can create your own type.
Transferable simply determines whether or not you can move this ancillary from one character to another. 0 is false and 1 is true.
Image refers to an image located in \data\ui\ancillaries
If you add the tag Unique, only 1 character in the entire world will be able to have this ancillary.
ExcludeCultures and ExcludedAncillaries are self explanatory but NOTE that one is spelled Exclude and one is spelled Excluded.
Descriptions and effects the same as for traits except the description file is export_ancillaries.txt.
Your task is to build 1 new Ancillary and 1 new Trait with at least 2 levels and get them to show up in game. Enter them in descr_strat and assign them to a character then take a screen shot. Once you know that your new trait and ancillary work in the game then proceed to building triggers.
Triggers simply tell the game when to apply a trait or ancillary. The trigger is checked when a specified event happens and if the conditions are true then the percentage is applied. Look through the Events in the Ultimate Docudemons, the ones you can use are the ones that export character_record. This is REQUIRED on these triggers because the character_record is what tells the game which character to apply the trait/ancillary to. The same for Conditions, you can use any Condition that has character_record in the Trigger Requirements line.
Take a look at the vanilla triggers, often there is one that applies to your new trait/ancillary that you can copy, but feel free to experiment with new combinations of Events and Conditions. There will be no screenshot required for triggers, just post your code in a code box.
This is the last lesson for this class, but for a bonus you can build a new guild. You already have all the skills you need to build a guild, they are just combinations of a new building tree and a triggers file. If you need further reading the best thing ever written on guilds is here. I will hand out the bonus in the form of reputation.
I will leave the classroom open and continue to help until the end of the year.