Where is a step by step for how to impliment some sort of cash script for AI?
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
House of Ward ~ Patron of Eothese, Mythic_Commodore, Wundai, & Saint Nicholas
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.
Something like this:
That needs to be added into campaign_script.txt in the Medieval II Total War\data\world\maps\campaign\imperial_campaign\ folder.Code:monitor_event FactionTurnEnd and FactionType spain and not FactionIsLocal add_money spain 10000 end_monitor
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
House of Ward ~ Patron of Eothese, Mythic_Commodore, Wundai, & Saint Nicholas
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
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
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.
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
Alrighty, thanks. Just wanted to get another opinion before I started screwing with scripts and possibly breaking my game >_<