-
April 11, 2010, 08:55 AM
#1
Regulating AI recruitment / upkeep
Regulating AI recruitment / upkeep
----------------------------------
As we know, left to its own devises, the AI will keep recruiting units, even if it cannot, in the long-term, afford the upkeep.
Extensive testing has revealed that using the freeze_recruit_pool command simply doesn't work in any usable way, it freezes recruitment across all factions every time it fires. Not only does it freeze recruitment but it also resets the replenishment pool every turn it does so. Net result, if 1 faction is permanently bankrupt, no-body else can recruit anything.
Which leaves two - options -either some sort of fudge which wipes the AI debts each turn, effectively making the AI economy redundant, or we devise a method of restricting recruitment and retention of units so the AI economy functions in much the same way that human players work their own.
The method of selective destroying categories of units has been established to work, based on attributes we can give to units in the EDU. This has been shown to work for crusade/ jihad units; units obsolete by a certain date, mercenaries if the Treasury is too low, and now noble units. However to really work properly it needs to be extended to cover more unit. We also need to use an event_counter to check how much the AI has in the Treasury at the start of the turn to see if it can afford more units.
It is suggested then the at the categories of units to be covered are:
Noble
Generic mercenaries
Local mercenaries (AoR units)
Professionals
Militia
Artillery
Ships
The minimum amount in the Treasury to enable a faction to build each type of unit would be as follows:
Noble 50,000
Militia 20,000
Artillery 40,000
Ships 20,000
A simple script along the lines of
monitor_event FactionTurn Start not FactionIsFaction
FactionType aragon
and Treasury > 49,999
set_event_counter aragon_can_recruit_nobles 1
end_monitor
monitor_event FactionTurn Start not FactionIsFaction
FactionType aragon
and Treasury < 50,000
set_event_counter aragon_can_recruit_nobles 0
end_monitor
Then in the EDB we have requires aragon_can_recruit_nobles 1 as a necessary condition to allow aragon to recruit them.
Mercenaries not recruited in the EDB will be picked up by the AI as and when it can recruit them, they will be subject to the minimum money script below to restrict their retention on a turn-by-turn basis.
---------------------------------------------------------------------------------------
To this we add a script to remove noble units if the Treasury has insufficient money
monitor_event FactionTurnStart not FactionIsLocal
and FactionType aragon
and I_TurnNumber > 10
and not I_CrusadeInProgress
and Treasury < 10,000
destroy_units aragon, noble_unit
end_monitor
The values of the other units would be:
Militia - 10,000
Ships 0
Professionals 0
Artillery 20,000
Nobles 25,000
Generic Mercenaries 10,000
Local Mercenaries 5,000
----------------------------------------------------------------------------------------
Hopefully such a system will keep happy players wanting the AI to have the same restrictions on their economy as human players. We can still give the AI economic bonuses to help balance the situation, but it should ensure that any stack spamming will be of a temporary nature. More widespread use of the obsolete by function should help remove old units and have them replaced by better, if more expensive ones.
The situation with ships needs to be reviewed - we don't really want to have the AI lose entire fleets overnight, especially if they have a lot of troops on board.
Exact numbers for Treasury cut-off points are open to debate.
For the system to work, the EDB needs to be totally re-written with every faction having their own entries for each unit.
It would help if local mercenaries (AoR units) were removed from barracks and made available to all factions in the region in the same manner as generic units.
The proposed garrison units will not be affected by this as they will have 0 recruitment cost and upkeep.
-
April 12, 2010, 02:24 PM
#2
Re: Regulating AI recruitment / upkeep
Damn, you have a lot of good ideas.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules