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

Thread: AI growth vrs unit production

  1. #1

    Default AI growth vrs unit production

    After work on trying to improve late era armies lately, it has become apparent to me that there are some serious long term problems with the campaign. That being that the AI will spend the bulk of its money each turn on new units. As a result this means that the upkeep costs soon prevent it from upgrading its towns, castles. This problem becomes worse later in the campaign when construction costs become more expensive.

    Unfortunately from my testing in hotseat mode the AI is forever stuck on a Military build policy.. This is hardcoded and cannot be modded. Worse this has an effect on the town/castles growth. I have ran a number of hotseat campaigns over 200 turns recently and noticed how bad the problem was. So basically the AI in this game is worse than I first realised. For the whole campaign its stuck on a military build policy. This means the AI debt script becomes more and more important to keep the AI out of the red. However this eventually means there is not enough money for city upgrades etc later on.

    What I am trying to get at here is that some compromises are going to have to be made in this mod. This is not easy for me to accept as I love the way the mod currently is myself. For example building costs, unit costs, upkeep costs etc are all challenging to the player. Some of you may never even play upwards of 200 turns and notice the down sides. But I feel like I am going to have to make some big changes.. sorry guys. Increasing the money cheat the AI gets each turn just is not the answer. Because the AI is forever stuck on a program of training more and more men... WHEN IT DONT EVEN NEED THAT MANY UNITS AND THEY CANT EVEN DISBAND. Sorry for caps.. basically my point is that in order for the AI to continue to grow and expand late in the game, we need to cater for it......

    This means for a start all buildings costs have to come down again. Not quite as low as they were in vanilla but almost. Construction building times for 2 turns per year however can pretty much remain as they are.

    Now onto a small update I am working on for the final KGCM patch. As mentioned above I have been working on late era recruitment. This involves getting rid of a lot of the high period units in the age of gunpowder. The aim is to have the AI recruiting pikes, musketeers, and cannons instead of the old. My work has gone really well so far but there is still much to do. Here is one example of a late army below.



    Note in the above: in the next city barracks up the crossbow militia are no longer trainable. Anyway the task of getting every faction to build bombards and later cannon is not an easy one. Each faction has different unit rosters, some favour siege weapons some don't atm. So I have to try and balance out every faction to train the same quantity of units. This means that every faction will have to have units with the same priority settings at each building level. Thats complicated work and will take me some time yet to get every faction recruiting the same late era armies.

    Dave
    Last edited by Dave Scarface; January 25, 2009 at 07:02 AM.

  2. #2

    Default Re: AI growth vrs unit production

    The whole military build policy makes alot of sense. It also can be noticed in the early game when people are saying the AI is almost dead, but still has the ability to field 2 or 3 large armies. This is probably due to the fact the AI spends all its money on recruiting troops, instead of improving its last few cities.

    Your changes look really good, and keep up the good work. I don't want 3.8 to be rushed out, only to require another patch to fix some of the last few errors. 3.8 should be the final version with 99% of the bugs fixed and everything running smoothly, such as late game army composition. Maybe we will be able to throw in XBAI, if not the full XAI if the CAI can work itself out by the time you are ready.

  3. #3

    Default Re: AI growth vrs unit production

    The whole military build policy makes alot of sense. It also can be noticed in the early game when people are saying the AI is almost dead, but still has the ability to field 2 or 3 large armies. This is probably due to the fact the AI spends all its money on recruiting troops, instead of improving its last few cities.
    There is no good enough reason for the AI to continue to produce troops en masse. Yes it may save the AI from certain defeat at times in the game. However the result is often huge masses of armies. And a complete halt in the building construction que. Meaning the AI will not get to build the best building (which give it more income) and produce elite units from the cities. Basically a faction that cannot upgrade its cities to large walls will decline. Therefore I am going to have to reduce building costs and population requirements for larger walls and citadels so it can upgrade before its too late.

    Dave
    Last edited by Dave Scarface; January 25, 2009 at 02:38 PM.

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

    Default Re: AI growth vrs unit production

    Dave,

    Sorry if you've considered this already. I don't want to waste your time going over already plowed ground. Have you considered increasing recruit time to 2 turns? The theory being that once the AI fills its recruit queue, it will have a turn in which it cannot recruit and will spend money on the construction queue.
    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

  5. #5

    Default Re: AI growth vrs unit production

    Have you considered increasing recruit time to 2 turns? The theory being that once the AI fills its recruit queue, it will have a turn in which it cannot recruit and will spend money on the construction queue.
    Thats actually not a bad idea as the campaign is two turns per year. But the question is would people accept this idea or would they acuse me of going to far? Anyhow thats why I created this thread. I wanted to discuss this with my fans and not just my dev team. As I have always tried to involve the fans in the mods development.

    Dave
    Last edited by Dave Scarface; January 25, 2009 at 02:56 PM.

  6. #6

    Default Re: AI growth vrs unit production

    Quote Originally Posted by dave scarface View Post
    Thats actually not a bad idea as the campaign is two turns per year. But the question is would people accept this idea or would they acuse me of going to far? Anyhow thats why I created this thread. I wanted to discuss this with my fans and not just my dev team. As I have always tried to involve the fans in the mods development.

    Dave
    No zomfg, me want full stack arm ready 2 go within 4 turns!&^@!!@^^#

    Idk if this is a good change, idk how to fix this, but I dont want my peasants to be ecruited within a year -.-

  7. #7
    Incontinenta Buttox's Avatar Protector Domesticus
    Join Date
    Aug 2007
    Location
    Airstrip One
    Posts
    4,415

    Default Re: AI growth vrs unit production

    Quote Originally Posted by dave scarface View Post
    Thats actually not a bad idea as the campaign is two turns per year. But the question is would people accept this idea or would they acuse me of going to far? Anyhow thats why I created this thread. I wanted to discuss this with my fans and not just my dev team. As I have always tried to involve the fans in the mods development.

    Dave
    I also think this is a good idea.

  8. #8
    MiiKLL's Avatar Semisalis
    Join Date
    May 2006
    Location
    Spokane, Washington
    Posts
    451

    Default Re: AI growth vrs unit production

    Hello Dave and Team....A thought I have had is to make a script that fires every set number of turns (say 10 turns). This script would be a process_cq for every AI controled city/castle automaticly finishing whatever building that AI had in its building quey. I think that this could push the AI into upgrading its cities a little....though it would most likely build military buildings first...it may have to get to economic ones....before the next city/castle upgrade.

    My problem is that I am terrible at scripting it seems....I have yet to get a script to work.

    Dave, Userprobe has a good grasp of scripting, If you thought the above idea is viable in some form....I believe that you or userprobe could get it going. A concern I would have is the effect it may have on the length of the AI turns. I personally wouldn't mind it...I do weight training sets in between turns...lol, but I know turn length can be an issue with some.

    "Nothing is more destructive than the charge of artillery on a crowd."
    Napoleon Bonaparte

  9. #9
    Koljan's Avatar Senator
    Join Date
    Jun 2008
    Location
    Israel
    Posts
    1,396

    Default Re: AI growth vrs unit production

    I dont know...
    maybe if you double the amount of troops produced you can balance it out?

    I mean, the shortcoming are pretty obvious, but please take into consideration that some people do like to blitz their neighbors once in a while

  10. #10
    Incontinenta Buttox's Avatar Protector Domesticus
    Join Date
    Aug 2007
    Location
    Airstrip One
    Posts
    4,415

    Default Re: AI growth vrs unit production

    After my experience in the first hotseat. I wouldn't mind anything that stops blitzing.

  11. #11

    Default Re: AI growth vrs unit production

    Instead of having 2 turns per unit for every unit, we should do it for the late game only. The early game seems fine, and teh AI needs the troops to be able to expand. Once they are established and have a decent sized defense force, I see no reason why we should not consider this. Also, it would take longer to train a unit of heavily armored knights or gunpowder units that you would find in the late game than it would to train a unit of spear miltia or similar units. Not only do th weapons and armor take longer to produce, but the training I imagine would be more extensive.

  12. #12
    Incontinenta Buttox's Avatar Protector Domesticus
    Join Date
    Aug 2007
    Location
    Airstrip One
    Posts
    4,415

    Default Re: AI growth vrs unit production

    You might have to increase unit costs if Building costs are coming down.

  13. #13
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: AI growth vrs unit production

    Very good thoughts around here. (especialy @ aduellist)
    In my Exordium mod, i'm actualy working on a simile project. It's called by myself, the "ai-must-manage-their-own-financial-situation". In my more than 100 test games until at least 150-200 rounds and many diference settings, in many difference areas - i've found out, that after all the Ai is able to manage their financial situation. But we must study to understand and balancing this ability - and not to hurt it.
    For example: In garrison script we gave them units, they are really to be in need of. But we need to consider, that the ai has not taken this decision due to their own ability and financial situation. So from this moment on, Ai must consider to pay a lot more units-upkeep, because we have interfered with their financial-managing system!!!
    Next example: The financial-managing-system told them: 'we can't continue to create units, because our account-balance is under zero'! We gave them 'debit help', although the Ai can't calculate this scripted mechanism. As follow the Ai think: 'Uhhh, we have 10.000 more money - let us build other units!' In this manner, we start up to help an avalanche rolling, with the result of messing up totally their poor, but basicly functional financial-managing-system.
    Last edited by Userpro; January 25, 2009 at 03:43 PM.
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  14. #14

    Default Re: AI growth vrs unit production

    Dave,
    This may be too extreme for you, but in my own personal mod I basically did away with the majority of the tech tree for barracks and such. So for example if you build a Fortress you get access to the whole string of fortress-level units. This has worked for me as the AI is never going to "out-think" the human on buildings anyway, so if anything it is an AI "equalizer" as the building choice is greatly streamlined. AI easily builds walls, castles = routine access to high end units as soon as they become available. Also added some "era switches" so you don't get Chivalric units too early, etc.

    Just a thought...

  15. #15
    Incontinenta Buttox's Avatar Protector Domesticus
    Join Date
    Aug 2007
    Location
    Airstrip One
    Posts
    4,415

    Default Re: AI growth vrs unit production

    Quote Originally Posted by RandomAttack View Post
    Dave,
    This may be too extreme for you, but in my own personal mod I basically did away with the majority of the tech tree for barracks and such. So for example if you build a Fortress you get access to the whole string of fortress-level units. This has worked for me as the AI is never going to "out-think" the human on buildings anyway, so if anything it is an AI "equalizer" as the building choice is greatly streamlined. AI easily builds walls, castles = routine access to high end units as soon as they become available. Also added some "era switches" so you don't get Chivalric units too early, etc.

    Just a thought...
    This seems like a great idea. We get all the buildings that come with that level of city. I imagine the build time would have to be greatly increased to compensate.

  16. #16
    MiiKLL's Avatar Semisalis
    Join Date
    May 2006
    Location
    Spokane, Washington
    Posts
    451

    Default Re: AI growth vrs unit production

    @ RandomAttack....with that thought in mind...you could start to play around with the AI personalities....ie: balanced smith. Giving factions say the trader smith...leaving it the smith part to try to keep the unit recruiting the same. Maybe that would encourage the AI to build more econmic buildings as well.

    "Nothing is more destructive than the charge of artillery on a crowd."
    Napoleon Bonaparte

  17. #17

    Default Re: AI growth vrs unit production

    Guys here is another demonstration of the problem some factions are having. The Teutonic Order is doing rather well. However all of its cities are still at stone walls level and only have city barracks. As you can see the military build policy is killing its population.. However France meanwhile has every castle upgraded to a Citadel. So the bigger factions are okay.




    As part of the solution to this I am changing the city and castle requirements to the following:

    <population_levels>
    <!-- city -->
    <level name="village" base="1000" upgrade="2000" min="400" max="2500"/>
    <level name="town" base="2000" upgrade="4500" min="400" max="6000"/>
    <level name="large_town" base="4500" upgrade="8000" min="400" max="12500"/>
    <level name="city" base="8000" upgrade="16000" min="400" max="25000"/>
    <level name="large_city" base="16000" upgrade="25000" min="400" max="50000"/>
    <level name="huge_city" base="25000" min="400" max="100000"/>
    <!-- castle -->
    <level name="moot_and_bailey" base="500" upgrade="1000" min="400" max="1500"/>
    <level name="wooden_castle" base="1000" upgrade="2500" min="400" max="4000"/>
    <level name="castle" base="2500" upgrade="8000" min="400" max="12000"/>
    <level name="fortress" base="8000" upgrade="15000" min="400" max="24000"/>
    <level name="citadel" base="15000" upgrade="40000" min="400" max="50000"/>
    </population_levels>

    Secondly the price of buildings must come back down. And most importantly that of walls.

    I also think this is a good idea.
    Incontinenta, I seem to remember in RTW that in the campaign (2 turns per year) there were units that did have a building time of 2 turns, though not all. I haven't played that game in years. As you are such a fan still of RTW could you tell me how much of romes units had building times of 2 turns?

    Hello Dave and Team....A thought I have had is to make a script that fires every set number of turns (say 10 turns). This script would be a process_cq for every AI controled city/castle automaticly finishing whatever building that AI had in its building quey. I think that this could push the AI into upgrading its cities a little....though it would most likely build military buildings first...it may have to get to economic ones....before the next city/castle upgrade.
    Thanks for the suggestion mate, however I am not a believer in using scripts to fix everything. I believe the same fundamental problems exist in many of the other biggest mods for M2TW as well. What I am seeking to do is strike a balance between challenge and AI performance. I would like to get to the bottom of this before I retire from modding. The last thing I want is to slow down turn waiting times further.

    Idk if this is a good change, idk how to fix this, but I dont want my peasants to be ecruited within a year
    Of course peasants and such would still be 1 turn to build. But I gave those -50 recruit_priority_offset setting anyhow So hopefully the AI would recruit agents instead

    Instead of having 2 turns per unit for every unit, we should do it for the late game only.
    The problem is this will come to late and the smaller factions will be stuck with stone walls

    Dave
    Last edited by Dave Scarface; January 25, 2009 at 03:48 PM.

  18. #18
    Incontinenta Buttox's Avatar Protector Domesticus
    Join Date
    Aug 2007
    Location
    Airstrip One
    Posts
    4,415

    Default Re: AI growth vrs unit production

    Dave,

    I have not played Roma Surrectum for some time now. But I remember tha most units had a 1-turn recruitment time. But the really elite units such as Generals, Heavy Cavalry, Preatorians, etc. Had a 2-turn recruitment time.
    Last edited by Incontinenta Buttox; January 25, 2009 at 04:01 PM.

  19. #19

    Default Re: AI growth vrs unit production

    @userprobe,

    I dont believe this problem will be so prevalent in Exordium mod because each faction starts off with basic building levels. In theory you should not hit this wall until much later in your campaign. As most buildings and units will be cheaper from the start and less expensive. The challenge for me is to start the campaign at Kingdoms building levels (which I want) and make sure all AI factions are still able to tech up late into the game.

    However could you please enlighten us more on your ai-must-manage-their-own-financial-situation

    Dave
    Last edited by Dave Scarface; January 25, 2009 at 03:59 PM.

  20. #20
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: AI growth vrs unit production

    However could you please enlighten us more on your ai-must-manage-their-own-financial-situation
    Oh yes, i do with a fast summary:
    1. Buildings cost at or near kingdoms values.
    2. Units cost must remain in strong relation with buildings coast. Same for upkeeps.
    3. I'm actualy testing with priority offset; but there seems to be a relation something like this: 1 p.o. point = 50 'dollars' in recruit decisions to estimating financial-managing-system.
    4. Instead of give money in scripts - increase king purse (this one the ai calculate)
    5. debit must help only in crisis times and not beeing a full time crook, that gives more than it should.
    6. balancing near perfection the kings purse - in a manner that every 100 extra money really counts for ai.
    Last edited by Userpro; January 25, 2009 at 06:28 PM.
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



Page 1 of 3 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
  •