I've spent the past few days stomping on unfamiliar ground and built a little PLUGIN ... To add AI BONUS' to the scenario.
I don't know if Pip and the gang are going to eventually add a PLUGIN, my goal was to practice coding and translate some ideas into reality.
So far, I've got 3 Bonus' for the AI built ... actually 2 and half.
1. AI Rally - Same as human player ... The players Rally is "free" adding 50 points to morale until it's above it's base morale, the same applies to AI in one step during it's turn.
2. AI Ammo - Same as human player ... Resets the "APCharges" to maximum.
Now, the third Bonus is what I'm working on .... AI Artillery ... Giving the AI a Battery of 150mm to ruin your day.
Below is a screen shot of the PLUGIN ... note, it's just basic since I'm adding stuff as I go. Also, the buttons are simply since I can't (for the life of me!) create a toggle button despite numerous examples in the current plugin scripts

Now, lets get back to the BATTERY part, or artillery ... (I'm going to change the BATTERY to read "150mm Battery").
Currently, I have the AI use the VP as their target point IF the VP is hostile (meaning they don't own it), with a random 3 Tile "scatter".
I'm having logic problems with this that needs sorting out.
Ok ... What I would like to do for the AI Artillery Target Selection is this ... The scenario designer set's up Pre-Target selection points using the same scripts as setting up VP loactions.
The AI will scan each Target point and check for any enemy units within a certain radius ... deemed as cheating in my book, but better than having it randomly select a point for absulutly no reason what so ever.
It's requires alot of code logic and I don't even know if I can get it to work. I want the AI to make a logical decision when comitting an artillery strike.
So ... use VP's ? ... use Pre-Targets ? or use random combination of both?
I dunno ... I've got to get the basic artillery strike logic to work properly with cooldown times ... if I can even do that!
Merr

