Results 1 to 7 of 7

Thread: Condition to check for # of inhabitants possible?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    EarendilElenthol's Avatar Artifex
    Join Date
    Apr 2008
    Location
    The Netherlands
    Posts
    998

    Default Condition to check for # of inhabitants possible?

    Is there any way to check for the population of a settlement other than too low or too high?

    Like:
    1000 inhabitants => event_counter inhabitants_1 = 1;
    2000 inhabitants => event_counter inhabitants_2 = 1

    Ideally I'm looking to build a script that checks per settlement for the inhabitants and add money to the tax part of the financial overview, but as it looks impossible to place the money on the tax side, I would settle for income_bonus bonus xxx requires event inhabitants_1 in the EDB.

    If you know a better way, I'm always interested, but at first I look for a condition to check for the population.

    Thanks in advance,

    EE

  2. #2
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Condition to check for # of inhabitants possible?

    I'm not aware of one directly, but you can use checks for core_building and core_castle_building to check at the various settlement levels. The limitation is that if the population drops below the level, the checks won't catch it.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  3. #3
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Condition to check for # of inhabitants possible?

    Yes, core buildings would be my guess too.

    I don't understand what you are planning to script with the taxes. Taxes are tied to population anyways, if you want to raise that you could as well raise the base tax.

    The eaysest way adding money via script to the balance sheet is with the king's purse:

    increment_kings_purse (can also have negative values)
    set_kings_purse

    (or was it set_kingspurse? not sure, it's part of the Britannia script).

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  4. #4
    EarendilElenthol's Avatar Artifex
    Join Date
    Apr 2008
    Location
    The Netherlands
    Posts
    998

    Default Re: Condition to check for # of inhabitants possible?

    It is possible to select a specific settlement in the event, but the second part, the condition is not yet clear to me. Yet I know the number of inhabitants is used in the game at least for determining the core_building upgrades, for the occupy/sack/exterminate effects and for the effects of descr_settlement_mechanics. So I guessed the value on the variable population should be in somewhere as well. As I'm bound to the docudemons, and I know there are more commands and conditions possible, I thought to ask the real scripters.
    In the docudemons I came across SettlementPopulationMaxedOut and SettlementPopulationTooLow, perhaps there is another one. Otherwise, is it possible to check for the income of a settlement (any way: on taxes solely or on the whole)?

    Edit: my idea in a nutshell

    I don't like the possibility of either the player or the AI extort high and very high taxes out of a population, when a settlement has grown enough (city+higher), in the quest for resolving that problem I came across base_tax_level but that EDB command didnt work anymore (in RTW it did). Next to this, I didn't like the growth of taxes when going from a village to a huge_city, as there is but very few difference. So I decided that there must be some way around this.
    My idea was to make a set of values (in an event) on which I base the tax income, with as a bonus that I could use negative effects in income from different buildings (under 0 is impossible). That would work like:
    0-1000 inhabitants normal tax, but capped on a certain amount.
    1000-1500 lvl1 : xxx gold
    1501-2000 lvl2 : yyy gold
    As it is less important for me to get the small settlements right (their liege kept a large amount of influence) it is of paramount importance for the large cities as they acted nearly independent other than paying a lump sum each year, and sometimes more.
    Thats why I wanted to use a scripted inhabitants-dependent income instead of the engine-based taxes.

    Simply:
    small settlements with possibility to set taxes (but not so important)
    large settlements with no possibility to use high or very high tax rate (paramount importance)
    But as we are unable to do something about the taxes part, I thought I would need a script based tax income, and I try to find a way to model that, not yet in scripts but just in whether it's possible and in which way. And that scripted approach has the problem of the corruption being fully dependent on engine tax, but the positive effects of easily using negative income_bonus'ses and relating the income_bonus'ses of e.g. brothels and taverns to the population.
    Last edited by EarendilElenthol; October 07, 2009 at 12:04 PM.

  5. #5
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Condition to check for # of inhabitants possible?

    Quote Originally Posted by EarendilElenthol View Post
    small settlements with possibility to set taxes (but not so important)
    large settlements with no possibility to use high or very high tax rate (paramount importance)
    That would be castles.

    You could completly turn around the game's functionality of castles and cities in the way that small settlements would be the cities (then called "castles"), where the player can build anything and changes taxes at his liking.

    The maximum population in this type of settlement would be limited, so at one point the player has to grant "city rights", what would technically be the conversion of the "city" into a "castle" (then called "city").

    There the maximum population would be large, but taxes flat at medium and the landlord (i.e. player) would no longer be able to build much inside this kind of settlement, because that would then be business of the council.

    In addition, trade should not add to income, because that would go into the pockets of the citizens, but only add to population growth.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  6. #6
    EarendilElenthol's Avatar Artifex
    Join Date
    Apr 2008
    Location
    The Netherlands
    Posts
    998

    Default Re: Condition to check for # of inhabitants possible?

    As far as I know, the AI is unable to convert settlements, and that is quite important to gameplay. I started with castles as the cities, but that wasn't fully to my tastes. Now I'm thinking of adding enormous population unhappiness to high and very haigh tax rates, I saw that is possible, not only with the variable in the settlement_mechanics, but as well with events+conditions. You made an excellent point with the trade going to the inhabitants instead of the landlord. I will see how I can incorporate it.

  7. #7
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Condition to check for # of inhabitants possible?

    Quote Originally Posted by EarendilElenthol View Post
    As far as I know, the AI is unable to convert settlements, and that is quite important to gameplay.
    This indeed makes any concept based on castle-vs.-cities pointless. For dHRR we will most likely return to the one-settlement concept of RTW, even though this must not necessarily be the "city".

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

Posting Permissions

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