PDA

View Full Version : Dead Characters in descr_strat.txt



Foot
08-19-2008, 09:53
I'm unsure whether this is known from RTW (I haven't tested it but I assume the same code works), but we certainly weren't aware of it in EB, so I thought I had better post my findings here.

Sometimes it may be necessary to have a family tree that contains dead characters in it (ie characters who have died before the game's start date). A simple but effective way to do this is to include them in the family tree as normal and then use the campaign script to kill off the characters in question. However this isn't particularly neat and means that while a character may have in fact been dead for more than a decade it will appear in the family tree that he was killed on turn 1.

There is an elegant solution to this in descr_strat.txt that wasn't used in vanilla, but contains everything you need to create a dead character in the family tree. Let us imagine that our game begins in 1459 and we have three characters in our family tree: Martin, Matilda, and Harry. Martin died six years ago in 1453, Matilda is his widow and Harry is their son (age: 7). If we were to use the script to kill them off the code in descr_strat.txt for their little family would look like this.



character_record Martin, male, age 33, alive, never_a_leader
character_record Matilda, female, age 29, alive, never_a_leader
character_record Harry, male, age 7, alive, never_a_leader

relative Martin, Matilda, Harry, end


Then we would include a script command to kill off Martin in campaign_script.txt. To have Martin begin the campaign dead we would, simply enough have the following piece of code.



character_record Martin, male, age 33, dead, never_a_leader


Now he will appear dead in the family tree. But wait, for the system_log is throwing up a complaint and in the family tree it shows his death as being in 0AD (not even a proper year!). To ease the suffering of the system_log and give him his proper death date you need only add a positive number after dead equal to the number of years he has been dead for. Martin has been dead for six years so we add a "6" after dead and everything works out fine.



character_record Martin, male, age 33, dead 6, never_a_leader


So the whole code for the family is:


character_record Martin, male, age 33, dead 6, never_a_leader
character_record Matilda, female, age 29, alive, never_a_leader
character_record Harry, male, age 7, alive, never_a_leader

relative Martin, Matilda, Harry, end


I hope that has added a little something to the modding community.

Foot

SigniferOne
09-25-2008, 23:06
Nice job Foot, who would've thought that you can add values like that to descr_strat.txt and not have the game go completely bonkers.