Page 1 of 3 123 LastLast
Results 1 to 20 of 46

Thread: Nakharar's Basics: Descr_strat

  1. #1

    Default Nakharar's Basics: Descr_strat

    descr_strat basics

    Factions and time:

    Hello welcome to my tutorial on the basics of the descr_strat. We will work down from the top and i will show all the functions. First is the factions list. This is very straight forward the most straight forward thing in modding. Playable factions, end unlockable factions and non playable factions. Non playable factions are best not to tamper with as their campaigns may be glitchy or may not start at all. After it states the starting years of the campaign in vanilla thats 1080 and the ending years. The timescale is how long each year is. Vanilla's time scale is 2.0 which means there are 2 turns a year. If you change it to 1.0 it becomes 1 turn every year. 0.5 2 turns a year and so on.

    Functions:

    The next part states some functions

    Code:
    marian_reforms_disabled
    rebelling_characters_active
    gladiator_uprising_disabled
    night_battles_enabled
    show_date_as_turns
    brigand_spawn_value 20
    pirate_spawn_value 28
    Its best not to change these because some are brought in from RTW and are needless. The last two brigand and pirate spawn value state the amount of that type which can be on the map at one time.

    Resources:

    Next is the resources section it states the resource the x co ordinate and then the y co ordinate. To find out the co ordinates of a place put your cursor in the co ordinate you want to find out press ` your medieval total war shell and type in show_cursorstat. Let us study one

    Code:
    resource    coal,    69,    107
    resource means the resource
    coal is the actual resource
    69 the x co ordinate
    107 the y co ordinate

    simple as the resources in MTW2 vanilla are:

    coal, fish, amber, cotton, furs, gold, marble, ivory, silver, tobacco, chocolate , wool, wine, textures, timber, sulphur, sugar, slaves, silk, graid, dyes
    tin, iron, spices and grain.

    Factions:

    This part of the descr_strat is the main bulk of it which shows all the factions there regions, ai status, money to start and king's purse.

    Here is the starting part of the English entry.

    Code:
    faction    england, balanced smith
    ai_label         catholic 
    denari    10000
    denari_kings_purse    2500
    the faction is england . the part after states the faction charactaristics. The charactaristics are these(from TWC wiki)

    Spoiler Alert, click show to read: 


    Characteristics

    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.



    Next is the ai label i dont know much about this there seems to be two default and catholic. The next line is the denari part

    denari 10000

    is the starting amount of money

    denari_kings_purse 2500

    every turn a faction receives a set amount of income. It is called the Kings Purse. For England it is 2500 for other factions it can be more or less. In Kingdoms by script it can be changes however we will not go into that.

    Settlement:

    After the faction part of the descr_strat it comes with their settlements and the settlement details.

    Code:
    settlement castle
    {
        level large_town
        region Nottingham_Province
    
        year_founded 0
        population 3000
        plan_set default_set
        faction_creator england
        building
        {
            type core_castle_building castle
        }
        building
        {
            type castle_barracks mustering_hall
        }
    }
    As you can see Nottingham is a castle as above it says settlement castle if it wasnt it would just say settlement. It shows then the region name
    and the status, eg: large town, village. It has the year founded(ignore) and the population . The next bit plan_set default set just ignore. Then it says faction_creator england. This signifies which faction made the city oringinaly so the culture of the buildings is shown. Aswell as the strat model. (i think).

    It then has the building, the building and thats it.

    Characters:

    This part shows the characters of the faction

    Code:
    character    William, named character, male, leader, age 50, x 109, y 147 
    traits Factionleader 1 , GoodCommander 1 , Intelligent 2 , VictorVirtue 3 , PublicFaith 2 , BattleDread 2 , StrategyDread 2 , ReligionStarter 1 
    army
    unit        NE Bodyguard                exp 1 armour 0 weapon_lvl 0
    unit        Spear Militia                exp 0 armour 0 weapon_lvl 0
    unit        Spear Militia                exp 0 armour 0 weapon_lvl 0
    unit        Town Militia                exp 0 armour 0 weapon_lvl 0
    unit        Peasants                exp 0 armour 0 weapon_lvl 0
    here is the faction leader

    the character is William. He is a named character since he is in the family. He is a male as all are. He is the faction leader thus it states leader. His then shows his age and the co ordinates he is at. The traits is on the line below with the faction leader trait it makes him faction leader. The rest of the traits are identified with a number after, that is the level of that trait they are at. Below is the army entry for the chracter this is his army with him at the co ordinates. There is his NE bodyguard and then there exp armour level and weapon level.
    Here is the character entries for a general and a heir.

    A general:

    Code:
    character    Robin, general, male, age 20, x 99, y 131
    And the faction heir:

    Code:
    character    Rufus, named character, male, heir, age 26, x 109, y 158 
    traits Factionheir 1 , LoyaltyStarter 1 , NaturalMilitarySkill 1 , GoodCommander 1 , ReligionStarter 1
    Agents are quite the same however can not have an army:

    Code:
    character    Richard, spy, male, age 20, x 107, y 160 
    traits GoodSpy 2 
    
    character    Samuel Blacke, merchant, male, age 25, x 110, y 134 
    traits GoodMerchant 1
    
    character    Laurence Bidell, diplomat, male, age 29, x 107, y 130 
    traits GoodDiplomat 2
    there is the spy a merhcnat and a diplomat.

    A princess is a bit different as you can see here

    Code:
    character    Cecilia, princess, female, age 25, x 111, y 151 
    traits IAmPrincess 1 , NaturalPrincess 2 , GoodPrincess 1
    Family Relations:

    Below all of the character entries there is a part which says character_record. This is for characters which arnt on map ever young relatives or married women or just old women.

    Below that there is the family bit this generates the family tree. 2 names next to each other mean they are married. 2 tab means there children. 1 tab means brothers or sisters.

    Other Entries:

    The Mongol and Timurid entries say dead_until_ressurected. This means the faction is dead until they are ressurected by an event or by a script.
    Factions can be killed just by adding this to them and removing there character entries and the settlement entries.

    Will be updated with diplomacy section.

    Regards

    Nakh
    Last edited by Squid; July 02, 2009 at 11:36 AM.

  2. #2
    S-te-Fan's Avatar Primicerius
    Join Date
    Jun 2008
    Location
    Diessen, The Netherlands, Near the belgium border.
    Posts
    3,905

    Default Re: Nakharar's Basics: Descr_strat

    Wow, some nice explenation. Although I already know the great part of what is in this topic .

  3. #3

    Default Re: Nakharar's Basics: Descr_strat

    Yeah well you are supposed too. For new modders seen them post questions on this next part will be diplomacy section below, just need to experiment big time with some mad stuff like if i enable marian_reforms what happens and stuff like that.-----------



    In Kingdoms there is this

    Here's a Kingdoms entry that can be put in the top section of the descr_strat.txt:

    Code:
    free_upkeep_forts x
    where x is the number of free upkeep slots that forts will have.
    thanks to abuelist
    Last edited by Nakharar; October 21, 2008 at 02:24 PM.

  4. #4
    Y_filip's Avatar Tiro
    Join Date
    Mar 2008
    Location
    in the galaxy far-far away
    Posts
    212

    Default Re: Nakharar's Basics: Descr_strat

    great thanks for tutorial !
    [SIGPIC][/SIGPIC]

  5. #5
    Gorrrrrn's Avatar Citizen
    Join Date
    Jan 2007
    Location
    here
    Posts
    5,546

    Default Re: Nakharar's Basics: Descr_strat

    Nakharar

    very timely (for me anyway)

    Q: how important is the faction creator line? What difference does it make in practice.

    Reason I ask is I'm looking at the stainless steel descr_strat and a lot of the scandinavian and western european slave towns have england as faction creator.

    I know that is the faction to which it will join if there is a loyalists revolt so should the faction creator be the nearest AI faction at the start - will changing scandinavian towns from england to denmark or norway make much difference?

  6. #6

    Default Re: Nakharar's Basics: Descr_strat

    If you changed it to a nation of another culture then it would if you made faction creator Egypt it would make a difference

  7. #7
    Gorrrrrn's Avatar Citizen
    Join Date
    Jan 2007
    Location
    here
    Posts
    5,546

    Default Re: Nakharar's Basics: Descr_strat

    many thanks for that.

    will go through the faction creators and see if there's any that I need to adjust.

    and one final question - I've noticed that some settlements have been given faction creators that are emergent factions - that would seem to be problematic to me if there is a loyalist revolt before the faction emerges?

  8. #8

    Default Re: Nakharar's Basics: Descr_strat

    Next is the ai label i dont know much about this there seems to be two default and catholic. The next line is the denari part
    The AI_label sets the behavior of a faction these are linked to the descr_campaign_ai_db.xml here they are defined.
    Last edited by J@mes; October 14, 2008 at 02:53 PM.


  9. #9

    Default Re: Nakharar's Basics: Descr_strat

    good tutorial +rep

  10. #10

    Default Re: Nakharar's Basics: Descr_strat

    havent seen it yet Also seen the resources one??
    Last edited by Nakharar; October 14, 2008 at 12:18 PM.

  11. #11

    Default Re: Nakharar's Basics: Descr_strat

    Great simple BUT useful tutorial. specially that Family Relations section. :

  12. #12

    Default Re: Nakharar's Basics: Descr_strat

    Just originality at its best im going to do a tutorial on cultures in the basics series then it gets complicated

  13. #13
    aduellist's Avatar Push the button Max!
    Join Date
    Mar 2005
    Location
    Shenandoah Valley
    Posts
    1,822

    Default Re: Nakharar's Basics: Descr_strat

    Quote Originally Posted by Nakharar View Post
    The last two brigand and pirate spawn value state the amount of that type which can be on the map at one time.
    Are you sure about that? It's long been said that the way to reduce the spawning of rebels and pirates is to increase these numbers, which would seem to indicate that the meaning of these values is other than stated. Your definition would seem to indicate that lowering the numbers would reduce the spawns. Can you (or anyone else) shed some light on this? Thanks!
    Under the patronage of TheFirstONeill
    Proud team member of
    THERA, A New Beginning


    "The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels. For it is against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning if it is to be stopped at all." H. L. Mencken

    "Liberty is meaningless where the right to utter one’s thoughts and opinions has ceased to exist. That, of all rights, is the dread of tyrants. It is the right which they first of all strike down." Frederick Douglass

  14. #14

    Default Re: Nakharar's Basics: Descr_strat

    well this is presuming lol i did experiments on most bit experiment with it yourself and you find out and post here please

    sorry

  15. #15
    aduellist's Avatar Push the button Max!
    Join Date
    Mar 2005
    Location
    Shenandoah Valley
    Posts
    1,822

    Default Re: Nakharar's Basics: Descr_strat

    Quote Originally Posted by Nakharar View Post
    well this is presuming lol i did experiments on most bit experiment with it yourself and you find out and post here please

    sorry
    No problem, just trying to figure out if I'd been "doing it backwards" all this time.

    From my own experimentation over time, it seems to hold true that raising these numbers reduces spawning. That doesn't give us a definition of what the numbers mean, only an indication of what the effects of changing them are.

    For example, here are the values from descr_strat.txt in PDER 1.0.

    Code:
    brigand_spawn_value 666	
    pirate_spawn_value 9999
    Haven't tried drastically lowering the numbers yet. Sounds like a good project for my weekend.

    Oh, +rep for your work organizing this information for folks like me trying to figure out "the meaning of it all".

    Edit: Here's a Kingdoms entry that can be put in the top section of the descr_strat.txt:

    Code:
    free_upkeep_forts x
    where x is the number of free upkeep slots that forts will have.
    Last edited by aduellist; October 21, 2008 at 12:26 PM. Reason: Additional info
    Under the patronage of TheFirstONeill
    Proud team member of
    THERA, A New Beginning


    "The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels. For it is against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning if it is to be stopped at all." H. L. Mencken

    "Liberty is meaningless where the right to utter one’s thoughts and opinions has ceased to exist. That, of all rights, is the dread of tyrants. It is the right which they first of all strike down." Frederick Douglass

  16. #16

    Default Re: Nakharar's Basics: Descr_strat

    wow really thanks will add that to reserved post the third post thanks this is for M2 thoigh

  17. #17

    Default Re: Nakharar's Basics: Descr_strat

    Excellent this is what i where loking for sorry i may have already asked this but is this the basis of AI?

  18. #18

    Default Re: Nakharar's Basics: Descr_strat

    no this isnt the basics of AI AI really isnt basic

  19. #19

    Default Re: Nakharar's Basics: Descr_strat

    Great tutorial, once again





    Researcher for Patria Liberia

    IF you rep me i might cry

  20. #20

    Default Re: Nakharar's Basics: Descr_strat

    THANK YOU! Very useful and educational!
    La Garde recule.






Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •