Before we go over the steps it's important that we learn a bit about how AI functions. The AI will have a list of tasks that it needs to do sorted by an enigmatic priority. It can assign multiple tasks at once, assuming it has the ability to do so. For example, a building can only train or upgrade one at a time. To prevent issues it's best to add the AI only upgrade to something that can't build/upgrade/train anything at the start of the match.
- 1. Create your AI only upgrade.
- Owner_type: player.
- All costs: 0.
- Ui_position: -1.
- Owner_type: player.
- 2. Add the upgrade to ai_economy\default, or a custom ai_economy if your mod uses one.
- Player_upgrades
- utility: 1000
- utility_random_range_offset: -1.
- utility: 1000
- Upgrades
- per_unit_scale: 1
- per_unit_scale_historical: 1
- utility: 1000
- utility_random_range_offset: -1.
- per_unit_scale: 1
- Player_upgrades
- 3. Assign the entity which will do the upgrading. As mentioned before you wouldn't want it on something that could conflict with it upgrading. Here are the entities I've used:
- AEF: armor_command_mp
- Brit: brit_weapon_rack_bren_lmg_mp
- OST: german_hq_mp
- OKW: west_german_hq_mp
- SOV: hq_mp (untested, might not work)
- AEF: armor_command_mp
- 4. Add the upgrade to the each army category.
- Ai_production_info
- create new unlocking_upgrade_info
- Upgrade_pbg: your AI only upgrade
- All other fields here must be filled, it doesn't matter what is there.
- Upgrade_pbg: your AI only upgrade
- create new unlocking_upgrade_info
- Ai_production_info
- 5. Set your requirement_actions with the AI only upgrade for squads, upgrades, and abilities that you wish to disable/enable for the AI.


cblanco ★
보드카 중대
VonManteuffel
Heartless Jäger