Production AI build minors units

Please post here for questions and discussion about modding for Strategic Command.
Post Reply
User avatar
Lothos
Posts: 1243
Joined: Tue May 23, 2006 8:22 pm

Production AI build minors units

Post 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.
User avatar
Hubert Cater
Posts: 5986
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: Production AI build minors units

Post 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
User avatar
Lothos
Posts: 1243
Joined: Tue May 23, 2006 8:22 pm

Re: Production AI build minors units

Post 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.
Post Reply

Return to “Scenario Design and Modding”