Results 1 to 22 of 22

Thread: GUIDE: Basics of descr_strat.txt

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Honorary Argentinian Senior Member Gyroball Champion, Karts Champion Caius's Avatar
    Join Date
    Aug 2006
    Location
    I live in my home, don't you?
    Posts
    8,114

    Default GUIDE: Basics of descr_strat.txt

    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:

    Code:
    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:

    Code:
    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.

    Code:
    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.

    Code:
    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:

    Code:
    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:

    Code:
    faction romans_julii, comfortable caesar
    superfaction romans_senate
    denari 5000
    There are a lot of things here, so lets start with:


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

    Code:
    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:

    Spoiler Alert, click show to read: 
    Quote Originally Posted by therother
    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.


    Code:
    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.

    Code:
    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:
    Code:
     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:

    Code:
    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.

    Code:
    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:

    Code:
     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.
    Last edited by Caius; 03-20-2008 at 03:34. Reason: Minor Changes




    Names, secret names
    But never in my favour
    But when all is said and done
    It's you I love

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO