Results 1 to 30 of 260

Thread: Fixing the AI money script (preliminary tests)

Hybrid View

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

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

    Quote Originally Posted by Redmeth
    What worries me is that factions that start out big (Seleucids, Ptolies) and receive a smaller bonus will have trouble developing their infrastructure and that is not good, I know that for the first 5 years(?) or so the AI gets larger bonuses but maybe for the first 10-20 years everyone should get the 1200 per turn including the big factions and these modified bonuses that depend on size should kick in after they had time to build their infrastructure (mines, ports, roads) and affect the spawning of elite stacks not stopping them from having a proper infrastructure or their ability to train elite troops (high level MICs in most provinces)
    You may be on to something...

    Here is 225bc, and Seleukia is getting raped.

    And they aren't using lube.


  2. #2

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

    Quote Originally Posted by Dayve
    You may be on to something...

    Here is 225bc, and Seleukia is getting raped.

    And they aren't using lube.
    So would there be a way to make it a trigger dependent on year? They would get a big boost the first few decades then decreasing amounts as the years roll by.....
    Slainte!!

  3. #3

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

    Quote Originally Posted by Wolfshart
    Quote Originally Posted by Dayve
    Quote Originally Posted by Wolfshart
    What worries me is that factions that start out big (Seleucids, Ptolies) and receive a smaller bonus will have trouble developing their infrastructure and that is not good, I know that for the first 5 years(?) or so the AI gets larger bonuses but maybe for the first 10-20 years everyone should get the 1200 per turn including the big factions and these modified bonuses that depend on size should kick in after they had time to build their infrastructure (mines, ports, roads) and affect the spawning of elite stacks not stopping them from having a proper infrastructure or their ability to train elite troops (high level MICs in most provinces)You may be on to something...
    Here is 225bc, and Seleukia is getting raped.

    And they aren't using lube.
    So would there be a way to make it a trigger dependent on year? They would get a big boost the first few decades then decreasing amounts as the years roll by.....
    Taking away all the bonuses for the large factions was a mistake. Try the new version of the script out, it gives them more help. I'm already seeing a significant change in the Seleukids. They are able to defend their own lands but don't seem to be the expansionist monsters you see with the unmodified EB script. Granted I have not even finished my first test run but it is 240 and their borders are nearly unchanged - a little smaller in the east, a little larger in the southwest and north to make up for it.

    Your idea about year-dependent bonuses is a good one. The EB script already gives extra bonuses to smaller factions for the first 20 turns but that wouldn't apply to the AS.
    Last edited by Sheep; 04-20-2007 at 22:12.

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

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

    So is this possible, Sheep? Could you give different money bonuses depending on years passed? Another trigger to lower the bonuses to what they are right now (as in the script you posted today or yesterday) would be that if during the say 20 years of added bonuses for infrastructure their treasury would exceed 200k they would start getting only the normal bonuses.
    I know a bit about programming but from what I understand the RTW-script language is pretty crappy and you can't really use too many if's and no variables or even % operations...

  5. #5

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

    Quote Originally Posted by Redmeth
    So is this possible, Sheep? Could you give different money bonuses depending on years passed? Another trigger to lower the bonuses to what they are right now (as in the script you posted today or yesterday) would be that if during the say 20 years of added bonuses for infrastructure their treasury would exceed 200k they would start getting only the normal bonuses.
    I know a bit about programming but from what I understand the RTW-script language is pretty crappy and you can't really use too many if's and no variables or even % operations...
    All of this can be done quite easily.

    The I_TurnNumber command can be used to specify a certain number of turns (4 turns = 1 year obviously)

    The Treasury command can be used to specify a certain amount in the treasury.

    If you look at the script file, in Section 4a: Difficult Start Help, you can see how to use these commands.

    As an example, try this:
    Code:
    ;Rome
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_TurnNumber < 41
    
    console_command add_money seleucid, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid < 4
    and I_TurnNumber > 40
    
    console_command add_money seleucid, 1200
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid < 9
    and I_NumberOfSettlements seleucid > 3
    and I_TurnNumber > 40
    
    console_command add_money seleucid, 1000
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid < 16
    and I_NumberOfSettlements seleucid > 8
    and I_TurnNumber > 40
    
    console_command add_money seleucid, 800
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid < 25
    and I_NumberOfSettlements seleucid > 15
    and I_TurnNumber > 40
    
    console_command add_money seleucid, 600
    
    end_monitor
    
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    and I_NumberOfSettlements seleucid > 25
    and I_TurnNumber > 40
    
    console_command add_money seleucid, 300
    
    end_monitor
    This code will give them the original 1200mnai bonus for the first 10 years of the game, then change to the stepped bonus after that. You can change the number of turns just by changing the value after I_TurnNumber. You will need to copy and paste this code for each faction. Don't forget to change the faction name in each and every instance it appears.

    If you wanted to change it so that the bonuses are dependent on the amount in the treasury, simply change every instance of "I_TurnNumber" to "Treasury" and then change the value to whatever you want (Treasury > 200000 or whatever)
    Last edited by Sheep; 04-20-2007 at 23:56.

  6. #6

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

    The above code was what I was looking for, but didn't have a good enough knowledge to make it work. It should allow for greater dynamic gameplay if the code is applied to all factions equally, depending on how well the ai does for each faction. Thank you Sheep for taking the time write it up, as it is much appreaciated.
    Help make developers understand the importance of game AI and earn credits as a Game Designer. The Restaurant Game Project

  7. #7

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

    Quote Originally Posted by Gaias
    The above code was what I was looking for, but didn't have a good enough knowledge to make it work. It should allow for greater dynamic gameplay if the code is applied to all factions equally, depending on how well the ai does for each faction. Thank you Sheep for taking the time write it up, as it is much appreaciated.
    No prob, three minutes of work.

    Test it and let us know how it goes. Preferably with some pretty pictures

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