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
|
|
|
|