PDA

View Full Version : AI Scripts with location data


kbluck
17 Dec 03, 16:24
I have some questions about the scenario editor.

How does one go about issuing orders that have a location element to them with locations that were not set at the start? For example, how do you set a new position area other than what was specified in the original cancelled mission? I see a Prerequisite Data item for IF Position, but am rather mystified as to how it actually works.

Similarly for the "Suppress" order type. How exactly do you specify the location to be suppressed?

I suppose I could assign a Support by Fire mission, but again, how to store more than one, so the AI can select the most advantageous based on whatever conditions I've set for it?

Same question with regard to fire missions. Is there any way to store them so they can be plugged in on a condition?

I guess I can generalize my question: how do you get the same hierarchy to execute more than one mission per scenario?

Thanks,

--- Kevin

Pat Proctor
17 Dec 03, 20:09
The safest answer I can give you is, "You can't". But that is not the COMPLETE answer.

The 'prerequisite data' objects, as you guessed, allow you to set locations, positions, paths, formations, and other items that can be "referenced" in an AI Mission. Some work better than others, though. Here is how it, generally, works.

When you want to order a hierarchy to execute an AI Mission, you

1. Create a new phase order in the phase in which you want the mission to initiate.
2. In the phase order, you set all of the conditions that you want to trigger the order.
3. You "Add" an order. You will see the Hierarchy Order dialog.
4. Input the name of the hierarchy you want to order, using the "Hierarchy Name" button.
5. Select "AI Order" as the type of order you want to give.
6. You will be presented with a list of all of the missions. Select the one you want to execute.
7. Here's the important step, you will be presented with a dialog with an empty box and an add and delete button. This is where you "reference" the prerequisite data items. Select Add.
8. Select the name of the data object you want from the list.

That's it. Once the order is executed, the order will look at the data items you referenced and do its best to try to figure out how you want them applied. Some of them are straight forward. If you reference an IF Position data item for an "Position Area" mission, the mission will use that position. Some are more obscure. If you reference an Objective Area for a SBF mission, it will apply to the suppression area. The other data-mission combinations are less predictable.

I really do intend to document all of this, but the features will only be used by 1/2 a percent of total users, so there are just a lot of other things that demand more attention.

kbluck
17 Dec 03, 20:21
Specifically regarding the "Suppress" order, as opposed to the SBF mission; What sort of prerequisite data does that expect? It doesn't seem to require anything in particular, at least it doesn't complain if you don't offer it anything.

For things like IF Position Area, it wants "a route which leads in turn to an objective" and a "divide force object". Can you elaborate a bit on those? I don't need excruciating detail, just a quick summary of what these somewhat cryptic messages mean and generally how to go about satisfying them.

If I can figure presently undocumented stuff like this out, I'll document it for you.

Thanks,

--- Kevin

Deltapooh
18 Dec 03, 17:27
For things like IF Position Area, it wants "a route which leads in turn to an objective" and a "divide force object". Can you elaborate a bit on those? I don't need excruciating detail, just a quick summary of what these somewhat cryptic messages mean and generally how to go about satisfying them.

If I can figure presently undocumented stuff like this out, I'll document it for you.

Basically you are being asked for two prerequisite data references. The first is a "Route." The second is "Divide Force."

To store a route,

1. Select the unit you want, and plan a path to the location desired.

2. right click on the node positioned on the unit icon, and set to 0h0m0s.

3. Cut path.

4. Go into your battle plan, select "route" in prequisite data. On the "Order Data Edit Dialog" page, give the route a name in the top box, click okay.

5. You will be asked if you wish to use the path on clipboard, click yes.

I'm not sure about Divide Force. It is also located in prerequisite data. Since this is an indirect fire unit, you might want to select Indirect Fire from the mission code section on the Divide Force property page.

Once both of these are created, go back to Prerequisite Data and select IF position area, and in the "add data reference page, select the route and divide force data's stored."

kbluck
18 Dec 03, 18:20
Basically you are being asked for two prerequisite data references. The first is a "Route." The second is "Divide Force."

I'm familiar with storing a route, but the message seems to indicate that the mission expects a certain kind of route "leading to an objective", which is another kind of prerequisite data. That's the part that is confusing me. I can't figure out if the editor is just stating the obvious in a confusing way, or if there really is a way to link a route to an objective.

And, of course, the "Divide Forces" object remains less than clear about what is expected.

--- Kevin

Deltapooh
18 Dec 03, 19:07
I'm familiar with storing a route, but the message seems to indicate that the mission expects a certain kind of route "leading to an objective", which is another kind of prerequisite data. That's the part that is confusing me. I can't figure out if the editor is just stating the obvious in a confusing way, or if there really is a way to link a route to an objective.

And, of course, the "Divide Forces" object remains less than clear about what is expected.

--- Kevin

I don't believe there is another kind of route. One possibility would be that it is asking for an Objective data reference which has a Route data reference added to it, but that doesn't make alot of sense.

In all likelihood, point about leading to an objective is just a statement, like the "destroy" warnings that pop up when working with databases. The last node should be the "objective area".

Pat Proctor
19 Dec 03, 12:03
DP hit the route question on the head. I have to say that I am honestly not sure what the divide force data item does in relation to the IF Position Area function. In a defense, it divides the force into left, center, right, and reserve (unless you de-select one of these elements). In the attack, it divides a force into support, breach, assault, and indirect fire (for BN mortars, etc.), unless, again, you remove one of these options.

I would have to search through the code to remember what it does (which is the case for all of the orders and, hence, why I have not yet documented these features).

I would say, in general, that you should use the TACSOP functions to set those things for a hierarchy that you want to remain constant. Then, I would use only those data objects that are absolutely neccessary to get the hierarchy to do what you want in the script.

For example, if you want the hierarchy to attack one objective and then, end the phase when that attack is over, and then attack the next objective, you might set a data object for the first route and objective and the second route and objective. But if you want them to EXECUTE the attacks in the same way (i.e. divide forces into the four elements described above, etc) then you don't need data objects for the other settings.