Login

russian armor

How to make AI use weapon racks?

27 Aug 2018, 11:32 AM
#1
avatar of DoggieBalloon

Posts: 64

Hi. I've made a separate custom weapon rack in my mod, but the issue is that the AI is not using it (not equipping their infantry units with the weapons from the rack). Is there a function somewhere in the Attrib editor to make the AI do that action? I can't seem to find it..
27 Aug 2018, 15:32 PM
#2
avatar of Lugie
Senior Modmaker Badge

Posts: 327

Well, it might be because of the item you have in that rack. Is it a slot item or something else? If its a slot item, the economy ai might consider the weapon is not good enough for the cost.
27 Aug 2018, 17:01 PM
#3
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

You can do this in the categorie 'army':
In army > ai_production_info > unlocking_upgrade_list > unlocking_upgrade_info,

Set unlocked_building to your weapon rack.
The setting upgrade_pbg is the upgrade to unlock the weapon rack if you have that.
And set you one or two infantry squads in upgraded_squads.

In my experience the AI uses all infantry to take the weapons, no matter which units are selected in upgraded_squads.
You can look into the US and UKF for an example.
29 Aug 2018, 13:06 PM
#4
avatar of DoggieBalloon

Posts: 64

So I did a clone on the economy_ai but I'm wondering what do the properties do like "per_unit_scale" and "utility" etc. I can't find any helpful description when clicking on them so I was wondering if you guys could help me understand what they do?

(also, modifying the army_bag couldn't work, so maybe the issue lies in the economy_ai?)
29 Aug 2018, 15:36 PM
#5
avatar of Lugie
Senior Modmaker Badge

Posts: 327

So I did a clone on the economy_ai but I'm wondering what do the properties do like "per_unit_scale" and "utility" etc. I can't find any helpful description when clicking on them so I was wondering if you guys could help me understand what they do?

(also, modifying the army_bag couldn't work, so maybe the issue lies in the economy_ai?)


Per_Unit_Scale is how valuable a unit gets after each unit is produced. Its mainly to prevent spam. Example; A unit scale of 1 has no decrease in utility for every unit on the field, a scale of 0.5 means each consecutive unit is considered half as useful to have.

Utility is a general rating applied to each unit. This rating is usually gotten after everything is considered (weapon, cost, speed, etc.). Its best to keep this as is unless its a special unit, say, a unit that only attacks with an ability.
2 Sep 2018, 15:29 PM
#6
avatar of DoggieBalloon

Posts: 64

Hi guys, sorry for the late update.

So I've been trying for the past four days but still no good results (I've tried both methods stated above). However, I did notice that whenever I were to give the AI a huge sum of resources, they will spam HMG-teams. It's pretty bizarre but, I guess it's a temporary solution to the problem. But it's not the solution I'm looking for and frankly I don't know what's missing. Have I missed out anything else besides army_bad and the settings in the economy ai?
4 Sep 2018, 03:29 AM
#7
avatar of Lugie
Senior Modmaker Badge

Posts: 327

You could try to make the slot item apply an upgrade that the AI considers really useful if nothing else works.
4 Sep 2018, 05:56 AM
#8
avatar of DoggieBalloon

Posts: 64

jump backJump back to quoted post4 Sep 2018, 03:29 AMLugie
You could try to make the slot item apply an upgrade that the AI considers really useful if nothing else works.


How do I make sure that the AI considers the upgrade "really useful"? Where do I edit that?
4 Sep 2018, 20:44 PM
#9
avatar of Lugie
Senior Modmaker Badge

Posts: 327

In the economy settings, theres places for player upgrades and normal upgrades. Player upgrades are mainly for commander abilities, so put the entry in normal upgrades.
7 Sep 2018, 02:17 AM
#10
avatar of DoggieBalloon

Posts: 64

jump backJump back to quoted post4 Sep 2018, 20:44 PMLugie
In the economy settings, theres places for player upgrades and normal upgrades. Player upgrades are mainly for commander abilities, so put the entry in normal upgrades.


Hihi, sorry again for the late reply, I've been busy as of late.

So I've tried many attempts including the ones you've suggested and they still don't work and I'm not sure why anymore. I think probably at this point I couldn't be bothered to mod the AI, really. It serves as a basic foe so I think I'll just leave it alone for now, but maybe when I do find a solution to the problem I'll add the fix. Once again, thanks for the assistance :)



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

213 users are online: 2 members and 211 guests
nigo, MajorBloodnok
9 posts in the last 24h
35 posts in the last week
89 posts in the last month
Registered members: 44640
Welcome our newest member, meryanna
Most online: 2043 users on 29 Oct 2023, 01:04 AM