PDA

View Full Version : GUIDE: Basics of descr_strat.txt



Caius
01-07-2008, 15:43
Modding Resource Header


Title: The Basics of descr_strat.txt Posted by: Caius
Modding area: Campaign Map
Required programmes: Notepad (or other text editor)
Summary: In-depth explanation of descr_strat.txt for starters.

Introduction:

We, at some point of our modding projects, can handle a lot of files without checking the Scriptorium. But, we were newbies when we started...
There are a lot of people who want to unlock all the factions. That's a classic question in the Rome Colliseum. But I will go further, and I will explain more things than how to unlock all the factions. Here, you can find information that won't be found in other places. Now, if you still are reading, we will start!

We are starting, now what do we need?

We need 4 things:

descr_strat.txt (the file in question)
A copy of descr_strat.txt (the file)
Notepad (or text editor you use)
Patience (always welcome)

I want to unlock all factions, what do I have to change?

1. Open the file descr_strat.txt, which can be found in data/world/maps/campaign/imperial_campaign.
2. Once opened, we can see the following text included in code tags:


campaign imperial_campaign
playable
romans_julii
romans_brutii
romans_scipii
britons
end
unlockable
egypt
seleucid
carthage
parthia
gauls
germans
greek_cities
end
nonplayable
romans_senate
macedon
pontus
armenia
dacia
numidia
scythia
spain
thrace
slave
end

Some cutting and pasting is need to change that to this:


campaign imperial_campaign
playable
romans_julii
romans_brutii
romans_scipii
egypt
seleucid
carthage
parthia
gauls
germans
greek_cities
britons
macedon
pontus
armenia
dacia
numidia
scythia
spain
thrace
end
unlockable
end
nonplayable
romans_senate
slave
end

Note: Please note that the Senate and the Slave factions CAN'T be played. High changes are need to make them playable, and maybe those changes won't work. We'll never know.

Changing the starting and ending age:

We can change our starting and ending age in case we starting to mod a campaign with other timeframe.


start_date -270 summer
end_date 14 summer

Just change the number to the year we want. You can use - (minus) to indicate that year is Before Christ.
It can start (or finish) in winter, just changing summer to winter.

There is one limit to the age, the end date cant be sooner than the start date, this will give you a CTD, which means Crash To Desktop. Like in this example, which has been created to show you a uncommon error that can make your game not start.


start_date 40 summer
end_date -77 summer

Pirates and Brigantes:


Annoying rebels... They are popping out from the nothing to annoy me! Well, that can be changed. There are two lines who make this change:


brigand_spawn_value 102
pirate_spawn_value 102

Since I have a moddified descr_strat.txt for my campaigns, this value should be much less than those.

How does it work?

Its like a rule: the lesser the number, the higher they will spawn. 0 (zero) is the lesser number for both spawn values, 1000 (one thousand) is the maximum number for both spawn values.

Now, we are approaching the factions section (Yes, we ommited the resources, that's advanced modding, as if you add a resource where you cant, you will have more than a headache.)

Let's start with a faction:


faction romans_julii, comfortable caesar
superfaction romans_senate
denari 5000


There are a lot of things here, so lets start with:



faction romans_julii
This indicates to Rome which faction are we talking about.


comfortable caesar
No, they aren't comfortable. This 2 words indicates how the IA will play as this faction. therother posted this list, its the research of IA and personalities:


These control a set of AI production personalities, which contribute a bias towards building and training (but not retraining or repairing). This bias is fairly small compared to game-generated factors such as "the enemy is attacking me with lots of cavalry, build me some spearmen". Explaining the weighting system which drives the production AI in full is beyond the scope of this document as it would take several days to write.

So in short, the building construction personalities are these: (ranked highest to lowest - therother)

balanced - biases towards growth, taxable income, trade level bonuses (roads), walls and xp bonus buildings

religious - biases towards growth, loyalty, taxable income, farming, walls and law

trader - biases towards growth, trade level, trade base, weapon upgrades, games, races and xp bonus buildings

comfort - biases towards growth, farming, games, races, xp bonus and happiness

bureaucrat - biases towards taxable income, growth, pop health, trade, walls, improved bodyguards and law

craftsman - biases towards walls, races, taxable income, weapon upgrades, xp bonuses, mines, health and growth

sailor - biases towards sea trade, taxable income, walls, growth, trade

fortified - biases towards walls, taxable income, growth, loyalty, defenses, bodyguards and law

These biases are towards building properties, rather than buildings themselves. The game does not know what a "Blacksmith" is, for example, it only knows that it is a building which provides a weapon upgrade, and hence a Craftsman AI would be more likely to build it than another AI personality type.

These are then combined with a troop production personality, as follows:

smith - exactly level

mao - biased towards mass troops, light infantry

genghis - biased towards missile cavalry and light cavalry

stalin - biased towards heavy infantry, mass troops and artillery

napoleon - biased towards a mix of light and heavy infantry, light cavalry

henry - biased towards heavy and light cavalry, missile infantry

Caesar - biased towards heavy infantry, light cavalry, siege artillery

The same system as for the buildings applies. Troop category and class are combined at the time the unit database is loaded to give a unit production type, and the likelihood of the AI choosing to produce a given unit type which can be produced is then modified by the unit type weighting. There is also a random element in the choosing of which building or troop type to produce next, so the effect of the bias is a statistical thing. Another factor that is applied over the top which may obscure the bias is a tendency towards producing troop mixtures (according to what is already in the garrison) and a weighting according to unit strength.

The two sets of types can be freely combined; for example, although Fortified Caesar does not appear in the list of options currently used by the vanilla RTW game, it is a valid combination.


superfaction romans_senate

This allows the Senate to give you missions. Delete this line entirely if you want to not to receive more missions as playing as the Julii (if you delete it in the Julii part). Remember that this action can give you problems if some changes aren't being done.


denari 5000

Starting denarii amount for each faction.


settlement
{
level large_town
region Campania
year_founded 0
population 7000
settlement_tax 51
plan_set default_set
faction_creator romans_julii
building
{
type barracks militia_barracks
}
building
{
type core_building governors_villa
}
}
settlement
{
level large_town
region Etruria
year_founded 0
population 5000
settlement_tax 51
plan_set default_set
faction_creator romans_julii
building
{
type barracks militia_barracks
}
building
{
type core_building governors_villa
}
}


This is the part of the cities/towns/villages. I won't enter in much details, but according to me, the first location indicated is automatically the capital of a faction.

Lets modify a family member:

character Flavius Julius, named character, leader, age 47, , x 89, y 82
traits GoodCommander 2 , NaturalMilitarySkill 1 , GoodDefender 1 , PoliticsSkill 3 , GoodAdministrator 2 , Austere 1
ancillaries aged_retainer
army
unit roman generals guard cavalry early exp 1 armour 0 weapon_lvl 0
unit roman hastati exp 1 armour 0 weapon_lvl 0
unit roman hastati exp 1 armour 0 weapon_lvl 0
unit roman triarii exp 1 armour 0 weapon_lvl 0
unit roman archer exp 1 armour 0 weapon_lvl 0


We can do a lot of things. Lets change something about a troop:


unit roman archer exp 1 armour 0 weapon_lvl 0

This unit is a Roman Archer. If we delete this line from descr_strat.txt, there won't be a roman archer unit with Flavius Julius.

But, we can change three things there:

Experience
Armour
Attack.

Actual experience is level 1, values can go from 0 to 9
Actual Armour is level 0, values can go from 0 to 3
Actual Attack is level 0, values can go from 0 to 3

We can add troops to them, in this case, I will teach how to add a mercenary unit in Flavius Julius army.


unit merc cretan archers exp 2 armour 0 weapon_lvl 0

This is the syntaxis for a cretan archer unit with two chevrons of experience. Add it in the last line of Flavius Julius army. It should look like this:


character Flavius Julius, named character, leader, age 47, , x 89, y 82
traits GoodCommander 2 , NaturalMilitarySkill 1 , GoodDefender 1 , PoliticsSkill 3 , GoodAdministrator 2 , Austere 1
ancillaries aged_retainer
army
unit roman generals guard cavalry early exp 1 armour 0 weapon_lvl 0
unit roman hastati exp 1 armour 0 weapon_lvl 0
unit roman hastati exp 1 armour 0 weapon_lvl 0
unit roman triarii exp 1 armour 0 weapon_lvl 0
unit roman archer exp 1 armour 0 weapon_lvl 0
unit merc cretan archers exp 2 armour 0 weapon_lvl 0


Note: Please notice that RTW is limited to 20 cards or units. Failure to reach the number won't give you a problem, but if you put more units you are in serious problems. The game won't start.

I will complete it soon. And yes, its not complete yet.

Quirinus
01-12-2008, 18:01
Nice. I found this comprehensive and easy to understand-- I haven't tried to tinker around with my descr_strat yet, but I will tomorrow.

One thing, though, I think that the earlier part, about unlocking factions, does not work. Only doing that leads to a CTD when you click on the previously unplayable factions (Spain, Numidia, Thrace, Pontus, Scythia, Armenia).

I think (in v1.3 at least) you need to edit the campaign_descriptions.txt file in Data/text, add in descriptions for the newly playable factions before it works.

Makanyane
01-12-2008, 18:11
Nice guide Caius, thanks for that :2thumbsup:
if you can expand it further that would be great, I know the family tree bits tend to confuse some people....


I think (in v1.3 at least) you need to edit the campaign_descriptions.txt file in Data/text, add in descriptions for the newly playable factions before it works.
I think you're right and I'm not sure if early versions needed some images as well, but it did change with 1.5, and I think the move to playable is enough now, you'll just be missing some information when you go through the starting screens.

Caius
01-13-2008, 21:05
One thing, though, I think that the earlier part, about unlocking factions, does not work. Only doing that leads to a CTD when you click on the previously unplayable factions (Spain, Numidia, Thrace, Pontus, Scythia, Armenia).

I think (in v1.3 at least) you need to edit the campaign_descriptions.txt file in Data/text, add in descriptions for the newly playable factions before it works
That's a problem with the version 1.3 only. I use 1.5, but it would be great if someone pm's me with a solution. I'd thank to whoever who posts it.

@Mak:I will be working on that now.

Spartan198
02-23-2008, 19:31
I'm as novice a modder as they come at the moment,but this guide is by far the most understandable that I've read. Props,Caius.

Caius
03-20-2008, 03:35
I'm as novice a modder as they come at the moment,but this guide is by far the most understandable that I've read. Props,Caius.
:bow:

I have added some details, but it still needs the family part.

Motep
03-22-2008, 06:26
:bow:

I have added some details, but it still needs the family part.

you might want to mention the specific problems you might face, and how to overcome them. If you do not know, I can aid you.

BTW, I must check in on the ITW forum...I once more am able to mod the game! (new computer)

Aristeides the Younger
03-23-2008, 02:05
Greetings, total newbie here. :clown:

Caius, thank you for this guide. It is very helpful so far.

Two questions come to mind:
1-Can one change the name of a 'named character' just by altering it in descr_strat.txt?
2-Can one assign the portrait of a 'named character' in descr_strat.txt, or does that happen somewhere else?

Thanks.

Caius
03-23-2008, 05:08
Welcome Aristeiders the Younger to the tw.org forums.

1- Of course you can. Lets take an example:

Flavius Julius
He can be named like you want to, always if that name you give him is in descr_names.txt
2-IT's not possible, you could try to change the portrait though.

Mek Simmur al Ragaski
03-30-2008, 22:04
Caius, i was just wondering, where do you put the copy of the descr_strat file, is it literally in the same directory as the original, or is it in a different folder???
Otherwise a good Guide, just cant figure out this bit

Caius
04-05-2008, 13:58
Rome will look for the file called "descr_strat.txt", if you have a copy called for example "descr_strat2.txt" or "copy of descr_strat.txt", the game wont look those files. They can be anywhere you want.

Iñnsomñni
04-09-2008, 16:36
Thanks a bundle, i would just like to point out to a few fellow Vista Users, as i have said on many of the recent threads i have posted on, you will need to turn the UAC off to make this saveable on a Vista, as you will need administrator rights, which you will not have as a vista account doesnt.

Bartholemew-Varath
04-29-2008, 21:01
I just have a question about the portraits question asked earliers, i looked at your coded text before:

character Flavius Julius, named character, leader, age 47, , x 89, y 82
traits GoodCommander 2 , NaturalMilitarySkill 1 , GoodDefender 1 , PoliticsSkill 3 , GoodAdministrator 2 , Austere 1
ancillaries aged_retainer
army
unit roman generals guard cavalry early exp 1 armour 0 weapon_lvl 0
unit roman hastati exp 1 armour 0 weapon_lvl 0
unit roman hastati exp 1 armour 0 weapon_lvl 0
unit roman triarii exp 1 armour 0 weapon_lvl 0
unit roman archer exp 1 armour 0 weapon_lvl 0

Does the x 89 or y 82 not refur to which portrait it might choose??? Or am i a mile off???

Bartholemew-Varath
04-29-2008, 21:10
I got it wrong, never mind, it changes the position of your general, no his portrait

eliterun
05-04-2008, 01:47
quick question: i did the non-playable to unlockable changes in the first post, but it crashes me back to the desktop when I select certain factions:
Scythia
Spain
Thrace
Pontus
Armenia
Dacia
Numidia

I'm playing RTW, the Gold Edition, so I'm thinking that might have affected things. Completely vanilla btw.

how do I fix this?

Caius
05-04-2008, 02:49
quick question: i did the non-playable to unlockable changes in the first post, but it crashes me back to the desktop when I select certain factions:
Scythia
Spain
Thrace
Pontus
Armenia
Dacia
Numidia

I'm playing RTW, the Gold Edition, so I'm thinking that might have affected things. Completely vanilla btw.

how do I fix this?
Welcome eliterun to the org!

Are you using the 1.3 version of Rome? If so, then that version disables all the non-playable factions, but that can be fixed.

eliterun
05-04-2008, 03:06
Welcome eliterun to the org!

Are you using the 1.3 version of Rome? If so, then that version disables all the non-playable factions, but that can be fixed.


maybe, but it's odd, I can play as Macedonia and one or two of the other non-playables...help? :inquisitive:

eliterun
05-04-2008, 03:10
maybe, but it's odd, I can play as Macedonia and one or two of the other non-playables...help? :inquisitive:


ok, can't find an edit button, so new post it is

I realize there's probably a thread about this somewhere...could you direct me to where it could be found?

thanks!

because as someone who has read through some of the guides I'm chomping at the bit to play as the Armenians :2thumbsup:

I love mobile units...

Caius
08-31-2008, 20:55
This guide is about to be remodelled to make it better to understand and I am going to add more parts to ampliate it.

Samofrome
11-18-2009, 19:40
well done, well done

Cretan
07-06-2010, 16:54
Very nice Tutorial, you can almost see the text if you squint your eyes.

Blue background really doesen't do this tutorial any justice. :)

Soul Reaver
07-07-2010, 19:05
Blue background really doesen't do this tutorial any justice. :)

Agree with you on that, the part about the AI and personalities is something I have not come across before though, thanks