Results 1 to 16 of 16

Thread: How to slow down city level of advancement?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Libertus
    Join Date
    Sep 2004
    Location
    Portugal
    Posts
    66

    Default How to slow down city level of advancement?

    I set the campaign for one turn = half year, but i dont like to have xvi century units on the xii century. so i triple the building construction time to slow down the game. the problem is the city\castle advancement levels. i want to decrease the population growth rate or change the requirements to advance to the next level (ex. Huge wall needs 24000 pop to advance). i search the txt files but i cant seem to find the right one. can anyone tell me what do i have to change

  2. #2

    Default Re: How to slow down city level of advancement?

    You can adjust descr_settlement_mechanics.xml to reduce the growth rates. All SPF variables modify population.

    For example:

    <factor name="SPF_FARMING_LEVEL">
    <pip_modifier value="0.25"/> <--adjust the values in red
    <castle_modifier value="0.7"/>
    </factor>
    Check out my Otherworld mod: A big fantasy map for Medieval 2, new playable factions and more! -Release 7 is now available-

  3. #3
    Libertus
    Join Date
    Sep 2004
    Location
    Portugal
    Posts
    66

    Default Re: How to slow down city level of advancement?

    Thanks dude. just what i was looking for. i dont know how i missed this

  4. #4
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: How to slow down city level of advancement?

    What do these two values mean? Pip_modifier determines how many "pips" show up to determine population in Settlement Details, or something?


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  5. #5

    Default Re: How to slow down city level of advancement?

    The modifiers govern the rate of change in particular values (the strength of another variable), which effects how many pips are shown on the in-game scrolls. Factors that have max and min values limit the number of pips possible.

    <factor name="SPF_FARMS_BUILT">
    <pip_modifier value="0.25"/> <--this gives the farms built variable 1/4 strength
    <pip_min value="0"/> <--lowest number of pips is none
    <pip_max value="25"/> <--highest number of pips is a fraction of this - ex. 5 to 1 pip or whatever shows in game
    </factor>
    Last edited by Gundug; July 31, 2007 at 11:16 AM.
    Check out my Otherworld mod: A big fantasy map for Medieval 2, new playable factions and more! -Release 7 is now available-

  6. #6
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: How to slow down city level of advancement?

    Sorry these settlement_mechanics modifiers take some time to wrap one's head around them. So pip_max says that at most 25 pips will be shown for maximum population, in Settlement Details?

    More to the point, how does the rate of settlement growth slow down in the earlier post? Setting pip_modifier to 0.25 means that, given some SPF_FARMING_LEVEL variable which affects pop-growth in way X, the 0.25 modifier means the FARMING_LEVEL will only be 1/4 as effective? and furthermore, then what is the need for castle_modifier, if you already lowered the base pop-growth for all cities?


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  7. #7

    Default Re: How to slow down city level of advancement?

    I take it that the number in max is divided into by a certain value to get the resulting display. So for example a max of 25 might be divided by 5 to show 5 pips on screen (or whatever values they are actually using).

    For your second question, yes, the farming level will be 1/4 as effective. The separate castle modifier effects only castles, so they have a different growth rate due to farming than cities. You could also make both values the same.

    The two separate values are especially good for the SOF (order factor) variables, since, for instance, you might like to make less popular unrest in distant castle regions:
    <factor name="SOF_DISTANCE_TO_CAPITAL">
    <pip_modifier value="2.0"/>
    <castle_modifier value="0.2"/>
    <city_modifier value="0.5"/>
    <pip_min value="0"/>
    <pip_max value="36"/>
    </factor>
    Check out my Otherworld mod: A big fantasy map for Medieval 2, new playable factions and more! -Release 7 is now available-

  8. #8
    Naked Emperor's Avatar Centenarius
    Join Date
    Mar 2005
    Location
    Norway
    Posts
    828

    Default Re: How to slow down city level of advancement?

    One thing though, lowering SPF values might resault in your cities (or especially castles) not reaching their growth limit. I had this especially with castles because they don't have any happiness buildings that help growth

  9. #9
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: How to slow down city level of advancement?

    Gundug, I was confused about Farming Level because while having a castle_modifier it didn't have a city_modifier, so I was confused, maybe the extra 0.7 penalty is applied to castles, on top of the farming penalties for all cities? So that if it was 1.0, castles would grow as fast as cities?

    Also, thanks for confirming pip_modifier. Why is it called that, if it has to do with the fundamental value involved, and not the actual pip being displayed? Maybe it's the value for each pip shown in the settlement details?

    As for the pip_min/pip_max values, do we know what it is divided by? And why have that kind of normalizing effect, wouldn't it be more intuitive for programmers to make it so that whatever the _max value was, it literally determined how many pips would show up?

    NE: good point, and you can't lower taxes in castles to foster population growth.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  10. #10

    Default Re: How to slow down city level of advancement?

    I wish I was not so poor in mathematics, so I could understand everything that the programmers are doing, but I'm not sure why the pips calculations are done the way they are. I have to admit I'm from the plug in a number and see how it works school of thought.

    The above sample settings are copied from my mod, and they seem to work OK - with slower growth in general, but no zero growth locations (except huge cities, which tend to stagnate). When I get home tonight, I will take a closer look at the pip max values and see how many pips that translates to in the game.
    Check out my Otherworld mod: A big fantasy map for Medieval 2, new playable factions and more! -Release 7 is now available-

  11. #11

    Default Re: How to slow down city level of advancement?

    SigniferOne, I tested the SPF_FARMING_LEVEL factor by adding a city modifier to it, and it worked fine. I gave cities a very low value and they had no farming growth, while the castles remained the same. The pip_modifier is a global modifier for the initial value while the city/castle modifiers further modify that result.

    For instance:

    <factor name="SPF_FARMING_LEVEL">
    <pip_modifier value="1.0"/> <--this means whatever number the programmers chose for this calculation will be unmodified (100% of initial value)
    <city_modifier value="0.1"/> <--10% of pip_modifier value, used for cities only
    <castle_modifier value="0.7"/> <--70% of pip_modifier value, used for castles only
    </factor>

    So for my mod's distance to capital penalty, I could change the pip modifier value to 1.0 and double the castle and city modifiers to get the same result in game.
    <factor name="SOF_DISTANCE_TO_CAPITAL">
    <pip_modifier value="2.0"/>
    <castle_modifier value="0.2"/>
    <city_modifier value="0.5"/>
    <pip_min value="0"/>
    <pip_max value="36"/>
    </factor>

    to

    <factor name="SOF_DISTANCE_TO_CAPITAL">
    <pip_modifier value="1.0"/>
    <castle_modifier value="0.4"/>
    <city_modifier value="1.0"/> <--this value becomes redundant and can be removed altogether to achieve the same result
    <pip_min value="0"/>
    <pip_max value="36"/>
    </factor>

    These two blocks of code produce exactly the same results in game, and you can see how stupid at math I am by looking at the first example (50% of 200% to achieve 100% for cities).

    For reference, the pips are broken down as follows:
    Population growth: 0.5% per pip
    Unrest: 10% per pip
    Religion: 5% per pip
    Check out my Otherworld mod: A big fantasy map for Medieval 2, new playable factions and more! -Release 7 is now available-

  12. #12
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: How to slow down city level of advancement?

    Ok that's an excellent explanation, I was able to follow all of your points exactly.

    Basically, pip_modifier is, like you said, the default modifier for that variable, whereas further elaborations like city_ or castle_ modifiers change it even further. Thus you can modify the pip_ to affect all values globally, or (and I think this is a better coding practice), leave it unchanged and only affect the local modifiers that do exactly what you want. Fantastic, thanks!


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  13. #13
    Grand Duke Vytautas's Avatar Dueling it out
    Citizen

    Join Date
    Jun 2005
    Location
    Kaunas, Lithuania, Europe, Earth, Universe, lol
    Posts
    1,221

    Default Re: How to slow down city level of advancement?

    Ok, I'll give you to try out my current rates of pop growth if you wish (on 2 YEARS PER TURN), which I've balanced according to vanilla.
    The emphasis here is more on actually 'farms built', reducing the effect of buildings and trade on growth.
    With these settings I only get citadels and huge cities in 1250s earliest if im lucky (while in vanilla pop growth was crazy you could get citadels very early which was unrealistic)

    <factor name="SPF_FARMING_LEVEL">
    <pip_modifier value="1.0"/>
    <castle_modifier value="0.7"/>
    </factor>
    <factor name="SPF_FARMS_BUILT">
    <pip_modifier value="2.0"/>
    <castle_modifier value="0.7"/>
    <pip_min value="0"/>
    <pip_max value="20"/>
    </factor>
    <factor name="SPF_HEALTH">
    <pip_modifier value="1.0"/>
    <pip_min value="0"/>
    <pip_max value="10"/>
    </factor>
    <factor name="SPF_BUILDINGS">
    <pip_modifier value="0.5"/>
    <pip_min value="0"/>
    <pip_max value="10"/>
    </factor>
    <factor name="SPF_TAX_RATE_BONUS">
    <pip_modifier value="1.0"/>
    <pip_min value="0"/>
    <pip_max value="10"/>
    </factor>
    <factor name="SPF_BUILDINGS_FUN">
    <pip_modifier value="0.25"/>
    <pip_min value="0"/>
    <pip_max value="10"/>
    </factor>
    <factor name="SPF_GOVERNORS_INFLUENCE">
    <pip_modifier value="1.0"/>
    <pip_min value="0"/>
    <pip_max value="10"/>
    </factor>
    <factor name="SPF_TRADE">
    <pip_modifier value="0.25"/>
    <castle_modifier value="0.5"/>
    <city_modifier value="1.0"/>
    <pip_min value="0"/>
    <pip_max value="10"/>
    </factor>
    <factor name="SPF_SQUALOUR">
    <pip_modifier value="1.0"/>
    <pip_min value="0"/>
    <pip_max value="40"/>
    </factor>
    <factor name="SPF_PLAGUE">
    <pip_modifier value="0.75"/>
    </factor>
    <factor name="SPF_TAX_RATE_PENALTY">
    <pip_modifier value="1.0"/>
    Plz give me advise how to balance it even more, txs

    Btw nice explanations Gundug, could you make clear smth for me again:

    <factor name="SPF_FARMS_BUILT">
    <pip_modifier value="2.0"/> <--- this is global pip, so it affects both cities and castles at the same level, if there are no additional pips?
    <castle_modifier value="0.7"/> how does this affect castle: is it exactly 0.7 despite cities being at 2.0 or is it 70% from 2.0, thus 2.0*0.7=1.4? I mean is the additional city or castle pip really apercentage from global pip or just fixed figure?

    Txs
    Last edited by Grand Duke Vytautas; August 02, 2007 at 12:41 PM.
    “Great empires are not maintained by timidity.” ― Tacitus

  14. #14
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: How to slow down city level of advancement?

    Quote Originally Posted by Grand Duke Vytautas View Post
    <factor name="SPF_FARMS_BUILT">
    <pip_modifier value="2.0"/> <--- this is global pip, so it affects both cities and castles at the same level, if there are no additional pips?
    <castle_modifier value="0.7"/> how does this affect castle: is it exactly 0.7 despite cities being at 2.0 or is it 70% from 2.0, thus 2.0*0.7=1.4? I mean is the additional city or castle pip really apercentage from global pip or just fixed figure?

    Txs
    I know this weren't asked of me, but I'll try to answer it anyways. Your question involves precisely the reason why I recommended rewriting all of the SPF_ variables in my previous post; I strongly urged the pip_modifiers to be set to 1.0. Otherwise it would get very confusing.

    We can rewrite your SPF_FARMS_BUILT in the following way:

    <factor name="SPF_FARMS_BUILT">
    <pip_modifier value="1.0"/>
    <city_modifier value="2.0"/>
    <castle_modifier value="1.4"/>
    </factor>

    Do you see what I did there? I made pip_modifier to 1.0, so it would affect everything to no degree. Then I make specific exceptions -- for cities, make it 2.0, double the default value, and for castles make it 1.4, that is double but not exactly of the default value (only 0.7).

    Thus cities will grow twice as fast as the default value, and castles will grow faster also, although not quite as much.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  15. #15
    Grand Duke Vytautas's Avatar Dueling it out
    Citizen

    Join Date
    Jun 2005
    Location
    Kaunas, Lithuania, Europe, Earth, Universe, lol
    Posts
    1,221

    Default Re: How to slow down city level of advancement?

    Cool txs, I see that it's actually better that way - setting the base figure and then manipulating around it with seperate city/castle modifiers, cool. Will test it
    Last edited by Grand Duke Vytautas; August 02, 2007 at 03:54 PM.
    “Great empires are not maintained by timidity.” ― Tacitus

  16. #16

    Default Re: How to slow down city level of advancement?

    I realize this is an old thread, but thought i would bring it back to life as i have done alot of research into the file. All my research has not had any outside influence so i didnt even know about the information in this thread. But, to sum it up, i came to the same conclusions except i also found what most of the pip values actually represent. SPF_FARMING_LEVEL refers to the value found in descr_regions < Directly affecting a regions harvest. So changing the SPF_FARMING_LEVEL to something other than 1.0 allows for precise balancing of individual regions which have the same harvest value. The value in descr_regions will therefore alter the final outcome based on the pip values in settlement_mechanics.

    SPF_FARMS_BUILT refers to the farm level in the EDB (Not the tier level).
    Code:
     
    capability
    {
    farming_level 1
    }
    Most pips refer to a value in the EDB such as population_growth_bonus, law_bonus, happiness_bonus, mine_resource etc etc.

    Each Factor's PIP carries the following weight and will be effected by values in the EDB by the following percentages
    SPF - 0.5%
    SOF - 5%
    SIF - 10%

    Example: SPF Farming directly affects base farming level as per regions.txt in the base folder. 6 in the regions for base farming would be 3% bonus to population growth at 1.0.

    Adding the pip modifier for city and castle further alters the outcome by a percentage of the pip (which is a percentage of the value found elsewhere - EDB, descr_regions etc).

    The pip max and min values refers to a combination of the of values in these other files and the pip itself. Meaning once the pip max is reached no more bonus can be gained from further pips. The mathematics of it can become daunting. An example might better explain what i mean...

    <factor name="SPF_BUILDINGS">
    <pip_modifier value="0.5"/>
    <pip_min value="0"/>
    <pip_max value="10"/>
    </factor>

    Firstly, SPF_BUILDINGS refers to any building that gives a bonus. Buildings that do not give a bonus will not come into the equation. Bonus refers to any bonus in the EDB such as road_level, farming_level, law_bonus etc. The pip max value being set to 10 will count the bonus up until 10 bonus points have been calculated. Any additional points are wasted and therefore additional buildings will not add to population growth.

    With each pip (for SPF) having a wieght of 0.5% and the pip max of 10, thats a maximum of 5% to population growth from buildings present in a settlement. But in this example the pip_modifier value is also 0.5, so thats a total of 2.5% population growth from buildings.

    I am still trying to find the value of certain other pips such as BOOM, SQUALOR and DISTANCE_TO_CAPITAL (among others). Knowing those values would make adjusting the pip alot easier and more accurate to a modders needs.

    Hope made sense... and sorry for bumping a 2 yr old thread
    ...longbows, in skilled hands, could reach further than trebuchets...

Posting Permissions

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