Page 6 of 9 FirstFirst ... 23456789 LastLast
Results 151 to 180 of 260

Thread: Fixing the AI money script (preliminary tests)

  1. #151
    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)

    Then I don't know how they manage to keep recruiting fresh troops in all my tests no faction seemed to be unable to recruit or conquer more provinces or field quite big armies, when they start going into debt the bonuses keep them somewhat stable and when they plunder a new city or lose and army and gain their upkeep they just recruit another army and plunge right back into it, never in debt AI would mean that all bonuses received would be above 0, positive so that just means and endless stream of new units.
    But of course that's just how I see things...
    @Dan_Grr thanks for trying my script, you should update to the last version it's posted a few posts back.
    Last edited by Redmeth; 04-25-2007 at 18:32.

  2. #152

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

    There should be some kind of code that would make the AI to never go into debt, like if it reaches 0 or less, the script could automatically give an extra 10000 mnai or any other value to make sure it stays constantly out of debt.

    Well, Im playing with the previous redmeth's script version and everything seems stable so far, the factions have started progressing somewhat well (Im in 210 I believe). Rome is expanding west, it's pratically inside the iberian peninsula while kicking averni and aedui while having conquered some lands on central germany. Not much happened to the Sweboz or the Getai, but Arche Seleuka is not the crazy empire it uses to be, it's actually pretty historical. It started out big, remained strong for a couple of decades and now the Ptolemaics are gaining a bit of ground with the help of... ta ra ra ra raaa.... the Sabyn, who have conquered a bit of land into AS regions.

  3. #153

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

    Gaias, I was going through your code and I have some questions about effects I'm not sure you intended. But I know you have a different philosophy with this so I wanted to ask first.

    Code:
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba < 5
    
    console_command add_money saba, 12000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba < 9
    
    console_command add_money saba, 10000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba < 13
    
    console_command add_money saba, 8000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba < 17
    
    console_command add_money saba, 6000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba < 21
    
    console_command add_money saba, 4000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba < 25
    
    console_command add_money saba, 2000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba > 25
    
    console_command add_money saba, -500
    Here you have conditionals that look for a certain number of settlements. But in most cases you only provide a high limit to your conditions. Each monitor of the script will be checked every turn, and multiple monitors can be activated simultaneously. So a low number of factions could trigger multiple commands. For instance, if a faction has 4 settlements, it will trigger the <5 condition, as well as the <9 condition, the <13 condition, the <17 condition, the <21 condition, and the <25 condition, because it checks all of those and they would all be true. This will result in the faction receiving 42000 mnai every single turn! Is that what you intended?

    You also wrote a monitor to take money away from large factions every turn. It is triggered by the condition of having 26 or more settlements (>25). You also have a monitor to add money to a faction with 24 or less settlements (<25). But you have no monitor for factions with exactly 25 settlements! Every other possible number is covered except for 25. Is this what you intended?

    If not, I suggest you include both a high limit and a low limit for each monitor aside from the first and last (<5 and >25). And remember that you have to use "greater than" and "less than," there is no "greater than or equal to" or "less than or equal to". So if you wanted a monitor to apply to factions with 21 to 25 settlements (for example), you would have to use >20 and <26 as your limits.
    Last edited by Sheep; 04-26-2007 at 03:38.

  4. #154

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

    Well considering I do not know how to code anything in RTW, I was just testing out very wide range of effects. I wasn't planning on this 'code' to be anything other than a random test of variables. It is rather raw and the money numbers are rather high but it easier to reduce the numbers than it is to increase.

    I didn't know about all the greater than and less than configuration, so I thank you for tell me that. The 25 was a mistake on my part as I didn't realise it until later.... My intent with factions greater than 25 settlements was to incur a massive debt the longer the go on and larger they become. The idea being that most large empires tend to fall under considerable financial debt. Though the large amount of monies gain per settlement probable negated this effect.

    The code, if you can call it that, is more a of trial and error for me to learn what works and what doesn't. It's one thing for you and others here to understand what it means and are able to moderately guess how the outcome will be. I can only learn from doing and seeing the results for myself (which I will be posting soon).

    Here are the test results for 120 turns. My poor computer couldn't handle anymore. Fairly interesting results considering that is very buggy code that is running it. Somewhat was I was looking for it to do but it still requires a great amount of tweaking to get it to work as I envision it.

    Last edited by Gaias; 04-26-2007 at 06:14.
    Help make developers understand the importance of game AI and earn credits as a Game Designer. The Restaurant Game Project

  5. #155

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

    That IS a weird map!

    Quote Originally Posted by Gaias
    Well considering I do not know how to code anything in RTW, I was just testing out very wide range of effects.
    That's fine! I assume you were posting your work for us to look over, so look it over I did, and now you have learned a bit about the code without having to figure it out for yourself. Which means you can more quickly do what you want to do with it!
    Last edited by Sheep; 04-26-2007 at 07:27.

  6. #156
    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)



    The results of my latest script. Pretty interesting.

    Cons. Baktria, Ptolies and Carthies are still too powerful. Need to be nerfed. Steppe factions still too weak. Saka in particular needs more support.
    Pahlava had a good expansion going in the right direction but got cut off from the best provinces by an overeager Baktria.

    Pros. Lusotana, Getai and Pontics moved! Sweet! They didn't stand up to the superpowers but they moved. The Sweboz are slow to start but once they get going their is no stopping them.

    Changes for next script include additonal bonuses to steppe factions. Additional nerfing of Superpowers and minor tweaks.

    By 200 B.C no faction has yet to be destroyed, although both Rome and Lusotana are on the endagered list, with a single weakly garrisoned settlement each, and under siege.
    The Getai are down to two settlements with one under siege by the Sweboz. The Arverni have a single settlement but nobody is bothering with them.
    The Pontics are down to two. The Pahlava also two though they are under heavy pressure from Baktria. The Seleukids have three but no active enemies.

    I'm eagerly expecting the White Giant going to war with the Pseudo Pharaohs of Hellenic Egypt.

    Anyway here is link to my current script: http://www.axifile.com?1839807
    Last edited by The Errant; 04-26-2007 at 19:23.

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

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

  7. #157

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

    I should have stated that most of my game test are on a modifed EB installing playing with the BI.exe. I was just posting here my ideas for the script as it seemed the most relevent thread to do so with.

    From the test that you Sheep and others have made here, I am beginning to come to the conclusion that the money script might not be the problem. As I was running my script a few more times, I noticed the AI was recuiting their elite units a third of the time. These of course are some of the more expensive units for the factions, and were afforable for the ai in droves considering the money they were recieving each turn. I had the idea of reducing all unit recruit cost to the exact same number and increasing the upkeep cost double, to see what kind of effect it would have.

    I am also toying around with the idea of having non recruitable units for all factions and units being introduced to factions via script. These units would be a set amount dependent on treasury, settlements, number of settlemes and the like. Not sure this would be doable, nor would it have the desired effect. As I thought about it, this kind of system would gear itself more to a faction specific campaign then a general one than what EB stands for.

    But I will continue on revising and testing my script to see if it has anykind of desirable effect and post my findings here.
    Help make developers understand the importance of game AI and earn credits as a Game Designer. The Restaurant Game Project

  8. #158

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

    What is the difference in money (or other?) terms between Hard and Very Hard Campaign difficulty?

    Does anyone know what priorities the AI has for money? Does it buy buildings first for all towns, then the rest on troops? Or troops first, then buildings if money left? Does it slow down building troops if it is broke? (i.e does it follow the same rules that the player has?).

    I am also thinking like people here about how best to balance the game (well, make it harder really). I have a couple of ideas, but haven't tried them out just yet...

    Cheers,

    Hunter

  9. #159
    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 Southern Hunter
    What is the difference in money (or other?) terms between Hard and Very Hard Campaign difficulty?

    Does anyone know what priorities the AI has for money? Does it buy buildings first for all towns, then the rest on troops? Or troops first, then buildings if money left? Does it slow down building troops if it is broke? (i.e does it follow the same rules that the player has?).

    I am also thinking like people here about how best to balance the game (well, make it harder really). I have a couple of ideas, but haven't tried them out just yet...

    Cheers,

    Hunter
    On VH the AI tends to be more agressive, expansionist and hopelessly stubborn. It also receives certain bonuses that make it harder for you to get cities to rebel by putting spies in those cities. I think their generals also get certain command improving traits more easily. It's also a lot less likely to accept diplomatic proposals. Especially Ceasefire.

    As a general rule the AI uses money to recruit troops first and build improvements second. The only exception is the Eleutheroi who seem to do the exact opposite. The AI never disbands troops so as long as it has money it will keep on recruiting. Only if it's broke will it stop recruiting new troops.

    I think the vanilla EB money script is as hard as I want the game to get. The reason I started modding the whole thing was because I got tired of fighting endlessly huge Seleukid stacks coming from three directions and fighting 5-6 battles per turn just to stay alive.

    In my opinion every battle should count. And big battles with full stacks lost to either side should hurt the AI as much as loosing my primary field army hurts me. That's why I'm modding the money script.

    You wan't to make it harder for you. Just increase the amount of money they get from the settlement bonus from 1200/settlement to 2000/settlement. If that dosen't get you twelve full stacks of elites coming your way every turn, nothing will.

    Since we can't mod the strategic or battle AI, giving them more resources to wage a war of endless attrition is propably the only way to make the game harder than it already is.

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

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

  10. #160

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

    Quote Originally Posted by Gaias
    As I was running my script a few more times, I noticed the AI was recuiting their elite units a third of the time.
    I honestly don't mind fighting their elite units, as they provide more of a challenge. But like TheErrant said, I just don't like fighting 6 stacks of them every turn. Especially the Seleukids. We can't control what the AI recruits with the script, but we can control how many of them they can recruit.

  11. #161

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

    I want to have this script in my EB where is it ???
    Medieval Auctoriso Modder
    BETA TESTA OF ANO DOMINI
    BETA TESTA OF Rise of Kings
    BETA TESTA OF Darthmod

  12. #162

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

    Quote Originally Posted by The Errant
    You wan't to make it harder for you. Just increase the amount of money they get from the settlement bonus from 1200/settlement to 2000/settlement. If that dosen't get you twelve full stacks of elites coming your way every turn, nothing will.

    Since we can't mod the strategic or battle AI, giving them more resources to wage a war of endless attrition is propably the only way to make the game harder than it already is.
    I have another approach in mind. I want to make the game harder for the player, and slow expansion (generally, but not make it impossible). At the same time, I want to avoid the AI having 'endless big stacks' which is, as you point out, boring as hell.

    There seems to be an easy approach...

    1. Extract money from the player (one way or another). Since the AI has more money (i.e. the script), it will have less trouble with a mechanism that extracts money over time. It seems the best way to do this is to make buildings more expensive. This will NEVER 'break' the AI, since you don't HAVE to buy buildings, and they have no maintenance costs.

    Taking money from the player will slow the rate at which they are able to wage war, increase the importance of key battles, etc.

    2. Make battles more even, that is, give the AI a fighting chance when they have equal or greater numbers. My Epic Battles mod does this fairly effectively in my testing so far.

    Therefore, I propose to produce a 'Challenge' mod, using both these things, to make the game a lot harder and more interesting. I am hoping that using the challenge mod the AI can be set to H/M, and that this will reduce the incidence of multiple full stacks coming from the big empires.

    Hence the question about what the script does to money on H level.

    Thanks,

    Hunter

  13. #163

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

    Quote Originally Posted by The Errant
    Changes for next script include additonal bonuses to steppe factions. Additional nerfing of Superpowers and minor tweaks.
    I noticed that you switched the difficult start bonus for Baktria and Armenia. Armenia (romans_scipii) gets it for 20 turns while Baktria (romans_brutii) gets it for 40 turns. I figured this was backwards so I switched it when I posted the code on the front page. Are Rome and the Saba supposed to have a treasury cap of 100000 instead of 80000?

  14. #164

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

    In me 1 test after the discusion over the problem whit the script not loading. The negative dept checking konditions are working for me. I have quit a stabil campain ( again the Seleuce are quit strong but not monstrous:P, the Ptoleis are holding quit good, and Pahlava and Bactria are advancing into AS lands.)

    What I dont like is that the factions Like Pontus or the Hai, after becoming stagnat just fxplod whit theyr tresury (pontus curently nearing 1milion in 249bc). So I am working on a step cap for the factions taking.

  15. #165
    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 Sheep
    I noticed that you switched the difficult start bonus for Baktria and Armenia. Armenia (romans_scipii) gets it for 20 turns while Baktria (romans_brutii) gets it for 40 turns. I figured this was backwards so I switched it when I posted the code on the front page. Are Rome and the Saba supposed to have a treasury cap of 100000 instead of 80000?
    That's about right. Hayasdan has problems starting the game but once they get moving they can become quite powerful. Baktria is overpowered as it is so I nerfed them even more in my new script. Same goes for the Carthies.
    The 100000 treasury cap Eminos64 introduced was good, but much too high. The new highest treasury cap for any faction is 80000 with the Ptolies, Carthies and Baktria getting it lowered to 70000. I want the Seleukids to be overrun by Pahlava, Pontos, Hayasdan or one of the other steppe factions. Not Baktria or Ptolies.
    Saba and Rome have both had their treasury capped lower. And the steppe factions get a total of 80 turns with the starting bonus of 6000 per turn.
    It's a careful balance I'm constructing. I want the Lusotana to beat the Carthies in Iberia if the AI will just put up the effort. The Getai are as well off as can be expected. Only the Sweboz expansion is a bit over the top but they mostly take large and poor provinces in the north.
    I feel I'm very close to the final build. The things I've managed to do have already improved the game immensly in my opinion.
    I'll see how the latest script affects things. If it works the way I planned, it might be the final version. Until the next EB build comes out and we have to start this thing all over again.

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

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

  16. #166
    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 The Errant
    I want the Seleukids to be overrun by Pahlava, Pontos, Hayasdan or one of the other steppe factions. Not Baktria or Ptolies.
    In my opinion you shouldn't act like a director through the script it takes out much of the "random" factors in campaigns in some the Seleucids get big in some the Baktria, Pontus, Pahlava, Hai and Ptolemies become allies and tear them apart, the EB team has put all of them in historical positions as they were some had many mines and were richer (Hai, Baktria, Seleucids) and some like the Steppe factions were poorer (Sauromatae, Saka)
    Keep in mind that giving big bonuses to the Steppe factions and to those you want to expand will make your eprience playing against them annoying like playing against the Seleucids.
    An EB player controlling the Seleucids will keep scratching his head saying how do these grass-eating bastards (Sarmatians) keep sending those HA stacks after me, and Parthia if you keep giving them a lot of money becomes a superpower, try fighting a few stacks of grivpanhar, cataphracts and HA + plus some foot archers, that's just as bad as fighting stacks of Seleucids (eventually).
    In my approach I tried to keep the bonuses equal for all and stop the factions that got big from flooding you with troops which is exactly what the lesser factions will do if you pump them up with money. The treasury cap thing is pretty ineffectual as they'll always recruit as much as they can and when they go above the cap and you take their money away, they'll just get it back from the script in the next few turns.
    The tweaks should keep things more or less how they are. As not all factions (and men) are created equal and should not be just as strong or own about the same number of territories. Starting to sound a bit communist..
    This is the approach I chose and my reasons:
    Because some factions are supposed to develop slower (Getai) than others (Romans) but instead make sure they don't get into big debt early (the rough start bonus) and encourage them to build their own infrastructure (20 years of flat bonus) and after that making sure they don't simply flood the map with stacks (the stepped bonus) .
    Just my opinion, I appreciate your work and effort I just don't like the way you're going trying to direct the factions into expanding as you wish they would.
    @Sheep: check your inbox please.
    Last edited by Redmeth; 04-28-2007 at 14:46.

  17. #167

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

    I quit agree whit Redmeth, my tries go to givin every on an eaquel chance.
    One of the fings that made me foll for EB whas, when I played my 2 campain, the 1 was almoust as vanilla whit the expansion of AI, and i vas in the east, thinkink, like well at this time the gauls should be goners, an Aedui diplomat came and we tradet maps, I went like, OMG the aedui took Segesta, Bonia and Patvium, an as i send spies there, they had strong garnison there, I was totali amazed. from there on I had almoust never had 2 campains that were the same, until 0.8 that is, where the East, ended almous always the same , Whit a big gray death.
    My goal is to restore the variety, have a campaine where the AS gets owern, and then another, in wich they emerge victorious, etc.

  18. #168
    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)

    The underlying principle defining all the work I've managed to do so far is to make sure every single faction in the game is still around at 200 B.C.
    From the Saka Katapracts to the Celtic slingers and Libyan spearmen. I want the player to have the chance to experience all these interesting enemies in a single campain with a single faction.
    That's what I'm working for. It might not be possible to balance the game to that degree. But the team put so much effort into making this great game it would be a shame if the average player didn't have have the chance to experience all of EB's glory. I admit a bias towards nerfing big factions. I don't want a monster sending wave after wave of enemies towards me. I like variety. So I strive to nerf the Seleukids. Just to keep them in the game but not to kill them.
    The Baktrians are a successor state. They share many of the same units that the Seleukids have but are still somewhat different. But the Pahlava are something completely different. A true steppe faction with flavor. I want to fight them all in a campaign. Not just one. But all with their different troops and tactics.
    That's the dream. To be able to fight as many different types of enemies that are in the game. And doing it in a campaign where a victory or defeat actually means something.
    Might not be possible. But I sure as Hell intend to try it.

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

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

  19. #169

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

    Keep up the good work. Ive been waiting for something like this and as far as I can see youve already had quite impressive results.

  20. #170

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

    There is something to be said for both philosophies, and I'm sure TheErrant doesn't want the same results in every campaign, but he just wants to make it POSSIBLE for the Parthians to defeat the AS, etc. Not necessarily to happen every time. Although I shouldn't be speaking for him.

    Right now I am testing Redmeth's latest script. Should have a test done today sometime, then another one in the next few days. If TheErrant finishes his script to his satisfaction, I'll give that one a whirl as well.

    (edit)
    Also, TheErrant, if you wish to PM me with a short developer's statement to explain your goals on the front page, that would be fine. If you want to. Not real long though, that second post is already huge!

    (edit 2)
    First test with Redmeth script 0.4
    Played as Casse using BI.exe
    Last edited by Sheep; 04-29-2007 at 02:58.

  21. #171

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

    Well I have revised my script to something more useable than the previous one. It is performing somewhat to what my expectations were, but still need more tweaking to specific factions. Right now their is slow expansion into other territories and alot of fighting between factions. Most armies are small and less numerous than they are with the vanilla script.

    The only problem I am having is that factions with one city are still recieve little or no money. At best, they are building the cheapest missile/skirmish unit that is available to recruit. I cannot for the life of me figure out what it is, so if someone could give me assistance in this matter it would be appreciated.

    Here is 40 years result of the script:


    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Section 4: Money Assistance
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Section 4a: Campaign Setting Money Negation
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    monitor_event FactionTurnStart FactionType romans_julii
    and not FactionIsLocal
    
    console_command add_money romans_julii, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and not FactionIsLocal
    
    console_command add_money romans_scipii, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and not FactionIsLocal
    
    console_command add_money romans_brutii, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and not FactionIsLocal
    
    console_command add_money egypt, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and not FactionIsLocal
    
    console_command add_money seleucid, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and not FactionIsLocal
    
    console_command add_money carthage, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and not FactionIsLocal
    
    console_command add_money parthia, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and not FactionIsLocal
    
    console_command add_money gauls, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and not FactionIsLocal
    
    console_command add_money germans, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and not FactionIsLocal
    
    console_command add_money britons, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and not FactionIsLocal
    
    console_command add_money greek_cities, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and not FactionIsLocal
    
    console_command add_money macedon, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and not FactionIsLocal
    
    console_command add_money pontus, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and not FactionIsLocal
    
    console_command add_money armenia, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and not FactionIsLocal
    
    console_command add_money dacia, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and not FactionIsLocal
    
    console_command add_money scythia, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and not FactionIsLocal
    
    console_command add_money spain, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and not FactionIsLocal
    
    console_command add_money thrace, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and not FactionIsLocal
    
    console_command add_money numidia, -10000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and not FactionIsLocal
    
    console_command add_money saba, -10000
    
    end_monitor
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Section 4b: Treasury Reduction
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    monitor_event FactionTurnStart FactionType romans_julii
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements romans_julii < 6
    
    console_command add_money romans_julii, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements romans_julii < 11
    
    console_command add_money romans_julii, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements romans_julii < 16
    
    console_command add_money romans_julii, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_julii
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements romans_julii > 15
    
    console_command add_money romans_julii, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements romans_scipii < 6
    
    console_command add_money romans_scipii, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements romans_scipii < 11
    
    console_command add_money romans_scipii, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements romans_scipii < 16
    
    console_command add_money romans_scipii, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements romans_scipii > 15
    
    console_command add_money romans_scipii, -30000
    
    end_monitor
    monitor_event FactionTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements romans_brutii < 6
    
    console_command add_money romans_brutii, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements romans_brutii < 11
    
    console_command add_money romans_brutii, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements romans_brutii < 16
    
    console_command add_money romans_brutii, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements romans_brutii > 15
    
    console_command add_money romans_brutii, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements egypt < 6
    
    console_command add_money egypt, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements egypt < 11
    
    console_command add_money egypt, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements egypt < 16
    
    console_command add_money egypt, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements egypt > 15
    
    console_command add_money egypt, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements seleucid < 6
    
    console_command add_money seleucid, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements seleucid < 11
    
    console_command add_money seleucid, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements seleucid < 16
    
    console_command add_money seleucid, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements seleucid > 15
    
    console_command add_money seleucid, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements carthage < 6
    
    console_command add_money carthage, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements carthage < 11
    
    console_command add_money carthage, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements carthage < 16
    
    console_command add_money carthage, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements carthage > 15
    
    console_command add_money carthage, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements parthia < 6
    
    console_command add_money parthia, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements parthia < 11
    
    console_command add_money parthia, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements parthia < 16
    
    console_command add_money parthia, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements parthia > 15
    
    console_command add_money parthia, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements gauls < 6
    
    console_command add_money gauls, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements gauls < 11
    
    console_command add_money gauls, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements gauls < 16
    
    console_command add_money gauls, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements gauls > 15
    
    console_command add_money gauls, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements germans < 6
    
    console_command add_money germans, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements germans < 11
    
    console_command add_money germans, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements germans < 16
    
    console_command add_money germans, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements germans > 15
    
    console_command add_money germans, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements britons < 6
    
    console_command add_money britons, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements britons < 11
    
    console_command add_money britons, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements britons < 16
    
    console_command add_money britons, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements britons > 15
    
    console_command add_money britons, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements greek_cities < 6
    
    console_command add_money greek_cities, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements greek_cities < 11
    
    console_command add_money greek_cities, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements greek_cities < 16
    
    console_command add_money greek_cities, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements greek_cities > 15
    
    console_command add_money greek_cities, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements macedon < 6
    
    console_command add_money macedon, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements macedon < 11
    
    console_command add_money macedon, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements macedon < 16
    
    console_command add_money macedon, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements macedon > 15
    
    console_command add_money macedon, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements pontus < 6
    
    console_command add_money pontus, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements pontus < 11
    
    console_command add_money pontus, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements pontus < 16
    
    console_command add_money pontus, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements pontus > 15
    
    console_command add_money pontus, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements armenia < 6
    
    console_command add_money armenia, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements armenia < 11
    
    console_command add_money armenia, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements armenia < 16
    
    console_command add_money armenia, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements armenia > 15
    
    console_command add_money armenia, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements dacia < 6
    
    console_command add_money dacia, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements dacia < 11
    
    console_command add_money dacia, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements dacia < 16
    
    console_command add_money dacia, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements dacia > 15
    
    console_command add_money dacia, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements scythia < 6
    
    console_command add_money scythia, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements scythia < 11
    
    console_command add_money scythia, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements scythia < 16
    
    console_command add_money scythia, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements scythia > 15
    
    console_command add_money scythia, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements spain < 6
    
    console_command add_money spain, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements spain < 11
    
    console_command add_money spain, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements spain < 16
    
    console_command add_money spain, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements spain > 15
    
    console_command add_money spain, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements thrace < 6
    
    console_command add_money thrace, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements thrace < 11
    
    console_command add_money thrace, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements thrace < 16
    
    console_command add_money thrace, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements thrace > 15
    
    console_command add_money thrace, -30000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and not FactionIsLocal
    and Treasury > 36000
    and I_NumberOfSettlements numidia < 6
    
    console_command add_money numidia, -12000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and not FactionIsLocal
    and Treasury > 48000
    and I_NumberOfSettlements numidia < 11
    
    console_command add_money numidia, -18000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and not FactionIsLocal
    and Treasury > 60000
    and I_NumberOfSettlements numidia < 16
    
    console_command add_money numidia, -24000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and not FactionIsLocal
    and Treasury > 72000
    and I_NumberOfSettlements numidia > 15
    
    console_command add_money numidia, -30000
    
    end_monitor
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Section 4c: AI Debt Reduction
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    monitor_event FactionTurnStart FactionType romans_julii
    and not FactionIsLocal
    and Treasury > -3600
    and I_NumberOfSettlements romans_julii < 4
    
    console_command add_money romans_julii, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements romans_scipii < 4
    
    console_command add_money romans_scipii, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements romans_brutii < 4
    
    console_command add_money romans_brutii, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType egypt
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements egypt < 4
    
    console_command add_money egypt, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType seleucid
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements seleucid < 4
    
    console_command add_money seleucid, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType carthage
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements carthage < 4
    
    console_command add_money carthage, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType parthia
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements parthia < 4
    
    console_command add_money parthia, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType gauls
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements gauls < 4
    
    console_command add_money gauls, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType germans
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements germans < 4
    
    console_command add_money germans, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType britons
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements britons < 4
    
    console_command add_money britons, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType greek_cities
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements greek_cities < 4
    
    console_command add_money greek_cities, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType macedon
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements macedon < 4
    
    console_command add_money macedon, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType pontus
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements pontus < 4
    
    console_command add_money pontus, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType armenia
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements armenia < 4
    
    console_command add_money armenia, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType dacia
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements dacia < 4
    
    console_command add_money dacia, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType scythia
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements scythia < 4
    
    console_command add_money scythia, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType spain
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements spain < 4
    
    console_command add_money spain, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType thrace
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements thrace < 4
    
    console_command add_money thrace, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType numidia
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements numidia < 4
    
    console_command add_money numidia, 6000
    
    end_monitor
    
    monitor_event FactionTurnStart FactionType saba
    and not FactionIsLocal
    and Treasury < -3600
    and I_NumberOfSettlements saba < 4
    
    console_command add_money saba, 6000
    
    end_monitor
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Section 4d: Faction Specific City Income Bonus
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ;monitor_event CharacterTurnStart FactionType egypt
    ;and AgentType = admiral
    ;and not FactionIsLocal
    ;console_command add_money egypt, 1200
    
    ;end_monitor
    monitor_event SettlementTurnStart FactionType romans_julii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_julii < 4
    
    console_command add_money romans_julii, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_julii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_julii > 3
    and I_NumberOfSettlements romans_julii < 7
    
    console_command add_money romans_julii, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_julii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_julii > 6
    and I_NumberOfSettlements romans_julii < 10
    
    console_command add_money romans_julii, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_julii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_julii > 9
    and I_NumberOfSettlements romans_julii < 13
    
    console_command add_money romans_julii, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_julii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_julii > 12
    and I_NumberOfSettlements romans_julii < 16
    
    console_command add_money romans_julii, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_julii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_julii > 15
    
    console_command add_money romans_julii, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_scipii < 4
    
    console_command add_money romans_scipii, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_scipii > 3
    and I_NumberOfSettlements romans_scipii < 7
    
    console_command add_money romans_scipii, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_scipii > 6
    and I_NumberOfSettlements romans_scipii < 10
    
    console_command add_money romans_scipii, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_scipii > 9
    and I_NumberOfSettlements romans_scipii < 13
    
    console_command add_money romans_scipii, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_scipii > 12
    and I_NumberOfSettlements romans_scipii < 16
    
    console_command add_money romans_scipii, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_scipii > 15
    
    console_command add_money romans_scipii, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_brutii < 4
    
    console_command add_money romans_brutii, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_brutii > 3
    and I_NumberOfSettlements romans_brutii < 7
    
    console_command add_money romans_brutii, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_brutii > 6
    and I_NumberOfSettlements romans_brutii < 10
    
    console_command add_money romans_brutii, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_brutii > 9
    and I_NumberOfSettlements romans_brutii < 13
    
    console_command add_money romans_brutii, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_brutii > 12
    and I_NumberOfSettlements romans_brutii < 16
    
    console_command add_money romans_brutii, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and I_NumberOfSettlements romans_brutii > 15
    
    console_command add_money romans_brutii, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType egypt
    and not FactionIsLocal
    and I_NumberOfSettlements egypt < 4
    
    console_command add_money egypt, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType egypt
    and not FactionIsLocal
    and I_NumberOfSettlements egypt > 3
    and I_NumberOfSettlements egypt < 7
    
    console_command add_money egypt, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType egypt
    and not FactionIsLocal
    and I_NumberOfSettlements egypt > 6
    and I_NumberOfSettlements egypt < 10
    
    console_command add_money egypt, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType egypt
    and not FactionIsLocal
    and I_NumberOfSettlements egypt > 9
    and I_NumberOfSettlements egypt < 13
    
    console_command add_money egypt, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType egypt
    and not FactionIsLocal
    and I_NumberOfSettlements egypt > 12
    and I_NumberOfSettlements egypt < 16
    
    console_command add_money egypt, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType egypt
    and not FactionIsLocal
    and I_NumberOfSettlements egypt > 15
    
    console_command add_money egypt, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid < 4
    
    console_command add_money seleucid, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid > 3
    and I_NumberOfSettlements seleucid < 7
    
    console_command add_money seleucid, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid > 6
    and I_NumberOfSettlements seleucid < 10
    
    console_command add_money seleucid, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid > 9
    and I_NumberOfSettlements seleucid < 13
    
    console_command add_money seleucid, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid > 12
    and I_NumberOfSettlements seleucid < 16
    
    console_command add_money seleucid, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid > 15
    
    console_command add_money seleucid, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType carthage
    and not FactionIsLocal
    and I_NumberOfSettlements carthage < 4
    
    console_command add_money carthage, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType carthage
    and not FactionIsLocal
    and I_NumberOfSettlements carthage > 3
    and I_NumberOfSettlements carthage < 7
    
    console_command add_money carthage, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType carthage
    and not FactionIsLocal
    and I_NumberOfSettlements carthage > 6
    and I_NumberOfSettlements carthage < 10
    
    console_command add_money carthage, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType carthage
    and not FactionIsLocal
    and I_NumberOfSettlements carthage > 9
    and I_NumberOfSettlements carthage < 13
    
    console_command add_money carthage, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType carthage
    and not FactionIsLocal
    and I_NumberOfSettlements carthage > 12
    and I_NumberOfSettlements carthage < 16
    
    console_command add_money carthage, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType carthage
    and not FactionIsLocal
    and I_NumberOfSettlements carthage > 15
    
    console_command add_money carthage, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType parthia
    and not FactionIsLocal
    and I_NumberOfSettlements parthia < 4
    
    console_command add_money parthia, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType parthia
    and not FactionIsLocal
    and I_NumberOfSettlements parthia > 3
    and I_NumberOfSettlements parthia < 7
    
    console_command add_money parthia, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType parthia
    and not FactionIsLocal
    and I_NumberOfSettlements parthia > 6
    and I_NumberOfSettlements parthia < 10
    
    console_command add_money parthia, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType parthia
    and not FactionIsLocal
    and I_NumberOfSettlements parthia > 9
    and I_NumberOfSettlements parthia < 13
    
    console_command add_money parthia, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType parthia
    and not FactionIsLocal
    and I_NumberOfSettlements parthia > 12
    and I_NumberOfSettlements parthia < 16
    
    console_command add_money parthia, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType parthia
    and not FactionIsLocal
    and I_NumberOfSettlements parthia > 15
    
    console_command add_money parthia, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType gauls
    and not FactionIsLocal
    and I_NumberOfSettlements gauls < 4
    
    console_command add_money gauls, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType gauls
    and not FactionIsLocal
    and I_NumberOfSettlements gauls > 3
    and I_NumberOfSettlements gauls < 7
    
    console_command add_money gauls, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType gauls
    and not FactionIsLocal
    and I_NumberOfSettlements gauls > 6
    and I_NumberOfSettlements gauls < 10
    
    console_command add_money gauls, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType gauls
    and not FactionIsLocal
    and I_NumberOfSettlements gauls > 9
    and I_NumberOfSettlements gauls < 13
    
    console_command add_money gauls, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType gauls
    and not FactionIsLocal
    and I_NumberOfSettlements gauls > 12
    and I_NumberOfSettlements gauls < 16
    
    console_command add_money gauls, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType gauls
    and not FactionIsLocal
    and I_NumberOfSettlements gauls > 15
    
    console_command add_money gauls, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType germans
    and not FactionIsLocal
    and I_NumberOfSettlements germans < 4
    
    console_command add_money germans, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType germans
    and not FactionIsLocal
    and I_NumberOfSettlements germans > 3
    and I_NumberOfSettlements germans < 7
    
    console_command add_money germans, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType germans
    and not FactionIsLocal
    and I_NumberOfSettlements germans > 6
    and I_NumberOfSettlements germans < 10
    
    console_command add_money germans, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType germans
    and not FactionIsLocal
    and I_NumberOfSettlements germans > 9
    and I_NumberOfSettlements germans < 13
    
    console_command add_money germans, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType germans
    and not FactionIsLocal
    and I_NumberOfSettlements germans > 12
    and I_NumberOfSettlements germans < 16
    
    console_command add_money germans, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType germans
    and not FactionIsLocal
    and I_NumberOfSettlements germans > 15
    
    console_command add_money germans, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType britons
    and not FactionIsLocal
    and I_NumberOfSettlements britons < 4
    
    console_command add_money britons, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType britons
    and not FactionIsLocal
    and I_NumberOfSettlements britons > 3
    and I_NumberOfSettlements britons < 7
    
    console_command add_money britons, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType britons
    and not FactionIsLocal
    and I_NumberOfSettlements britons > 6
    and I_NumberOfSettlements britons < 10
    
    console_command add_money britons, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType britons
    and not FactionIsLocal
    and I_NumberOfSettlements britons > 9
    and I_NumberOfSettlements britons < 13
    
    console_command add_money britons, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType britons
    and not FactionIsLocal
    and I_NumberOfSettlements britons > 12
    and I_NumberOfSettlements britons < 16
    
    console_command add_money britons, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType britons
    and not FactionIsLocal
    and I_NumberOfSettlements britons > 15
    
    console_command add_money britons, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType greek_cities
    and not FactionIsLocal
    and I_NumberOfSettlements greek_cities < 4
    
    console_command add_money greek_cities, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType greek_cities
    and not FactionIsLocal
    and I_NumberOfSettlements greek_cities > 3
    and I_NumberOfSettlements greek_cities < 7
    
    console_command add_money greek_cities, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType greek_cities
    and not FactionIsLocal
    and I_NumberOfSettlements greek_cities > 6
    and I_NumberOfSettlements greek_cities < 10
    
    console_command add_money greek_cities, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType greek_cities
    and not FactionIsLocal
    and I_NumberOfSettlements greek_cities > 9
    and I_NumberOfSettlements greek_cities < 13
    
    console_command add_money greek_cities, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType greek_cities
    and not FactionIsLocal
    and I_NumberOfSettlements greek_cities > 12
    and I_NumberOfSettlements greek_cities < 16
    
    console_command add_money greek_cities, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType greek_cities
    and not FactionIsLocal
    and I_NumberOfSettlements greek_cities > 15
    
    console_command add_money greek_cities, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType macedon
    and not FactionIsLocal
    and I_NumberOfSettlements macedon < 4
    
    console_command add_money macedon, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType macedon
    and not FactionIsLocal
    and I_NumberOfSettlements macedon > 3
    and I_NumberOfSettlements macedon < 7
    
    console_command add_money macedon, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType macedon
    and not FactionIsLocal
    and I_NumberOfSettlements macedon > 6
    and I_NumberOfSettlements macedon < 10
    
    console_command add_money macedon, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType macedon
    and not FactionIsLocal
    and I_NumberOfSettlements macedon > 9
    and I_NumberOfSettlements macedon < 13
    
    console_command add_money macedon, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType macedon
    and not FactionIsLocal
    and I_NumberOfSettlements macedon > 12
    and I_NumberOfSettlements macedon < 16
    
    console_command add_money macedon, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType macedon
    and not FactionIsLocal
    and I_NumberOfSettlements macedon > 15
    
    console_command add_money macedon, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType pontus
    and not FactionIsLocal
    and I_NumberOfSettlements pontus < 4
    
    console_command add_money pontus, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType pontus
    and not FactionIsLocal
    and I_NumberOfSettlements pontus > 3
    and I_NumberOfSettlements pontus < 7
    
    console_command add_money pontus, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType pontus
    and not FactionIsLocal
    and I_NumberOfSettlements pontus > 6
    and I_NumberOfSettlements pontus < 10
    
    console_command add_money pontus, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType pontus
    and not FactionIsLocal
    and I_NumberOfSettlements pontus > 9
    and I_NumberOfSettlements pontus < 13
    
    console_command add_money pontus, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType pontus
    and not FactionIsLocal
    and I_NumberOfSettlements pontus > 12
    and I_NumberOfSettlements pontus < 16
    
    console_command add_money pontus, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType pontus
    and not FactionIsLocal
    and I_NumberOfSettlements pontus > 15
    
    console_command add_money pontus, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType armenia
    and not FactionIsLocal
    and I_NumberOfSettlements armenia < 4
    
    console_command add_money armenia, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType armenia
    and not FactionIsLocal
    and I_NumberOfSettlements armenia > 3
    and I_NumberOfSettlements armenia < 7
    
    console_command add_money armenia, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType armenia
    and not FactionIsLocal
    and I_NumberOfSettlements armenia > 6
    and I_NumberOfSettlements armenia < 10
    
    console_command add_money armenia, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType armenia
    and not FactionIsLocal
    and I_NumberOfSettlements armenia > 9
    and I_NumberOfSettlements armenia < 13
    
    console_command add_money armenia, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType armenia
    and not FactionIsLocal
    and I_NumberOfSettlements armenia > 12
    and I_NumberOfSettlements armenia < 16
    
    console_command add_money armenia, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType armenia
    and not FactionIsLocal
    and I_NumberOfSettlements armenia > 15
    
    console_command add_money armenia, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType dacia
    and not FactionIsLocal
    and I_NumberOfSettlements dacia < 4
    
    console_command add_money dacia, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType dacia
    and not FactionIsLocal
    and I_NumberOfSettlements dacia > 3
    and I_NumberOfSettlements dacia < 7
    
    console_command add_money dacia, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType dacia
    and not FactionIsLocal
    and I_NumberOfSettlements dacia > 6
    and I_NumberOfSettlements dacia < 10
    
    console_command add_money dacia, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType dacia
    and not FactionIsLocal
    and I_NumberOfSettlements dacia > 9
    and I_NumberOfSettlements dacia < 13
    
    console_command add_money dacia, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType dacia
    and not FactionIsLocal
    and I_NumberOfSettlements dacia > 12
    and I_NumberOfSettlements dacia < 16
    
    console_command add_money dacia, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType dacia
    and not FactionIsLocal
    and I_NumberOfSettlements dacia > 15
    
    console_command add_money dacia, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType scythia
    and not FactionIsLocal
    and I_NumberOfSettlements scythia < 4
    
    console_command add_money scythia, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType scythia
    and not FactionIsLocal
    and I_NumberOfSettlements scythia > 3
    and I_NumberOfSettlements scythia < 7
    
    console_command add_money scythia, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType scythia
    and not FactionIsLocal
    and I_NumberOfSettlements scythia > 6
    and I_NumberOfSettlements scythia < 10
    
    console_command add_money scythia, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType scythia
    and not FactionIsLocal
    and I_NumberOfSettlements scythia > 9
    and I_NumberOfSettlements scythia < 13
    
    console_command add_money scythia, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType scythia
    and not FactionIsLocal
    and I_NumberOfSettlements scythia > 12
    and I_NumberOfSettlements scythia < 16
    
    console_command add_money scythia, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType scythia
    and not FactionIsLocal
    and I_NumberOfSettlements scythia > 15
    
    console_command add_money scythia, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType spain
    and not FactionIsLocal
    and I_NumberOfSettlements spain < 4
    
    console_command add_money spain, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType spain
    and not FactionIsLocal
    and I_NumberOfSettlements spain > 3
    and I_NumberOfSettlements spain < 7
    
    console_command add_money spain, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType spain
    and not FactionIsLocal
    and I_NumberOfSettlements spain > 6
    and I_NumberOfSettlements spain < 10
    
    console_command add_money spain, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType spain
    and not FactionIsLocal
    and I_NumberOfSettlements spain > 9
    and I_NumberOfSettlements spain < 13
    
    console_command add_money spain, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType spain
    and not FactionIsLocal
    and I_NumberOfSettlements spain > 12
    and I_NumberOfSettlements spain < 16
    
    console_command add_money spain, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType spain
    and not FactionIsLocal
    and I_NumberOfSettlements spain > 15
    
    console_command add_money spain, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType thrace
    and not FactionIsLocal
    and I_NumberOfSettlements thrace < 4
    
    console_command add_money thrace, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType thrace
    and not FactionIsLocal
    and I_NumberOfSettlements thrace > 3
    and I_NumberOfSettlements thrace < 7
    
    console_command add_money thrace, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType thrace
    and not FactionIsLocal
    and I_NumberOfSettlements thrace > 6
    and I_NumberOfSettlements thrace < 10
    
    console_command add_money thrace, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType thrace
    and not FactionIsLocal
    and I_NumberOfSettlements thrace > 9
    and I_NumberOfSettlements thrace < 13
    
    console_command add_money thrace, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType thrace
    and not FactionIsLocal
    and I_NumberOfSettlements thrace > 12
    and I_NumberOfSettlements thrace < 16
    
    console_command add_money thrace, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType thrace
    and not FactionIsLocal
    and I_NumberOfSettlements thrace > 15
    
    console_command add_money thrace, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType numidia
    and not FactionIsLocal
    and I_NumberOfSettlements numidia < 4
    
    console_command add_money numidia, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType numidia
    and not FactionIsLocal
    and I_NumberOfSettlements numidia > 3
    and I_NumberOfSettlements numidia < 7
    
    console_command add_money numidia, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType numidia
    and not FactionIsLocal
    and I_NumberOfSettlements numidia > 6
    and I_NumberOfSettlements numidia < 10
    
    console_command add_money numidia, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType numidia
    and not FactionIsLocal
    and I_NumberOfSettlements numidia > 9
    and I_NumberOfSettlements numidia < 13
    
    console_command add_money numidia, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType numidia
    and not FactionIsLocal
    and I_NumberOfSettlements numidia > 12
    and I_NumberOfSettlements numidia < 16
    
    console_command add_money numidia, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType numidia
    and not FactionIsLocal
    and I_NumberOfSettlements numidia > 15
    
    console_command add_money numidia, -1200
    
    end_monitor
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba < 4
    
    console_command add_money saba, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba > 3
    and I_NumberOfSettlements saba < 7
    
    console_command add_money saba, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba > 6
    and I_NumberOfSettlements saba < 10
    
    console_command add_money saba, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba > 9
    and I_NumberOfSettlements saba < 13
    
    console_command add_money saba, 1800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba > 12
    and I_NumberOfSettlements saba < 16
    
    console_command add_money saba, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and I_NumberOfSettlements saba > 15
    
    console_command add_money saba, -1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType slave
    and not FactionIsLocal
    and I_NumberOfSettlements slave < 121
    and I_NumberOfSettlements slave > 100
    
    console_command add_money slave, 2400
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType slave
    and not FactionIsLocal
    and I_NumberOfSettlements slave < 101
    and I_NumberOfSettlements slave > 80
    
    console_command add_money slave, 3000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType slave
    and not FactionIsLocal
    and I_NumberOfSettlements slave < 81
    and I_NumberOfSettlements slave > 60
    
    console_command add_money slave, 3600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType slave
    and not FactionIsLocal
    and I_NumberOfSettlements slave < 61
    and I_NumberOfSettlements slave > 40
    
    console_command add_money slave, 4200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType slave
    and not FactionIsLocal
    and I_NumberOfSettlements slave < 41
    
    console_command add_money slave, 4800
    
    end_monitor
    Help make developers understand the importance of game AI and earn credits as a Game Designer. The Restaurant Game Project

  22. #172
    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)

    Looking at Sheep's test run as well as mine and other's tests I can say that in EB Baktria expands so well because it has a lot of mines and no real threat to the north and none to the east and that's a big advantage. While the AS, if attacked from all directions can get and got destroyed in some of my campaigns that used the normal script with 1200 for everyone regardless of number of territories
    The only way to nerf Bakria is by targeting them specifically in the script and that is not what I'd like to do, the EB team should do it.
    Carthage is also doing well in Sheep's test but in a test of mine they got kicked out of Spain by the Lusitans so I think it's balanced out pretty good.

  23. #173
    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)



    The results of the latest testrun. Not promising at all. I've come to some conclusions I'm going to share though.

    - In the early game the Ptolies have an advantage over the AS. If they both are on equal ground conserning financial aid the Ptolies are bound to win. Never have I seen the AS win if they are treated equally.

    - Pahlava does not go for Seleukid provinces if the AI percieves it too strong. It will be more than happy to waste it's resources on unprofitable Steppe provinces instead. The longer the money keeps flowing for the Saka the longer the steppe wars will last.

    - For the life of me, I can't figure out a way for the Saka to survive as anything other than a protectorate. The only way for Saka to manage greatness is at the expense of the Baktrians which is the one direction Saka is refusing to go.

    - Nerfing the Carthies only postpones their rise to power. The Lusotana take a long time in conquering the Eleutheroi settlements. They are too passive until the Carthies start expanding and at that point too weak to stand up against the White Giant.

    - The Getai are agressive but only to a point. They too need the threat of extinction to move. Usually in the form of a massive Koinon or Epirote expansion into Thrace. And by that time it's usually too late.

    - The Pontics need a weakened AS in order to expand. They also need to control atleast Sinope, Trapezous and preferably Ani-Kamah and Mazaka.

    - Macedon and Epeiros are survivors. They can be kicked out of their original homelands and will usually make a decent comeback at some point.

    - Sweboz are slow but steady expanders and tend to survive either trough expansion or rebellion for a long time.

    - The Sauromatae have the ambition to be great but fail to hold their provinces in the west due to repeated rebellions in favor of either the Sweboz, Aedui, Arverni or Koinon.

    - The Aedui and Arverni are about equally matched with one coming up on top early in the game and the other gaining momentum later when other factions have entered the fray.

    - Rome is a powerhouse, but only after the Polybian reforms. Until then they are pretty much confined to their peninsula and unless they manage to kick both the Epirotes and Carthage out they tend to loose the south quickly to either or both at times. Which slows down their expansion since periodically they have to refocus all their efforts to repacifying Italy.

    - The Hai and Saba are slow to start but once they get rolling they tend to become mediocre empires at best.

    - Baktria is like the Carthies. You can nerf them but they will bounce back eventually. And once they do, there is no stopping it.

    - Koinon is the power of Hellas that always seems to get the upper hand at some point. I think the proximity of the cities they control and the wealth from seatrade and mining make them nearly unstoppable. Once they get going, that is. It dosen't help that the Epirotes usually are quite unprepared for a war with them when the Koinon finally decides to betray the Epirotes.

    The last version of my script, while not as balanced was better than this one. Some things I will change but the next script I release will be the last one, I think. I'm going to download the Nisa mines fix and hope that does the trick for Pahlava.

    Other than that there isn't much I can do. Except Introduce an additional money trigger. I noticed that the last two decades of the game, my treasury was way over 300 000 and I wasn't even the wealthiest. It seems the treasury cap only reduces money from the magic marker, but looks to me like the cumulative trade and mining income can surpass the reduction once it reaches a certain point. The only way to stop that is to introduce a new cap. Once that will seriously reduce the AI cashflow.

    That's it for now. I'll have one more go at it and then I'll have a look at Redmeth's and Sheep's scripts. Those might be more intuitive than mine. Or then the factions act differently cause I don't play with BI.exe.

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

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

  24. #174

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

    Quote Originally Posted by "The Errant"
    Or then the factions act differently cause I don't play with BI.exe.
    That could be something worth checking yes, as the ability of the AI to use boats to hassle someone abroad might contribute to something. Or maybe not.

    Even then I think a result is just a result. I think there is a need to have more than 1 result to able to compare judgements or reach better conclusions. 10 tests with the Casse might bear different results each time for the factions.

    It's something I'd like to test but unfortunately passing each turn in my computer takes an eternity.

  25. #175

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

    Quote Originally Posted by Dan_Grr
    That could be something worth checking yes, as the ability of the AI to use boats to hassle someone abroad might contribute to something. Or maybe not.

    Even then I think a result is just a result. I think there is a need to have more than 1 result to able to compare judgements or reach better conclusions. 10 tests with the Casse might bear different results each time for the factions.

    It's something I'd like to test but unfortunately passing each turn in my computer takes an eternity.
    I feel the same way. I try to test at LEAST twice before passing any judgement, mostly three times. My computer could handle it, but I don't have the patience to do 10 tests each time. At least in three you can start to see some general trends.

  26. #176
    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)



    Another one. Forgot to take a pic in 250 B.C so it's missing from the set. Three dead factions this time. Saba, Lusotana and Baktria.

    Baktrian nerfing worked somewhat. They were just unlucky to choose the wrong enemy. Going after the Ptolies. Good news though, their loss was the Sakas gain. First time I've seen AI controlled Saka expand in the right direction.

    Carthies and Ptolies roughly equal. For a moment it looked like the AS was gaining the upper hand pushing the Ptolies south to Egypt proper. But then they got into war with Pontos and Koinon while trying for Egypt. That changed the tide and the Ptolies prevailed.

    Neither Gallic faction moved on their own accord. They needed to move only when coming into contact with Rome and Sweboz.

    Pahlava as usual going after useless and poor steppe provinces. Damn. The Lusotana and Getai completely passive until threatened. Not good. Not good at all. Sweboz had a strange expansion going on for a while until they solified to a decent empire.

    Rome still too weak. It takes them an age to get out of Italy and by that time the Carthies are unstoppable. The Carthie economy is a monster. The seatrade in particular gives them an edge over everybody else. Scary.

    Epeiros wasn't moving until late in the game. Koinon was it's usual powerhouse and the Sauromatae were good at the beginning but they just can't get past that crappy Steppe economy.

    Great news! I actually saw a real life naval invasion without BI.exe. Our good friends the Macedonian cockroaches invaded and took Rhodos from the Koinon. Sweet.

    Another good piece of news is the new treasury cap is actuall working better than the old one. All factions now have a treasury cap of 200 000 mnai and once that sum gets exceeded the script automatically reduces some 150 000 mnai from whatever faction that gets such an insane treasury. Works wonders in keeping things in check.

    Bad news is I'm going to have to adjust the population bonuses for AI recruitment. The longer the game runs the larger the AI stacks get. And they are not few and far in between, either.

    Anyway here is the script: http://www.axifile.com?6997843

    Comments are as always welcome.

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

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

  27. #177

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

    Well in my game the Pahlava is quite good, (but im only in 240, dont have time for plaing). they and bactria are going the right direction. But the AS, stands it ground somehow, sometime lose, sometime win, while making some gains in the Levant. But the Ptolies are not planing on giving up on those teritories either.

  28. #178

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

    Im trying out your script Errand.

  29. #179

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

    Congrats to you all,Sheep,The Errant and Redmeth.Great work


    The Errant wrote:
    Bad news is I'm going to have to adjust the population bonuses for AI recruitment
    It is a very good idea.Again,congrats.

  30. #180
    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)

    OK. Finished the modifications to the script. It took me over two hours just to halve the population bonuses for the AI factions. I'm never doing this manually again.
    If this dosen't work I'll return to the original values but add a time trigger for the first 50 years. So after 220 B.C the population bonuses will stop completely. By that time most settlements should have sufficient population adding infrastructure, such as granaries, roads and markets, to still produce enough surplus population that can be drafted into the military.
    If the AI is still determined to empty their cities in order to fight a war, then let it. It's better than an endless and unrealistic war of attrition.

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

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

Page 6 of 9 FirstFirst ... 23456789 LastLast

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