fa icon indicating copy to clipboard operation
fa copied to clipboard

AI/Engineer State Machine

Open relent0r opened this issue 2 years ago • 3 comments

Description of changes

This draft PR is for implementing an engineer based state machine to pick up jobs from the engineer manager. It is a wip with the following components.

Initialization. Sets the Location type and engineer manager instance.

DecideWhatToDo Legacy engineer manager task. Takes a preallocated task or queries the engineer manager GetHighestBuilder Sets platoon data and stores the engineer handle.

Note. Engineer manager is static. The defaulted taskfinished function would relocate the engineer to a different manager if it was closer to a new base. Happens on disband.

SetBuilderData Sets data based on builder, requires base template and construction data.

NavigateToTaskLocation Handles navigation.

CheckForOtherTask Handles checking for other task before going back into the normal engineer task.

Current issues. Uncertainty on how to handle the queued construction. The default AI runs a buildstructure function on the build location in order to 'reserve' the build position. It also does this as part of the navigation queue. This means that pathing that is required must run through and then run a buildstructure command at the end before the engineer starts moving. Ideal solution is to have the engineer manager understand reservation for build locations so that there is no requirement for this. This may be possible with Jips chunk based templates.

relent0r avatar Nov 05 '23 21:11 relent0r

image

There's something going wrong here 😃

Garanas avatar Nov 06 '23 15:11 Garanas

image

There's something going wrong here 😃

Yer for some reason its picked up every sync my fork has done with the main repo over the last few months. Never used to do that.

relent0r avatar Nov 06 '23 18:11 relent0r

@relent0r the drawing of #5647 is available in this branch now too

Garanas avatar Nov 06 '23 20:11 Garanas