Page 1 of 4 1234 LastLast
Results 1 to 20 of 77

Thread: Playing around with the money script (and finding things out on the AI)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Playing around with the money script (and finding things out on the AI)

    I have made some changes to the EB money script (that section 4 in the EBS that provides the bigger AI factions with unlimited money). The reason was that I was fighting AS, I became ascoumted to the two or three major battles every turn, but what made me realy angry were his four diplomats that run around on my lands and bribed away every unit that was outside a settlement. Of course, when AS is getting 36,000 mne extra every turn they can afford for such funny things.

    For me, that was the point when I said 'enough is enough'. I had made two Casse-tests (starting as Casse and simply hit a hundred times 'end turn'):

    The first one without money script. It didn't realy do what I wanted: Rome, Karthago, Seleucia, Greece and Ptolemaia were doing well but the others were ruined by their starting armies. Of course, that problem should have been solved as soon as they had attacked the first Eleutheroi town and suffered heavy casualties, reducing their army to an affordable size. But when they had waited to long to do so, they were already so deep in the red that they will never (or not in a century) recover.

    For the second test I had modified the script by raising the extra money per town to 5,000 (help! they're getting even more money!) but only if treasury is under 0. Meaning that factions that can look for themselves, like Rome, AS or Carthago don't get any extra money at all while the smaller factions get much more money than before - up to the point when they were able to run their own economy.

    The result was very fine, if not to say exciting! After 100 turns most of the Eleutheroi towns were still alive, even those in northern Italy and the Arabians that are bordering AS and Pt. There was no Roman Empire in Poland and no Selucids expanding North, South, East and West at the same time.

    I had dozends of turns toggled fow off to see if they were doing anything at all and found out: What they were doing was fighting each other with passion (I will add some screenshots later).
    • The Gauls were fighting each other to exhaustion.
    • The Romans took Taras, Rhegio and Bononia and than attacked Karthago and the Aedui at the same time
    • Epiros had two full stacks standing static along the Adriatic until the Romans took Taras, then those two stacks marched east and blitzed Makedonia and Thessaly.
    • AS and Ptoly were fighting each other but were not able to replace all the casualties and so not much able to go for anyone else. AS was even drawing garrisons out of some towns and loosing those to rebellion. They even managed to loose control over Antiochia for some turns!
    • Saba was slowy but steady expanding in southern Arabia, undisturbed by both AS and Pt.
    • The best job did the Nomands, Phalava and Baktria do: They were at war with each other (the two Nomands vs. the two Satrapies) while the Parthians also acted as 'cleaners' for NE-Seleucia: every town that AS losed there to rebellion was a few turns later attacked and taken by Phalava.
    Whatching the AI, it seems that a priority list: "1st Eleutheroi, 2nd Human Player, 3rd Ohter AI factions" doesn't exsist. To decide whom to attack next it seems to calculate the relative strength of both sides. With the EBS any AI faction is unbelivable strong and so the AI will avoid war with these as much as possible. The human faction is usually much weaker and will become a target. Compared to this, the Eleutheroi are the weakest will be attacked first.

    But now the AI factions weren't able to replace all their casualties from their inital attacks on Eleutheroi towns or from their starting wars and might had become targets for their neighbours. And that's what we want them to do: Fighting epic wars for the lands around the Mediterranian and not go and bulid empires elsewhere.



    BTW, the AI isn't as stupied as I always thought: it is trying to merge stacks, for example, but only gives the command to move to the stack that is supposed to join the other stack, but not the command to wait for the reciving stack. Then again it breaks down larger stacks and tries to encircle the opponent before the attack. I had even observed, what I had called "Operation Eagle", the Baktrians moveing four 1/2 stacks around Saka lands without entering them and then starting the invasion with all four armies on the same turn from different directions.

  2. #2
    boofhead's Avatar Dux Limitis
    Join Date
    Aug 2006
    Location
    Mining Country, Outback Australia.
    Posts
    19,332

    Default Re: Playing around with the money script (and finding things out on the AI)

    There is also the -ai command you can put at the end of your shortcut to test this kind of thing also; the AI will control every faction start to finish and you can just watch......saves having to have human control of one faction.

  3. #3

    Default Re: Playing around with the money script (and finding things out on the AI)

    Impressive! But how do they (AI) behave about humans in a real play... I mean, if the human is not only ending turn... If the keep such behaviour and do not became too weak to fight Human players, that will be a great finding!!! Would you, after proper testing, share the modificated file? (only with this modification and no other)

  4. #4
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Playing around with the money script (and finding things out on the AI)

    I have used this script also for some turns of the Pontic campaign (that one where it bribed all my armies away). The treasury of the big factions instandly nosedived. Most of the factions were ruined anyhow before that; but the Sweboz and Makedonia did recover after I had launched the altered script. So, there are situations in which the factions are not given enough money by the EBS.

    What had happend so far: Epeiros, Greece and Makedonia signed a peace; Epeiros and Greece also allied. AS withdraw most of her forces to the cities, leaving only one larger army in Syria to fight Ptolemai. Rome declared war on Karthago

    Spoiler Alert, click show to read: 
    BTW, since then there is a Karthagian full stack led by a Hasdrubal south of the Ebro even so the Karthagians do not control any land around. This is much to perfect and I supsect it's scripted. But it will be fun to see what's happening next.


    But all this might as well be by random and it is much to early to say that the EBS is responsible for the AI's 'misbehaviour'. I will go on with this campaign and start a new one later to see what's happening. I will also start a new Casse-Test on the weekend or next week.
    Last edited by konny; September 14, 2007 at 10:30 AM. Reason: it is factionS not faction

  5. #5

    Default Re: Playing around with the money script (and finding things out on the AI)

    i also want your file with the second test (money script: when a faction has under 0 money add 5000 money per town)!
    pleeeaaassseee!
    Play "Holodance"
    The ultimate dancing game now in early access on steam!

    http://store.steampowered.com/app/42..._7_7_230_150_1

  6. #6

    Default Re: Playing around with the money script (and finding things out on the AI)

    I would not mind to test your script with Carthage or Epeiros

  7. #7
    Paul d's Avatar Praepositus
    Join Date
    Oct 2006
    Location
    Lost in the New Real
    Posts
    5,424

    Default Re: Playing around with the money script (and finding things out on the AI)

    very good find. hope it becomes public(for download) soon.

  8. #8
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Playing around with the money script (and finding things out on the AI)

    My fault, I must apologize. I had forgotten to upload the script last night (I don't have EB on this computer and no internet on the laptop with EB, so I have to move files around with the USB stick). I hope I will do so tonight.

    If you don't want to wait, you can do it manuel, it's quite easy:

    (Make a backup of the original EBBS_Script first!). Open EBBS_Script with notepad and search for "4b" until you have found the "Section 4b: City Income Bonus". There add a line

    and Treasury < 0

    under "and not FactionIsLocal" and set "add_money" to 5000

    Do it for every faction, save, done. It's savegame compatible.

    What does it do technicaly: When the turn of the AI faction starts, the script checks for every town; one after the other. If the treasury is in the red it will add 5,000 mne. If the treasury is still under 0 after that it will add another 5,000 mne when checking the next settlement. The script will go on in that way until either the last town of the faction is checked or until the treasury is over 0.

    Example:
    An AI faction has 3 towns and -7,000 mne. On turn start the script adds 5,000 for the first town; makes -2,000 mne. So the script adds another 5,000 mne for the second town; makes +3,000 mne. But no money will be given for the third town because then treasury is already 'green'.

    This faction might make a 4,000 mne minus every turn and will start the next turn with -1,000 mne. The script will intercept once more setting the money to above 0. So, the maximun a faction gets by this is 4,999 mne for starting the turn with -1 mne.


    Basicly the script keeps the money of non-profitable faction around 0, allowing them to recover once the economic problem (usually the large starting army compared to the few towns) is solved. Of course, there will be as well situations in which the script wont help, for example a 1-town faction is makeing 6,000 minus every turn. The script will assist with 5,000 every turn but the faction will slide deeper into the red with -1,000 every turn.

    If that faction sits around for 20 turns it will have -20,000 mne. But if they take a second town the next turn and lose large parts of the army by this the script will add 10,000 every turn help them to recover in 2 turns. Now balances should be positive and the faction can start a normal in-game economy.


    --------------------------------------------------------------------


    I have started a new campaign now with this script from the start and an active human faction (Pontos):




    Yeah, here we come!

    Now, let's take a look what the others are doing:



    We are looking at Syria, and we can clearly see that we don't see anything. Both 'monsters' are sitting around in their towns. But the Ptolemaii have a huge problem with rebell armies down in Egypt. May be they will come back after that is solved. AS is completly static, even so they are the richest factions. That is very fine because it allows the smaller faction to grow.



    Now this is sweet little Armenia. Very fine, they have united the Kaukasus and are still expanding. Their army is of a reasonable size for a faction with four settlements. I am looking foreward to that war...



    Another one. Parthia is doing exactly the same as one the test: They are attacking the Saka (up right) and go for the towns that AS looses due to rebellion (down left).



    And here we have a wannabe empire in problems. Rome has this time not done what I expected. Instead of thorwing the Epirote out of Taras they made silly assaults on Rhegon. That failed but it left the garrison so reduced that Epirus could take it some turns later. They even messed it up more by marching their only remaining stack north while the Epirotes took Capua and are now besiegeing Arpi. Fortuna helped that they sinked the only ship of Pyhrros so his main army (right) isn't able to ship to Italy. And the AI is not able to figure out the land route. Please note that Epirus has shown no interesset in the Eleutheroi settlements along the Danube so far.
    Last edited by konny; September 15, 2007 at 03:58 AM.

  9. #9

    Default Re: Playing around with the money script (and finding things out on the AI)

    Really nice, I shall try the script change in a new Kart-haddastim campaing, more to come ...

  10. #10

    Default Re: Playing around with the money script (and finding things out on the AI)

    I'm confused about the edit: should I replace any text with yours or just add it to the "and I_NumberOfSettlements seleucid < 20", etc..?

  11. #11
    Paul d's Avatar Praepositus
    Join Date
    Oct 2006
    Location
    Lost in the New Real
    Posts
    5,424

    Default Re: Playing around with the money script (and finding things out on the AI)

    just add what he said to.

  12. #12

    Default Re: Playing around with the money script (and finding things out on the AI)

    you will only change the ammount of money from the regular 1200 to 5000. the additon of and treasury < 0 is bellow the "and not FactionIsLocal" and before the rest of the text

  13. #13

    Default Re: Playing around with the money script (and finding things out on the AI)

    Thanks LM

  14. #14
    Paul d's Avatar Praepositus
    Join Date
    Oct 2006
    Location
    Lost in the New Real
    Posts
    5,424

    Default Re: Playing around with the money script (and finding things out on the AI)

    aye at first i had an error; couldn't click the show me button, but i figured it out; put the lines in the wrong section lol. me spazzy

  15. #15

    Default Re: Playing around with the money script (and finding things out on the AI)

    Ten years of developmant, till now the behavior is the same before, think it is too early in the game yet

  16. #16

    Default Re: Playing around with the money script (and finding things out on the AI)

    Twenty years and still no newa, perhaps I have not made the alteration in a proper manner, please Kony, as soon as possible paste the altered text here so I can see what I may have done wrongly... Anyway, till now, every faction is behaving in a very similar way they used to. , Still testing though

  17. #17
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Playing around with the money script (and finding things out on the AI)

    @ Callicles

    You are in section 4a. Scroll down a little to section 4b "Section 4b: City Income Bonus"


    It should look like this:

    monitor_event SettlementTurnStart FactionType pontus
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money pontus, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType carthage
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money carthage, 5000

    end_monitor

    etc.

    Please ensure that you take the original script not one of the variants that are around.


    That is the full code:

    Spoiler Alert, click show to read: 

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Section 4b: 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 pontus
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money pontus, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType carthage
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money carthage, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType germans
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money germans, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType egypt
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money egypt, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType romans_brutii
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money romans_brutii, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType armenia
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money armenia, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType numidia
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money numidia, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType romans_julii
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money romans_julii, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType greek_cities
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money greek_cities, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType thrace
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money thrace, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType macedon
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money macedon, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money seleucid, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType spain
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money spain, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType gauls
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money gauls, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType scythia
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money scythia, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType britons
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money britons, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType dacia
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money dacia, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType romans_scipii
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money romans_scipii, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType parthia
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money parthia, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType saba
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money saba, 5000

    end_monitor

    monitor_event SettlementTurnStart FactionType slave
    and not FactionIsLocal
    and Treasury < 0

    console_command add_money slave, 5000

    end_monitor




    @ Lećo magno

    Please check the money ranking of AS (the diagrams that can be found under the faction overview screen). With the original script AS is getting around 30,000 mne extra every turn and should be much over 100,000 around turn 10, with the changes the balances should be stable between around 10,000 and 30,000.


    Here is a sample:



    The white line shows the treasury (may also be profit, I am not sure) of AS who has not got any money by the script so far. The blue line shows Armenia, who has done every right so far and now even attacked AS! They were helped out until the size of the empire matched the size of the army and from then are running an economy on their own.

    If those lines look dramaticly different in your game, espacially if the large factions are makeing tons and tons of money, than you are still running the old script.

    I have attached the scipt ziped. Just unzip it in the show me folder.

    ---------------------------------------------------------------------------

    Edit: When you test it, take your time to toggle_fow off from time to time (I do it every fourth turn) to observe the AI movements. It still makes attacks on Eleutheroi towns even when on war with another faction, but these attacks fail in 9 out of 10 times. They also do so with the old EB-Script, because the Eleutheroi towns are to much guarded and the AI usually doesn't send more men than absolutly needed.

    The difference is that now the large factions do not have five or six full stacks in reserve that can either attack other free towns in the same time or anew the siege the next turn or defend all of their own towns against enemy attacks. So there are more successfull attacks on settlements of other factions than on free towns. And taking a faction's town usualy causes a reaction by other factions, at least by the former owner.


    In the recent game Rome isn't able to take Bononia (what had become their Verdun so far, if they don't look out it will be their Stalingrad as well). That allowed Epirus to make good advances in Southern Italy. On the other hand the Epirotes still had not figured out how to get reinforcements to Italy and so the Romans are able to strike back every turn, but not able to hold their ground when all reinforcements are moved north. The result is that Rome wont be able to advance to the Alps, save the Danube or even Poland as long as they do not controll all of Italy.

    In the East, Epirus has taken Dalmatia but got a terrible beating when attacking Thermon (I suppose, because the garrison there was much reduced the next year, one of the two Epirote stacks had disapeared and they were suddenly at war with KH). That was an invitation for the Maks who sent an army from Demetrias and attacked the Epirote forces in the Albanian mountains.

    And that is the point when the script comes into play: Epirus has now lost most of the army that had broken her financially before. The script will now add 25,000 mne every turn until they have recovered, that will happen much faster than with the original script. But from then it will take a longer time before they have a strong army again.

    And that's what I want to see: decisive battles and wars that fought to exhaustion. Not the neverending clash of unlimited armies.
    Last edited by konny; September 16, 2007 at 04:52 AM.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  18. #18

    Default Re: Playing around with the money script (and finding things out on the AI)

    I am in a new Karthadastim test, I had the modifications done the rigth way as much as I can see, AS is more than 40000 in 271 and Averni are attacking two or three Eleutheroi settlements at the same time, unfortunetly, for some unknown reason, in this new computer I own, I can not take a single picture of the game to show you the development, after I press the print screen button when I try to glue the image in Paint it only appears a black screen... don't know if it has somethng to do with the Vista windows or with the Radeon express 1100, anyway,
    I will continue the test, I have been watching (fow off) every turn and for now, did not see for time enought for some factions get their armies kicked, more info to come on monday

  19. #19
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Playing around with the money script (and finding things out on the AI)

    The factions are getting extra money for the start, and of course, have that huge armies they start with. So, the start will be exactly the same as in any previous game. The pictures I had uploaded are from the 260s. Around this date you should see a difference.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  20. #20
    joerd9's Avatar Decanus
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    578

    Default Re: Playing around with the money script (and finding things out on the AI)

    Sounds very interesting. I will give it a try tonight.

Page 1 of 4 1234 LastLast

Posting Permissions

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