Game modes: conquest, co-op, Titan and Heroes' modes
A game mode is two things: a set of objects a level places for it (control points, spawn points, vehicles, flags) and a Python script that scores them. The engine underneath is the same in every mode: it keeps tickets, moves control point flags, spawns players and ends the round. This page says what each mode adds, what a ticket means in it, and what the port runs.
What a level holds for a mode#
A level's server.zip has one folder per mode and size: GameModes/<mode>/<players>/GamePlayObjects.con. The script in it creates that layer's objects. The same level can be a 16-player conquest map with four control points and a 64-player one with nine. The server rules page has the engine's part (the round's phases, tickets and their limits, the flag of a control point, spawning); this page is the modes'.
| Mode | Script | Games | Objects a layer places |
|---|---|---|---|
| conquest | gpm_cq | Battlefield 2, 2142 | control points, spawn points, vehicle spawners, the combat area |
| co-op | gpm_coop | Battlefield 2, 2142 | conquest's, with the AI's strategic areas |
| Titan | gpm_ti | 2142 | two Titans, missile silos with their control points |
| team deathmatch | gpm_tdm | Heroes | control points, one uncapturable base a team |
| capture the flag | gpm_ctf | Heroes | CtfObject (the flag) and CtfPoint (pickup and drop-off) |
| the hill | gpm_hoth | Heroes | one control point, the hill, with its rocket |
| team elimination | gpm_cdm | Heroes 1.126 | two hidden control points and team spawns |
| basic training | gpm_tut | Heroes | one layer, the tutorial |
Heroes' level census as the notes counted it: 20 layers of team deathmatch, 7 of capture the flag, 7 of the hill, one of basic training.
Conquest#
Each team starts with tickets from a table by map size. A death costs the team a ticket. Control points decide the bleed: the script counts what each team holds and sets a ticket change per second for the team that holds too little. The round ends when a team's tickets cross a limit, at the time limit, or when too few players are left. A control point changes hands by standing in its radius: the flag goes down for the old owner and up for the new one, at a speed that grows with the number of capturers.
Co-op is conquest with bots on both sides. Choosing it turns the AI on whatever the command line says; the level's co-op layer adds the strategic areas the bots plan with.
Titan#
Each team has a Titan, a flying fortress. The tickets of Titan mode are the Titans' hit points: the script subtracts each damage event from them. Ground play is about missile silos: a silo belongs to the team that holds its control point, and it fires at the enemy Titan on a fixed cycle. When a Titan's hull is at or below 61 percent its shield drops and it can be boarded: inside, four consoles (7,000 hit points each) hold the core's doors and the core (40,000), whose armor passes its damage on to the Titan. A destroyed Titan ends the round 25 seconds later.
| Rule | Original (bf2142ded, the Linux server) | Port |
|---|---|---|
| what a Titan is | object_isTitan 0x08163ef0 (a remote controlled object of type Titan among the object's children) | bf2_world::assets::is_titan_2142 |
| no damage past its hit points | ArmorGLComp::damage 0x082200d0 | titan::before_vehicle_damage |
| the shield drops at a damage level | ArmorGLComp::handleUpdate 0x08223430 | titan.rs |
| the round's end | GameLogicDamage::serverGiveDamage 0x080e1ca0, endGame 0x08104950 with a delay of 25 s | titan.rs |
| the Titan's movement by the commander's orders | TitanManager::setTick 0x081d2510 | titan.rs |
The port runs Titan rounds on its own server with 2142's data: both Titans spawn, the tickets follow their hit points, the silos fire, the shield drops, and the destroyed Titan ends the round. The measurements were made against the retail Linux server with a probe in the admin script.
Heroes' modes#
Heroes has no script of its own for team deathmatch: gpm_tdm runs conquest's script. Its levels give each team a base that cannot change hands, and the script only bleeds a team that holds no point at all, so on those levels flags do not bleed tickets: a death costs one ticket and that is the whole score. "I hold every flag and the tickets stand still" is a common question, and the answer is that the original does the same. The number beside the flags on the HUD is a count of flags held, not a multiplier.
By the notes' count 20 team deathmatch layers of version 1.126 have a base for each team, so no round on them ever bleeds; one level's two layers have a single base, and there a team can be left without a point.
Capture the flag is the one mode with objects of its own. A flag (CtfObject) is in one of a few states:
| State | Rule as read (BFHeroes.exe@bfh126) |
|---|---|
| home | every 0.2 s the first living soldier on foot of the team that may take it, within the pickup point's radius, takes it (0x006750b6, pickup 0x0067484c) |
| carried | the flag rides with the soldier; within the radius of his team's drop-off point it scores (0x00675212, 0x00675145), but only while his own team's flag is at home unless the template allows otherwise. A carrier who dies, or who sits in a vehicle he does not drive, drops it |
| dropped | it lies there for its time in the world; the time runs down faster the more soldiers of the flag's own team stand near it (one to four times). The original's client shows only the HUD's side of this state: that the flag then returns, and that an attacker who touches it carries it on, is the port's inference |
| at the drop-off point | after a capture the flag rests there for a set time, then goes home |
The script scores a capture in a way that surprises: the capturing team loses one ticket, and the team that reaches 0 wins. The carrier gets valor points and experience.
The flag's update is 0x0067556b. The port's rules are crates/bfh-game/src/ctf.rs, stepped by the server behind the object update.
The hill (gpm_hoth) places one control point and scores holding it on a Python timer through conquest's script, so 2142's control point code serves it. The hill carries a rocket; the port holds the rocket still as the original does (RemoteControlGLComp::init 0x0082bb23 puts it to sleep), and its launch is not ported.
Team elimination (gpm_cdm, version 1.126) is played in heats. A team's tickets are its heats left; a player has one life a heat. When a team's tickets fall by one the heat halts, the result shows, and the next heat starts after its delay (the heat's update is 0x00509349). The delays, the lives and the time limit of 180 s come from the level's GameLogicSettings.con. The port's rules are bfh_game::cdm.
What is tested#
- The engine's part (tickets, limits, flags) has tests from the original's addresses: see server rules with its capture bar and ticket pieces.
- Titan mode: measured against the retail Linux server run by
tools/bf2142/titan_round.py. - Heroes: capture the flag and team elimination have unit tests in
bfh-game; a played scenario holds all flags of a team deathmatch level and checks that the tickets stay; others play a capture (bfh_ctf_capture: a headless hero carries the flag to the drop-off point) and a round of heats (bfh_cdm_round).
In the code#
| What | Where |
|---|---|
| the engine's rules | crates/bf2-game (round, tickets, conquest, control_point), crates/bf2-server |
| Titan | crates/bf2-server/src/titan.rs |
| Heroes' flag and heats | crates/bfh-game/src/ctf.rs, cdm.rs |
| the scripts | the game's own Python (gpm_cq.py, gpm_coop.py, gpm_ti.py, gpm_ctf.py, gpm_hoth.py, gpm_cdm.py), run by the port's Python host |
Notes: notes/subsystems/game-logic-rules.md, notes/bf2142/titan.md, notes/bfheroes/gamemodes.md.
docs/dev/levels/game-modes.md · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.