Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 54

Thread: Population Control and Horse Pastures - Beta

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Population Control

    I totally forgot about 1 guild per settlement... Have to rethink that idea
    ...longbows, in skilled hands, could reach further than trebuchets...

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

    Default Re: Population Control

    Another point - AFAIK the AI builds the first guild it is eligible to build in a settlement.
    (IE the first one it gets enough points for.)

    If the trade guild system - and specialist trade guilds seems a good idea with extra trade bonuses - is used you'll need to monitor how the AI adapts to it and adjust accordingly.

  3. #3

    Default Re: Population Control

    I've done some testing and written a script which works for the most part. I have scrapped the guild system idea and gone with regular buildings to track how many horses a player has. (creating buildings was rather easy).

    I only have it working for the player for now, i want to release a version for testing soon and then improve on it and possibly add AI factions.

    For now though, there are 3 new buildings (one chain), Horse Pastures. (horse farmer, horse dealer and horse trader < these can be more aptly named at a future date). Each building increases the players horse pool by a said amount (1,2 and 3) every turn. The buildings also grant the AI an increase in trade based income (they are not currently gaining the horse pool so i gave them somthing so the building is not wasted on them - and they are building them). every time the player recruits a cavalry unit the horse pool is decreased. If the pool reaches 0, recruitment of cavalry freezes. The player can check how many horses he has via requesting settlement help (the '?' in the top right of any settlement scroll owned by the player - this will not be an exact number, more a general idea of how many you have). At the moment it is faction wide, meaning if one settlement adds 2 horses to the pool, another settlement can use those horses. (it may be difficult to limit it to settlements alone).
    All i need to do before releasing a beta version is add the restriction of horses to the EDB. Will do that over the next few days. I also need to change the values each building provides and the values for recruiting cavalry.

    Notes on the script:
    I have not put anything in place to represent the mongols or cumans style of play.

    Possible Ideas and Improvements:
    Though it may be impossible for the AI to use this system properly it may be possible to allow the AI to want to trade horses with the player (or steal horses from the player). The AI doesnt need the horses, but the player does, this would create a new way to interact with other factions. If you have a trade agreement you can buy horses, if your at war, they might steal from your horse supply (under predetermined conditions ofcourse). Just needs some thought...
    The horse pastures and horse pool could also be used (increased/decreased) based on the number of trade agreements made. Meaning the player will need more horses to conduct trade on land (wagons, supply trains etc). Forcing the player to get more horses whether for military use or trade based. Ofcourse, sea trade would not be affected.

    On a side note, I am going to upload the Population Control mod on the first post. This effects population whenever you recruit any unit and also includes the migration script.
    ...longbows, in skilled hands, could reach further than trebuchets...

  4. #4

    Default Re: Population Control

    To : Tsarsies

    Great idea, just a thought, did you consider some faction(or location/settlement) should spawn or better word... breed more or better horses than others? but in anyways, can't wait to try your new stuff, should add alot of depth(realizm) to the game. hopefully it's save game compatible...

  5. #5

    Default Re: Population Control and Horse Pastures

    I have not thought of setting specific faction to having more or better horses. But i do like that idea. Will surely add that to the first release.

    I have planned however to ensure every faction starts with a specific amount of horses dependant on buildings it starts with. Adding your idea to that would would be fine. And it wont be save compatable as new buildings will be included.
    ...longbows, in skilled hands, could reach further than trebuchets...

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

    Default Re: Population Control and Horse Pastures

    (could use hidden_resource to have superior horse breeds available in certain areas?)

  7. #7

    Default Re: Population Control and Horse Pastures

    man, not saved-game compatible? you just hit my face with a brick... but I really like your idea(so hit me with more...), horses were assets back then, and not all countries should get the same amount of horses due to nature(otherwise back then the chinese didn't have to buy horses from the stepp people and create their own cavalry). By far such situation has been overlook in SS(in My opinion).

    If(and I mean only if), we can do a little research about horse, and add alttile bit of taste of that, will be a plus too, you think? what I mean is, for example, certain area replentish rate will be faster then others due to the fact it was a historical horse breeding area(place where they had horse guild in start up), maybe?

  8. #8

    Default Re: Population Control and Horse Pastures

    Some very good ideas!!!

    I have finished writing the script, its a mammoth 44 lines of code (not including the editions to the EDB or historic events files also not including the script to fire the ingame messages regarding how many horses you have). I will spend the next 2 days editing the EDB to accomodate the script and upload a beta for testing. It will only be compatable with SS 6.2. but as always, ill release a version for other mods as needed.


    A quick run down on its features so far...
    1. 3 new buildings (Horse Farmer, Horse Dealer and Horse Trader).
    2. Most cavalry units in the EDB have 24 men, so 24 horses are required to recruit 1 cavalry unit. (some cavalry in the EDB have 32, some only 8. But more then 98% have 24). This includes elephants, camels etc.
    3. Each building grants an increase in the kingdoms horse population (2/4/8 respectfully) each turn (all my scripts are based on 2tpy - every 6 months) - so 12 turns is required for 1 settlement with a horse farmer to provide enough horses for 1 cavalry unit (3 turns if the settlement has a Horse Trader). Keep in mind that all your settlements contribute, so 12 settlements with a horse farmer is 1 cavalry every turn. More settlements with the buildings = more horses.
    4. If your kingdom has less then 24 horses, you can not recruit.
    5. The buildings also provide trade bonuses. More so for the AI then the player.
    6. There is no limit the number of horses your faction can own
    7. Farms provide 1 horse per 2 turns per tier. So Irrigation farms provide 4 horses every 2 turns.
    Still To Do/In Planning
    1. Add Horse Thieves.
    2. Add Faction Specific Horse numbers/quality.
    3. Add trade options for the player to buy and sell his horses.
    4. Make Marketplaces affect horse levels/trade
    5. Other balancing issues...
    Will hopefully release the first beta in a few days...
    ...longbows, in skilled hands, could reach further than trebuchets...

  9. #9
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: Population Control and Horse Pastures

    What about increasing the number of horses available to the player when they capture a settlement?

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  10. #10

    Default Re: Population Control and Horse Pastures

    That would be possible and easy to impliment. The horses are increased at the end of every turn (currently), so if a player captures a settlement that already has a farm and a horse pasture building they will gain horses from those buildings at the end of turn. Or are you suggesting an immediate increase at the time of taking control?

    Added screenshots to the first post.
    ...longbows, in skilled hands, could reach further than trebuchets...

  11. #11

    Default Re: Population Control and Horse Pastures

    Would you consider putting something similar in for armour? It's always seemed odd that you could recruit as many armoured sergants etc in a settlement without any armour making facilities as in one with a good enough armourer to make their starting armour. I suppose it could be tricky given the different types of armour and the recruitment model where many units may bring their own armour to the party...

  12. #12
    Caesar Clivus's Avatar SS Forum Moderator
    Join Date
    May 2007
    Location
    Australia
    Posts
    12,693

    Default Re: Population Control and Horse Pastures

    Quote Originally Posted by SwampRAt View Post
    Would you consider putting something similar in for armour? It's always seemed odd that you could recruit as many armoured sergants etc in a settlement without any armour making facilities as in one with a good enough armourer to make their starting armour. I suppose it could be tricky given the different types of armour and the recruitment model where many units may bring their own armour to the party...
    There is the problem that using the condition of whether a building is present in a settlement to allow/prevent recruitment of a unit can cause crashes. Also the AI has problems keeping up: it can't be told that to recruit a certain unit it needs to build a certain building. I tried that once ages ago and the AI had a LOT more peasant units in it's armies.

    BftB2 UPDATED 22nd DECEMBER. Member of the Complete Byzantine Unit Roster team

  13. #13
    preachercheeze's Avatar Biarchus
    Join Date
    Oct 2008
    Location
    Gothenburg
    Posts
    690

    Default Re: Population Control and Horse Pastures

    this is a great idea, but unfortunatly the sripts lags turns a lot... I installed the migration sript on a fresh SS and it took double amount of time in comparison from when I deleted the script entries...

    maybe itīs my comp that holds me back, but i suspect that with TC this will most certanly lag down the turns a lot...

  14. #14

    Default Re: Population Control and Horse Pastures

    @ SwampRat

    I have been thinking of eventually adding similar ideas and incorporating them all into a much larger 'trade and supplies' mod. So the player would need to acquire the metals necessary for weapon and Armour, farming tools and other supplies that to most people are mundane but would add a little more depth to ones strategy. I have not really put much thought into any of that yet tho, its more like something to look into at a later date with some proper research.

    @ preachercheeze

    I'm honestly not sure why you experienced turn lag with the migration script. I don't experience any. I always try to write scripts that are void of turn lag. My garrison script is like 100,000 lines of code and doesn't lag, this migration script is like 5,000 lines of code so should not lag. All monitors are only firing during the players turn.

    You might be interested to know that the log is still activated. The log is more used when debugging. If left on it slows your game down. I turn the log off when ever i 'play' the game. Although it does not speed the game up a noticeable amount, it might for some people improve performance. To turn the log off, open the SS cfg file. Found in the SS mod folder. open it with notepad and search for these lines..

    Spoiler Alert, click show to read: 

    [log]
    to = logs/SS.system.log.txt
    ;level = * error
    level = * trace

    and replace with...

    ;[log]
    ;to = logs/SS.system.log.txt
    ;level = * error
    ;level = * trace

    If your interested, the error command is like a summary log where as the trace is very detailed and tracks every monitor and trigger that fires during the game.

    I don't promise it will make a huge difference, but might help a little.


    I have been thinking of ways to possibly extend the horse pasture mod. But I'm just not sure how Dependant i would want to force the player to rely on horses. Here is a collection of random research Ive done, just to give you an idea of what could be done. If you have any ideas, throw them at me, I'm sure i can finagle some kind of script to put most ideas into the game...

    Horses in medieval times were extremely important and took on roles in almost every facet of daily life, from travel and trade to farming and warfare. Horse's were so important that entire communities would gather their moneys together to buy one horse for the community (sometimes as expensive as a house!) and with the hope the horse would reproduce. During warfare the victors would search through the enemy dead for Armour, weapons and horses. If a regular soldier manage to capture an enemies horse it could be his ticket to promotion within the army! Horses brought honor and reputation to the rider and during competition, such as the joust, the winner often gaining the others mount as a prize, the loser willing to pay large sums to get his mount back, and thus, his honor!. Horses were also used to be eaten. This was common during a siege when there was no food and soldiers had nothing to eat. They then ate the horse and drank its blood to survive a little bit longer. Of course this was rare, but nevertheless it did happen. Horses were also used to show wealth and ensure comfort (in 1445, the English royal household contained 60 horses in the king's stable and 186 kept for "chariots" (carriages) and carts). Horses were used in farming such as ploughing and transporting crops to the market.

    There are alot of ideas in that which i plan to implement. They all seem good and with enough creativity could be implimented...
    ...longbows, in skilled hands, could reach further than trebuchets...

  15. #15
    preachercheeze's Avatar Biarchus
    Join Date
    Oct 2008
    Location
    Gothenburg
    Posts
    690

    Default Re: Population Control and Horse Pastures

    @ Tsarsies
    Spoiler Alert, click show to read: 
    @ preachercheeze

    I'm honestly not sure why you experienced turn lag with the migration script. I don't experience any. I always try to write scripts that are void of turn lag. My garrison script is like 100,000 lines of code and doesn't lag, this migration script is like 5,000 lines of code so should not lag. All monitors are only firing during the players turn.

    You might be interested to know that the log is still activated. The log is more used when debugging. If left on it slows your game down. I turn the log off when ever i 'play' the game. Although it does not speed the game up a noticeable amount, it might for some people improve performance. To turn the log off, open the SS cfg file. Found in the SS mod folder. open it with notepad and search for these lines..

    Spoiler Alert, click show to read: 

    [log]
    to = logs/SS.system.log.txt
    ;level = * error
    level = * trace

    and replace with...

    ;[log]
    ;to = logs/SS.system.log.txt
    ;level = * error
    ;level = * trace

    If your interested, the error command is like a summary log where as the trace is very detailed and tracks every monitor and trigger that fires during the game.

    I don't promise it will make a huge difference, but might help a little.



    hehehe... long quote... so i "spoil tag" it...
    first, I send my excuses... it would seem I might have jumped to conclusions in this instance, but fact was that when I installed the migration mod a turn took a full 4-5 minutes (first turn!) but when I deleted the lines you added it went to a "normal" 1― minute (yeah, my computer is rather slow )...

    in my earlier experiences this is affected by the sripting and that every faction in the world is bound by it... eg. I canīt play TC submod because of lagtime for about 7-10 minutes from the first turn in some instances... well, I am not complaining īcause I have my limitations in CPU standard, so I can only dream of a better computer soon (whines for my wife instead)

    I will try it again, with the log deactivated... if it works, I will be mucho happiero... this makes it worthwhile to build farms in cities again!!!


    about the horse pasture mod... if I manage to build all the buildings that affect horse population (but NOT the guild), will it not be at a negative development??? I did a counting just now and found that if I donīt get the guild and not the caravan (usually playing england or HRE) I will be at a minus 6 in breeding... I guess you canīt get a negative number of horses (sorry mister noble sir, you have to kill of your horse now ), and for me at least, I always aim for cities with EVERYTHING in them... I donīt specialize much because in my campaigns I aim for peace and development until attacked... and when that happens I donīt want to be too dependent on a few cities, everyone should fill eachothers need...

    must I change my tacticts totally or is this just a miscalculation (had F in math during my gymnasium studies (gymnasium=voulentary 3-year studies after High-school, must have for university studies (this is sweden by the way)))
    Last edited by preachercheeze; March 07, 2009 at 01:19 AM. Reason: clarified whom I quoted

  16. #16
    Overlord.ru's Avatar Centenarius
    Join Date
    Jan 2009
    Location
    Russian Federation, Moscow Region, Town of Electrostal
    Posts
    866

    Default Re: Population Control and Horse Pastures

    How can I find out if the mod is working correctly?I recieve a message about population boom after the first turn,but there are no other signs of mod presence.Check it please,my last lines of campaign_script are :
    monitor_event UnitDisbanded TrainedUnitCategory cavalry
    and TrainedUnitClass missile
    and not UnitType Kazaks Mercs
    and not UnitType Turkomans Mercs
    and not UnitType Turkopoles
    and not UnitType Bedouin Camel Riders
    and not UnitType Numidian Cavalry
    and FactionIsLocal
    inc_counter PopulationRecruited 3
    end_monitor
    wait_monitors
    end_script

  17. #17

    Default Re: Population Control and Horse Pastures

    You only receive a popup for the migration script (population boom). The other part of the script just runs in the background taking population from settlements as you recruit. It will be very hard to notice it as an infantry unit requires 64 men from your population. To track if its working you would need to check the settlments population before you hit end turn, taking into account the population growth (like 4%) which is displayed on the settlment info screen. then check your population next turn when you have recruited an infantry. It does work.

    example... settlment has 10,000 population with a pop growth of say 4%. so next turn that settlement should have an increase of 400 people for a total of 10,400 at the start of next turn. If you recruit a unit of infantry in that turn you need to also take into account those 64 population. so a total of 10,336. This doesnt take into account the population boom (migration) script. As i said, hard to notice but can add up if you recruit alot of units from a single settlement in the course of the game.

    The mod is not intended to make major changes to the campaign, only subtle changes. I could have a popup message appear every time you recruit, but that would be kinda lame. Also, the population boom script only has a 30% chance to fire every 2 turns, you were lucky to get it to fire on the second turn. If it does fire it likely wont fire again for atleast 10 turns. I may yet, in the final release, increase the population boom and have it less likely to occur. currently a max of 300 people can migrate over a period of 10 turns. Which is very minute in regards to settlement population growth.
    ...longbows, in skilled hands, could reach further than trebuchets...

  18. #18

    Default Re: Population Control and Horse Pastures

    Here is a list of factions and thier starting Horse Populations. This is based off of initial starting buildings such as farms, markets and stables etc. Only early era playable factions are listed. There are 2 values, and i may use the larger value if i add horse requirements to other buildings. (which is explained below).

    Spoiler Alert, click show to read: 
    Code:
    FACTION  Est Horses
    england  25 115
    france  25 160
    hre  34 250
    spain  13 40
    venice  28 100
    sicily  18 45
    Milan  7 25
    scotland 3 30
    cumans  16 60
    byzantium 28 100
    russia  3 30
    moors  38 200
    turks  28 100
    egypt  39 295
    denmark  8 35
    portugal 7 25
    poland  8 35
    hungary  9 45
    knights_templar 1 0
    kievan_rus 9 45
    aragon  2 10
    ireland  7 5
    norway  0 0
    lithuania 5 5
    kwarezm  45 360
    Some of these are far to low for a faction to succeed. Such as the knights templar so im open to any suggestion on starting values.

    I am slowly building a list of other buildings that will be affected by the Horse Pasture mod. as below:

    Spoiler Alert, click show to read: 

    This is a list of all buildings that breed and require horses to build and maintain.
    Mounts Bred and Used is Increased/Decreased every 2 turns!
    To Build is how many horses are required to construct the building initially.

    Building Name -Bred -Used -To Build

    HORSE PASTURES
    These are new with the mod, and are the players main source of increasing his available horses.
    Horse Farmer - 4 - 0 - 0
    Horse Dealer - 8 - 0 - 0
    Horse Trader - 16 - 0 - 0

    FARMS
    Farms require horses to plough or otherwise aid in working the fields. Thus they each have a required number of horses before you can construct a farm. Once built, the horses breed and reproduce.
    Land Clearance - 1 - 0 - 10
    Communal Farming - 2 - 0 - 20
    Crop Rotation - 3 - 0 - 30
    Irrigation - 4 - 0 - 40

    MARKETS
    Merchants, farmers and villages from outlying areas require horses to keep the local and regional markets booming.
    Corn Exchange - 0 - 2 - 10
    Market - 0 - 4 - 20
    Fairground - 0 - 8 - 30
    Great Market - 0 - 12 - 40
    Merchants Quarter - 0 - 16 - 50

    CARAVANS
    Camels are used to ensure these stops are properly maintained, They also aid in training camels.
    Caravan Stop - 0 - 1 - 10
    Caravanersary - 0 - 2 - 20

    JOUSTS
    Jousting fields require horses for practice and tournaments.
    Jousting Lists - 0 - 1 - 10
    Tourney Fields - 0 - 2 - 20

    GUILDS
    The Merchants guild require horses to ensure a stable and otherwise booming economy.
    Merchants Guild - 0 - 2 - 0
    Master Merchant - 0 - 4 - 0
    Grand Merchant - 0 - 8 - 0

    The horse breeders guild, if attained will give the player a much needed boost to his available horses.
    Horse Breeder - 4 - 0 - 0
    Master Breeder - 8 - 0 - 0
    Grand Breeder - 12 - 0 - 0
    ...longbows, in skilled hands, could reach further than trebuchets...

  19. #19

    Default Re: Population Control and Horse Pastures

    Some regions were famous for horse farming, these could be added as hidden resources and could increase the amount of horses available there.

  20. #20

    Default Re: Population Control and Horse Pastures

    I think you took in to consideration every building when only the last building counts. Your math was right but you added to much i think. For example, a fairground requires 8 horses but the 2 buildings prior to that bring that total to 14). I think you were adding the previous buildings in that building tree to it. If you do that you end up with a negative in horse population after adding all totals up. But if you just take the one level of building you come out at a positive. If you take the first building in each tree (not including the caravan or guilds) you end up breeding 5 horses but require 3 horses for those buildings to function properly. So a positive of 2.

    Which is kind of about where i want it to be. I dont want the player to have too many horses, but i dont want them to be lacking severly either.

    With that said, the current numbers are just for testing purposes and would need to be better balanced. Also, i have still not included horses per region as some people have suggested. Keep in mind also that a player will not have every settlement at the same level, so you village and castle will have to completly different horse populations, one might be lacking in horses where as the other has enough to compensate. I also plan to add in game events and missions that allow the player to buy and sell horses. I have a few interesting ideas as to how to impliment it so that other factions aproach the player...

    I've basically finished the first release. I just have to add ingame messages for the player to check how many horses he is using each turn. I already have in game messages to let you know how many you are breeding, just figured it would be nice to also know how many you are using each turn.) Allowing the player to better plan ahead in what buildings he would need.

    As for particular regions having more horses, i'll have to do reasearch into what areas were known for horse populations. I may also just give certain factions a boost to thier horse production.
    ...longbows, in skilled hands, could reach further than trebuchets...

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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