This page collects the math underlying the simulation — Battle Power, damage exchange, morale, march rate, production yield, and victory scoring. Most formulas are canonical in military_war_system.md §8, combat_system.md, metrics.md, and economy_system.md.
Constants reference. Every constant referenced here lives in metrics & constants. When a number appears in this page, it should match the constants register.
The composite combat-strength score. Computed per unit slot per tick.
unit_slot_BP =
base_LP_atk_score
× equipment_multiplier
× hero_attach_multiplier
× formation_modifier
× terrain_modifier
× weather_modifier
× morale_modifier
× divine_effect_modifier
× culture_flag_modifier
The army's BP is the sum across active slots.
base_LP_atk_score = LP × (Atk / Cd) × (1 + Armor_M_factor + Armor_P_factor)
where Armor factors translate to damage-absorbed-per-tick.
equipment_multiplier = (1 + weapon_quality_tier × 0.15) × (1 + armor_tier × 0.10) × tool_factor
(Multipliers approximate; see armory_system.md §8 for the canonical formula.)
hero_attach_multiplier = 1 + (hero_level × 0.05) + (hero_archetype_bonus × culture_match_factor)
A level-10 hero matched to your culture can ~1.7× the attached army's BP.
Each tick, slot pairings exchange damage:
damage_dealt = attacker_BP × pair_alignment × tick_duration
- defender_armor_absorbed
- defender_morale_steady_factor
+ attacker_focus_fire_bonus
pair_alignment is 1.0 for a perfect slot match, lower for mismatched targeting (e.g., archers shooting heavy infantry → 0.7, archers shooting cavalry mid-charge → 1.2).
Morale is a 0–100 per-slot value.
morale_tick =
base_morale
- casualty_rate × 8
- weather_drag
- supply_loss_factor
+ hero_aura
+ divine_buff
+ ally_intervention_bonus
Thresholds:
Effective hexes per day:
hexes_per_day =
base_speed
× terrain_multiplier
× road_tier_multiplier
× weather_drag
× fatigue_modifier
× culture_terrain_flag
(See movement.)
Per-tick output of an extractor / refiner:
production_per_tick =
base_rate
× class_composition_factor
× tech_modifier
× climate_factor
× culture_flag_factor
× leader_archetype_bonus
× wonder_global_bonus
class_composition_factor rewards balanced citizen / artisan ratios (see society).
Per-day decay:
need_decay = base_decay - building_offset - leader_offset - tech_offset
If need_decay is positive (decay outpaces offsets), the gauge drops.
belief_gain_per_month =
temple_count × tier_multiplier
+ festival_completed_bonus
+ sacred_site_proximity_bonus
+ missionary_conversion_returns
- decay_from_neglect
- enemy_missionary_pressure
Tier crossings: 25 / 80 / 160 / 280 / 420 favor points.
DI_score =
Σ(belief_tier_for_my_gods × tier_weight)
+ avatar_kills × 50
+ creature_kills × 20
+ state_wonder_completed × 100
- rival_missionary_attacks_received
(Per victory_conditions.md §3B.)
trade_score =
my_alliance_trade_volume / global_trade_volume
× 100
+ treasury_factor
+ leader_route_bonus
(Per victory_conditions.md §4B.)
military_score =
Σ(my_capital_captures × 50)
+ Σ(my_city_captures × 10)
+ (my_territory_hex_count / total_hex_count) × 100
- rival_active_war_pressure_on_me
(Per victory_conditions.md §6B.)
wonder_score = my_alliance_wonder_count
+ 0.5 × ally_wonder_integrity_factor
Threshold: 5 distinct wonders. Hold timer enforces stability.
peace_score =
concordance_signatory_player_share
+ memorial_wonder_completion
- active_wars_within_concordance × penalty
Threshold: 60% player coverage + 3+ alliances + zero active wars within Concordance.
attribution_tier_after_action =
base_attribution
+ audacity (action visibility)
+ counter_intel_strength
+ duration_in_attribution_zone
- attacker_skill (Spy Master hero level)
Tiers 0–4 (see espionage).
metrics.md. Change a constant there → re-derive here → audit downstream.app/tools/smoke_*.ts exercise these formulas end-to-end. If a player observes BP / score that contradicts these formulas, file a bug.Sources: military_war_system.md §8 (BP), combat_system.md, metrics.md, economy_system.md, victory_conditions.md §13.