CON property reference
Every ObjectTemplate class and component, and every property a .con / .tweak file can set on it. Generated on each build from the tables bf2-rs is built from (re/data/template_properties.tsv, re/data/template_types.tsv) and the Rust that handles them (crates/bf2-objects/src/template/), plus the command tables of the 2142 and Heroes binaries.
| BF2 | 2142 | Heroes | |
|---|---|---|---|
objectTemplate.* commands | 1219 | 1257 | 1783 |
| handled by bf2-rs | 1121 | 1121 shared + 273 checked / 2142-only | shared with 2142 |
Args are the console types the original parser accepts (float, int, bool, std::string, Vec3 as x/y/z, template names as std::string). Default is the value a fresh template holds before any script line (read from the original constructors). Effect says what the server does with it; accepted, no effect on the server means the line is valid but only the client (rendering, sound) reads it.
Template classes#
A template is created with ObjectTemplate.create <Type> <name>; every line after it sets a property on that active template. A type inherits the properties of every class in its chain.
| Type | Inherits from | Own properties | Used by |
|---|---|---|---|
| AirDraftEffectBundle | 0x0000946f > SimpleObject | 136 | AirDraftEffectBundle |
| AmbientEffectArea | 0x0000946f > Bundle > SimpleObject | 103 | AmbientEffectArea |
| AnimatedBundle | 0x0000946f > Bundle > SimpleObject | 98 | AnimatedBundle, GenericFireArm, MaskObject |
| AntennaObject | 0x0000946f > SimpleObject | 89 | AntennaObject |
| AreaObject | 0x0000946f > Bundle > SimpleObject | 97 | AreaObject |
| Bundle | 0x0000946f > Bundle | 95 | AmbientEffectArea, AnimatedBundle, AreaObject, Bundle, Bundle, Camera ... |
| Camera | 0x0000946f > Bundle > Camera > RotationalBundle | 163 | Camera |
| ControlPoint | 0x0000946f > Bundle > SimpleObject | 131 | ControlPoint |
| Decal | 0x0000946f | 47 | Decal |
| DestroyableObject | 0x0000946f > Bundle > SimpleObject | 101 | DestroyableObject |
| DestroyableWindow | 0x0000946f > SimpleObject | 83 | DestroyableWindow |
| DestroyableWindowsBundle | 0x0000946f > Bundle > SimpleObject | 100 | DestroyableWindowsBundle |
| DropVehicle | 0x0000946f > SimpleObject | 84 | DropVehicle |
| DynamicBundle | 0x0000946f > Bundle > SimpleObject | 96 | DynamicBundle |
| EffectBundle | 0x0000946f > Bundle > EffectBundle | 158 | EffectBundle |
| Emitter | 0x0000946f > Emitter | 121 | Emitter |
| Engine | 0x0000946f > Bundle > Engine > RotationalBundle | 189 | Engine |
| EntryPoint | 0x0000946f > EntryPoint | 84 | EntryPoint |
| EnvMap | 0x0000946f > SimpleObject | 84 | EnvMap |
| FloatingBundle | 0x0000946f > Bundle > FloatingBundle > RotationalBundle | 125 | FloatingBundle |
| ForceObject | 0x0000946f > SimpleObject | 91 | ForceObject |
| FreeCamera | 0x0000946f > Bundle > SimpleObject | 97 | FreeCamera |
| GenericFireArm | 0x0000946f > Bundle > SimpleObject > AnimatedBundle | 121 | GenericFireArm |
| GenericProjectile | 0x0000946f > Bundle > SimpleObject | 125 | GenericProjectile |
| GrapplingHookRope | 0x0000946f > SimpleObject | 107 | GrapplingHookRope |
| GrapplingHookRopeContainer | 0x0000946f > Bundle > SimpleObject > GrapplingHookRopeContainer | 158 | GrapplingHookRopeContainer |
| GroundEffectBundle | 0x0000946f > SimpleObject | 84 | GroundEffectBundle |
| HookLink | 0x0000946f > SimpleObject | 83 | HookLink |
| Item | 0x0000946f > Bundle > SimpleObject | 99 | Item, Kit |
| ItemContainer | 0x0000946f > Bundle > SimpleObject | 97 | ItemContainer |
| Kit | 0x0000946f > Bundle > SimpleObject > Item | 113 | Kit |
| KitPart | 0x0000946f > Bundle > SimpleObject | 98 | KitPart |
| Ladder | 0x0000946f > SimpleObject | 84 | Ladder |
| LadderContainer | 0x0000946f > Bundle > SimpleObject > LadderContainer | 158 | LadderContainer |
| LandingGear | 0x0000946f > Bundle > RotationalBundle > SimpleObject | 128 | LandingGear |
| LightSource | 0x0000946f | 63 | LightSource |
| MaskObject | 0x0000946f > Bundle > SimpleObject > MaskObject | 100 | MaskObject |
| MeshParticleSystem | 0x0000946f | 93 | MeshParticleSystem |
| NonScreenAlignedParticleSystem | 0x0000946f | 101 | NonScreenAlignedParticleSystem |
| ObjectSpawner | 0x0000946f > SimpleObject | 102 | ObjectSpawner |
| Obstacle | 0x0000946f > Bundle > SimpleObject | 96 | Obstacle |
| OverheadCamera | 0x0000946f > Bundle > SimpleObject | 98 | OverheadCamera |
| Parachute | 0x0000946f > Bundle > SimpleObject > PlayerControlObject | 158 | Parachute |
| Particle | 0x0000946f | 66 | Particle |
| ParticleSystemEmitter | 0x0000946f | 79 | ParticleSystemEmitter |
| PlayerControlObject | 0x0000946f > Bundle > SimpleObject | 158 | GrapplingHookRopeContainer, LadderContainer, Parachute, PlayerControlObject, ZiplineContainer |
| RemoteControlledObject | 0x0000946f > Bundle > SimpleObject | 102 | RemoteControlledObject, TurnableRemoteControlledObject |
| RopeLink | 0x0000946f > SimpleObject | 83 | RopeLink |
| RotationalBundle | 0x0000946f > Bundle > RotationalBundle | 120 | Camera, Engine, FloatingBundle, LandingGear, RotationalBundle, Wing |
| Rotor | 0x0000946f > Bundle > SimpleObject | 101 | Rotor |
| SimpleObject | 0x0000946f | 83 | AirDraftEffectBundle, AmbientEffectArea, AnimatedBundle, AntennaObject, AreaObject, Bundle ... |
| Soldier | 0x0000946f > Bundle > SimpleObject | 113 | Soldier |
| Sound | 0x0000946f | 51 | Sound |
| SpawnPoint | 0x0000946f | 42 | SpawnPoint |
| Spring | 0x0000946f > Bundle > SimpleObject | 101 | Spring |
| SpriteParticle | 0x0000946f | 29 | SpriteParticle |
| SpriteParticleSystem | 0x0000946f | 106 | SpriteParticleSystem |
| SupplyDepot | 0x0000946f > SimpleObject | 90 | SupplyDepot |
| SupplyObject | 0x0000946f > Bundle > SimpleObject | 111 | SupplyObject |
| TargetObject | 0x0000946f > Bundle > SimpleObject | 100 | TargetObject |
| TrailSystem | 0x0000946f | 100 | TrailSystem |
| Trigger | 0x0000946f > Bundle > SimpleObject | 102 | Trigger |
| Triggerable | 0x0000946f > Bundle > SimpleObject | 105 | Triggerable |
| TriggerableTarget | 0x0000946f > Bundle > SimpleObject | 102 | TriggerableTarget |
| TurnableRemoteControlledObject | 0x0000946f > Bundle > SimpleObject > RemoteControlledObject | 103 | TurnableRemoteControlledObject |
| UAVVehicle | 0x0000946f > Bundle > SimpleObject | 95 | UAVVehicle |
| WheelEffectBundle | 0x0000946f > SimpleObject | 132 | WheelEffectBundle |
| Wing | 0x0000946f > Bundle > RotationalBundle > SimpleObject | 128 | Wing |
| Zipline | 0x0000946f > SimpleObject | 90 | Zipline |
| ZiplineContainer | 0x0000946f > Bundle > SimpleObject > ZiplineContainer | 158 | ZiplineContainer |
| ZiplineRope | 0x0000946f > SimpleObject | 84 | ZiplineRope |
Components#
Components are sub-objects a template creates on demand; their properties carry a prefix (ObjectTemplate.fire.roundsPerMinute, ObjectTemplate.armor.hitPoints). Weapons are almost entirely components.
| Component | Prefix | Properties |
|---|---|---|
| Ability | ability. | 4 |
| Armor | armor. | 41 |
| DefaultAmmoComp | ammo. | 14 |
| DefaultAnimationComp | animation. | 4 |
| DefaultCollisionComp | collision. | 2 |
| DefaultDetonationComp | detonation. | 54 |
| DefaultFollowComp | follow. | 5 |
| DefaultPenetrateComp | penetrate. | 3 |
| DefaultSoundComp | sound. | 2 |
| DefaultZoomComp | zoom. | 9 |
| ExplosivesFireComp | fire. | 17 |
| FixedTargetComp | seek. | 2 |
| Ik | ik. | 6 |
| LPFireComp | fire. | 14 |
| LPTargetComp | target. | 13 |
| MultiFireArmTargetComp | target. | 12 |
| MultiFireComp | fire. | 17 |
| Radio | radio. | 5 |
| ReplenishCollisionComp | collision. | 4 |
| ReplenishDetonationComp | detonation. | 56 |
| ReplenishingAmmoComp | ammo. | 21 |
| ResurrectCollisionComp | collision. | 4 |
| SeekClosestTargetComp | seek. | 6 |
| SimpleDeviationComp | deviation. | 6 |
| SimpleTargetComp | target. | 13 |
| SingleFireComp | fire. | 23 |
| SoldierBasedRecoilComp | recoil. | 8 |
| SoldierDeviationComp | deviation. | 24 |
| SpawnObjectFireComp | fire. | 13 |
| StickyCollisionComp | collision. | 6 |
| TargetDeviationComp | deviation. | 4 |
| ThrownFireComp | fire. | 19 |
| ToggleCameraComp | zoom. | 8 |
| WeaponBasedRecoilComp | recoil. | 6 |
| WindAffector | widnBlowTime. | 8 |
Triggers in each game#
Which trigger classes each game's template parser registers (the class pages hold the events values each game reads, with the handler addresses). 2142 and Heroes have no Triggerable switch or TriggerableTarget mover: no use-key triggers and no moving doors or lifts; their Trigger fires on proximity, explosions and weapon fire (BF2 adds control point events).
| Class | BF2 | 2142 | Heroes |
|---|---|---|---|
| Trigger | yes BF2.exe!0x00537263 +0x812, bf2_w32ded.exe!0x00480be0 +0x91a | yes BF2142.exe!0x00504be6 +0x61a | yes BFHeroes.exe@bfh126!0x00540cd1 |
| AmbientEffectArea | yes BF2.exe!0x00537263 +0x851, bf2_w32ded.exe!0x00480be0 +0x961 | yes BF2142.exe!0x00504be6 +0x659 | yes BFHeroes.exe@bfh126!0x00540d2d |
| Triggerable | yes BF2.exe!0x00537263 +0x890, bf2_w32ded.exe!0x00480be0 +0x9a8 | no | no |
| TriggerableTarget | yes BF2.exe!0x00537263 +0x8cf, bf2_w32ded.exe!0x00480be0 +0x9ef | no | no |
| TutorialTrigger (Heroes' tutorial waypoint: once armed it fires when the local player reaches it, posts ECGameLogicGLTutorialTriggerTriggered with its triggerId and arms the TutorialTrigger its nextTriggerId names; no shipped level creates one) | no | no | yes BFHeroes.exe@bfh126!0x00688c16 |
Class lists read: BF2 BF2.exe!0x00537263, bf2_w32ded.exe!0x00480be0; 2142 BF2142.exe!0x00504be6; Heroes BFHeroes.exe@bfh126!0x005c28c2, BFHeroes.exe@bfh126!0x0068959a.
TutorialTrigger#
Which games parse it#
Heroes' tutorial waypoint: once armed it fires when the local player reaches it, posts ECGameLogicGLTutorialTriggerTriggered with its triggerId and arms the TutorialTrigger its nextTriggerId names; no shipped level creates one. Read from each game's ObjectTemplate class list (a game that does not register the type ignores ObjectTemplate.create TutorialTrigger):
| Game | Parsed | Registered at |
|---|---|---|
| BF2 | no | not in BF2.exe!0x00537263, bf2_w32ded.exe!0x00480be0 |
| 2142 | no | not in BF2142.exe!0x00504be6 |
| Heroes | yes | BFHeroes.exe@bfh126!0x00688c16 |
##### radius and the shape it tests
The property values pick one test. Read by lists the games whose handler runs it.
| When | Fires on | Read by | Handler |
|---|---|---|---|
| radius above 0; length or width below 0 | the local player's soldier or vehicle closer than radius plus its own radius (a sphere) | Heroes | BFHeroes.exe@bfh126!0x0082e44b (the sphere test at +0x87, the object's vt+0x90 radius added at +0xb0, the hit at +0x493) |
| length and width 0 or above (radius not read) | the local player's soldier or vehicle inside the length x width box, flat on the ground and turned with the trigger | Heroes | BFHeroes.exe@bfh126!0x0082e44b (the box test at +0xd2), BFHeroes.exe@bfh126!0x0082e2d1 (four triangles from the centre) |
| radius 0 or below; length or width below 0 | fires on its first update once armed (no shape tested) | Heroes | BFHeroes.exe@bfh126!0x0082e44b (no shape tested at +0x94, the hit at +0x493) |
The editor's Ambient panel and inspector show the same table for the loaded game (crates/bf2-editor/src/triggers.rs, H2936).
Across the three games#
The cross-game table lists all 2085 objectTemplate commands (and the other template objects' commands) with their argument types and their server / client scope in each game, so you can see what a 2142 or Heroes file may use that BF2 does not and whether a mod of it needs the players' files. Every property row on the class pages links its cross-game row; the unified reference finds a name in all three games.
Generated by tools/devwiki/refs_con.py.
tools/devwiki/refs_con.py · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.