RE: AI Scripts questions - selecting units to the task (Full Version)

All Forums >> [New Releases from Matrix Games] >> Strategic Command Series >> Strategic Command: World War I >> MODS and Scenarios



Message


Jazon -> RE: AI Scripts questions - selecting units to the task (11/28/2021 8:12:44 AM)

Hi Hubert!
Thank you for your long and helpful reply!
I got so far one more question that bothers me:

How to mark units i want to use in current script? How can I know that computer will use the units nearby?
I guess i missed the main point, the sense, idea of what GOAL POSITION is:

In GUARD scripts this is the meaning:
#GOAL_POSITION= What is the map position that is the object of this plan?
In OFFENSIVE scripts this is the meaning:
#GOAL_POSITION= What is the map position that is the objective of this plan?

So in GUARD scripts, GOAL POSITION is kind of a marker of units involved? Or I got totally bananas?

Main question here, how computer AI will distribute it's units?
I used to do some missions to some other game series, and there was kind of "marker" command in every script to grab selected units to the current mission set.
Uff...
Sorry for bothering, but I got to say it's getting interesting to crack how this scripting work:)
Looking forward to reply
Jazon
Cheers :)




Hubert Cater -> RE: AI Scripts questions - selecting units to the task (11/29/2021 1:22:12 PM)

Yes no problem at all and for GUARD scripts, GOAL_POSITION is the desired positions you wish units to actually GUARD, whereas for OFFENSIVE scripts, that will be the target position you wish to capture.

There is no marker function as the game is so dynamic and from testing it was found the best solution was to just let the game engine select which units would be the most suitable on its own due to the fluidity of movement of units all over the map.

So for GUARD scripts the engine typically looks for units first that are in range, second that are as close as possible, and then third for any available unit after that. For all 3 cases, it has to fit the criteria of the HOLD flag, and the STEAL flag. That is how it is fine tuned for GUARD scripts.

For OFFENSIVE scripts, the RANGE flag and STEAL flag are the fine tune options. RANGE will check for any units within RANGE of the topmost marked FRIENDLY_POSITION and also within RANGE of the GOAL_POSITION. This just means if the RANGE is 5 hexes, it will only look at any units within 5 hexes of the FRIENDLY_POSITION or 5 hexes within range of the GOAL_POSITION.

This is also why when I script OFFENSIVE plans, the LENGTH is usually short and set to 1 turn as units can kind of go out of range sometimes when there are multiple nearby GOAL_POSITIONS, e.g. let's say on the Eastern Front. Then the game engine re-assigns after every turn the nearest and most applicable units etc.

Picking the right FRIENDLY_POSITION also helps to sort of pick from a pool of units that is desirable and close to the GOAL POSITION as well.

Hope this helps,
Hubert




Jazon -> DOWNLOAD HERE Polish Soviet War 3.0 (2/9/2022 10:44:17 AM)

Hi!
Here is the Polish-Soviet War 3.0 scenario. Download and enjoy! Game is set for multiplayer, but of course you can try with AI first, I've started some AI scripts, but they don't work perfectly. Anyone looking for a match? :)))
Jazon

https://www.mediafire.com/file/y1lsbfoavsglili/Campaigns.rar/file


[image]local://upfiles/73489/40B3DA805C3348D7A91A48DA286028DE.jpg[/image]




Page: <<   < prev  2 3 4 5 [6]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
4.65625