Page 1 of 1

modding force composition

Posted: Fri Dec 19, 2008 9:49 pm
by gwgardner
I would like to alter the desired builds for a given country. Can anyone explain if that's possible or how to do it?

I see in the scenario data folder an AI file containing the entry 'desiredforcestructure' or some such. Is that it? If so, what do the entries mean?

Specifically I wish to reduce alter the USSR builds, so that country invests more in the infantry/armor than the air units. Currently the USSR is spending vast sums of PPs on air.

RE: modding force composition

Posted: Sat Dec 20, 2008 2:58 am
by gwgardner
further examination of the ai_data.csv shows the following entry for the USSR:

NewUnitPurchasePreferences;0;40;0;5;0;5;0;0;5;0;0;0;0;0;;;;;;;;

I interpret that as a 40 weight preference for infantry corps, 5 for mech corps, 5 for armor corps, 5 for air fleets

If that is the case, then this is not working at all, because in my latest game the AI for the USSR produced mostly air fleets and a couple of armored corps.  Zero infantry corps as far as I could tell.  If it's not working as it should, please advise on how to get it to work or come out with a quick patch!

RE: modding force composition

Posted: Sat Dec 20, 2008 5:46 am
by doomtrader
It should work this way.

We will take a closer look into this.

RE: modding force composition

Posted: Sat Dec 20, 2008 12:26 pm
by Radar8717
NewUnitPurchasePreferences;0;40;0;5;0;5;0;0;5;0;0;0;0;0;;;;;;;;

Lowering that "5 for airfleets" to 1 or 2 for the USSR has worked in my games for several months. The Soviets build just a few air armies to contest air superiority, while building many more land units.

RE: modding force composition

Posted: Sat Dec 20, 2008 1:03 pm
by gwgardner
Thx, I will change that too then.  I guess I might as will jigger around with the other figures too, like land divisions, etc.

Does a zero value mean that the AI will buy zero of those types of units?

Also, some countries like Italy have no entry at all. What happens for them, some default?

RE: modding force composition

Posted: Sat Dec 20, 2008 3:51 pm
by Radar8717
Check the AI_data

#########;#;;;;;;;;;;;;;;;;;;;;;
# ITALY;#;;;;;;;;;;;;;;;;;;;;;
##########;#;;;;;;;;;;;;;;;;;;;;;
#Target: Greece;;;;;;;;;;;;;;;;;;;;;;
Country;21;;;;;;;;;;;;;;;;;;;;;
#CurrentTargets;134;110;-1;;;;;;;;;;;;;;;;;;;
SeaZonesToPatrol;6;0;;;;;;;;;;;;;;;;;;;;
AllianceEntryPolicy;1;;;;;;;;;;;;;;;;;;;;;
CountriesToPress;26;27;;;;;;;;;;;;;;;;;;;;
TransportsUnitsToFrontsBySea;1;;;;;;;;;;;;;;;;;;;;;
#########;#;;;;;;;;;;;;;;;;;;;;;

Yes, Italy is using the default unit build, but you can put your own in.