Bucefalo
08-31-2009, 16:22
Some time ago my friend Ragnarök and me worked on a submod for the popular M2TW lotr mod TATW, it involved adding more resources on the map and increasing trade overall. This made the player have a lot more of money, so we had to balance it using some scripts.
I thought some of them are pretty interesting, as allow the endgame to be challenging and fix some of the flaws that we noticed with governors. I bring them here in case the EB team want to take a look at them or simply see some ideas. They were created by Ragnarök, so he deserves all merit, i only helped him with research and gave him the ideas about creating some of these scripts.
Let´s start with the scripts:
AI king purse: We eliminated the king purse for all factions (setting it to 0 in descr_strat), as the increased trade made up for it. Our objective was to eliminate all the constant sources of income, so that losing a city is really hurtful for your economy, and trade is very important. We thought that getting x money at the start of each turn for doing nothing and without risk of losing it was not fun, and as a human player we loved the increased challengeof having to take care of your economy. The ai faction kept the king purse as it helps them to never run out of money and compensates for the lack of brain.
This script gave the ai factions money each turn, representing giving back to them the king purse we took from them. This way the ai keep getting his king purse, but the player controled factions do not.
;==================AI King's Purse ========================================
monitor_event FactionTurnStart FactionIsLocal
and I_TurnNumber = 0
if I_IsFactionAIControlled england ;Mordor
increment_kings_purse england 3700
end_if
if I_IsFactionAIControlled france ;Isengard
increment_kings_purse france 4300
end_if
if I_IsFactionAIControlled hre ;OrcsMM
increment_kings_purse hre 4700
end_if
if I_IsFactionAIControlled spain ;Harad
increment_kings_purse spain 3000
end_if
if I_IsFactionAIControlled venice ;Rhun
increment_kings_purse venice 4000
end_if
if I_IsFactionAIControlled sicily ;Gondor
increment_kings_purse sicily 3000
end_if
if I_IsFactionAIControlled milan ;Rohan
increment_kings_purse milan 2700
end_if
if I_IsFactionAIControlled scotland ;Dale
increment_kings_purse scotland 2200
end_if
if I_IsFactionAIControlled moors ;Dwarves
increment_kings_purse moors 2200
end_if
if I_IsFactionAIControlled turks ;Eriandor
increment_kings_purse turks 1700
end_if
if I_IsFactionAIControlled egypt ;High Elves
increment_kings_purse egypt 1800
end_if
if I_IsFactionAIControlled mongols ;Silvan Elves
increment_kings_purse mongols 3200
end_if
increment_kings_purse papal_states 10
terminate_monitor
end_monitor
;================== More Trade scripts end =============================
Settlement cost: This script add a cost each turn for the maintainance of each settlement, this only starts kicking in after easy difficulty. In easy there is no costs at all, in medium it is 120, in hard 220 and in very hard 270. This numbers were balanced for the trade submod thought, and probably should be adjusted. The result of this script was that the more settlements you have, the more you have to pay for maintaining them, this make big empires amass less money and make expansion slower, so each settlement really counts and it is important to conserve it. The maintainance costs should be low enough so that all settlements always give at least some profit. Unless you want to make some settlement really bad, and costs you money to maintain it, in exchange for being able to recruit very good soldiers. There are many possibilities.
;================== Settlement Cost =====================================
declare_counter settlement_cost
monitor_event SettlementTurnEnd FactionIsLocal
and CampaignDifficulty = medium
console_command add_money -120
inc_counter settlement_cost 120
end_monitor
monitor_event SettlementTurnEnd FactionIsLocal
and CampaignDifficulty = hard
console_command add_money -220
inc_counter settlement_cost 220
end_monitor
monitor_event SettlementTurnEnd FactionIsLocal
and CampaignDifficulty = very_hard
console_command add_money -270
inc_counter settlement_cost 270
end_monitor
Field cost: Probably while playing M2TW you noticed the following: you can have two type of characters, generals or governors. Generals fight battles, and give bonus to the troops, while costing some money to maintain but generally it is worth it. Governors are generals who stay in settlements, they usually pick up some traits or ancillaries which makes you earn more money in that city or reducing costs of buildings etc. In M2TW their effects usually are negligible, unless your governor is extremelly good. For example, supposing that your mediocre governor give you an extra 75 money for the city. Well that´s good, but if his bodyguard has a upkeep of 375, then that is 300 money that you are losing every turn. No wonder why every M2TW player (specially those who care little about fair play or houserules) use all their characters as generals, and not as governors. To put it simple, currently in M2TW governors are useless, because they cost a lot more than what you gain by having them sitting on a town. To the solution, we changed the upkeep cost of all bodyguard units to 0, so now governors were profitable. But what about generals? They were now free and provided a lot of bonus to troops. We created a script that added a field cost to generals which are in the wilderness, so now, every general you want to use, you have to pay for him. Again this script only affects the player faction and not the AI, as the ai do not make differences between governors/generals.
And also, this script is designed so the higher the difficulty the more money generals cost to maintain on the field.
;==================== Field Cost ========================================
declare_counter field_cost
monitor_event CharacterTurnEnd FactionIsLocal
and not EndedInSettlement
and not AgentType = admiral
and not AgentType = spy
and not AgentType = princess
and not AgentType = merchant
and not AgentType = diplomat
and not AgentType = assassin
and not AgentType = priest
and not AgentType = captain
and CampaignDifficulty = medium
console_command add_money -100
inc_counter field_cost 100
end_monitor
monitor_event CharacterTurnEnd FactionIsLocal
and not EndedInSettlement
and not AgentType = admiral
and not AgentType = spy
and not AgentType = princess
and not AgentType = merchant
and not AgentType = diplomat
and not AgentType = assassin
and not AgentType = priest
and not AgentType = captain
and CampaignDifficulty = hard
console_command add_money -200
inc_counter field_cost 200
end_monitor
monitor_event CharacterTurnEnd FactionIsLocal
and not EndedInSettlement
and not AgentType = admiral
and not AgentType = spy
and not AgentType = princess
and not AgentType = merchant
and not AgentType = diplomat
and not AgentType = assassin
and not AgentType = priest
and not AgentType = captain
and CampaignDifficulty = very_hard
console_command add_money -300
inc_counter field_cost 300
end_monitor
;================== More Trade scripts end =============================
That´s all, i hope it was a interesting read, and provide you with some ideas about possible scripts.:2thumbsup:
I thought some of them are pretty interesting, as allow the endgame to be challenging and fix some of the flaws that we noticed with governors. I bring them here in case the EB team want to take a look at them or simply see some ideas. They were created by Ragnarök, so he deserves all merit, i only helped him with research and gave him the ideas about creating some of these scripts.
Let´s start with the scripts:
AI king purse: We eliminated the king purse for all factions (setting it to 0 in descr_strat), as the increased trade made up for it. Our objective was to eliminate all the constant sources of income, so that losing a city is really hurtful for your economy, and trade is very important. We thought that getting x money at the start of each turn for doing nothing and without risk of losing it was not fun, and as a human player we loved the increased challengeof having to take care of your economy. The ai faction kept the king purse as it helps them to never run out of money and compensates for the lack of brain.
This script gave the ai factions money each turn, representing giving back to them the king purse we took from them. This way the ai keep getting his king purse, but the player controled factions do not.
;==================AI King's Purse ========================================
monitor_event FactionTurnStart FactionIsLocal
and I_TurnNumber = 0
if I_IsFactionAIControlled england ;Mordor
increment_kings_purse england 3700
end_if
if I_IsFactionAIControlled france ;Isengard
increment_kings_purse france 4300
end_if
if I_IsFactionAIControlled hre ;OrcsMM
increment_kings_purse hre 4700
end_if
if I_IsFactionAIControlled spain ;Harad
increment_kings_purse spain 3000
end_if
if I_IsFactionAIControlled venice ;Rhun
increment_kings_purse venice 4000
end_if
if I_IsFactionAIControlled sicily ;Gondor
increment_kings_purse sicily 3000
end_if
if I_IsFactionAIControlled milan ;Rohan
increment_kings_purse milan 2700
end_if
if I_IsFactionAIControlled scotland ;Dale
increment_kings_purse scotland 2200
end_if
if I_IsFactionAIControlled moors ;Dwarves
increment_kings_purse moors 2200
end_if
if I_IsFactionAIControlled turks ;Eriandor
increment_kings_purse turks 1700
end_if
if I_IsFactionAIControlled egypt ;High Elves
increment_kings_purse egypt 1800
end_if
if I_IsFactionAIControlled mongols ;Silvan Elves
increment_kings_purse mongols 3200
end_if
increment_kings_purse papal_states 10
terminate_monitor
end_monitor
;================== More Trade scripts end =============================
Settlement cost: This script add a cost each turn for the maintainance of each settlement, this only starts kicking in after easy difficulty. In easy there is no costs at all, in medium it is 120, in hard 220 and in very hard 270. This numbers were balanced for the trade submod thought, and probably should be adjusted. The result of this script was that the more settlements you have, the more you have to pay for maintaining them, this make big empires amass less money and make expansion slower, so each settlement really counts and it is important to conserve it. The maintainance costs should be low enough so that all settlements always give at least some profit. Unless you want to make some settlement really bad, and costs you money to maintain it, in exchange for being able to recruit very good soldiers. There are many possibilities.
;================== Settlement Cost =====================================
declare_counter settlement_cost
monitor_event SettlementTurnEnd FactionIsLocal
and CampaignDifficulty = medium
console_command add_money -120
inc_counter settlement_cost 120
end_monitor
monitor_event SettlementTurnEnd FactionIsLocal
and CampaignDifficulty = hard
console_command add_money -220
inc_counter settlement_cost 220
end_monitor
monitor_event SettlementTurnEnd FactionIsLocal
and CampaignDifficulty = very_hard
console_command add_money -270
inc_counter settlement_cost 270
end_monitor
Field cost: Probably while playing M2TW you noticed the following: you can have two type of characters, generals or governors. Generals fight battles, and give bonus to the troops, while costing some money to maintain but generally it is worth it. Governors are generals who stay in settlements, they usually pick up some traits or ancillaries which makes you earn more money in that city or reducing costs of buildings etc. In M2TW their effects usually are negligible, unless your governor is extremelly good. For example, supposing that your mediocre governor give you an extra 75 money for the city. Well that´s good, but if his bodyguard has a upkeep of 375, then that is 300 money that you are losing every turn. No wonder why every M2TW player (specially those who care little about fair play or houserules) use all their characters as generals, and not as governors. To put it simple, currently in M2TW governors are useless, because they cost a lot more than what you gain by having them sitting on a town. To the solution, we changed the upkeep cost of all bodyguard units to 0, so now governors were profitable. But what about generals? They were now free and provided a lot of bonus to troops. We created a script that added a field cost to generals which are in the wilderness, so now, every general you want to use, you have to pay for him. Again this script only affects the player faction and not the AI, as the ai do not make differences between governors/generals.
And also, this script is designed so the higher the difficulty the more money generals cost to maintain on the field.
;==================== Field Cost ========================================
declare_counter field_cost
monitor_event CharacterTurnEnd FactionIsLocal
and not EndedInSettlement
and not AgentType = admiral
and not AgentType = spy
and not AgentType = princess
and not AgentType = merchant
and not AgentType = diplomat
and not AgentType = assassin
and not AgentType = priest
and not AgentType = captain
and CampaignDifficulty = medium
console_command add_money -100
inc_counter field_cost 100
end_monitor
monitor_event CharacterTurnEnd FactionIsLocal
and not EndedInSettlement
and not AgentType = admiral
and not AgentType = spy
and not AgentType = princess
and not AgentType = merchant
and not AgentType = diplomat
and not AgentType = assassin
and not AgentType = priest
and not AgentType = captain
and CampaignDifficulty = hard
console_command add_money -200
inc_counter field_cost 200
end_monitor
monitor_event CharacterTurnEnd FactionIsLocal
and not EndedInSettlement
and not AgentType = admiral
and not AgentType = spy
and not AgentType = princess
and not AgentType = merchant
and not AgentType = diplomat
and not AgentType = assassin
and not AgentType = priest
and not AgentType = captain
and CampaignDifficulty = very_hard
console_command add_money -300
inc_counter field_cost 300
end_monitor
;================== More Trade scripts end =============================
That´s all, i hope it was a interesting read, and provide you with some ideas about possible scripts.:2thumbsup: