SITREP Fri 24 Jun 22
Hi all,
I have spent this week trying to get complex attacks working properly. But in the end I had to revise my code for basic attacks as this was not handling all the possible cases. At the root of this are the changes I made to ensure HQs stay with the main attack force. We now achieve this by having the attack force assemble at the assemblyLoc, which is some distance forward of the objective (2 to 3 kms for a Bde). There the force gathers from whatever locations it was deployed across. Then it moves off together to the reserveLoc (1 to 2 kms), drops off the HQs and reserve forces and the assault force then moves to the FUP ( 500m to 1 km) and launches its assault onto the objective.
But we also want to stop forces that are already forward of these locations from moving back only to come forward again. So now the code determines those forces near the FUP and hives these off from the moveToFUP force group (FG). When the moveToFUPFG arrives it will combine with the nearFUPFG to become the assaultFG. We do the same sort of thing at the reserveLoc and assemblyLoc. Picture it like a snake unfurling from the assembly to the objective.
Trouble is the force may be too close to the objective to bother with an assembly and in other cases we may not have a reserve or a HQ or all the forces are already near the assembly or reserveLoc or FUP and we can dispense with the preceding phases altogether. It's complicated. I have now revised the DevelopBasicAttack() to manage these. I have yet to test these changes. But first I now need to do the same for complex attacks.
For a complex attack we determine the approaches, select one and then assign our subordinate forces to the subAttacks and send orders. Eg the Bde sends attack orders to each of its Bn HQs. But I want to have the Bde assemble prior to the Bns doing their subAttacks. And I want them to ignore the need for their own assembly. Ie I want to just have the one assembly for the Bde and then the Bn move off to their reserveLocs and FUPs. Further, I don't want companies near the objective hiking back to the Bde assembly only to march forward again.
So rather than than simply relying on the Bn HQs to develop their own subAttacks and allocate their own forces. I need to determine which of their forces need to be assigned to their nearby FGs and deduct these from the Bde's mainForce that moves to the Bde AssemblyLoc. That's where I am at right now. There are a different options for handling this, but no matter which I choose it invlolves storing and passing more data with the orders to the Bns. In essence the Bde HQ will be specifying more stuff that the Bn HQs will have to comply with - eg. where they will have their reserveLoc and what forces will be assigned to nearbyFGs.
At the moment I am leaning towards adding more fields to the ScenTask class. At the moment it stores the objLoc and FUP. We need to add the reserveLoc and assemblyLoc, flags to ignore both, nearFUPFG, nearResFG and nearAssFG. If there is no one assigned to these FGs then the Bn HQ can do as he pleases, but otherwise the section of code inside DevelopBasicAttack() that does so for a specifiedFUP will need to be expanded to handle a specified reserveLoc and assemblyLoc. We will copy the approach route to the subAttack and then from all this data the Bn HQ will be able to simply calc the various routes without having to develop them from scratch. That should reduce processing load for the subAttacks but increase it a little for the complex attack.
I also need to consider how a human player will be able to manage all this. At the moment the player can order a force to attack by setting the objective location. He can also specify the FUP by placing an additional waypoint prior to the objective. I'm thinking that if the player lays down say five waypoints, then the final one will be the objective, the one prior to that will be the FUP, prior to that will be the reserveLoc and prior to that the assembly loc. That would be the simplest to implement.
OK enough pontificating. As you can see there is still more work to go.