Data and Dice
  • Tournaments
  • CoK-2025
  • Army Reviews
  • Contact
Reading: My Kings of War Combat Simulator: A Deep Dive into Its Mechanics
Share
Data and DiceData and Dice
Font ResizerAa
Search
  • Tournaments
  • CoK-2025
  • Army Reviews
  • Contact
Follow US
Copyright @2024 Data & Dice
Data and Dice > Blog > CoK-2024 > My Kings of War Combat Simulator: A Deep Dive into Its Mechanics
CoK-2024

My Kings of War Combat Simulator: A Deep Dive into Its Mechanics

Discover how my Kings of War combat simulator provides in-depth unit matchup analysis and generates Elo ratings through millions of simulated battles with implemented special rules.

By Trevor
Last updated: 2024-10-08 7:51 pm
By Trevor
Share
8 Min Read
SHARE

Introduction

Welcome to Data & Dice, a Kings of War data analytics blog. As many of you are new readers, I’d like to introduce you to a crucial tool I’ve been developing and refining for about a year now: a comprehensive combat simulator for Kings of War. This simulator serves two primary purposes:

Contents
IntroductionHow the Simulator WorksTurn-Based Phased SimulationSpecial Rules ImplementationMechanics of Special RulesCombat Resolution MechanicsMassive Simulations for Elo RatingsImplemented Special RulesConclusion
  1. Game Matchup Analysis: By loading both armies’ lists into the simulator, I can assess which units have advantages over others. This analysis helps in strategizing for upcoming matches by identifying favorable and unfavorable unit matchups. You’d think that might make me better at the game, but unfortunately, that is not generally the case.
  2. Unit Ranking and Elo Ratings: Behind the scenes, the simulator runs millions of unit-versus-unit combats to generate Elo ratings for all units. These ratings provide insights into each unit’s effectiveness across countless simulated encounters, offering a data-driven approach to understanding unit performance.

Based on comments on a Facebook thread, I wanted to give some additional insight into the simulator. In this post, I’ll provide a high-level overview of what the simulator does and how it works. Additionally, I’ll list all the special rules I’ve implemented so you can understand the depth of consideration that goes into each simulation–and then give me guidance on what else I should incorporate.

How the Simulator Works

The Kings of War combat simulator is designed to model 1v1 unit battles accurately by replicating the game’s mechanics and rules. Here’s a breakdown of its core components and processes:

Turn-Based Phased Simulation

The simulator follows the turn-based structure of Kings of War, with each turn divided into distinct phases. This structure ensures that actions and effects occur in the correct sequence, mirroring actual gameplay. The main phases are:

  • Start of Turn Phase: Units apply effects that occur at the beginning of their turn, such as regeneration of wounds or activation of certain abilities.
  • Movement Phase: Units move according to their speed and any movement-related special rules. The simulator calculates distances, checks for charges, and considers terrain effects.
  • Start of Combat Phase: Pre-combat effects and special rules that activate before attacks are resolved here.
  • Attack Phase: Units perform their attacks, factoring in melee or ranged combat modes. Attack rolls are made, and modifiers from special rules or conditions are applied.
  • Damage Calculation Phase: Damage is calculated based on the number of successful hits and wounds inflicted, considering the defender’s defense and any defensive special rules.
  • Post-Combat Phase: Effects that occur after combat, such as healing from Lifeleech or applying conditions like Disorder, are resolved.
  • Nerve Test Phase: Units that have taken damage test their nerve to determine if they hold, waver, or rout. Modifiers from special rules or inspiring presence are considered.
  • End of Turn Phase: Any end-of-turn effects are applied, and preparations are made for the next unit’s turn.

This phased approach allows the simulator to handle complex interactions between units and their special rules, providing an accurate representation of combat outcomes.

Special Rules Implementation

Special rules are integral to Kings of War, granting units unique abilities that can significantly influence battles. In the simulator, each special rule is implemented as an individual component, encapsulating its own logic and effects.

Mechanics of Special Rules

  • Modular Design: Each special rule is a separate class derived from a base SpecialRule class. This design ensures that adding or modifying rules doesn’t affect the overall system’s integrity.
  • Phase Integration: Special rules have methods corresponding to the game’s phases, allowing them to activate and apply effects at the appropriate times.
  • Unit Association: Units have a list of special rule instances attached to them. During each phase, the simulator calls the relevant methods on these rules, ensuring their effects are considered in simulations.

By implementing special rules individually, the simulator can accurately model their effects and interactions, providing realistic combat outcomes.

Combat Resolution Mechanics

When two units engage in combat within the simulator, several factors are considered to determine the outcome:

  • Attack Calculations: The simulator calculates the number of attacks, factoring in any additional attacks from special rules like Slayer or Rampage. It rolls dice for each attack, applying modifiers to determine hits.
  • Hit Modifiers: Terrain, unit status (e.g., hindered), and special rules can modify the required roll to hit.
  • Damage Calculations: Successful hits are rolled against the opponent’s defense, considering modifiers from special rules like Crushing Strength or Piercing.
  • Applying Damage: Damage is recorded on the defending unit, and effects like Lifeleech can heal the attacking unit.
  • Nerve Tests: After damage is applied, the defending unit makes a nerve test to determine if it holds, wavers, or routs. Special rules like Brutal or Dread can affect this test.

Massive Simulations for Elo Ratings

To generate Elo ratings for units:

  • Automated Combat Simulations: The simulator runs millions of combats between different units, covering a wide range of possible matchups and scenarios.
  • Statistical Aggregation: Results are collected and analyzed statistically to assess each unit’s performance.
  • Elo Calculation: Based on the outcomes, units are assigned Elo ratings that reflect their effectiveness relative to others.

This approach provides a data-driven metric for comparing units, helping players understand the strengths and weaknesses of various options.

Implemented Special Rules

The simulator currently includes the following special rules, each fully implemented to reflect their in-game effects:

  • Big Shield
  • Blast
  • Brutal
  • Cloak of Death
  • Crushing Strength
  • Dread
  • Duelist
  • Elite
  • Ensnare
  • Fly
  • Fury
  • Headstrong
  • Individual
  • Inspiring
  • Iron Resolve
  • Lifeleech
  • Nimble
  • Pathfinder
  • Phalanx
  • Piercing
  • Rampage
  • Radiance of Life
  • Regeneration
  • Scout
  • Shambling
  • Shattering
  • Slayer
  • Steady Aim
  • Stealthy
  • Strider
  • Thunderous Charge
  • Vengeance
  • Very Inspiring
  • Vicious
  • Wild Charge

Conclusion

The development of this combat simulator has been a meticulous process aimed at faithfully representing the mechanics of Kings of War. By simulating combats with detailed consideration of special rules and unit characteristics, the simulator provides valuable insights for both tactical matchup analysis and broader assessments through Elo ratings.

I hope this overview has given you a clear understanding of how the simulator works and the depth of detail involved in its operation. As the simulator continues to evolve, I’ll be implementing more special rules and refining existing ones to enhance its accuracy and utility. If you have specific questions about how interactions are modeled, please let me know, and I can address here!

Thank you for reading, and I look forward to sharing more findings and updates with you in future posts.

You Might Also Like

Tracking Kings of War Faction Popularity Over Time: Part 2

Theme vs Main Lists: Popularity in Kings of War

How You Can Support My Kings of War Data Analytics Blog

Cluster Performance in Kings of War: How Army Archetypes Stack Up Against Each Other

Unveiling the Six Archetypes of Kings of War Armies: Part I

Share This Article
Facebook Twitter Email Print
What do you think?
Love3
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Trending Stories

Tournaments

2023 US Masters: What Magic Items Were Taken

2023-07-10
Tactics

Mastering Chaff in Kings of War: Essential Tactics for Victory

2023-11-01
CoK-2024

How You Can Support My Kings of War Data Analytics Blog

2024-10-03
Tournaments

2024 US Masters: Quick Thoughts

2024-09-02

2024 US Masters Kings of War Tournament Recap: Ogres Dominate, Twilight Kin Shine

2024-09-05
Army Reviews

Harnessing the Abyss: Data Analytics for the Forces of the Abyss

2024-06-03
Data and Dice

Copyright @2024 Data & Dice

Welcome Back!

Sign in to your account

Lost your password?