--------------------------------------------------------
Available action commands and their function:
--------------------------------------------------------
"action_add" <- adds an action where you are currently standing.
Parameters (in the order they are taken - all are number values):
======
"AXIS OBJ" <- the axis goal at this particular action (if one exists).
default value: -1 (NO goal)
When the axis bots scan thru the available actions, this tells them what action is available here (ex: camping, planting, roaming, mg42, etc, etc).
======
"ALLIED OBJ" <- the allied goal at this particular action (if one exists).
default value: -1 (NO goal).
This is the same for the allies as it was for the axis. You may be wondering why there are two goals for one action. Well, think about it: when you have a goal that you want the allies to plant on, you also want the axis to defuse there too, right? Or perhaps you have some place you want one team to camp on, and another to just patrol thru. The possibilities are limitless. If you have an action that you only want one team to use, set the other teams flag to -1.
Here are the possible values available for AXIS OBJ and ALLIED OBJ:
0 = CAMP. This is a camping spot for the bot.
1 = MG42. There is a mg42 nearby. This isn't used as a goal per se. Its more of a hint on where a nearby mg42 is for the bot. In combat, it will look for nearby actions that have this flag, and if the target is in firing range of the mg42, the bot may decide to use it.
2 = Capture point flag. This is only for the capture point game mode. It just marks that a flag is nearby.
3 = Aim point. You can use this in conjunction with the camp flag to have a point that bots can look at while camped (how that works will be explained later).
4 = dynamite goal. This is a place to plant. The radius you set for this will determine the area the bot may plant in.
8 = defuse goal. This is the opposite of above. EX: on beach, the wall is a dynamite goal for the allies, but a defuse goal for the axis.
16 = spawnflag. This is only for spawnflags, letting the bot know one is available as a goal.
32 = deliver. A place to run to to deliver the docs or whatever the obj is.
64 = steal. A place to steal the map's obj (docs, etc).
512 = airstrike hint. This is a place LTs can throw airstrikes. EX: on beach, there are several of these placed on top of the walls, so that bots from both teams will throw airstrikes over the wall to harass the enemy.
2048 = roam/patrol goal. This is just a place for the bot to visit.
4096 = sniper point. A good place for a sniper to hang out.
8192 = panzer camp point. A good place for a panzer to hang out.
7 = ENG camp - a place for an ENG to camp after having planted (NOT USED ATM, BUT WILL BE ADDED).
You may notice that the number values are kinda odd. Well, originally I was going to use bit math for these so that you could have multiple actions per team. I later found out that doing so caused a lot of problems, so I stopped (but I had already waypointed several maps, and was too lazy to do it over again). So if you think its odd - you're right.
======
"radius" <- works just like the one for nodes - its area of effect.
default value: 70
======
"Entity number" <- whatever ent this action may point to.
default value: -1 (NO entity).
This works just like the node one. For ex: if you had a mg42 action, you would set this to the entity number of the mg42 itself.
======
"active forever" <- once activated, is this action active forever?
default value: 0 (NO, its not active forever).
This is used to mark actions you may want to keep, no matter what changes on the map (perhaps you have a camp point that you always want the bots to use, during the course of the whole game, set this flag to 1 to make that happen).
======
"Group ID" <- this is like the one for nodes, but extended
default value: 0
OK, this can get complicated. When you play a map, you can usually break down the goals for the map into some basic, discrete linear steps. EX: on beach - the first goal is to blow the walls (for allies - defend them for axis). That is the only major goal each team has. When those walls are blown, otehr goals open up (spawn flag and docs). When the docs are grabbed, only one goal becomes open - deliever them (or return them if axis).
So, if you broke it down like that, you would get something like this:
Group ID 0 (the first goal): Bomb the walls.
Group ID 1 (the 2nd goal): Grab docs, cap spawn flag.
Group ID 2 (the 3rd goal): transmit the docs, cap spawn flag. NOTE: the spawn flag is "active forever".
When an event happens (like the walls blowing) a special counter increments, and executes actions that have the same group ID number that its at.
So, when the map starts, the Goal tracker is always set to 0 to start. For the bots, it will only see actions that are in group ID 0. When the walls blow, the tracker increments to 1, so now the bots only see actions that have a group ID of 1. etc, etc, etc.
You can't control the progress of the tracker, it works by itself in the bot's event handling code.
How it works:
only certain events can increment the goal tracker:
1. OBJ being destroyed - sets goal tracker to +1.
2. Docs/obj being stolen - sets goal tracker to +1.
3. Docs/obj being returned - sets goal tracker to -1.
Certain actions will be inherited into the next group ID, if its very important, all by itself.
EX: on beach, both the door and the wall start out as group ID 0 action goals. Say the wall blows, but noone planted on the door yet. The wall being blown would cause the goal tracker to increment (the bots would know to grab docs now), but it would also "inherit" the door action from group 0. The door action would now be group ID 1. This is set in the code, you don't need to worry about it.
Now, when the door blows, it would not have an effect on the goal tracker. Why? Because it was inherited into this goal group. Basically the tracker keeps track of your original Group ID number, and if your not in your original one when your triggered, you don't have an effect on the tracker.
Whew.
That may be a difficut concept to grasp at first, but it allows me to easily control what goals the bots consider to be available, without a lot of hacks and jumping thru hoops. And I've run this code thru every possible default map, and it works fine. If you have questions on how to number your actions goals (which I'm sure you will), I'll be here to help, because I've already planned them out in my mind for most of the maps.
======
"use angles" <- this is currently not used, but needs to be accounted for
default value: 0 (dont use angles).
This was to be used to give actions an angle the bots should look at when doing an action (like if planting, look this direction, if camping, look this direction).
It hasn't been added yet, and I'm not sure its really needed since I've managed without it fine.
======
"Acceptable Classes" <- classes that can use this action
default value: 0 (any class may use this action
This is only tested use for camp and roam actions. Most of the other actions are already class specific.
Valid values:
0 = any class
1 = soldiers only
2 = medics only
4 = engs only
8 = LTs only
This uses bit math, so you can combine these values to have more than one class use it.
EX: you only want LTs and Medics to camp here, set "classes" to 10. Or only ENGs and soldiers, set it to 5. etc, etc.