X-Wing Miniatures

Combat Analyzer

Daniel Ramírez

The Game

In X-Wing Miniatures Game, you take the role of squad leader and command a group of merciless Imperial, daring Rebel pilots or the best bounty hunters and Villains from the galaxy in furious ship-to-ship space combat.

No, I don't work at Fantasy Flight or any X-Wing Miniatures related company, I'm just a huge Star Wars fan and I have been playing this awesome game for almost a year. And loving it.

Playing

The game has two main steps: movement (not relevant here) and combat. Each miniature has an attack and defense value, a number that indicates the number of dices to roll. At the end of each round, each miniature may attack 1 ship within range (not relevant here either).

The focus token allow you to change eyes to hits or evades, the target lock token allow you to reroll any number of attack dices, and the evade token increases in 1 the total of evades.

Combat step

So let's go for a classic: you are playing an Imperial TIE Defender (attack: 3) and your foe is using an E-Wing (defense: 3).

Some typicall questions that players may ask themselves are:

  • Is it better for the attacker to perform a target lock or a focus action if he is playing offensive?
  • Is it better for the E-Wing perform a focus or an evade action if he is not going to perform an attack this round?
  • Should I spend my focus token during my attack, or save it to use it while defending?

If the total acumulated damage received is >= (hull + shields) then the ship is destroyed.

damage = (#hits + #crits + #focus*atkFocus) - (#evades + #focus*defFocus)

Assuming atkFocus and defFocus are [0,1] as the player uses the focus token or don't.

Solutions

So far, the only applications that I have found to perform an statistical dice analysis are based on sampling and averaging, which is not an efficient way. In the first version of the application it reads the ship's data from a csv file and plots the odds of the ship's rolls.

  # Assuming 3 dice of attack
  x <- seq(0, 3, by=1)
  hit_prob <- 4/8
  hit_focused_prob <- 6/8

  dbinom(x, 3, hit_prob)*100
## [1] 12.5 37.5 37.5 12.5
  dbinom(x, 3, hit_focused_prob)*100
## [1]  1.5625 14.0625 42.1875 42.1875

Developed for players

Being a game in a continuous evolution, the interest of the players in perform accurate analysis of their squadrons has grown. Neither Fantasy Flight Games nor Edge Entertainment have developed any tool regarding the competitive live of their games, despite most of them have regional and worldwide championships.

As of today, the Combat Analyzer performs an statistical analysis of each ship's odds to perform an attack or defense roll with success, including most modificators in the game (there are tokens which can be used to affect the odds of the dice as you might have noticed from the picture in the previous slide).