Results 1 to 30 of 260

Thread: Fixing the AI money script (preliminary tests)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Wise and Partially Handsome Member Jarardo's Avatar
    Join Date
    Jan 2006
    Location
    Midlands, US
    Posts
    155

    Default Re: Fixing the AI money script (preliminary tests)

    I think the treasury cutoff is a good idea.

    I've never looked at how The Team had the per turn/per city script set up, but from looking at the script in the first post, it seems that a given faction will recieve a bonus for having a number of cities, not individual ones.

    For instance, This will give the Romans 1200 per turn altogether.

    Code:
    ;Rome
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid < 4
    
    console_command add_money seleucid, 1200
    And, this will give the romans 1000 per turn all together etc...

    Code:
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid < 9
    and I_NumberOfSettlements seleucid > 3
    
    console_command add_money seleucid, 1000
    Or does this somehow count for every city a faction owns?
    I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones. -Albert Einstein


    www.EuropaBarbarorum.com

  2. #2
    Questor of AI revenue. Member The Errant's Avatar
    Join Date
    Feb 2007
    Location
    Limbo. Aka. the Empty Hold.
    Posts
    378

    Default Re: Fixing the AI money script (preliminary tests)

    Quote Originally Posted by Jarardo
    I think the treasury cutoff is a good idea.

    I've never looked at how The Team had the per turn/per city script set up, but from looking at the script in the first post, it seems that a given faction will recieve a bonus for having a number of cities, not individual ones.

    For instance, This will give the Romans 1200 per turn altogether.

    Code:
    ;Rome
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid < 4
    
    console_command add_money seleucid, 1200
    And, this will give the romans 1000 per turn all together etc...

    Code:
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid < 9
    and I_NumberOfSettlements seleucid > 3
    
    console_command add_money seleucid, 1000
    Or does this somehow count for every city a faction owns?
    The effect is actually cumulative which is the reason the unmodded script is so unbalancing. Lets say the Seleucids start with 28 or so provinces. Thats 28x1200 mnai = 33600 mnai on the first turn just from the script. Add trade and mining income you get an even higher number. From that starting income you reduce the upkeep of whatever standing units in garrison and on the field and whatever is left is what the Seleucids have at their disposal at the beginning of the turn. That money can be used for city improvements and the recruitment of new troops. For every new settlement the Seleucids conquer they get an additonal 1200 mnai per turn/per settlement.
    This leads to a virtually limitless treasury that allows them to train full stacks of elites, hire mercs if their armies get destroyed, bribe settlements and enemy family members.

    The modified script puts a cap on how many settlements they can own and still get the full benefits of the money script. In Sheep's script the cap is 3 provinces. Any more and the sum gets reduced from 1200 to 1000 per held province. The higher number of held provinces the less money per held settlement comes from the script. Eminos64 adds an additional trigger where if an AI faction has somehow gained a treasury of more than 100000 the script immediatly reduces 30000 from that AI factions treasury. Basically the bigger you empire is the less "free money" comes your way. From a historic point of view you can justify this by saying all that free money dissapears due to corruption of such a far flung and difficult to control burocracy.

    "It's those damn civil servants. They're costing me an Empire!"
    Last edited by The Errant; 04-15-2007 at 21:14.

    "If you listen, carefully. You can hear the Gods laughing."

    Last words of Emperor Commodus. From "The Fall of the Roman Empire".

  3. #3

    Default Re: Fixing the AI money script (preliminary tests)

    Does anyone know how much of the approx 180000 talents of gold captured by Alexander were left by the time Arche Seleukeia was established? I am asking because these guys had the richest territories of the now conquered Achaemenid Persia so its only natural if they have a huge income.

    Cataphract Of The City

  4. #4
    Guest Dayve's Avatar
    Join Date
    Oct 2005
    Location
    England
    Posts
    1,659

    Default Re: Fixing the AI money script (preliminary tests)

    Has anybody tried simply leaving the handout at 1200 a turn, but giving the rebels a huge handout? I think that would stop most factions from getting huge, especially my personal most hated, the Sweboz, who, in every Romani campaign i play, ruin my campaign by about 230BC by sending 4-5 full stacks at northern Italy every turn, and making it impossible for me to progress.

  5. #5
    Member Member Thaatu's Avatar
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    1,117

    Default Re: Fixing the AI money script (preliminary tests)

    Quote Originally Posted by Cataphract_Of_The_City
    Does anyone know how much of the approx 180000 talents of gold captured by Alexander were left by the time Arche Seleukeia was established? I am asking because these guys had the richest territories of the now conquered Achaemenid Persia so its only natural if they have a huge income.
    They were stinking rich, but I think it's good to draw the gap between human and AI economy a little more narrow. Personally I'd be all for Seleukids getting an economic boost, while AI income is nerfed.

  6. #6

    Default Re: Fixing the AI money script (preliminary tests)

    Quote Originally Posted by The Errant
    OK. In light of the developments and some constructive critisism from MAA I decided to make some alterations to the script.
    Please let us know how that works, I'm going to test the original script a few more times. Sample size is still 2 for me at least (haven't seen anyone elses' screenshots).

    I'm concerned that we already nuked the Seleukids too hard. I mean, the Sabaeans and Armenians conquered them in my second test. So I dunno if we want to nuke them further. I was actually thinking about adding a very small bonus (like 200mnai) for empires with 25 or more settlements, just to keep them around if not expanding. But that depends on a little bit more testing. I have a scientific background so I am cautious. :)


    Quote Originally Posted by Jarardo
    Or does this somehow count for every city a faction owns?
    Code:
    monitor_event SettlementTurnStart
    In case you were wondering, this is the bit of code that makes it cumulative. It checks the script at the start of each turn once for every settlement. So if a faction has 3 settlements, it will check it 3 times. Each time that turn that it checks and finds that the faction has 3 settlements (ie, every time), it will add 1200mnai to the treasury. 3x1200. Ditto for more than 3 settlements, with different amounts of money.
    Quote Originally Posted by Cataphract_Of_The_City
    Does anyone know how much of the approx 180000 talents of gold captured by Alexander were left by the time Arche Seleukeia was established? I am asking because these guys had the richest territories of the now conquered Achaemenid Persia so its only natural if they have a huge income.
    They will probably still have a huge income, but not quite so ridiculously huge. In my Baktrian campaign with the unmodified EB script, it's 235 and they currently have NINE armies in just three of my territories. That's not realistic either.

    Quote Originally Posted by Dayve
    Has anybody tried simply leaving the handout at 1200 a turn, but giving the rebels a huge handout? I think that would stop most factions from getting huge, especially my personal most hated, the Sweboz, who, in every Romani campaign i play, ruin my campaign by about 230BC by sending 4-5 full stacks at northern Italy every turn, and making it impossible for me to progress.
    The rebels already get a bigger handout, and that would only work for factions surrounded by rebels, like the Sweboz. For the Seleukids, it would just give them over 33,000 mnai a turn to spend on armies to annihilate every faction around it. I think we will probably end up doubling the rebel handout every turn though.
    Last edited by Sheep; 04-16-2007 at 06:43.

  7. #7

    Default Re: Fixing the AI money script (preliminary tests)

    Wacky... I just starting running another test and after 88 turns, it is EXACTLY the same map as test #2. Like 100% province for province. In fact, I could predict which provinces would change color next, like now Nabataia, now Pamphylia.

  8. #8
    Questor of AI revenue. Member The Errant's Avatar
    Join Date
    Feb 2007
    Location
    Limbo. Aka. the Empty Hold.
    Posts
    378

    Default Re: Fixing the AI money script (preliminary tests)

    I only had time to play to 257 B.C. so I'm not going to post any screens just yet. I'm playing everybodys favorite testfaction the Casse and these are my observations to date.

    1. In my altered script I gave the Eleutheroi 3500 mnai/turn instead of their previous 2000 mnai/turn. Big mistake. Sure they have the money to improve infrastructure like roads and mines, but they seem to have completely stalled the expansion of the smaller factions (Getai, Lusotannan, Pontos, Sauromatae etc.)

    2. The active players are AS and the Ptolies who have a nice game of exchange the cities going on in Asia Minor. The Ptolies took Antiocheia and the AS took Sidon. The AS recaptures Antiocheia but is left with a weak defense of three units against an almost full stack of Ptolies besieging Sidon.
    The Ptolies have managed to grab Petra but not much else.
    Hayasdan has taken two provinces but seems to have stalled since then. The Pontics are their usual inactive selves along with the Pahlava. Baktria has also failed to expand anywhere although they do have some nice armies running arund the Parthian border. The Saka have taken one province and gotten into a war with Parthia.
    The Sabyn made an early push against Tamane with an impressive stack but got beaten by a similarly impressive Eleutheroi stack in Tamane. They have stalled since then.
    Carthage has made some interesting forays into the north African provinces south of Carthage proper. But the Eleutheroi seem to be resisting so far.
    Koinon took control of southern Greece but seem to have stalled at five provinces. The Macedonians are down to their capital and Mytilene.
    Epeiros is stuck on passive mode fortifying their Capital and building large stacks to fight of invaders. The Getai aren't moving either.
    Rome has expanded north taking Segesta but seem to have trouble fighting the other Eleutheroi settlements in northern Italy. They do have some impressive Camillan stacks moving towards Massilia though.
    The Aedui have done absolutely nothing except defend against Arverni incursions. Seems like they still have all their starting provinces. Same case for the Arverni.
    The Lusotannan took one province and went for a second but got beaten back. So far no movement but could be they are still building up for another attempt.
    The Sweboz took one province with their starting army but seem to have stalled since then. The Sauromatae are stuck with their starting provinces.

    3. Armies are varied with a good mix of levies and professionals. The AS and Ptolies are still fielding large mercenary armies. I have no idea where they cough up the funds for it.

    It's too early to tell how the game will develop in the future but it seems like the AS is still in the game even though it has pissed off most of it's neighbors. And Baktria isn't looking like a giant octopus which is allways an improvement.

    Btw. does anybody know of a console command that lets you see the AI treasury. It would be nice to know just how much cash the AS and Ptolies have in their pockets.

    I'll test until 200 B.C. then I'll make some additional alterations to the script depending on the results. I'll post some AI progress screenies every decade game time.
    Last edited by The Errant; 04-16-2007 at 11:53.

    "If you listen, carefully. You can hear the Gods laughing."

    Last words of Emperor Commodus. From "The Fall of the Roman Empire".

  9. #9
    Member Member Thaatu's Avatar
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    1,117

    Default Re: Fixing the AI money script (preliminary tests)

    Btw, in what order do AI factions use their money? Do they recruit first, then build infrastructure and then use it for diplomacy or is it mixed, or can we even know? I'm just curious.

  10. #10
    EB TRIBVNVS PLEBIS Member MarcusAureliusAntoninus's Avatar
    Join Date
    Jul 2006
    Location
    The State of Jefferson, USA
    Posts
    5,722

    Default Re: Fixing the AI money script (preliminary tests)

    Quote Originally Posted by Thaatu
    Btw, in what order do AI factions use their money? Do they recruit first, then build infrastructure and then use it for diplomacy or is it mixed, or can we even know? I'm just curious.
    From what I've seen, it seems like AI factions use money for military first. While the AI rebels seem to go for infrastructure first. Just my observation.


  11. #11
    Closet Celtophile Member Redmeth's Avatar
    Join Date
    Mar 2007
    Location
    Bucharest, Romania
    Posts
    3,740

    Default Re: Fixing the AI money script (preliminary tests)

    I've used the new script in my ongoing Sauromatae campaign.
    I was at war with the Seleucids for many years but started steadily making progress but the countless battles against small armies of elites were really starting to bore me, because of my HA armies, they seemed eager to attack even with small forces the battles were won easily but they kinds bored me, I didn't have to fight many full-stack armies but the large battles were entertaining.
    After using the new script for about 8 turns they seem to train less armies, but I also started to take some of their heartland territories. The game is more fun, 3-4 battles a turn are too much IMO, but I still think more balancing is in order or it might become TOO easy to take down large empires and that would not be a good thing.
    A recent map from 3 years ago, I took 3 more provinces from the Seleucids since then, and I'm now nearly engulfing the lone Parthian province :

    A historical explanation for the less bonus money received the larger an empire gets would be that generally small nations were more motivated and worked together and sacrificed their well being for the nation and its growth, while the larger an empire got the more the people cared about their own well-being.
    Last edited by Redmeth; 04-16-2007 at 22:52.

  12. #12

    Default Re: Fixing the AI money script (preliminary tests)

    I personally like the idea of fixing the money script so that we can get a better balance between all the countries and not have a monster Seleukid empire...but I was just looking over the ideas for a city mod which came across as a far better idea for balancing the empires than just a money script fix alone. What if we tied the money bonuses to the size of the city specifically? ie. large towns get more than towns, but less than small cities? This seems closer to reality for balance purposes, because the Seleukids didn't have tons of super-sized towns (it wasn't the ancient world's McDonald's or something...hehe) but rather a few cities with tons of smaller towns. Meanwhile, I would say that even though Ptolemy's kingdom was smaller, the percentage of cities to towns was greater for him than Seleukids. How about merging the two mods into one...in order to solve this quandry?

    Brian

  13. #13

    Default Re: Fixing the AI money script (preliminary tests)

    Quote Originally Posted by kain789
    I personally like the idea of fixing the money script so that we can get a better balance between all the countries and not have a monster Seleukid empire...but I was just looking over the ideas for a city mod which came across as a far better idea for balancing the empires than just a money script fix alone. What if we tied the money bonuses to the size of the city specifically? ie. large towns get more than towns, but less than small cities? This seems closer to reality for balance purposes, because the Seleukids didn't have tons of super-sized towns (it wasn't the ancient world's McDonald's or something...hehe) but rather a few cities with tons of smaller towns. Meanwhile, I would say that even though Ptolemy's kingdom was smaller, the percentage of cities to towns was greater for him than Seleukids. How about merging the two mods into one...in order to solve this quandry?

    Brian
    I rather like that idea! Wish I knew how to do it.
    Slainte!!

  14. #14
    Guest Dayve's Avatar
    Join Date
    Oct 2005
    Location
    England
    Posts
    1,659

    Default Re: Fixing the AI money script (preliminary tests)

    255bc... And still, almost no AI expansion from what i can see... Except for Ptolemoi taken a big chunk of Arabian peninsula, and me taking northern Italy of course.

  15. #15
    Guest Dayve's Avatar
    Join Date
    Oct 2005
    Location
    England
    Posts
    1,659

    Default Re: Fixing the AI money script (preliminary tests)

    I've added the new script in... I'll continue to post my screenshots if you like Sheep but i'm not starting again. It's taken me 4 days to get here already.

  16. #16

    Default Re: Fixing the AI money script (preliminary tests)

    Whatever you want. Tell us if you notice a difference.

  17. #17
    Closet Celtophile Member Redmeth's Avatar
    Join Date
    Mar 2007
    Location
    Bucharest, Romania
    Posts
    3,740

    Default Re: Fixing the AI money script (preliminary tests)

    But can't the bonuses depend on both, is this going to work for example? Both the turn number and the treasury.
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_TurnNumber < 41
    and Treasury < 200000

    console_command add_money seleucid, 1200

    end_monitor

    If the AI faction is either too old or too rich it will start receiving the stepped bonuses.
    EDIT:How do I enter the code in that special code window? What tags do I use?
    Last edited by Redmeth; 04-21-2007 at 08:23.

  18. #18

    Default Re: Fixing the AI money script (preliminary tests)

    Thanks a lot people, for taking this initiative, it's super tedious to fight against infinite stacks. It's getting interesting to see some of the tests people are making with giving less money to super powers and more to smaller ones. I hope I can find a good balance that suits me in this thread, not just the old "the AI is stupid, she has the money, you have the brains".

  19. #19
    Member Member Christianus's Avatar
    Join Date
    Mar 2006
    Location
    Nidarosiensis, Norway
    Posts
    150

    Default Re: Fixing the AI money script (preliminary tests)

    Is this for "Very Hard" settings, "Hard", or "Medium"?
    Ὦ ξεῖν', ἀγγέλλειν Λακεδαιμονίοις ὅτι τῇδε
    κείμεθα, τοῖς κείνων ῥήμασι πειθόμενοι.
    - Σιμωνίδης ὁ Κεῖος

  20. #20
    Closet Celtophile Member Redmeth's Avatar
    Join Date
    Mar 2007
    Location
    Bucharest, Romania
    Posts
    3,740

    Default Re: Fixing the AI money script (preliminary tests)

    The money script was made with VH in the tests and in mind, but it would also work for the rest but don't complain if you'll think the AI doesn't field enough armies to be challenging for you. It will still do ok but some people like it harder than others.
    EDIT: I just updated my version with the new 0.81a2 patch and it replaces the script so if you want to keep using my or other money scripts don't forget to either edit the text file manually or download it again or just overwrite if you remember where it is on your HD.
    Last edited by Redmeth; 05-15-2007 at 22:11.

  21. #21
    Member Member Darth Stalin's Avatar
    Join Date
    May 2007
    Location
    Main station of "Friendship" pipeline
    Posts
    241

    Default Re: Fixing the AI money script (preliminary tests)

    @Redmeth:
    where Your latest (with v2 Patch) money script can be downloaded from?

    @The Errant:
    I have a problem with downloading Your money script from the link You have provided ion the previous page - any idea, where could it be downloaded from?
    DARTH STALIN - Lord Generalissimus of the Union of the Socialist Sith Republic

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO