Balance constants
All 316 balance constants at da35d677e: every public value in the rules code, plus a few values the simulation keeps privately or writes inline, and numbers read from rules functions (each says where). _TICKS values also show seconds. Descriptions are the code's own comments.
balance.rs
balance/abilities.rs
balance/bodies.rs
balance/economy.rs
balance/entrenchment.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
ENTRENCHMENT_DIG_IN_TICKS | 90 (3 s) | balance/entrenchment.rs:7 | entrenchment_system · entrenchment.rs | |
ENTRENCHMENT_RANGE_BONUS_TILES | 1 | balance/entrenchment.rs:8 | attack_range_tiles · entrenchment_combat.rs | |
ENTRENCHMENT_DIRECT_DAMAGE_REDUCTION | 0.5 | balance/entrenchment.rs:9 | direct_damage_after_entrenchment · combat.rs | |
ENTRENCHMENT_AREA_DAMAGE_REDUCTION | 0.25 | balance/entrenchment.rs:10 | area_damage_after_entrenchment · combat.rs | |
ENTRENCHMENT_TRENCH_RADIUS_TILES | 0.375 | balance/entrenchment.rs:11 | restore_replay_clock_and_trenches · replay_281_tank_gap.rs create · trench.rs |
balance/map.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
TILE_SIZE | 32 | balance/map.rs:3 | stats.rs:6 radius_tiles · stats.rs balance.rs:38 +10 more |
balance/scout_plane.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
SCOUT_PLANE_HP | 40 | balance/scout_plane.rs:5 | defs.rs:436 | |
SCOUT_PLANE_SIGHT_TILES | 19 | balance/scout_plane.rs:6 | defs.rs:441 | |
SCOUT_PLANE_SPEED_PX_PER_TICK | 2.6 | balance/scout_plane.rs:7 | defs.rs:440 | |
SCOUT_PLANE_COST_STEEL | 0 | balance/scout_plane.rs:8 | defs.rs:442 faction.rs:620 | |
SCOUT_PLANE_COST_OIL | 0 | balance/scout_plane.rs:9 | defs.rs:443 faction.rs:621 | |
SCOUT_PLANE_COMMAND_CAR_COST_STEEL | 0 | balance/scout_plane.rs:10 | faction.rs:417 | |
SCOUT_PLANE_COMMAND_CAR_COST_OIL | 0 | balance/scout_plane.rs:11 | faction.rs:418 | |
SCOUT_PLANE_SUPPLY | 0 | balance/scout_plane.rs:12 | defs.rs:444 | |
SCOUT_PLANE_ORBIT_RADIUS_TILES | 2 | balance/scout_plane.rs:13 | advance_scout_planes · scout_plane.rs | |
SCOUT_PLANE_LIFETIME_TICKS | 900 (30 s) | balance/scout_plane.rs:14 | launched_at · state.rs default_scout_plane_lifetime_ticks · state.rs | |
SCOUT_PLANE_ABILITY_COOLDOWN_TICKS | 900 (30 s) | balance/scout_plane.rs:15 | faction.rs:616 | |
SCOUT_PLANE_BODY_LENGTH_PX | 48 | Client render/selection body only. The authoritative movement/collision body stays zero-radius in `defs.rs` until aerial movement owns its own non-blocking runtime path. | balance/scout_plane.rs:19 | — |
SCOUT_PLANE_BODY_WIDTH_PX | 34 | balance/scout_plane.rs:20 | — | |
SCOUT_PLANE_BODY_CLEARANCE_PX | 0 | balance/scout_plane.rs:21 | — |
balance/stats.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
DISCIPLE_ENGAGEMENT_RANGE_TILES | 5 | Disciples may approach visible enemies within this range without extending sword reach. | balance/stats.rs:9 | engagement_range_tiles · combat.rs |
TANK_TRAP_CLUSTER_ATTACK_RADIUS_TILES | 4 | A contextual clear-area order prioritizes completed Tank Traps inside this objective radius. | balance/stats.rs:12 | tank_coax_target_candidates · coax.rs combat_system · mod.rs tank_trap_cluster_targets · commands.rs +2 more |
balance/supply.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
PLAYER_SUPPLY_CAP | 300 | Every active player has the full match supply allowance without requiring a building. | balance/supply.rs:4 | from_state_with_compatibility · mod.rs validate_player_supply · validation.rs critical_event_state · critical_events.rs +3 more |
balance/support_weapons.rs
balance/timing.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
TICK_HZ | 30 | balance/timing.rs:3 | abilities.rs:3 abilities.rs:6 abilities.rs:7 +10 more | |
TICK_MS | 33 | balance/timing.rs:4 | from_env · perf.rs |
balance/upgrades.rs
combat.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
MG_HALF_SPREAD_RAD | 0.175 | combat.rs:4 | fire · machine_gun.rs | |
MG_BURST_BULLETS | 3 | combat.rs:5 | fire · machine_gun.rs fire · machine_gun.rs | |
MG_RAY_DAMAGE_MULTIPLIER | 0.6 | Each ray contributes 60% of profile damage, up 20% from the original 50%. | combat.rs:7 | fire · machine_gun.rs |
TANK_ARMOR_REACTION_LOCK_TICKS | 90 (3 s) | A tank keeps its hull-facing preference for this long after the latest qualifying direct-AP hit. | combat.rs:38 | validate_tank_armor_reaction_lock · validation.rs try_lock_tank_armor_reaction · state.rs turn_stationary_tanks_toward_locked_ap_source · armor_reaction.rs |
TANK_ARMOR_REACTION_MAX_PIVOT_RAD | 1.396 | Largest hull pivot that a direct-AP damage-facing preference may initiate. | combat.rs:40 | facing_preference_within_pivot_cap · armor_reaction.rs |
FRONT_ARC_RADprivate combat::FRONT_ARC_RAD | 0.785 | A hit is on the front when the shooter is within this angle of the Tank's facing. | combat.rs:30 | classify_armor_facing · combat.rs |
SIDE_ARC_RADprivate combat::SIDE_ARC_RAD | 2.356 | Past the front arc and within this angle of the facing a hit is on the side; beyond it, the rear. | combat.rs:31 | classify_armor_facing · combat.rs |
combat/armor.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
ARMOR_SMALL_DAMAGE_TAKENreturned by effective_damage_for_armor_penetration_with_bonus() | 1 | Share of a hit's damage a Small target takes. | combat/armor.rs:55 | — |
ARMOR_ARMORED_DAMAGE_TAKENreturned by effective_damage_for_armor_penetration_with_bonus() | 0.25 | Share of a hit's damage an Armored target takes from a weapon with no armor penetration. | combat/armor.rs:53 | — |
ARMOR_ARMORED_REDUCTIONwritten as 0.75 in effective_damage_for_armor_penetration_with_bonus() | 0.75 | Armor of an Armored target: the share of damage it stops. Armor penetration cancels that share of it. | combat/armor.rs:54 | — |
faction.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
DEFAULT_FACTION_ID | kriegsia | faction.rs:12 | faction.rs:772 mod.rs:70 try_fire_artillery · artillery_fire.rs +9 more | |
CULTIVATORS_FACTION_ID | cultivators | faction.rs:14 | faction.rs:848 enqueue · research.rs advance · tournament.rs +3 more | |
EMPTY_FIXTURE_FACTION_ID | phase2_empty_fixture | faction.rs:15 | faction.rs:790 | |
METHAMPHETAMINES_UPGRADE | methamphetamines | faction.rs:222 | — | |
PANZERFAUSTS_UPGRADE | panzerfausts | faction.rs:223 | — | |
ENTRENCHMENT_UPGRADE | entrenchment | faction.rs:224 | — | |
ANTI_TANK_GUN_UNLOCK_UPGRADE | anti_tank_gun_unlock | faction.rs:225 | — | |
TANK_UNLOCK_UPGRADE | tank_unlock | faction.rs:228 | — | |
TANK_PLUS_UPGRADE | tank_plus | faction.rs:229 | — | |
SMOKE_PLUS_UPGRADE | smoke_plus | faction.rs:230 | — | |
SCOUT_PLANE_UNLOCK_UPGRADE | scout_plane_unlock | faction.rs:231 | — | |
ROCKETS_UPGRADE | rockets | faction.rs:232 | — | |
SMOKE_ABILITY | smoke | faction.rs:234 | — | |
MORTAR_FIRE_ABILITY | mortarFire | faction.rs:235 | — | |
BREAKTHROUGH_ABILITY | breakthrough | faction.rs:238 | — | |
SCOUT_PLANE_ABILITY | scoutPlane | faction.rs:239 | — | |
CHARGE_ABILITY | charge | faction.rs:241 | — | |
BARRAGE_ABILITY | barrage | faction.rs:246 | — |
navigation.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
TANK_TRANSIT_CLEARANCE_TILES | 3 | Tank transit waypoint centers stay at least three world tiles from static obstacle edges. Path planners add the native waypoint arrival tolerance so turning early does not cut this gap. | navigation.rs:4 | tank_transit_waypoint_radius_px · navigation.rs navigation.rs:24 |
TANK_ENDPOINT_APRON_TILES | 12 | A source/actual destination inside the clearance apron may attach through at most this much body-clear path. This permits production egress and exact target approach, never a body-width fallback for the intervening transit route. | navigation.rs:8 | navigation.rs:26 |
NAVIGATION_POLICY_SOURCE | //! AI Tank waypoint policy; native movement and physical collision radii remain unchanged. /// Tank transit waypoint centers stay at least three world tiles from static obstacle edges. /// Path planners add the native waypoint arrival tolerance so turning early does not cut this gap. pub const TANK_TRANSIT_CLEARANCE_TILES: u32 = 3; /// A source/actual destination inside the clearance apron may attach through at most this /// much body-clear path. This permits production egress and exact target approach, never /// a body-width fallback for the intervening transit route. pub const TANK_ENDPOINT_APRON_TILES: u32 = 12; /// Profile identity input for consumers whose authored decisions use these rules. pub const NAVIGATION_POLICY_SOURCE: &str = include_str!("navigation.rs"); /// Include arrival slack in waypoint placement; physical Tank collision size is unchanged. pub fn tank_transit_waypoint_radius_px(tile_size: f32) -> f32 { TANK_TRANSIT_CLEARANCE_TILES as f32 * tile_size + crate::balance::VEHICLE_WAYPOINT_ACCEPTANCE_RADIUS_PX } /// Tile-center consumers can round the protected AI waypoint radius outward. pub fn tank_transit_grid_radius_tiles(tile_size: f32) -> u32 { (tank_transit_waypoint_radius_px(tile_size) / tile_size).ceil() as u32 } /// Numeric dependencies join the source input when constructing an AI profile identity. pub const NAVIGATION_POLICY_VALUES: (u32, u32, u32) = ( TANK_TRANSIT_CLEARANCE_TILES, crate::balance::VEHICLE_WAYPOINT_ACCEPTANCE_RADIUS_PX.to_bits(), TANK_ENDPOINT_APRON_TILES, ); /// Production egress stays inside a connected industrial campus and is still bounded. pub const TANK_PRODUCTION_EGRESS_TILES: u32 = 32; pub const TANK_PRODUCTION_CAMPUS_PADDING_TILES: u32 = 5; pub type NavigationRect = (f32, f32, f32, f32); /// Expanded known building clusters containing a Vehicle Works. The geometric envelope /// confines the longer endpoint exception to industrial yards, never arbitrary terrain. pub fn production_campus_rects( buildings: &[(bool, NavigationRect)], tile_size: f32, ) -> Vec<NavigationRect> { let padding = TANK_PRODUCTION_CAMPUS_PADDING_TILES as f32 * tile_size; let rects: Vec<_> = buildings .iter() .map(|(_, r)| (r.0 - padding, r.1 - padding, r.2 + padding, r.3 + padding)) .collect(); let mut included: Vec<_> = buildings.iter().map(|(producer, _)| *producer).collect(); let mut queue: std::collections::VecDeque<_> = included .iter() .enumerate() .filter_map(|(i, &v)| v.then_some(i)) .collect(); while let Some(i) = queue.pop_front() { let a = rects[i]; for (j, &b) in rects.iter().enumerate() { if !included[j] && a.0 <= b.2 && a.2 >= b.0 && a.1 <= b.3 && a.3 >= b.1 { included[j] = true; queue.push_back(j); } } } rects .into_iter() .zip(included) .filter_map(|(r, yes)| yes.then_some(r)) .collect() } pub fn point_in_production_campus(point: (f32, f32), rects: &[NavigationRect]) -> bool { rects .iter() .any(|r| point.0 >= r.0 && point.0 <= r.2 && point.1 >= r.1 && point.1 <= r.3) } | Profile identity input for consumers whose authored decisions use these rules. | navigation.rs:11 | — |
TANK_PRODUCTION_EGRESS_TILES | 32 | Production egress stays inside a connected industrial campus and is still bounded. | navigation.rs:30 | — |
TANK_PRODUCTION_CAMPUS_PADDING_TILES | 5 | navigation.rs:31 | production_campus_rects · navigation.rs |
sim: combat/mod.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
TANK_TURRET_TURN_RATE_RAD_PER_TICK | 0.07 | sim: combat/mod.rs:102 | weapons.rs:13 rotate_vehicle_weapon_for_combat · weapons.rs rotate_tank_commander_weapon · weapons.rs +3 more | |
ANTI_TANK_GUN_TURN_RATE_RAD_PER_TICK | 0.07 | sim: combat/mod.rs:104 | weapons.rs:12 rotate_anti_tank_gun_for_combat · weapons.rs rotate_support_weapon_toward_setup_facing · weapons.rs |
sim: combat/projection.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
TANK_STATIONARY_RANGE_MAX_TILES | 14 | sim: combat/projection.rs:12 | combat_system · mod.rs tank_effective_range_tiles · projection.rs tank_weapon_range_tiles · projection.rs | |
TANK_STATIONARY_RANGE_RAMP_TICKS | 90 (3 s) | sim: combat/projection.rs:13 | tank_effective_range_tiles · projection.rs tick_tank_stationary_range · weapons.rs tank_weapon_range_tiles · projection.rs |
sim: combat/weapons.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
TANK_PLUS_RANGE_RAMP_RATEwritten as 2 in tick_tank_stationary_range() | 2 | With Tank Plus, the stationary range ramp counts this many ticks per tick. | sim: combat/weapons.rs:24 | — |
sim: entity/ability_charges.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
WIND_DASH_MASTER_CHARGESwritten as 2 in ability_max_charges() | 2 | Blink charges a Wind Master holds. | sim: entity/ability_charges.rs:6 | — |
sim: entity/dao.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
DOUBLE_XP_INSIGHT_MULTIPLIERwritten as 2 in gain_insight() | 2 | Insight multiplier while the 2X XP item is active. | sim: entity/dao.rs:85 | — |
sim: movement/barbed_wire.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
BARBED_WIRE_ENTRY_DAMAGEwritten as 10 in apply_entries() | 10 | Damage to a unit Barbed Wire affects each time it moves onto a wire tile. | sim: movement/barbed_wire.rs:59 | — |
sim: movement/speed.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
BARBED_WIRE_SPEED_MULTIPLIERwritten as 0.7 in movement_speed() | 0.7 | Speed multiplier for units Barbed Wire affects while they stand on a wire tile. | sim: movement/speed.rs:60 | — |
sim: services/ability_orders.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
THROW_SWORD_ADEPT_COOLDOWN_MULTIPLIERwritten as 2 in launch_world_ability() | 2 | Throw Sword's cooldown multiplier for a War Adept below Master rank. | sim: services/ability_orders.rs:420 | — |
sim: services/tournament.rs
| Constant | Value | Meaning | Defined at | Used in |
|---|---|---|---|---|
TOURNAMENT_CAPACITYprivate tournament::CAPACITY | 4 | Novices that enter one tournament; it starts when the Grounds is full. | sim: services/tournament.rs:10 | — |
TOURNAMENT_DURATION_TICKSprivate tournament::DURATION | 150 (5 s) | How long a full tournament runs before its Adept comes out. | sim: services/tournament.rs:11 | — |