Login

russian armor

How to make it so the AI selects a certain upgrade?

29 Sep 2021, 18:13 PM
#1
avatar of I II II I_

Posts: 6

So currently I have an upgrade for one of my squads that the AI seems to not be willing to unlock. The upgrade has a manpower cost associated with it (40 MP/10 Muni) so that seems to be a potential factor. Is there some sort of setting that I can adjust in the tools that makes the AI unlock certain upgrades when they become available?
30 Sep 2021, 15:15 PM
#2
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

Welcome to the forum!

The AI seems to unlock upgrades which add slot items or certain modifiers regularly. They somehow evaluate the value based on the actions inside. I once had an upgrade that changed the weapon which they did not unlock, but after changing that to add weapon they did buy it. It depends on your upgrade if this is possible.

Another way to increase the value is in ai_economy and in army.
ai_economy has a list 'upgrades' for entity and squad upgrades, there is a separate list 'player_upgrades' for global upgrades. Set the utility to 1000 to give a high priority.

In army there is the 'unlocking_upgrade_list' list for player/global upgrades. The combination with 'unlocked_building' can encourage the AI to unlock it. For example, I use the hq entity for several upgrades which seems to have a high priority, while the bunker entity does nothing. This is try on error.

I put important tech upgrades in all possible locations and they now use them perfectly. However, I am still not sure which location has the most effect.
30 Sep 2021, 19:15 PM
#3
avatar of I II II I_

Posts: 6

Welcome to the forum!

The AI seems to unlock upgrades which add slot items or certain modifiers regularly. They somehow evaluate the value based on the actions inside. I once had an upgrade that changed the weapon which they did not unlock, but after changing that to add weapon they did buy it. It depends on your upgrade if this is possible.

Another way to increase the value is in ai_economy and in army.
ai_economy has a list 'upgrades' for entity and squad upgrades, there is a separate list 'player_upgrades' for global upgrades. Set the utility to 1000 to give a high priority.

In army there is the 'unlocking_upgrade_list' list for player/global upgrades. The combination with 'unlocked_building' can encourage the AI to unlock it. For example, I use the hq entity for several upgrades which seems to have a high priority, while the bunker entity does nothing. This is try on error.

I put important tech upgrades in all possible locations and they now use them perfectly. However, I am still not sure which location has the most effect.



So seeing the comments about slot item additions and all this makes me wonder if I somehow have my configuration set in a way that makes it so that the AI isn't actually using the override I set for it. I've got the upgrade utility set to 1,000 and the AI still isn't willing to get it, so I'm starting to think that there's some other issue at play here. If you wouldn't mind, could you either like write a step-by-step basic list of how to properly setup AI economy settings/overrides or link me to a post that has some details on how to do this?
30 Sep 2021, 20:07 PM
#4
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

So seeing the comments about slot item additions and all this makes me wonder if I somehow have my configuration set in a way that makes it so that the AI isn't actually using the override I set for it. I've got the upgrade utility set to 1,000 and the AI still isn't willing to get it, so I'm starting to think that there's some other issue at play here. If you wouldn't mind, could you either like write a step-by-step basic list of how to properly setup AI economy settings/overrides or link me to a post that has some details on how to do this?

This is an example of an emtpy upgrade with 'player' as owner, located in each HQ. The AI always buys it. (Context: it is invisible for players so with this upgrade I can determine if a player is cpu or human).

ai_economy


army
30 Sep 2021, 20:58 PM
#5
avatar of I II II I_

Posts: 6


This is an example of an emtpy upgrade with 'player' as owner, located in each HQ. The AI always buys it. (Context: it is invisible for players so with this upgrade I can determine if a player is cpu or human).

ai_economy


army



Yeah I've done this stuff for the squad upgrades (Utility set to 1,000) and the AI still doesn't get the upgrade. I'm pretty sure I just have configured something incorrectly with the AI economy, though what exactly that might be is unknown. Whatever it is, I assume it has something to do with the ai_economy_override not being set up properly.
1 Oct 2021, 04:50 AM
#6
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

Yeah I've done this stuff for the squad upgrades (Utility set to 1,000) and the AI still doesn't get the upgrade. I'm pretty sure I just have configured something incorrectly with the AI economy, though what exactly that might be is unknown. Whatever it is, I assume it has something to do with the ai_economy_override not being set up properly.

The ai_economy\overrides are only working for specific singleplayer missions. You have to use "ai_economy\complete\default". I tried once to edit the ai_personality to link them to different economies, but that wouldn't work.
1 Oct 2021, 10:40 AM
#7
avatar of I II II I_

Posts: 6


The ai_economy\overrides are only working for specific singleplayer missions. You have to use "ai_economy\complete\default". I tried once to edit the ai_personality to link them to different economies, but that wouldn't work.


Ah, I was working under a false impression I got from another thread that seemed to imply that I had to create an economy override to get the AI to use the modded stuff. Now that I've set the economy to use the complete setting instead of override... the AI still doesn't get the initial upgrade, but if they own a pre-upgraded squad they will automatically get the secondary upgrade. I guess I'll just have to experiment with this some more, but I think I'm on the right track now. Thanks!
7 Oct 2021, 00:57 AM
#8
avatar of Zycat

Posts: 14


The ai_economy\overrides are only working for specific singleplayer missions. You have to use "ai_economy\complete\default". I tried once to edit the ai_personality to link them to different economies, but that wouldn't work.


It actually works if you have a custom personality .ai built into the mod, and therefore you can run custom A.I scripts since .ai files are basically SCAR scripts but limited in scope.

And yeah that means you can have custom TacticFilters for abilities, build order overrides based on number of players/resources available/time, changing values in ai_settings over time, etc. in a tuning pack mod.



Ah, I was working under a false impression I got from another thread that seemed to imply that I had to create an economy override to get the AI to use the modded stuff. Now that I've set the economy to use the complete setting instead of override... the AI still doesn't get the initial upgrade, but if they own a pre-upgraded squad they will automatically get the secondary upgrade. I guess I'll just have to experiment with this some more, but I think I'm on the right track now. Thanks!


My guess is that the "value" of the upgrade is too low for the A.I i.e it brings nothing to the table. Try setting these settings to 0 and see if it upgrades just fine :

(A.I economy bag - acquire_time_scale_weight and combat_utility_scale_weight)



If it does then we know the A.I assigns a very low value in their internal calculations for the upgrade.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

271 users are online: 1 member and 270 guests
capiqua
0 post in the last 24h
20 posts in the last week
136 posts in the last month
Registered members: 45005
Welcome our newest member, Kreitner
Most online: 2043 users on 29 Oct 2023, 01:04 AM