Login

russian armor

AI economy question

12 Aug 2021, 13:10 PM
#1
avatar of trigg

Posts: 139

What is the per_unit_scale number?
12 Aug 2021, 13:35 PM
#2
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

These are the best explanations I could find:

: utility - A score that is applied to the squad when all of its values are added up. Weapons, cost, and health are all taken into account. Leaving it at -1 lets the AI add all those values up, setting it to a number disables that logic.
: random_range_offset - A random number that is gotten at the beginning of the game that is applied to the utility value. It can be a positive or negative number in the range. Example; if the utility value is 100, setting the random range to 10 can make it anywhere between 90 and 110 once the ai starts.
: per_unit_scale - How much the utility value gets reduced/increased based on how many units of that type are present on the battlefield. Say, if set to 0.5, each unit alive of that time will reduce the value by half. This is mainly used to prevent the AI from spamming units it deems good.
- https://www.coh2.org/topic/84712/ai-economy/post/715032

Addition from Zycat:
per_unit_scale_historical works the same as per_unit_scale, but it's used for the entire match. If the squad dies per_unit_scale will not have an effect anymore, while historical does.


Under "ai_economy/overrides/[yourpresetname]/squads", add a new "squad_utility" in case the unit you want to adjust isn't already listed. For "blueprint", set the sbps file of the unit.

As for "per_unit_scale", I'm not 100% sure, but countless hours of testing lead me to the conclusion that this controls how many of one unit the AI will produce at all. If you set it to "0.05", countless TDs will swarm the field if the AI has the resources. Set it to "0.5" and over the course of the match you'll most likely see two at max before the AI chooses to build other tanks instead. Works different for Infantry. But again, just my guess at making sense of the variables.

Finally, the "utility". Pretty straight forward, it tells the AI what the unit is worth. Extremely inconsistent, probably a modifier to some hidden (?) base value of a unit. You'll need to experiment. Random offset should be clear.
- https://www.coh2.org/topic/58127/ai-don-t-use-some-units-at-all/post/581958
12 Aug 2021, 22:28 PM
#3
avatar of trigg

Posts: 139

Thanks, SneakEye.
14 Sep 2021, 23:23 PM
#4
avatar of Zycat

Posts: 14

per_unit_scale_historical works the same as per_unit_scale, but it's used for the entire match. If the squad dies per_unit_scale will not have an effect anymore, while historical does.
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

955 users are online: 955 guests
0 post in the last 24h
0 post in the last week
28 posts in the last month
Registered members: 49400
Welcome our newest member, praptitourism
Most online: 2043 users on 29 Oct 2023, 01:04 AM