Jump to content

Tuning the purchasing scripts


Recommended Posts

Looking for ideas out there on how to fine-tune the AI purchase scripts. As the system is, it is completely random. While this leads to variability, it also leads to major problems. For example, one game the AI buys too many HQs, something like 6 or 7 before Barbarossa. The very next game, the AI buys none until 1943. How do I fix this?

Link to comment
Share on other sites

The brute force approach would be to set up different scripts based on date...and effectively force the AI to buy only HQ for say one or two turns...and then go back to regular troops. The best approach would be the AI to be changed such that the you specify a force percentage that would be used to make buys. Like 40% army, 20% tank coros, 10% HQ, etc. instead of the random chance approach. While it would be nice for the planning scripts to have more variation, a (large) variation in force pool is rarely productive - plus ahistorical. Maybe Hubert could make this change...or put a flag in the purchasing script to interprut the input as such. This would make my mod effort easier as well. But for now, I am using the date trick.

Link to comment
Share on other sites

One way is to add more purchase scripts, and focus their purchases on specific units for short periods of time. Say between May and June 1941, give 100% chance for Axis to buy an HQ. This way you can directly control when they buy HQ's, then turn off the % chance to buy them for the rest of the purchase scripts. Then you may want to add another one later on just in case.

Ideally it'd be nice to have more control over when and what units the AI purchases. I like the random system we have now, as it still allows for a lot of customization and keeps things randomized a bit, but it'd be nice to say, "Germany build 1 HQ if it has less than 3" and have this true during certain time periods that you specify. Of course it would have to count the # of HQ's on the map, and ones in production, otherwise it'd keep trying to build an HQ if there were only 2 on the map.

Anyway, I think if you fool around and take some time with the purchase scripts you can get pretty consistent with the AI purchases that you want.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...