close

SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft. It is a multi-player event-driven simulator written in C++ that models raid damage. Increasing class synergy and the prevalence of proc-based combat modifiers have eroded the accuracy of traditional calculators that rely upon closed-form approximations to model very complex mechanics. The goal of this simulator is to close the accuracy gap while maintaining a performance level high enough to calculate relative stat weights to aid gear selection.

One of the common criticisms of theorycrafting tools is that they model Patchwerk style fights in which the DPS players are able to focus exclusively on generating damage without worrying about standing in molten lava or other such trivial distractions. While truly modeling individual boss fights is a near-impossible task, SimulationCraft does support a wide array of raid events. See "Modeling Raid Events" and the Examples tab for details.

## Table of Contents

## How This Interface Works

At its core, SimulationCraft is a parameter-driven batch simulation tool. This interface is a very light-weight wrapper that simply helps you build configuration scripts, pass them to the simulator, and then evaluate the results. It relies upon existing character profile management sites to provide interactive manipulation of character talents, glyphs, gear, enchants, etc. The three key steps are:

1. Generate your profile.
2. Simulate your profile.
3. Evaluate your results.

## Navigation

In general the flow is from left to right across the main tabs at the top of the window.

- At Options you set the global sim options, such buffs, scaling, plots and how many targets are in the simulation.
- At Import you load your character profile from a variety of sources.
- At Simulate you make character-specific tweaks, such as gear and action list changes.
- At Overrides a super-user can specify custom parameters that will persist from run to run.
- At Help you can check out our wiki, which will give an explanation of all supporting parameters, including common usage.
- At Log you will find simple text reporting as well as any errors encountered.
- At Results you will find HTML output generated by the simulator.
- At Spell Query you will be able to query everything there is to know about a spell.

Please note that the behavior of the command line and the buttons to either side are context-sensitive. Their function and labels may change as you navigate the main tabs.

## Tips and Tricks

- The label on the main button changes between Simulate!, Import! and Save! depending upon the active main tab. While a character profile is being imported or a simulation is running, the label will be set to Cancel!. Cancelling a simulation run early may still result in valuable information: The results posted are a statistical analysis of many iterations. Cancelling a simulation will simply reduce the number of iterations, increasing the reported statistical error.
- The progress bar is context-sensitive. When viewing a web page under Import or Results it will display the percent-completion of rendering the web page. Under all other tabs, the progress bar will report the percent-completion of the character import or the simulation run.
- The Back and Forward buttons to the left of the command-line allow you to cycle through the history of the main viewport. When viewing a web page under Import or Results they will cycle through the URL history. When viewing Globals, Simulate, or Overrides, these buttons will cycle through previous states. This history is persistent between runs.
- With the exception of the Import tab, pressing the Enter key while the command-line has focus is equivalent to clicking the main button.
- When the command-line has focus, the Up and Down keys cycle through the history of command-line text. This history is persistent between runs.
- The configuration script passed to the simulator is constructed by first adding the options implied by the button-settings under Options, followed by the text under Simulate, followed by the text under Overrides and finally including anything on the command line. It is important to understand that the last setting wins. Users already comfortable with earlier releases of the command-line-only application can use the the GUI command-line in the same manner. For example, one could type armory=us,llane,segv to download and simulate the Hunter Segv from server US-Llane.
- Any option that does not fit the parm=value paradigm is assumed to be the name of a script file which is subsequently loaded. For example, typing Raid_T17M.simc on the command-line will load and simulate the shipped script that contains all supported class/spec combinations using T17M gear. While the history mechanism of the Back and Forward buttons should be sufficient for most needs, it can be convenient to save complicated parameter settings in an external file.

## Global Parameters

SimulationCraft has many, many options that can be loosely categorized into two groups, those that are applied to the active player and those that are applied globally. The Globals section of the Options tab is dedicated to the more commonly changed global parameters.

- Version: The mechanics of World of Warcraft are constantly changing. SimulationCraft endeavors to model the two most recent patch levels. This corresponds to Live and PTR. The Both option will simulate two characters at once: One character will run with Live mechanics and a second character with the name EvilTwinPTR will be run with PTR mechanics. The results will shown side-by-side for easy comparison.
- Latency: During simulation we do not attempt to model the actual latency in all internet traffic, but rather how that latency manifests itself in terms of the inevitable gaps between player actions. Rigorous testing has shown that these gaps differ greatly depending upon whether the preceding action has a cast-time (enabling queueing), is instant-cast (triggering the GCD), or is channeled (requiring extra care not to clip the last tick). SimulationCraft uses random values for these gaps, whose range is centered on user-supplied values.
- Iterations: The largest drawback of simulation is that in order to get meaningful answers, one must run the simulation many, many times to acquire a trustworthy statistical average. More iterations means better accuracy, at the cost of longer runtimes. When calculating scale factors one must iterate enough such that the simulation error margin is sufficiently smaller than the change in stat value being analyzed.
- Length(sec): It is important to understand that the length of the fight is a goal and not a hard limit. Half-way through the first iteration the health of the target (boss) is estimated based upon damage done up to that point. The simulation ends when the target dies and not when the desired fight length is reached. At the end of every proceeding iteration, the target health is re-evaluated based upon whether the fight ended early or late. The end result is that after many iterations, the average fight length matches the desired value.
- Vary Length: In order to smooth out the effects of very powerful procs and/or abilities one can tell the simulator to vary the fight length. The sim will perform an even distribution of fight lengths from length-variance to length+variance.
- Adds: While it is possible to specify raid events that spawn adds that are only temporary, this option specifies adds that are present the entire fight.
- Fight Style: One of the most common criticisms of theorycrafting tools is that they only model tank-n-spank fights in which the player gets to stand perfectly still just hitting keys/buttons. SimulationCraft supports a wide array of raid events including movement, stuns, splash damage, target (in)vulnerability, etc. The Helter Skelter option throws in an interesting mix of these random events so that the user may see how badly DPS suffers under adverse conditions. The Hectic Cleave option puts the character into an encounter that is intended to simulate the Horridon from Throne of Thunder.
- Player Skill: Whenever a player is considered ready to do something the sim walks through their prioritized list of actions and executes the very first one that is available. If a player is below 100% skill then there is a chance that it may skip an action even if it is available and make use of a lower-priority action instead. DoTs are considered available when the last tick will occur after current_time+dot_cast_time.
- Threads: The iterative nature of SimulationCraft means that parallel processing is a very effective means to increase performance. Most modern desktops have at least two CPU cores. Match the number of threads to the number of CPU cores for optimal performance.
- Thread Priority: When setting Threads to max, it can leave the computer in such a state that it is unusable for anything else while the simulation is running. When this is set to 'lowest', the operating system will yield cpu time to any other application that requests it, which will allow multitasking in most situations.
- Deterministic RNG: One of the most difficult problems associated with simulation is variance. Decreasing variance will reduce the number of iterations required to reach a confidence level in the results. Turning on Deterministic RNG will introduce determinism in both the cycle and the distribution of individual RNG calculations. This will increase convergence by an order of magnitude, allowing the use of far fewer iterations. However, as with formulation, introducing this kind of determinism into the RNG can interfere with the scale factor generation of non-linear stats. Use with caution.
- Armory Region: This option controls which region (US, EU, TW, CN) the Armory Import tab uses.
- Armory Spec: Players may have two talent/glyph combinations, but only one may be active at a time. When a player is downloaded from the Armory, by default the active talent/glyph setup is used. This parameter allows one to access the inactive setup during import.
- Generate Debug: This option provides a peek under the hood. Running with Log Only will force the number of iterations to just one and generate a human-readable combat log that is stored in the Log tab. Running with Gory Details dramatically increases the size of the combat log and makes it considerably less human-readable. It will also provide detailed debug output during character import. Since turning on debug allows only one iteration, scale factor and plot generation are turned off.

## Scale Factors

Scale factors represent the change in DPS per change in stat value. They are helpful in evaluating incremental gear changes, and are calculated by first making a baseline simulation and then comparing it against subsequent runs in which one stat is increased or decreased. To calculate trustworthy scale factors, the simulation margin of error must be sufficiently smaller than the change in stat value. To reduce the margin of error a large number of iterations is required. Since multiple simulations must be run with a higher-than-normal number of iterations, calculating scale factors can take 50x to 100x longer than a standard DPS run.

ScaleFactor(Stat) = ( DPS(Baseline+StatDelta) - DPS(Baseline) ) / StatDelta

By default, SimulationCraft uses stat deltas between 150 and 300 depending upon the stat. Most stat deltas are positive, measuring the increase in DPS.

## Plots

SimulationCraft will optionally generate DPS-per-stat graphs using a +/- 50 stat point range given the initial gear point. It should be noted that simulation is not well suited for plot generation. Precision is not as important so fewer iterations are required. However, the sheer number of sample points needed to generate a plot make it even more cpu-intensive than scale factor generation.

## Importing from the Armory

To download a character from the Armory, merely navigate the web view to a character profile page. The easiest way to do this is via the Search mechanism. The Armory Spec toggle under Options controls whether to use the active or the inactive talent setup. There is no need to wait for the web page to be fully rendered. The import process uses the URL at the command-line. Note that the URL at the command-line can be modified directly in the same manner as a normal web browswer. The Armory tab defaults to US region. See the Options tab to change the region to EU, TW, or CN.

## Saving Results

To save text that may be conveniently cut-and-pasted into an email or forum, go to the Log tab and select the portion of interest. To save the entire log, specify the file name at the command line and press Save!.

To save HTML, go to the Results tab, specify the file name at the command line, and press Save!.

These HTML files are all-inclusive. The images are generate using GoogleCharts which means that the HTML cannot be viewed offline.

## Priority Lists, Not Rotations

A key part of the simulation is the player artificial intelligence. It is important to understand that there is no rotation to specify. Instead, the player is given a priority list of actions. Whenever the player is looking for something to do (just finished an action and not waiting on the GCD), it will simply walk the list of actions and perform the first one that is ready. For example, damage-over-time actions are not ready until they are finished ticking (minus the cast-time, of course). Temporary buffs and cooldowns can also prevent certain actions from being considered ready. There are a large variety of conditionals that can be applied to each action in the priority list that can limit their execution even further. The default action list (actions+=) generated during character import will demonstrate this. For more details, see the Help tab.

## Modeling Raid Events

Experimenting with SimulationCraft's various supported events allows one to determine how susceptible talent/gear combinations are to adverse conditions. The intervals and durations of each event are user-specified, as are the degree of randomness applied to each. Supported events include: movement, stuns, AoE damage, adds spawning, boss (in)vulnerability, boss casting requiring use interrupts.

- Movement: When a player is moving auto-attacks are halted and only ranged instant-casts are allowed. To further control the actions taken while moving, there is a moving=1 conditional that can be specified with actions to prevent them from being used in normal circumstances.
- Stun: While stunned, even instant-casts are forbidden.
- Damage: The damage event is used to model splash damage from AoE.
- Adds: Note that some modules have implemented more aoe/multi-dot capability, so some modules take more advantage of adds spawning than others.
- Vulnerable: Boss vulnerability is a 2x damage multiplier.
- Invulnerable: Boss invulnerability will remove any existing player DoTs on the target, but it does not yet remove player debuffs.
- Casting: The casting event is used to model players changing their rotations to perform interrupts. Player interrupt actions are not considered ready unless the boss is in mid-cast. This means that it is safe to give these actions a high-priority because they will not be used unless necessary.

These are only a few examples. For more details, see the Help tab.

### Every 30sec, all players and pets are required to move for 5sec

raid_events+=/movement,cooldown=30,duration=5

### Every 30sec, all players are required to move for 5sec while pets remain stationary

raid_events+=/movement,players_only=1,cooldown=30,duration=5

### Every 40sec, all players within 5yards are required to move for 7sec

raid_events+=/movement,cooldown=40,duration=7,distance<=5

### Every 60sec, all players are stunned for 2sec

raid_events+=/stun,cooldown=60,duration=2

### Every 1min, 3 additional targets are nearby the boss and remain for 20sec

raid_events+=/adds,count=3,cooldown=60,duration=20

### Every 2min, the target becomes invulnerable, interrupting players and shedding all DoTs.

raid_events+=/invulnerable,cooldown=120,duration=3

### Interrupt boss's 3 second cast every 30 seconds starting 15sec into fight

raid_events+=casting,cooldown=30,duration=3,first=15