Thursday, July 07, 2005

Tracking me, Tracking you

Introduction



... When you drop one it will look like a skull gib, depending on what weapon you were using at the time is what it will shoot. - Lethal Orifice eXamination man pages



One of the most annoying favorite features for campers that could have ever been introduced into the game... - TheLopez

Recently, I added a new type of tracker, turrets, which can stick onto almost anything except for players. This does include decoys, mmmm… almost walking trackers. Implementing the turrets wasn’t hard, copy the tracker source files, rename, update the code allowing turrets to stick to things, etc. This led me to the realization that I was implementing the trackers/turrets all wrong. I’ll explain, basically by duplicating the source files for the tracker I was creating work for the LOX development team because now there would be two places where we will have to update the code whenever we add any new weapons that the trackers/turrets shouldn’t be able to use. I was planning to do the same with floating trackers when I thought to myself “there is no way I am going to create a third instance of the tracker source code so they can float, updating all of these will be a nightmare down the road.” So what is the solution? Configurable trackers.

What are configurable trackers you may ask? Currently, the only part of trackers that are configurable is what weapon they use, which isn’t really a configuration since they just use the weapon currently used when deployed. The new trackers will have several configurable options: float, stick, taunt, ammotype, detonate, and name. Last, the classic trackers have a three part lifecycle: spawn, track/attack, and detonation. Configurable trackers will have a four part lifecycle: configuration, spawn, track/attack, and detonation but the configuration part is not explicitly required.

Note: In the definitions for the different tracker commands, 1 denotes that the command is on, 0 denotes that the command is off.

Configuring Trackers

The majority of the commands are used for configuring trackers. The name, stick, float, wander, ammotype and taunt options can be set before spawning a new tracker though they are not required to spawn a new tracker. If they are not set then the tracker spawned will act like a classic tracker.

Command: Name

Format: tracker name <name of tracker not already used>

Default: <player name>_tracker_<tracker number>

Example: tracker name Bob

Description:
Specifies the name of the new tracker that will be spawned, if no name is specified then by default the name of the tracker will be <player name>_tracker_<tracker number> i.e. If I have 2 trackers in the game and I spawn a new tracker without specifying the name, the name by default of the new tracker will be TheLopez_tracker_3. Tracker names with multiple words must be quoted; i.e. tracker name “Billy Bob”. Players will not be able to allowed to set the name of a new tracker if they have already spawned another tracker with that name and that tracker is still alive.


Command: Stick

Format: tracker stick (0|1)

Default: Off

Example: tracker stick 1

Description:
By setting this command the tracker being configured will stick to anything except for other players. This command cannot be set if either the float or wander commands are set.


Command: Float

Format: tracker float (0|1)

Default: Off

Example: tracker float 1

Description:
By setting this command the tracker being configured will rise up and float in the middle of the air after being spawned. This command cannot be used if the stick command is set.


Command: Wander

Format: tracker wander (0|1)

Default: Off

Example: tracker wander 1

Description:
By setting this command the tracker being configured will slowly follow any targets it acquirers. This command cannot be used if the stick command is set.


Command: Taunt

Format: tracker taunt (0|1|<taunt>)

Default: Off

Example: tracker taunt 1
Example: tracker taunt "Get back here"

Description:
By setting this command the tracker will taunt their target if the target gets out of range and the tracker hasn’t acquired a new target. If taunt is just turned on then the tracker will use the standard taunts otherwise the player supplied taunt will be used.

Note: A new pointer needs to be added to the edict data structure keeping the pointer to the old enemy. If the ent->enemy pointer is null after attempting to acquire a target that is not the owner, then the tracker needs to taunt the old enemy at least once.


Command: Ammo Type

Format: tracker ammotype <weapon name in quotes>

Default: current weapon used by player if allowed and not banned

Example: tracker ammotype “Plasma Cluster Grenade Launcher”

Description:
By setting this command the tracker will use the ammo type specified. The tracker will use the current ammo type of the player if this command is not set when the tracker is spawned.


Command: Configuration

Format: tracker config

Description:
Players can use this command to see the current configuration to be used for the tracker that they are about to spawn.


After Tracker Configuration

Spawning configurable trackers should act exactly as before with one difference, the command to actually spawn a tracker should be tracker spawn. There are several new features that characters will be able to perform after they have spawned their trackers: viewing their trackers configuration, listing their existing trackers, detonating their trackers and changing to their trackers point of view.


Command: Spawn

Format: tracker spawn

Description:
Spawns a new tracker into the game configured using the settings provided by the player.


Command: Configuration

Format: tracker config [<tracker name>]

Example: tracker config "Billy Bob"

Description:
Players use this command to see the current configuration of the tracker with the given name that they have spawned if it still exists in the game. Tracker names with multiple words must be quoted; i.e. tracker config “Billy Bob”.


Command: Listing

Format: tracker list

Description:
Players use this command to see the listing of tracker currently in the game and what weapon they are using.


Command: Detonate

Format: tracker detonate [(<tracker name>|all)]

Example: tracker detonate “Billy Bob”

Description:
Players use this command to detonate their trackers. If the player does not provide a name then the last spawned tracker will be detonated. If the player uses all then all of the spawned trackers will be detonated (all being a reserved word and not a valid name). If the player does provide a name then only that tracker with that name will be detonated. Tracker names with multiple words must be quoted; i.e. tracker detonate “Billy Bob”.


Command: Point-of-view

Format: tracker POV [<tracker name>]

Example: tracker POV "Billy Bob"

Description:
One new feature not available for classic trackers, that is the ability to toggle through the deployed trackers. It basically allows players to change their point of view to their deployed trackers point of view. This lasts until the tracker is detonated, the player dies, and the player toggles their view to another tracker or back to their regular view. If the player does not provide the name of the tracker the POV will be changed to the next available tracker. If there is no next available tracker then the POV is switched back to the players POV. Tracker names with multiple words must be quoted; i.e. tracker POV “Billy Bob”.

Note: This new feature will require changing the way that trackers are created. Currently there is nothing in the code that ties a player to his trackers … though there is ent->owner which does tie the tracker to the player that spawned it. An array of edict_s pointers of should be added to the edict data structure. The array must be the same length as the max amount of trackers allowed.

Conclusion

If this new version of trackers is implemented players will have a new level of flexability in trackers. For instance if I just wanted to create a classic tracker all one would have to do is just use the tracker command without any configuration options set. If I wanted to create a tracker that taunts, floats, uses the super blaster and is named bob the command would look like:

tracker taunt 1;tracker float 1;tracker ammotype "super blaster";tracker name Bob;tracker spawn

This can be bound to a key or better yet you could do something like:

alias tracker1 "tracker taunt 1;tracker float 1;tracker ammotype "super blaster";tracker name Larry;tracker spawn;bind t tracker2"


alias tracker2 "tracker taunt 1;tracker float 1;tracker ammotype "kaminit";tracker name Curly;tracker spawn;bind t tracker3"


alias tracker3 "tracker taunt 'Get Back here';tracker float 1;tracker ammotype "rail gun";tracker name Moe;tracker spawn;bind t tracker1"

bind t tracker1



Things to remember when implementing the new version of trackers:

  • Removal of turret code, i.e. loxturretban, maxturrets, etc
  • Remove debug code (damn spamming onrespawn lbind command)

Open ended items/questions:

  • Taunts for tracker taunt feature
  • Tracker feature banning, should trackers as a whole be banned or should we allow for individual features for configurable trackers to be banned?
  • Should trackers show up in the scanner? If they do should one of the tracker commands allow players to cloak their trackers from the scanner?
  • Should trackers have a feature where they only target non-cloaked, non-player damageable targets? The feature could be named intercept, picket, defense, etc.

Modified 07/13/2005 to incorporate QwazyWabbit's feedback - changes in bold

0 Comments:

Post a Comment

<< Home