-
Notifications
You must be signed in to change notification settings - Fork 109
computer_player_commands
\
\
Falko Poiker
May 19, 1998
\
The purpose of this document is to give the reader an understanding of the current and planned implementation of the computer player in homeworld. It is also intended to help find out how scripts can be tied into the computer player to allow maximum flexibility in setting up the single player missions, as well as the computer player itself.
The computer player commands are orders to be performed by a series of ships. The orders passed down from a “commanding” entity within the computer player to the “squadron” and “team” level of command - the lowest command entity within the computer player (refer to the computer player design document).
Reconaissance - right now the ships go to a waypoint and count the ships in the area. (Parameters: location - a location to check out, shiptype - a type of ship to look for. Flags will also be able to modify this order, i.e. to make the recon automatic with a new mission sphere appears).
Recon_Harrass - right now the ships go to a waypoint, count the ships in the area, move to another waypoint, wait for any unarmed undefended ship to show itself and attack. This wait/attack loop is contined until all the squadron is killed. (Parameters: location, shiptype - the type of ship to harass (the computer player has some shiptypes that are more general than those specified in the game. i.e. construction capable ships (mothership and carrier ship) or unarmed ships (resource collectors, resource controllers, etc.).
Takout Target - the squadron builds a fleet designed to eliminate a specific ship and attacks it. The idea is to surgically remove that ship from the enemies fleet. (Parameters - ship - a specific ship to take out, shiptype - a shiptype to take out, group - a group of ships to take out). This command will be more powerful in the future, as it will look at the defenses around a specific ship and remove those before taking out the ship. For example if a group of ion cannon frigates have been targeted to be taken out, and they are surrounded by multigun corvettes, the some of the multigun corvettes will be removed before attack bombers are assigned to attack the ion cannon frigates.
Guard - the squadron is assigned to guard a specific ship. This order is merely an AI implementation of the “guard” command.
\
Patrol - similar to reconaissance, but move from point to point repeatedly. (Parameters - points - the set of points to patrol)
Harass - plain’ol pissing off the other player (without the reconaissance) (Parameters - ship - a specific ship to harass, shiptype - a shiptype to harrass, group - a set of ships to harass)
Swarm - lots of little ships swarming around an enemy ship or ships (necessary for the P2 orders). (Parameters - ship, shiptype, group)
Overrun - Plows through enemy lines (not sure how this’ll work, the name sounds cool though). (Parameters - ship, shiptype, group, location)
Hold Font - get to a location and don’t let anyone pass (Parameters - location)
Break Through - split open a specific location in the enemy lines and get a squadron of ships through. (Parameters - location)
Retreat - self explanatory - break off attack (Parameters - ship, shiptype, group, location (where location specifies the location to retreat to, and the ship parameters specify who retreats))
Regroup - break off attack and regroup at a specific location. (Parameters - same as retreat).
Defend - defend a certain ship or shiptype or location. More general than guard, which only applies to a specific ship. In addition, this could be a more aggressive defense, with formations and stuff. (Parameters - ship, shiptype, group, location).
\
I have also set up a series of flags to determine how these orders are performed:
Aggressive/neutral/evasive - correspond roughly to the in game tactics, though setting these flags would not entail having the ships set to that tactic necessarily. For example, an agressive harrass order would probably entail going for more heavily defended targets.
Suicidal - not much time is spent on defense at all, just KILL KILL KILL!
Discreet - possible modifier for certain order - a discreet retreat could possibly have the ships continue their current order, but slowly moving backwards in an orderly retreat, so as to put the enemy into a good position for a surprise counterattack.
Ultra Evasive - at the first sign of an enemy ship, the ships sneak away.
\
\
Squadron Level Moves
When a order command works its way down to the squadron level of the computer player command structure, the squadron sets up a series of moves it will perform to execute the command. These moves are the building blocks of an order and can be executed in a loop (repeated over and over) or once through. Later, there could be conditional branches within the move structure, and maybe some even more powerful features.
get ships - normally the first move in a series. A squadron can’t operate without ships, so they have to be requested.
mission finished - the last move in a series. The squadron deletes itself and frees up its ships for other orders.
move standoff - moves to a point a certain distance away from a specified location.
move location - moves to a specific location.
count ships - fills in a structure that keeps track of the number of ships the enemy has. Later this structure will determine how the computer player deals with the enemy (lots of fighters will make the computer player build many multi-gun corvettes, standard frigates and missile destroyers, for example, whereas lots of capital ships will make the computer player build lots of ion cannon capital ships (Ion Cannon Frigate, Destroyer and Heavy Cruiser))
team formation - puts the squadron’s ships into a formation
harass attack - an evasive attack command
attack ship - squadron’s ships attack a specific ship
guard ship - the squadron guard a specific ship
\
For the purpose of illustration, here is how a squadron would implement a recon harass command:
1. get ships (gets 5 heavy interceptors)
2. team formation (puts the 5 ships into a delta formation)
3. move standoff (moves so that it is a certain distance away from the enemy mother ship)
4. count ships (counts the enemy ships)
5. move standoff (moves a little farther away)
6. harass attack (with the “Unarmed undefended ship” flag set - the squadron only attacks unarmed undefended ships)
7. mission finished
\
The following moves are planned, more will be implemented when they are needed:
hold position - stay at a cetain location until a pre-defined condition is met.
attack shiptype - attack a certain type of ship
attack group - attack a selection of ships
guard group - guard a group of ships
\