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
    EBII Council Senior Member Kull's Avatar
    Join Date
    Jan 2003
    Location
    El Paso, TX
    Posts
    13,502

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

    Some very nice work going on here - kudos for that. When the EB Team was coming up with our last faction, it was an extremely tight vote between Saka and the Lugians of Central Europe. I'm not unhappy with Saka as a human player faction, but the AI rarely knows what to do with them. The Lugians on the other hand would have been tailor made to prevent these weird Central European empires of the Romans and Sweboz (among others).

    Eminos64 - Since we can't create a new faction, perhaps we could simulate a powerful presence in the area, something tough enough to deter most of the usual invaders. Can you develop a script that adds 0-move, high powered ubergenerals to 4-5 of these provinces, once every 20 years or so? Test first for Eleutheroi ownership and if "yes", then plunk down a general. It would be interesting to see if this creates a tough Eleutheroi "buffer zone" that forces action back towards the coastlines and other historic areas of contention.
    "Numidia Delenda Est!"

  2. #2
    EB annoying hornet Member bovi's Avatar
    Join Date
    Jan 2007
    Location
    Norway
    Posts
    11,796

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

    Quote Originally Posted by Foot
    Unfortunately you will need to transplant the EBBS (modified or not) into the campaign_script.txt, as in the -ai game you cannot start the EBBS script. I'm not entirely sure how you do this, but my guess would be to copy all the bits inbetween the start and end script lines into the campaign_script at the end of the file (before the end script line) as is. But very good for churning off test games. Be wary of ctds though. It cannot save, so you'll need to be checking on things all the while, just in case it ends unexpectedly.
    Good point... I completely forgot about enabling the script. I noticed that when I used halt_ai, if it halted on the turn of the faction I chose at game start, I could control stuff, but I don't think the advisor came up though. Anyway, when you halt the AI you can save the game.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  3. #3
    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)

    Quote Originally Posted by Foot
    Unfortunately you will need to transplant the EBBS (modified or not) into the campaign_script.txt, as in the -ai game you cannot start the EBBS script. I'm not entirely sure how you do this, but my guess would be to copy all the bits inbetween the start and end script lines into the campaign_script at the end of the file (before the end script line) as is. But very good for churning off test games. Be wary of ctds though. It cannot save, so you'll need to be checking on things all the while, just in case it ends unexpectedly.

    Foot
    At the end of the campaign script there's a terminate_script and an end_script line. Where do I paste all of the EBBS script BEFORE both or BETWEEN the terminate and the end_script lines?

  4. #4
    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 made this test using my money script, mlp0701's mercenary modification and JMRC's victory conditions. This is the setup I'm using and wanted to testing out using an autoplay game controlling the Casse (I gave them ~30k every 10 years because they did not receive the bonuses) Everybody expanded very well especially the Aedui, Getai(!!) and Carthage. Sweboz, Pahlava and Sauromatae were very static which usually is not the case except for the Sauro. Using the merc mod I noticed very few stacks and while it's a good thing it's a bit worrying because I think for the human player it would be easy to overrun the AI.
    So here are the screenies, you can judge for yourselves.
    260

    250

    240

    230

    220

    210

    200

    190

    180

    170

    160

    I could not get past a repeating CTD in 160 so that's as far as it gets.

  5. #5

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

    AI has available roughly 1 stack per 4-5 provinces of mercs to recruit, in most of the areas. For empires with 15+ provinces,(which you have in 200) that would translate into 3 stacks every 3-4 years.And AI doesn't have to own the province to be able to recruit mercs from it.By the year 200 that should be quite a bit,something between 54-72 stacks of merc per 5 provinces , if AI is buying them and therefore they get replenished.

    Thing is does AI has finances to buy them, or develop income buildings to boost his economic situation?

    I can lower mercs prices back to original ones and see if that helps. And if not, spawn times can be shorter too.Will play with it and see.

    Thanks for feedback
    Last edited by mlp071; 06-11-2007 at 20:06.

  6. #6

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

    @JMRC
    i think there is a little bug in your script:
    please check the lines "numidia after 175 BC" and "romans_julii after 175 BC"
    it has to be "> 388" not "< 388"

    i wrote on your basis my own script with smaller treasury incomes
    if you want to look; it doesn' work 'cause there is a bug !!! but i dont see him...
    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Section 4: Money Assistance
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ;--------------------------------------------------
    ;Carthaginian Navy Bonus
    
    monitor_event CharacterTurnStart FactionType egypt
    and AgentType = admiral
    and not FactionIsLocal
    console_command add_money egypt, 600
    end_monitor
    
    
    ;--------------------------------------------------
    ;Romani - (272BC to 242BC) 0-30K
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 20000
    and I_TurnNumber < 120
    and not FactionIsLocal
    console_command add_money seleucid, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 2
    and Treasury < 20000
    and I_TurnNumber < 120
    and not FactionIsLocal
    console_command add_money seleucid, -10000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 1
    and Treasury < 10000
    and I_TurnNumber < 120
    and not FactionIsLocal
    console_command add_money seleucid, 20000
    end_monitor
    
    
    ;Romani - (241BC to 122BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 80000
    and I_TurnNumber > 119
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money seleucid, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 119
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money seleucid, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber > 119
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money seleucid, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury < 20001
    and I_TurnNumber > 119
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money seleucid, 20000
    end_monitor
    
    
    ;Romani - (after 121BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 140000
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money seleucid, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money seleucid, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money seleucid, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money seleucid, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury < 20001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money seleucid, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Saka - 20K-40k
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money pontus, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money pontus, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money pontus, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money pontus, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury > 0
    and Treasury < 20000
    and not FactionIsLocal 
    console_command add_money pontus, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury < 1
    and not FactionIsLocal 
    console_command add_money pontus, 40000
    
    
    ;--------------------------------------------------
    ;Arverni - 20K-40K
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money scythia, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money scythia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money scythia, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money scythia, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury > 0
    and Treasury < 20000
    and not FactionIsLocal 
    console_command add_money scythia, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury < 1
    and not FactionIsLocal 
    console_command add_money scythia, 40000
    
    
    ;--------------------------------------------------
    ;Saba - (272BC to 175BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 100000
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 0
    and Treasury < 20000
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury < 1
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, 40000
    end_monitor
    
    
    ;Saba - (after 174BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 130000
    and I_TurnNumber > 388
    and not FactionIsLocal 
    console_command add_money saba, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber > 388
    and not FactionIsLocal 
    console_command add_money saba, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber > 388
    and not FactionIsLocal 
    console_command add_money saba, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber > 388
    and not FactionIsLocal 
    console_command add_money saba, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury < 10001
    and I_TurnNumber > 388
    and not FactionIsLocal 
    console_command add_money saba, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    
    ;Makedon  - 40K-70K
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 130000
    and not FactionIsLocal 
    console_command add_money macedon, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 100000
    and Treasury < 130001
    and not FactionIsLocal 
    console_command add_money macedon, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 70000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money macedon, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 10000
    and Treasury < 40001
    and not FactionIsLocal 
    console_command add_money macedon, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury < 10001
    and not FactionIsLocal 
    console_command add_money macedon, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Ptolemaioi - (272BC to 176BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 140000
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money numidia, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money numidia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money numidia, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money numidia, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury < 20001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money numidia, 60000
    end_monitor
    
    
    ;Ptolemaioi - (after 175BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 130000
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money numidia, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money numidia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money numidia, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money numidia, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury < 10001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money numidia, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Arche Seleukeia - (272BC to 176BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 140000
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money romans_julii, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money romans_julii, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money romans_julii, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money romans_julii, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury < 20001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money romans_julii, 60000
    end_monitor
    
    
    ;Arche Seleukeia - (after 175BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 100000
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 0
    and Treasury < 20000
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury < 1
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, 40000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Carthage - (272BC to 200BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 140000
    and I_TurnNumber < 289
    and not FactionIsLocal 
    console_command add_money egypt, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber < 289
    and not FactionIsLocal 
    console_command add_money egypt, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber < 289
    and not FactionIsLocal 
    console_command add_money egypt, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber < 289
    and not FactionIsLocal 
    console_command add_money egypt, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury < 20001
    and I_TurnNumber < 289
    and not FactionIsLocal 
    console_command add_money egypt, 60000
    end_monitor
    
    
    ;Carthage - (after 200BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 100000
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 0
    and Treasury < 20000
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury < 1
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, 40000
    end_monitor
    
    ;--------------------------------------------------
    ;Parthians - (272BC to 248BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 100000
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 0
    and Treasury < 20000
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury < 1
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, 40000
    end_monitor
    
    ;Parthians - (after 247BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 140000
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money parthia, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money parthia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money parthia, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money parthia, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury < 20001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money parthia, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Pontus - (272BC to 248BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 100000
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 0
    and Treasury < 20000
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury < 1
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, 40000
    end_monitor
    
    
    ;Pontus - (247BC to 114BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 130000
    and I_TurnNumber > 100
    and I_TurnNumber < 633
    and not FactionIsLocal 
    console_command add_money carthage, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber > 100
    and I_TurnNumber < 633
    and not FactionIsLocal 
    console_command add_money carthage, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber > 100
    and I_TurnNumber < 633
    and not FactionIsLocal 
    console_command add_money carthage, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber > 100
    and I_TurnNumber < 633
    and not FactionIsLocal 
    console_command add_money carthage, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury < 10001
    and I_TurnNumber > 100
    and I_TurnNumber < 633
    and not FactionIsLocal 
    console_command add_money carthage, 60000
    end_monitor
    
    
    ;Pontus - (after 113BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 100000
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 0
    and Treasury < 20000
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury < 1
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, 40000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Aedui - gauls - 20K-40K
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money gauls, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money gauls, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money gauls, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money gauls, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury > 0
    and Treasury < 20000
    and not FactionIsLocal 
    console_command add_money gauls, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury < 1
    and not FactionIsLocal 
    console_command add_money gauls, 40000
    
    
    ;--------------------------------------------------
    ;Sweboz - (272BC to 122BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 100000
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 0
    and Treasury < 20000
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury < 1
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, 40000
    end_monitor
    
    
    ;Sweboz - (after 121BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 140000
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money germans, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money germans, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money germans, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money germans, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury < 20001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money germans, 60000
    end_monitor
    
    ;--------------------------------------------------
    ;Casse - 20K-40K
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money britons, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money britons, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money britons, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money britons, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury > 0
    and Treasury < 20000
    and not FactionIsLocal 
    console_command add_money britons, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury < 1
    and not FactionIsLocal 
    console_command add_money britons, 40000
    
    
    ;--------------------------------------------------
    ;Hayasdan - (272BC to 248BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 100000
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 0
    and Treasury < 20000
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury < 1
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, 40000
    end_monitor
    
    
    ;Hayasdan - (after 247BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 130000
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money romans_scipii, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money romans_scipii, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money romans_scipii, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money romans_scipii, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury < 10001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money romans_scipii, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Getai - 20K-40K
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money dacia, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money dacia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money dacia, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money dacia, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury > 0
    and Treasury < 20000
    and not FactionIsLocal 
    console_command add_money dacia, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury < 1
    and not FactionIsLocal 
    console_command add_money dacia, 40000
    
    
    ;--------------------------------------------------
    ;Koinon Hellenon - (272BC to 262BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 130000
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money greek_cities, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money greek_cities, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money greek_cities, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money greek_cities, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury < 10001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money greek_cities, 60000
    end_monitor
    
    
    ;Koinon Hellenon - (after 262BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 100000
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 0
    and Treasury < 20000
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury < 1
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, 40000
    
    
    ;--------------------------------------------------
    ;Baktria - 20K-40K
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money romans_brutii, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money romans_brutii, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money romans_brutii, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money romans_brutii, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury > 0
    and Treasury < 20000
    and not FactionIsLocal 
    console_command add_money romans_brutii, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury < 1
    and not FactionIsLocal 
    console_command add_money romans_brutii, 40000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Sauromatae - 20K-40K
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money armenia, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money armenia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money armenia, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money armenia, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury > 0
    and Treasury < 20000
    and not FactionIsLocal 
    console_command add_money armenia, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury < 1
    and not FactionIsLocal 
    console_command add_money armenia, 40000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Lusotannan - 20K-40K
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money romans_brutii, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money spain, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money spain, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money spain, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury > 0
    and Treasury < 20000
    and not FactionIsLocal 
    console_command add_money spain, 20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury < 1
    and not FactionIsLocal 
    console_command add_money spain, 40000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Epeiros - thrace (272BC to 168BC) - 30K-60K
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 90000
    and I_TurnNumber < 417
    and not FactionIsLocal 
    console_command add_money thrace, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 60000
    and Treasury < 90001
    and I_TurnNumber < 417
    and not FactionIsLocal 
    console_command add_money thrace, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury < 30001
    and I_TurnNumber < 417
    and not FactionIsLocal 
    console_command add_money thrace, 30000
    end_monitor
    
    
    ;Epeiros - thrace (after 167BC) - 10K-30K
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 70000
    and I_TurnNumber > 416
    and not FactionIsLocal 
    console_command add_money thrace, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 50000
    and Treasury < 70001
    and I_TurnNumber > 416
    and not FactionIsLocal 
    console_command add_money thrace, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 30000
    and Treasury < 50001
    and I_TurnNumber > 416
    and not FactionIsLocal 
    console_command add_money thrace, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury < 10001
    and I_TurnNumber > 416
    and not FactionIsLocal 
    console_command add_money thrace, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Eleutheroi - slave
    
    monitor_event SettlementTurnStart FactionType slave
    and not FactionIsLocal
    
    console_command add_money slave, 2850
    
    end_monitor
    Last edited by pilatus; 06-12-2007 at 15:37.

  7. #7
    EBII PM Member JMRC's Avatar
    Join Date
    Nov 2006
    Location
    Lisboa, Portugal
    Posts
    7,930

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

    Quote Originally Posted by pilatus
    @JMRC
    i think there is a little bug in your script:
    please check the lines "numidia after 175 BC" and "romans_julii after 175 BC"
    it has to be "> 388" not "< 388"

    i wrote on your basis my own script with smaller treasury incomes
    if you want to look; it doesn' work 'cause there is a bug !!! but i dont see him...
    Thanks for your feedback. I have already corrected the code and made some tests. Now I'm looking more closely to other bugs of this kind.


    About the code you wrote, I noticed that in the part reproduced below, you overlap the interval 3 to 9999 in the Treasury, so it will give 10000 (20000-10000). At the same time you do nothing when the Treasury is exactly 20000, since it won't fit in none of the 3 conditions.


    Code:
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 20000
    and I_TurnNumber < 120
    and not FactionIsLocal
    console_command add_money seleucid, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 2
    and Treasury < 20000
    and I_TurnNumber < 120
    and not FactionIsLocal
    console_command add_money seleucid, -10000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 1
    and Treasury < 10000
    and I_TurnNumber < 120
    and not FactionIsLocal
    console_command add_money seleucid, 20000
    end_monitor



    "Death Smiles at Us All,all a Man Can Do Is Smile Back."
    Maximvs Decimvs Meridivs, Commander of the Armies of the North, General of the Felix Legions, Iberian Gladiator.

  8. #8
    EBII PM Member JMRC's Avatar
    Join Date
    Nov 2006
    Location
    Lisboa, Portugal
    Posts
    7,930

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

    Quote Originally Posted by Redmeth
    I made this test using my money script, mlp0701's mercenary modification and JMRC's victory conditions. This is the setup I'm using and wanted to testing out using an autoplay game controlling the Casse (I gave them ~30k every 10 years because they did not receive the bonuses) Everybody expanded very well especially the Aedui, Getai(!!) and Carthage. Sweboz, Pahlava and Sauromatae were very static which usually is not the case except for the Sauro. Using the merc mod I noticed very few stacks and while it's a good thing it's a bit worrying because I think for the human player it would be easy to overrun the AI.
    So here are the screenies, you can judge for yourselves.
    (...)
    I could not get past a repeating CTD in 160 so that's as far as it gets.
    Redmeth, in my tests, both Sweboz and Sauromatae are very active, while Pahlava only goes active after getting into war with Seleukeia. On the other hand, the Getai are not so active.

    Anyway, one of the reasons why sometimes a faction's progress stalls is because it lost several generals in a relatively short timespan. I've seen this happen with the Romans in one of my tests. They kept stubbornly attacking heavily defended cities with 3 or 4 units (sometimes not even fully replenished units) and eventually they lost all their generals except 2. Not only they stalled, but the Epirots seized the chance to conquer the whole of Italy and the Roman Empire was no more...

    I will look carefully to your test results and try to make adaptations to the script if necessary.

    Also, the consistent CTD that you mention, may be connected to the rebellious city bug. If so, it is easy to discover and correct, and you can keep on the campaign. For the next 2 days I won't have access to my computer, but if you wish to make available your savegame, I can look at it later and try my best to recover it for you.



    "Death Smiles at Us All,all a Man Can Do Is Smile Back."
    Maximvs Decimvs Meridivs, Commander of the Armies of the North, General of the Felix Legions, Iberian Gladiator.

  9. #9

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

    thank's to JMRC
    here is an new scipt which seems pretty stable and good in my first impressions

    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Section 4: Money Assistance
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ;--------------------------------------------------
    ;Carthaginian Navy Bonus
    
    monitor_event CharacterTurnStart FactionType egypt
    and AgentType = admiral
    and not FactionIsLocal
    console_command add_money egypt, 600
    end_monitor
    
    
    ;--------------------------------------------------
    ;Romani - (272BC to 242BC) 0-20K
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 20001
    and I_TurnNumber < 120
    and not FactionIsLocal
    console_command add_money seleucid, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 10001
    and Treasury < 20000
    and I_TurnNumber < 120
    and not FactionIsLocal
    console_command add_money seleucid, -8000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury < 10000
    and I_TurnNumber < 120
    and not FactionIsLocal
    console_command add_money seleucid, 15000
    end_monitor
    
    ;Romani - (241BC to 122BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 100000
    and I_TurnNumber > 119
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money seleucid, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber > 119
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money seleucid, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 119
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money seleucid, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber > 119
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money seleucid, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury < 20001
    and I_TurnNumber > 119
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money seleucid, 20000
    end_monitor
    
    ;Romani - (after 121BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 140000
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money seleucid, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money seleucid, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money seleucid, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money seleucid, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and Treasury < 20001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money seleucid, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Saka - 20K-40k
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money pontus, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money pontus, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money pontus, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money pontus, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and Treasury < 20001
    and not FactionIsLocal 
    console_command add_money pontus, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Arverni - 30K-50K
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury > 110000
    and not FactionIsLocal 
    console_command add_money scythia, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury > 80000
    and Treasury < 110001
    and not FactionIsLocal 
    console_command add_money scythia, -50000
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money scythia, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury > 50000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money scythia, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and Treasury < 30001
    and not FactionIsLocal 
    console_command add_money scythia, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Saba - (272BC to 175BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 100000
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury < 20001
    and I_TurnNumber < 389
    and not FactionIsLocal 
    console_command add_money saba, 20000
    end_monitor
    
    ;Saba - (after 174BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 130000
    and I_TurnNumber > 388
    and not FactionIsLocal 
    console_command add_money saba, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber > 388
    and not FactionIsLocal 
    console_command add_money saba, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber > 388
    and not FactionIsLocal 
    console_command add_money saba, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber > 388
    and not FactionIsLocal 
    console_command add_money saba, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and Treasury < 10001
    and I_TurnNumber > 388
    and not FactionIsLocal 
    console_command add_money saba, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Makedon  (272BC to 176BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 140000
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money macedon, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money macedon, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money macedon, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money macedon, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury < 20001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money macedon, 60000
    end_monitor
    
    ;Makedon (after 175BC) - 30K-50K
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 110000
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money macedon, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money macedon, -50000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money macedon, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury > 50000
    and Treasury < 60001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money macedon, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and Treasury < 30001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money macedon, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Ptolemaioi - (272BC to 176BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 140000
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money numidia, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money numidia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money numidia, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money numidia, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury < 20001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money numidia, 60000
    end_monitor
    
    ;Ptolemaioi - (after 175BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 130000
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money numidia, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money numidia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money numidia, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money numidia, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and Treasury < 10001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money numidia, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Arche Seleukeia - (272BC to 176BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 140000
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money romans_julii, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money romans_julii, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money romans_julii, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money romans_julii, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury < 20001
    and I_TurnNumber < 388
    and not FactionIsLocal 
    console_command add_money romans_julii, 60000
    end_monitor
    
    ;Arche Seleukeia - (after 175BC) - 30K-50K
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 110000
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, -50000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury > 50000
    and Treasury < 60001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and Treasury < 30001
    and I_TurnNumber > 389
    and not FactionIsLocal 
    console_command add_money romans_julii, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Carthage - (272BC to 200BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 140000
    and I_TurnNumber < 289
    and not FactionIsLocal 
    console_command add_money egypt, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber < 289
    and not FactionIsLocal 
    console_command add_money egypt, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber < 289
    and not FactionIsLocal 
    console_command add_money egypt, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber < 289
    and not FactionIsLocal 
    console_command add_money egypt, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury < 20001
    and I_TurnNumber < 289
    and not FactionIsLocal 
    console_command add_money egypt, 60000
    end_monitor
    
    ;Carthage - (after 200BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 100000
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and Treasury < 20001
    and I_TurnNumber > 290
    and not FactionIsLocal 
    console_command add_money egypt, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Parthians - (272BC to 248BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 100000
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury < 20001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money parthia, 20000
    end_monitor
    
    ;Parthians - (after 247BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 140000
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money parthia, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money parthia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money parthia, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money parthia, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and Treasury < 20001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money parthia, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Pontus - (272BC to 248BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 100000
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury < 20001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money carthage, 20000
    end_monitor
    
    ;Pontus - (247BC to 114BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 130000
    and I_TurnNumber > 100
    and I_TurnNumber < 633
    and not FactionIsLocal 
    console_command add_money carthage, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber > 100
    and I_TurnNumber < 633
    and not FactionIsLocal 
    console_command add_money carthage, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber > 100
    and I_TurnNumber < 633
    and not FactionIsLocal 
    console_command add_money carthage, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber > 100
    and I_TurnNumber < 633
    and not FactionIsLocal 
    console_command add_money carthage, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury < 10001
    and I_TurnNumber > 100
    and I_TurnNumber < 633
    and not FactionIsLocal 
    console_command add_money carthage, 60000
    end_monitor
    
    ;Pontus - (after 113BC) - 30K-50K
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 110000
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, -50000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury > 50000
    and Treasury < 60001
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and Treasury < 30001
    and I_TurnNumber > 632
    and not FactionIsLocal 
    console_command add_money carthage, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Aedui - gauls - 30K-50K
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury > 110000
    and not FactionIsLocal 
    console_command add_money gauls, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury > 80000
    and Treasury < 110001
    and not FactionIsLocal 
    console_command add_money gauls, -50000
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money gauls, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury > 50000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money gauls, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and Treasury < 30001
    and not FactionIsLocal 
    console_command add_money gauls, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Sweboz - (272BC to 122BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 100000
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury < 20001
    and I_TurnNumber < 600
    and not FactionIsLocal 
    console_command add_money germans, 20000
    end_monitor
    
    ;Sweboz - (after 121BC) - 50K-80K
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 140000
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money germans, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 110000
    and Treasury < 140001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money germans, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 80000
    and Treasury < 110001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money germans, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury > 20000
    and Treasury < 50001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money germans, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and Treasury < 20001
    and I_TurnNumber > 601
    and not FactionIsLocal 
    console_command add_money germans, 60000
    end_monitor
    
    ;--------------------------------------------------
    ;Casse - 20K-40K
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money britons, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money britons, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money britons, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money britons, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and Treasury < 20001
    and not FactionIsLocal 
    console_command add_money britons, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Hayasdan - (272BC to 248BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 100000
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury < 20001
    and I_TurnNumber < 101
    and not FactionIsLocal 
    console_command add_money romans_scipii, 20000
    end_monitor
    
    ;Hayasdan - (after 247BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 130000
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money romans_scipii, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money romans_scipii, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money romans_scipii, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money romans_scipii, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and Treasury < 10001
    and I_TurnNumber > 100
    and not FactionIsLocal 
    console_command add_money romans_scipii, 60000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Getai - 30K-50K
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury > 110000
    and not FactionIsLocal 
    console_command add_money dacia, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury > 80000
    and Treasury < 110001
    and not FactionIsLocal 
    console_command add_money dacia, -50000
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money dacia, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury > 50000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money dacia, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and Treasury < 30001
    and not FactionIsLocal 
    console_command add_money dacia, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Koinon Hellenon - (272BC to 262BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 130000
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money greek_cities, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money greek_cities, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money greek_cities, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money greek_cities, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury < 10001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money greek_cities, 60000
    end_monitor
    
    ;Koinon Hellenon - (after 262BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 100000
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and Treasury < 20001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money greek_cities, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Baktria - 30K-50K
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury > 110000
    and not FactionIsLocal 
    console_command add_money romans_brutii, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury > 80000
    and Treasury < 110001
    and not FactionIsLocal 
    console_command add_money romans_brutii, -50000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money romans_brutii, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury > 50000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money romans_brutii, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and Treasury < 30001
    and not FactionIsLocal 
    console_command add_money romans_brutii, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Sauromatae - 20K-40K
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money armenia, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money armenia, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money armenia, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money armenia, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and Treasury < 20001
    and not FactionIsLocal 
    console_command add_money armenia, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Lusotannan - 20K-40K
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury > 100000
    and not FactionIsLocal 
    console_command add_money spain, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury > 80000
    and Treasury < 100001
    and not FactionIsLocal 
    console_command add_money spain, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury > 60000
    and Treasury < 80001
    and not FactionIsLocal 
    console_command add_money spain, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury > 40000
    and Treasury < 60001
    and not FactionIsLocal 
    console_command add_money spain, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and Treasury < 20001
    and not FactionIsLocal 
    console_command add_money spain, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Epeiros - (272BC to 262BC) - 40K-70K
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 130000
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money thrace, -90000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 100000
    and Treasury < 130001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money thrace, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 70000
    and Treasury < 100001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money thrace, -30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 10000
    and Treasury < 40001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money thrace, 30000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury < 10001
    and I_TurnNumber < 41
    and not FactionIsLocal 
    console_command add_money thrace, 60000
    end_monitor
    
    ;Epeiros - (after 262BC) - 20K-40K
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 100000
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money thrace, -80000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 80000
    and Treasury < 100001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money thrace, -60000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 60000
    and Treasury < 80001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money thrace, -40000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury > 40000
    and Treasury < 60001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money thrace, -20000
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and Treasury < 20001
    and I_TurnNumber > 40
    and not FactionIsLocal 
    console_command add_money thrace, 20000
    end_monitor
    
    
    ;--------------------------------------------------
    ;Eleutheroi - slave
    
    monitor_event SettlementTurnStart FactionType slave
    and not FactionIsLocal
    
    console_command add_money slave, 2850
    
    end_monitor

  10. #10

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

    Hey. Which money script allows the AI to have the most stacks, as with the money script I'm using I don't think that the enemy have enough stacks. I have Marian cohorts so maybe thats why I find it easier but I would rather face worse odds thanks. It has however kept all factions alive for longer then in my previous campaigns and for that i thank () whoever wrote the script as I have forgotten which script I'm using
    Cheers

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