How to make AI use weapon racks?
27 Aug 2018, 11:32 AM
#1
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
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
Posts: 817 | 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.
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
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?)
(also, modifying the army_bag couldn't work, so maybe the issue lies in the economy_ai?)
29 Aug 2018, 15:36 PM
#5
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
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?
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
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
Posts: 64
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
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
Posts: 64
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
PAGES (1)
1 user is browsing this thread:
1 guest
Livestreams
823 | |||||
16 | |||||
5 | |||||
2 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.599215.736+14
- 3.34957.860+14
- 4.1107614.643+8
- 5.305114.728+1
- 6.916405.693-2
- 7.273108.717+24
- 8.722440.621+4
- 9.1041674.607-2
- 10.17146.788+1
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
9
Download
1234
Board Info
684 users are online:
684 guests
0 post in the last 24h
8 posts in the last week
37 posts in the last month
8 posts in the last week
37 posts in the last month
Registered members: 49100
Welcome our newest member, Modarov
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, Modarov
Most online: 2043 users on 29 Oct 2023, 01:04 AM