Page 1 of 1
Purchase Script
Posted: Sat Apr 13, 2019 4:43 am
by Gilber
Hello,
For purchase scripts.
In what order does the AI ​​perform its tests?
The AI ​​starts with a percentage test for # UNIT_ID_0 = HQ then goes to # UNIT_ID_1 = Garrison and so on and stops when there is no MPP left?
Gilles
RE: Purchase Script
Posted: Sun Apr 14, 2019 8:47 pm
by Hubert Cater
Hi Gilber,
It actually randomizes the list of UNIT types or IDs each time it reads a PURCHASE event and then goes through the event with the randomized list. This way it doesn't go in order from HQs to Garrison as you thought, and ensures a more even/random set of purchases each time through.
Beyond that the only priorities it sets is on any unit with an '*' in its name as it means this unit is re-purchaseable at a discount etc.
Hubert
RE: Purchase Script
Posted: Mon Apr 15, 2019 12:16 am
by sPzAbt653
If I am playing as the Axis against the computer run Allies, and I switch sides in 1944 and see that the USA has 15,000 MPP's and lots of unbuilt units, would you suggest to increase the percentage that those unbuilt units might be built in the Purchase Script, or is there something else that has an influence? [This is with 653N, but it uses all of the original scripts from the stock 1939 campaign].
RE: Purchase Script
Posted: Mon Apr 15, 2019 9:59 am
by Hubert Cater
Yes, as long as the % chance is greater than 0 then those units will have a chance of being built.
RE: Purchase Script
Posted: Sat Apr 20, 2019 3:35 am
by Gilber
Hello,
Thanks hubert for your answer.
I would like to do one or more scripts to buy 6 Corpsand that stops definitely after.
The difficulty is that we do not know when we are trying to buy if there is enough MPP.
And using # SKIP_FUNDS_CHECK = 0 is unsatisfactory because it comes down to buying without spending MPP.
Someone would have any idea ?
Gilles
RE: Purchase Script
Posted: Sat Apr 20, 2019 6:42 am
by sPzAbt653
Decision Event to Purchase Corps for 150 MPP's each, if YES then Unit Script for Unit(s) to arrive. Any good ?