Page 1 of 1
Production AI build minors units
Posted: Sun Apr 03, 2022 11:33 pm
by Lothos
Is their any way to get the production AI to build a minors units? I noticed it will not do it, even though it may run out of units to build it will just stockpile the MP and never used it on its minors.
Thank you in advance to anyone that responds.
Re: Production AI build minors units
Posted: Mon Apr 04, 2022 1:40 pm
by Hubert Cater
Yes this is certainly possible and you would just need to create a script event for the AI to make these purchases.
Campaign->Edit AI Scripts and then edit the PURCHASE script for the AI.
If you follow the template of an existing event, just create one with the COUNTRY_ID for the one you have in mind and then the game engine will handle the rest after that.
Note, these events are read in top down order, so first one that is valid is read in by the engine and then the next one after that.
So if you set one for Germany first and then let's say for Hungary, it might not ever get to the Hungarian one if all funds are spent on the German plan event first. You could experiment and create a one time Hungarian event using FLAG= 0 (or 1) (for example) that is read first under the right conditions, the engine will apply AI MPPs to that one, and then have the German ones follow after that.
Hope this helps,
Hubert
Re: Production AI build minors units
Posted: Mon Apr 04, 2022 2:10 pm
by Lothos
Thank you
Let me think about this for a bit, my initial reaction is that I can't think of a good way to tell the AI when to start building minor units but I may come up with something. The problem I am trying to work out of my head is how and when to tell the AI to do it.