Results 1 to 15 of 15

Thread: Money script?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Money script?

    Where is a step by step for how to impliment some sort of cash script for AI?

  2. #2
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Money script?

    What are you looking to do with this cash script? Reward the AI for capturing cities, give the AI a money boost every turn, give the AI a money boost once, etc.?

    Cheers,
    Augustus

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Money script?

    Welcome to the "I want a sensible AI' club.










  4. #4

    Default Re: Money script?

    Give them extra money every turn

  5. #5

    Default Re: Money script?

    If you just want them to simply have more cash going in, you should just increase their kings purse.
    That dosen't necessarily make them any better to play against, you see the more money you give them the more troops they can recruit and the more their upkeep goes up to match. End result, a lot of broke AI factions who can't advance their settlements or afford to recruit troops in key threaterned areas.

  6. #6

    Default Re: Money script?

    Your suggestion does nothing for the end user. I would have to change the kings purse for each kingdom depending who I want to play with. I want a script that does it for all of them.

  7. #7
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Money script?

    Something like this:

    Code:
    monitor_event FactionTurnEnd
            and FactionType spain
            and not FactionIsLocal
    
                add_money spain 10000
    end_monitor
    That needs to be added into campaign_script.txt in the Medieval II Total War\data\world\maps\campaign\imperial_campaign\ folder.

    That should give 10,000 gold to spain each turn if you aren't the controller of spain. That script would be duplicated for every faction. There's another parameter which might help which is turn-based. So if turn is before 50, they get 5,000, below 100, they get 10,000, above 100 they get 20,000 or something similar. I could see about adding that in later if I ever get my internet back and you think that would be useful.

    Cheers,
    Augustus

  8. #8

  9. #9

    Default Re: Money script?

    Hello.

    I'd like to give money to the AI when it's indebted. Small kingdoms would get 5000, and every extra 5 regions (or 4 in the first step) would grant additional funds (4000, 3000, 2000 and 1000). I picked several piece of scripts and tried to make mine. Could anyone tell me if this script would work please ?

    Code:
    	monitor_event FactionTurnStart FactionType spain
    		and IsFactionAIControlled
    		and LosingMoney
    		and Treasury < 0
    
    		add_money spain 5000
    
    		if I_NumberOfSettlements spain > 4
    		add_money spain 4000
    		end_if
    
    		if I_NumberOfSettlements spain > 9
    		add_money spain 3000
    		end_if
    
    		if I_NumberOfSettlements spain > 14
    		add_money spain 2000
    		end_if
    
    		if I_NumberOfSettlements spain > 19
    		add_money spain 1000
    		end_if
    
    	end_monitor

  10. #10

    Default Re: Money script?

    Here are the scripts I'm using. I don't remember which mod I took them from... again using Spain as an example

    Code:
    ;------------------- AI DEBT -------------------;
        monitor_event FactionTurnStart FactionType spain
            and IsFactionAIControlled
            and Treasury < -15000
            
                add_money spain 20000    
            
        end_monitor
    ;------------------- AI LAST STAND BONUS -------------------;
        monitor_event FactionTurnStart FactionType spain
            and I_TurnNumber > 25
            and I_NumberOfSettlements spain < 2
            and IsFactionAIControlled
            
                add_money spain 10000
    
            terminate_monitor    
            
        end_monitor

  11. #11

    Default Re: Money script?

    it comes from an official kingdom mod. Thanks for your reply, I'll use this shortened version with the losingmoney condition for the sake of saving loading time.

  12. #12

    Default Re: Money script?

    Recently I've been crawling through the forums looking for a way to disable the AI money script. I don't know about anyone else but I personally hate this aspect of the game. I used the directions on how to make an AI money script to trace the path through the files of the mod I'm using and have found the mod's AI money script. However, I'd like to ask before deleting the script if there's a certain way I should to it: should I just change the 700, 800, 900 (etc..) gold bonus values to 0, or just delete the entire script line (example shone below):

    if I_IsFactionAIControlled england
    increment_kings_purse england 900

  13. #13
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Money script?

    My suggestion is to change the numbers, you might want to fiddle around with it later on.










  14. #14

    Default Re: Money script?

    Alrighty, thanks. Just wanted to get another opinion before I started screwing with scripts and possibly breaking my game >_<

  15. #15
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Money script?

    One is glad to be of service










Posting Permissions

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