Skip to main content

Ama's FF14 Combat Sim

Project description

Amas-FF14-Combat-Sim_source

Open source code for Ama's FF14 Combat Sim.

Quick start

If you would like to run the sim but do not want to install it, go to the Python Notebook Github and follow the instruction to open and use CoreSimulator.ipynb.

If you would like to install the sim to run locally, run pip install ama-xiv-combat-sim on your machine to install the core packages. You may want to refer to some of the code in the Python Notebook to grab some visualization/plotting code that visualizes the sim's output.

About

This open-source package simulates the damage of given gearsets and rotations, producing the full distributions over damage values and various statistics, like the expected max damage over N runs (useful for parsers). Currently, all lvl 100 standard combat classes are supported. For issues/feature requests and news, join the Discord server.

Unlike other simulators/spreadsheets, this gives more than just expected damage with an approximation of damage variance- this is an accurate Monte Carlo simulation that gives the full range and distribution over all possible damage values. This tool is an installable pip package, and is also in a standalone Python Notebook that can be run on Google's Colab in 2 mouse clicks.

The sim's main computation engine is written in Numpy, relying on parallelized matrix-based computations for the heavy lifting. It runs fairly fast (a typical ~30s opener with 1M samples takes about 1-2 seconds on a single CPU).

The tool has four advantages over existing simulators/spreadsheets:

  1. handles the simulation of all FF14 job classes in a single place- no need to maintain multiple spreadsheets, etc.,

  2. incorporates all damage rolls and crit/dh procs on a per-damage-instance basis, and rolls them every time the sim is run,

  3. enables the building of several useful community tools that either don't exist, or can be streamlined, using this sim as a backend, and

  4. allows for the incorporation of procs in the simulation process itself.

Some examples of useful tools is a kill time estimator, that takes a 1) full 8-player rotation including LB usage, and 2) a target boss HP values, and outputs a distribution over expected kill times. To see a demonstration of this and other capabilities built on top of the sim, please refer to the Python Notebook Github.

Usage

Imports

After installation, make sure to import ama-xiv-combat-sim so that paths, etc. are set up. After this, you can import sub-packages/functions/files as you wish, and use them. Rotations can be specified both in code in the sim itself, and by passing in CSV files.

Example Single Target, Single Player rotation, typed directly into the sim.

import ama_xiv_combat_sim

from ama_xiv_combat_sim.simulator.damage_simulator import DamageSimulator
from ama_xiv_combat_sim.simulator.rotation_import_utils.csv_utils import CSVUtils
from ama_xiv_combat_sim.simulator.skills import create_skill_library, SkillModifier
from ama_xiv_combat_sim.simulator.stats import Stats
from ama_xiv_combat_sim.simulator.timeline_builders.damage_builder import DamageBuilder
from ama_xiv_combat_sim.simulator.timeline_builders.rotation_builder import RotationBuilder

# Creates the FF14 game skill library
SKILL_LIBRARY = create_skill_library()

# Our stats
stats = Stats(wd=132, weapon_delay=3.36, main_stat=3330, det_stat=2182, crit_stat=2596, dh_stat=940, speed_stat=400, tenacity=601, job_class = 'WAR')

rb = RotationBuilder(stats, SKILL_LIBRARY, ignore_trailing_dots=True, enable_autos=True)

# Specify party status effects first.  In general, this is whatever the name of the button you would press in-game is.
# Note the format is (timestamp, skill name, job class)
rb.add(6.3, 'Chain Stratagem', job_class='SCH')
rb.add(7.1, 'Battle Litany', job_class='DRG')
rb.add(0.8, 'Arcane Circle', job_class='RPR')
rb.add(6.28, 'Embolden', job_class='RDM')
rb.add(6.3, 'Dokumori', job_class='NIN') 

# Actual skill usage for our class, WAR.
# Note here, when uses add_next, we need only specify the name of the skill. In general, this is whatever the name of the button you would press in-game is.
rb.add_next('Tomahawk')
rb.add_next('Infuriate')
rb.add_next('Heavy Swing')
rb.add_next('Maim')
rb.add_next('Grade 8 Tincture')
rb.add_next("Storm's Eye")
rb.add_next('Inner Release')
rb.add_next('Inner Chaos')
rb.add_next('Upheaval')
rb.add_next('Onslaught')
rb.add_next('Primal Rend')
rb.add_next('Inner Chaos')
rb.add_next('Onslaught')
rb.add_next('Fell Cleave')
rb.add_next('Onslaught')
rb.add_next('Fell Cleave')
rb.add_next('Fell Cleave')
rb.add_next('Heavy Swing')
rb.add_next('Maim')
rb.add_next("Storm's Path")
rb.add_next('Fell Cleave')
rb.add_next('Inner Chaos')

# Standard code to build the sim for a rotation and run it
db = DamageBuilder(stats, SKILL_LIBRARY)
sim = DamageSimulator(stats, db.get_damage_instances(rb.get_skill_timing()), num_samples=100000) #for speed, we only use 100k samples.
dps = sim.get_dps() # dps values of our WAR rotation
damage = sim.get_raw_damage() # raw damage of our WAR rotation
per_skill_damage = sim.get_per_skill_damage(rb) # get per-damage-instance information
damage_ranges = sim.get_damage_ranges() # get damage ranges on each skill, detailing crit/dh damage ranges and probabilities.

# Visualization code here. Whatever you want to do to visualize the outputs, etc. Or refer to the Python notebook for examples.

Example Single Target, Single Player rotation, from a CSV file.

import ama_xiv_combat_sim
import os

from ama_xiv_combat_sim.simulator.damage_simulator import DamageSimulator
from ama_xiv_combat_sim.simulator.rotation_import_utils.csv_utils import CSVUtils
from ama_xiv_combat_sim.simulator.skills import create_skill_library, SkillModifier
from ama_xiv_combat_sim.simulator.stats import Stats
from ama_xiv_combat_sim.simulator.timeline_builders.damage_builder import DamageBuilder
from ama_xiv_combat_sim.simulator.timeline_builders.rotation_builder import RotationBuilder

#The name of our rotation file. The expected columns are "Time", "skill_name", "job_class", and "skill_conditional" in that order. See my_rotation.csv in this repo for an example.
csv_filename = 'my_rotation.csv'

# Creates the FF14 game skill library
SKILL_LIBRARY = create_skill_library()

# Our stats
stats = Stats(wd=132, weapon_delay=3.36, main_stat=3330, det_stat=2182, crit_stat=2596, dh_stat=940, speed_stat=400, tenacity=601, job_class = 'WAR')

rb = RotationBuilder(stats, SKILL_LIBRARY, ignore_trailing_dots=True, enable_autos=True)

if not os.path.exists(csv_filename):
  print('File does not exist: {}. Make sure you are in the right directory and have the right file name: '.format(csv_filename))
else:
    rb, _ = CSVUtils.populate_rotation_from_csv(rb, csv_filename)

# Standard code to build the sim for a rotation and run it
db = DamageBuilder(stats, SKILL_LIBRARY)
sim = DamageSimulator(stats, db.get_damage_instances(rb.get_skill_timing()), num_samples=100000) #for speed, we only use 100k samples.
dps = sim.get_dps()
damage = sim.get_raw_damage()
per_skill_damage = sim.get_per_skill_damage(rb) # get per-damage-instance information
damage_ranges = sim.get_damage_ranges() # get damage ranges on each skill, detailing crit/dh damage ranges and probabilities.

Acknowledgements

I'd like to thank the following people/groups for their help! Without them, this sim would not be at all possible:

The Balance

Io Whitespirit

Hint and Hint's damage calc repo

Fürst

Apollo Van-waddleburg

IAmPythagoras and IAmPythagoras's FFXIV-Combat-Simulator and Discord

Cless

Kaiser08259

Mahdi (from the Allagan Studies Discord server)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ama_xiv_combat_sim-2026.3.2.1.tar.gz (235.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ama_xiv_combat_sim-2026.3.2.1-py3-none-any.whl (321.9 kB view details)

Uploaded Python 3

File details

Details for the file ama_xiv_combat_sim-2026.3.2.1.tar.gz.

File metadata

  • Download URL: ama_xiv_combat_sim-2026.3.2.1.tar.gz
  • Upload date:
  • Size: 235.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.2

File hashes

Hashes for ama_xiv_combat_sim-2026.3.2.1.tar.gz
Algorithm Hash digest
SHA256 624b9be32c101db3cafbc95686326887df67429d1faa204324a87c660d529a1f
MD5 13fb9f74f4f1ccc5bf01098cbf2114fb
BLAKE2b-256 63cf84f861d0319c6c816b8a0d54da04aa6706b14cedbb52c5f899566968c67d

See more details on using hashes here.

File details

Details for the file ama_xiv_combat_sim-2026.3.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ama_xiv_combat_sim-2026.3.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 78beca35916c9265dfdfb2bed8885cf039c48b0d8e8efa6df34ee5344d021573
MD5 11e8b47e322c06bf2197af0735520c68
BLAKE2b-256 e6d6c3be9c6d83cb31e3e31d50f37219634ff53c63c7b2fb274218f54198cc86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page