Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

RE: AI Scripts questions - selecting units to the task

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Strategic Command Series >> Strategic Command: World War I >> MODS and Scenarios >> RE: AI Scripts questions - selecting units to the task Page: <<   < prev  2 3 4 5 [6]
Login
Message << Older Topic   Newer Topic >>
RE: AI Scripts questions - selecting units to the task - 11/28/2021 8:12:44 AM   
Jazon


Posts: 121
Joined: 8/18/2020
Status: offline
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 :)

(in reply to Hubert Cater)
Post #: 151
RE: AI Scripts questions - selecting units to the task - 11/29/2021 1:22:12 PM   
Hubert Cater

 

Posts: 5199
Joined: 7/22/2013
Status: offline
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

_____________________________


(in reply to Jazon)
Post #: 152
DOWNLOAD HERE Polish Soviet War 3.0 - 2/9/2022 10:44:17 AM   
Jazon


Posts: 121
Joined: 8/18/2020
Status: offline
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





Attachment (1)

(in reply to Hubert Cater)
Post #: 153
Page:   <<   < prev  2 3 4 5 [6]
All Forums >> [New Releases from Matrix Games] >> Strategic Command Series >> Strategic Command: World War I >> MODS and Scenarios >> RE: AI Scripts questions - selecting units to the task Page: <<   < prev  2 3 4 5 [6]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.891