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)
0 user is browsing this thread:
Livestreams
95 | |||||
71 | |||||
47 | |||||
26 | |||||
10 | |||||
887 | |||||
80 | |||||
17 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.655231.739+15
- 2.842223.791+5
- 3.941410.697+7
- 4.35459.857-1
- 5.599234.719+7
- 6.278108.720+29
- 7.307114.729+3
- 8.645.928+5
- 9.269143.653+2
- 10.10629.785+7
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
11
Download
1265
Board Info
801 users are online:
801 guests
2 posts in the last 24h
10 posts in the last week
29 posts in the last month
10 posts in the last week
29 posts in the last month
Registered members: 50043
Welcome our newest member, Ban ca xeng Live
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, Ban ca xeng Live
Most online: 2043 users on 29 Oct 2023, 01:04 AM