diff --git a/.gitignore b/.gitignore
index b958cfa24e..7ea0db406d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,7 @@ node_modules
ui/core/index.ts
ui/*/*/index.html
.dirstamp
-.vscode/launch.json
+
# IDE folders
.idea
.history
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 7f94fc83f2..ed3ace36f7 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -101,5 +101,6 @@
],
"[go]": {
"editor.defaultFormatter": "golang.go"
- }
+ },
+ "makefile.configureOnOpen": false
}
diff --git a/README.md b/README.md
index 08105061ae..52ba4c46f1 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,6 @@
-Welcome to the WoW Cataclysm Classic simulator! If you have questions or are thinking about contributing, [join our discord](https://discord.gg/jJMPr9JWwx 'https://discord.gg/jJMPr9JWwx') to chat!
+# WoW Mists of Pandaria Classic Simulator
+
+Welcome to the WoW Mists of Pandaria Classic simulator! If you have questions or are thinking about contributing, [join our discord](https://discord.gg/jJMPr9JWwx) to chat!
The primary goal of this project is to provide a framework that makes it easy to build a DPS sim for any class/spec, with a polished UI and accurate results. Each community will have ownership / responsibility over their portion of the sim, to ensure accuracy and that their community is represented. By having all the individual sims on the same engine, we can also have a combined 'raid sim' for testing raid compositions.
@@ -8,7 +10,7 @@ This project is licensed with MIT license. We request that anyone using this sof
[Support our devs via Patreon.](https://www.patreon.com/wowsims)
-# Downloading Sim
+## Downloading Sim
Links for latest Sim build:
@@ -20,256 +22,9 @@ Then unzip the downloaded file, then open the unzipped file to open the sim in y
Alternatively, you can choose from a specific relase on the [Releases](https://github.com/wowsims/mop/releases) page and click the suitable link under "Assets"
-# Local Dev Installation
-
-This project has dependencies on Go >=1.23, protobuf-compiler and the corresponding Go plugins, and node >= 20.
-
-## Ubuntu
-
-Do not use apt to install any dependencies, the versions they install are all too old.
-Script below will curl latest versions and install them.
-
-```sh
-# Standard Go installation script
-curl -O https://dl.google.com/go/go1.23.4.linux-amd64.tar.gz
-sudo rm -rf /usr/local/go
-sudo tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz
-echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.bashrc
-echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
-echo 'export PATH=$PATH:$GOPATH/bin' >> $HOME/.bashrc
-source $HOME/.bashrc
-
-cd mop
-
-# Install protobuf compiler and Go plugins
-sudo apt update && sudo apt upgrade
-sudo apt install protobuf-compiler
-go get -u -v google.golang.org/protobuf
-go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
-
-# Install node
-curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
-nvm install 20.13.1
-
-# Install the npm package dependencies using node
-npm install
-```
-
-## Docker
-
-Alternatively, install Docker and your workflow will look something like this:
-
-```sh
-git clone https://github.com/wowsims/mop.git
-cd mop
-
-# Build the docker image and install npm dependencies (only need to run these once).
-docker build --tag wowsims-mop .
-docker run --rm -v $(pwd):/mop wowsims-mop npm install
-
-# Now you can run the commands as shown in the Commands sections, preceding everything with, "docker run --rm -it -p 8080:8080 -v $(pwd):/mop wowsims-mop".
-# For convenience, set this as an environment variable:
-MOP_CMD="docker run --rm -it -p 8080:8080 -v $(pwd):/mop wowsims-mop"
-
-#For the watch commands assign this environment variable:
-MOP_WATCH_CMD="docker run --rm -it -p 8080:8080 -p 3333:3333 -p 5173:5173 -e WATCH=1 -v $(pwd):/mop wowsims-mop"
-
-# ... do some coding on the sim ...
-
-# Run tests
-$(echo $MOP_CMD) make test
-
-# ... do some coding on the UI ...
-
-# Host a local site
-$(echo $MOP_CMD) make host
-```
-
-## Windows
-
-If you want to develop on Windows, we recommend setting up a Ubuntu virtual machine (VM) or running Docker using [this guide](https://docs.docker.com/desktop/windows/wsl/ 'https://docs.docker.com/desktop/windows/wsl/') and then following the Ubuntu or Docker instructions, respectively.
-
-If you prefer working natively:
-
-- Install [Go](https://go.dev/dl/s), [NVM Windows](https://github.com/coreybutler/nvm-windows), and [make](https://gnuwin32.sourceforge.net/packages/make.htm) (you can also install it through Chocolate).
-- Install and use Node 20+ from NVM, for example `nvm install 20 && nvm use 20`
-- Setup GO workspace following [this guide](https://www.freecodecamp.org/news/setting-up-go-programming-language-on-windows-f02c8c14e2f/)
-- Download GO dependencies [protobuf](https://github.com/protocolbuffers/protobuf/releases), [gopls](https://github.com/golang/tools/releases), [air-verse](https://github.com/air-verse/air/releases), [protobuf-go](https://github.com/protocolbuffers/protobuf-go/releases), and [staticcheck](https://github.com/dominikh/go-tools/releases). Unzip them into your GO workspace directory.
-
-With all the dependencies setup, you should be able to run the `make` commands and compile the project.
-
-If you prefer working natively:
-
-- Install [Go](https://go.dev/dl/s), [NVM Windows](https://github.com/coreybutler/nvm-windows), and [make](https://gnuwin32.sourceforge.net/packages/make.htm) (you can also install it through Chocolate).
-- Install and use Node 20+ from NVM, for example `nvm install 20 && nvm use 20`
-- Setup GO workspace following [this guide](https://www.freecodecamp.org/news/setting-up-go-programming-language-on-windows-f02c8c14e2f/)
-- Download GO dependencies [protobuf](https://github.com/protocolbuffers/protobuf/releases), [gopls](https://github.com/golang/tools/releases), [air-verse](https://github.com/air-verse/air/releases), [protobuf-go](https://github.com/protocolbuffers/protobuf-go/releases), and [staticcheck](https://github.com/dominikh/go-tools/releases). Unzip them into your GO workspace directory.
-
-With all the dependencies setup, you should be able to run the `make` commands and compile the project.
-
-## Mac OS
-
-- Docker is available in OS X as well, so in theory similar instructions should work for the Docker method
-- You can also use the Ubuntu setup instructions as above to run natively, with a few modifications:
- - You may need a different Go installer if `go1.18.3.linux-amd64.tar.gz` is not compatible with your system's architecture; you can do the Go install manually from `https://go.dev/doc/install`.
- - OS X uses Homebrew instead of apt, so in order to install protobuf-compiler you’ll instead need to run `brew install protobuf-c` (note the package name is also a little different than in apt). You might need to first update or upgrade brew.
- - The provided install script for Node will not included a precompiled binary for OS X, but it’s smart enough to compile one. Be ready for your CPU to melt on running `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash`.
-
-# Commands
-
-We use a makefile for our build system. These commands will usually be all you need while developing for this project:
-
-```sh
-# Installs a pre-commit git hook so that your go code is automatically formatted (if you don't use an IDE that supports that). If you want to manually format go code you can run make fmt.
-# Also installs `air` to reload the dev servers automatically
-make setup
-
-# Run all the tests. Currently only the backend sim has tests.
-make test
-
-# Update the expected test results. This will need to be run after adding/removing any tests, and also if test results change due to code changes.
-make update-tests
-
-# Host a local version of the UI at http://localhost:8080. Visit it by pointing a browser to
-# http://localhost:8080/mop/YOUR_SPEC_HERE, where YOUR_SPEC_HERE is the directory under ui/ with your custom code.
-# Recompiles the entire client before launching using `make dist/mop`
-make host
-
-# With file-watching so the server auto-restarts and recompiles on Go or TS changes:
-WATCH=1 make host
-
-# Delete all generated files (.pb.go and .ts proto files, and dist/)
-make clean
-
-# Recompiles the ts only for the given spec (e.g. make host_elemental_shaman)
-make host_$spec
-
-# Recompiles the `wowsimmop` server binary and runs it, hosting /dist directory at http://localhost:3333/mop.
-# This is the fastest way to iterate on core go simulator code so you don't have to wait for client rebuilds.
-# To rebuild client for a spec just do 'make $spec' and refresh browser.
-make rundevserver
-
-# With file-watching so the server auto-restarts and recompiles on Go or TS changes:
-WATCH=1 make rundevserver
-
-
-# The same as rundevserver, recompiles `wowsimmop` binary and runs it on port 3333. Instead of serving content from the dist folder,
-# this command also runs `vite serve` to start the Vite dev server on port 5173 (or similar) and automatically reloads the page on .ts changes in less than a second.
-# This allows for more rapid development, with sub second reloads on TS changes. This combines the benefits of `WATCH=1 make rundevserver` and `WATCH=1 make host`
-# to create something that allows you to work in any part of the code with ease and speed.
-# This might get rolled into `WATCH=1 make rundevserver` at some point.
-WATCH=1 make devmode
-
-# This is just the same as rundevserver currently
-make devmode
-
-# This command recompiles the workers in the /ui/worker folder for easier debugging/development
-# Can be used with or without WATCH command
-make webworkers
-
-# With file watch enabled
-WATCH=1 make webworkers
-
-# Creates the 'wowsimmop' binary that can host the UI and run simulations natively (instead of with wasm).
-# Builds the UI and the compiles it into the binary so that you can host the sim as a server instead of wasm on the client.
-# It does this by first doing make dist/mop and then copying all those files to binary_dist/mop and loading all the files in that directory into its binary on compile.
-make wowsimmop
-
-# Using the --usefs flag will instead of hosting the client built into the binary, it will host whatever code is found in the /dist directory.
-# Use --wasm to host the client with the wasm simulator.
-# The server also disables all caching so that refreshes should pickup any changed files in dist/. The client will still call to the server to run simulations so you can iterate more quickly on client changes.
-# make dist/mop && ./wowsimmop --usefs would rebuild the whole client and host it. (you would have had to run `make devserver` to build the wowsimmop binary first.)
-./wowsimmop --usefs
-
-# Generate code for the sim database (db.json). Only necessary if you changed the items generator.
-# Useful only if you're actively working on the generator and have already run make db locally at least once.
-make simdb
-
-# Generate data from WoW client files
-# Requires dotnet 9 to run
-# Uses tools/database/generator-settings.json for settings
-# Also runs make simdb
-# This is what you will use most of the time for generation
-make db
-
-# Same as make db but from the ptr client
-# Uses tools/database/ptr-generator-settings.json for settings
-make ptrdb
-```
-
-## (Optional) Installing Dotnet 9 - Required if generating client data
-
-```sh
-curl -L https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
-chmod +x ./dotnet-install.sh
-./dotnet-install.sh --channel 9.0
-echo 'export PATH=$PATH:$HOME/.dotnet' >> ~/.bashrc
-source ~/.bashrc
-```
-
-# Adding a Sim
-
-So you want to make a new sim for your class/spec! The basic steps are as follows:
-
-- [Create the proto interface between sim and UI.](#create-the-proto-interface-between-sim-and-ui)
-- [Implement the UI.](#implement-the-ui)
-- [Implement the sim.](#implement-the-sim)
-- [Launch the site.](#launch-the-site)
-
-## Create the proto interface between Sim and UI
-
-This project uses [Google Protocol Buffers](https://developers.google.com/protocol-buffers/docs/gotutorial 'https://developers.google.com/protocol-buffers/docs/gotutorial') to pass data between the sim and the UI. TLDR; Describe data structures in .proto files, and the tool can generate code in any programming language. It lets us avoid repeating the same code in our Go and Typescript worlds without losing type safety.
-
-For a new sim, make the following changes:
-
-- Add a new value to the `Spec` enum in proto/common.proto. **NOTE: The name you give to this enum value is not just a name, it is used in our templating system. This guide will refer to this name as `$SPEC` elsewhere.**
-- Add a 'proto/YOUR_CLASS.proto' file if it doesn't already exist and add data messages containing all the class/spec-specific information needed to run your sim.
-- Update the `PlayerOptions.spec` field in `proto/api.proto` to include your shiny new message as an option.
-
-That's it! Now when you run `make` there will be generated .go and .ts code in `sim/core/proto` and `ui/core/proto` respectively. If you aren't familiar with protos, take a quick look at them to see what's happening.
-
-## Implement the UI
-
-The UI and sim can be done in either order, but it is generally recommended to build the UI first because it can help with debugging. The UI is very generalized and it doesn't take much work to build an entire sim UI using our templating system. To use it:
-
-- Modify `ui/core/proto_utils/utils.ts` to include boilerplate for your `$SPEC` name if it isn't already there.
-- Create a directory `ui/$SPEC`. So if your Spec enum value was named, `elemental_shaman`, create a directory, `ui/elemental_shaman`.
-- Copy+paste from another spec's UI code.
-- Modify all the files for your spec; most of the settings are fairly obvious, if you need anything complex just ask and we can help!
-- Finally, add a rule to the `makefile` for the new sim site. Just copy from the other site rules already there and change the `$SPEC` names.
-
-No .html is needed, it will be generated based on `ui/index_template.html` and the `$SPEC` name.
-
-When you're ready to try out the site, run `make host` and navigate to `http://localhost:8080/mop/$SPEC`.
-
-## Implement the Sim
-
-This step is where most of the magic happens. A few highlights to start understanding the sim code:
-
-- `sim/wasm/main.go` This file is the actual main function, for the [.wasm binary](https://webassembly.org/ 'https://webassembly.org/') used by the UI. You shouldn't ever need to touch this, but just know its here.
-- `sim/core/api.go` This is where the action starts. This file implements the request/response messages defined in `proto/api.proto`.
-- `sim/core/sim.go` Orchestrates everything. Main event loop is in `Simulation.RunOnce`.
-- `sim/core/agent.go` An Agent can be thought of as the 'Player', i.e. the person controlling the game. This is the interface you'll be implementing.
-- `sim/core/character.go` A Character holds all the stats/cooldowns/gear/etc common to any WoW character. Each Agent has a Character that it controls.
-
-Read through the core code and some examples from other classes/specs to get a feel for what's needed. Hopefully `sim/core` already includes what you need, but most classes have at least 1 unique mechanic so you may need to touch `core` as well.
-
-Finally, add your new sim to `RegisterAll()` in `sim/register_all.go`.
-
-Don't forget to write unit tests! Again, look at existing tests for examples. Run them with `make test` when you're ready.
-
-# Launch the site
-
-When everything is ready for release, modify `ui/core/launched_sims.ts` and `ui/index.html` to include the new spec value. This will add the sim to the dropdown menu so anyone can find it from the existing sims. This will also remove the UI warning that the sim is under development. Now tell everyone about your new sim!
-
-# Add your spec to the raid sim
-
-Don't touch the raid sim until the individual sim is ready for launch; anything in the raid sim is publicly accessible. To add your new spec to the raid sim, do the following:
-
-- Add a reference to the individual sim in `ui/raid/tsconfig.json`. DO NOT FORGET THIS STEP or Typescipt will silently do very bad things.
-- Import the individual sim's css file from `ui/raid/index.scss`.
-- Update `ui/raid/presets.ts` to include a constructor factory in the `specSimFactories` variable and add configurations for new Players in the `playerPresets` variable.
-
-# Deployment
+## Documentation
-Thanks to the workflow defined in `.github/workflows/deploy.yml`, pushes to `master` automatically build and deploy a new site so there's nothing to do here. Sit back and appreciate your new sim!
+- [Installation Guide](docs/installation.md)
+- [Development Commands](docs/commands.md)
+- [Adding a New Sim](docs/adding_sim.md)
+- [Internationalization](docs/i18n_guide.md)
diff --git a/assets/locales/en.json b/assets/locales/en.json
new file mode 100644
index 0000000000..ef14578553
--- /dev/null
+++ b/assets/locales/en.json
@@ -0,0 +1,207 @@
+{
+ "landing": {
+ "navigation": {
+ "home": "Home",
+ "simulations": "Simulations",
+ "about": "About",
+ "toggle": "Toggle navigation"
+ },
+ "simulations": {
+ "full_raid": "Full Raid Sim"
+ },
+ "home": {
+ "title": "WoWSims - Mists of Pandaria",
+ "description": "A powerful simulation tool for World of Warcraft: Mists of Pandaria",
+ "welcomeDescription": "Welcome to WoWSims - Mists of Pandaria! This is a community-driven project to provide class and raid simulations for World of Warcraft® Mists of Pandaria Classic together with the leading theorycrafters and class representatives."
+ },
+ "header": {
+ "wowsims": "WoWSims",
+ "expansion": "Mists of Pandaria",
+ "supportDevs": "Support our devs"
+ }
+ },
+ "common": {
+ "phases": {
+ "1": "Phase 1 (T14)",
+ "2": "Phase 2 (T15)",
+ "3": "Phase 3 (T16)"
+ },
+ "status": {
+ "unlaunched": "Not Yet Supported",
+ "alpha": "Alpha",
+ "beta": "Beta",
+ "launched": "Launched"
+ },
+ "classes": {
+ "death_knight": "Death Knight",
+ "druid": "Druid",
+ "hunter": "Hunter",
+ "mage": "Mage",
+ "monk": "Monk",
+ "paladin": "Paladin",
+ "priest": "Priest",
+ "rogue": "Rogue",
+ "shaman": "Shaman",
+ "warlock": "Warlock",
+ "warrior": "Warrior"
+ },
+ "specs": {
+ "death_knight": {
+ "blood": "Blood",
+ "frost": "Frost",
+ "unholy": "Unholy"
+ },
+ "druid": {
+ "balance": "Balance",
+ "feral": "Feral",
+ "guardian": "Guardian",
+ "restoration": "Restoration"
+ },
+ "hunter": {
+ "beast_mastery": "Beast Mastery",
+ "marksmanship": "Marksmanship",
+ "survival": "Survival"
+ },
+ "mage": {
+ "arcane": "Arcane",
+ "fire": "Fire",
+ "frost": "Frost"
+ },
+ "monk": {
+ "brewmaster": "Brewmaster",
+ "mistweaver": "Mistweaver",
+ "windwalker": "Windwalker"
+ },
+ "paladin": {
+ "holy": "Holy",
+ "protection": "Protection",
+ "retribution": "Retribution"
+ },
+ "priest": {
+ "discipline": "Discipline",
+ "holy": "Holy",
+ "shadow": "Shadow"
+ },
+ "rogue": {
+ "assassination": "Assassination",
+ "combat": "Combat",
+ "subtlety": "Subtlety"
+ },
+ "shaman": {
+ "elemental": "Elemental",
+ "enhancement": "Enhancement",
+ "restoration": "Restoration"
+ },
+ "warlock": {
+ "affliction": "Affliction",
+ "demonology": "Demonology",
+ "destruction": "Destruction"
+ },
+ "warrior": {
+ "arms": "Arms",
+ "fury": "Fury",
+ "protection": "Protection"
+ }
+ },
+ "stats": {
+ "strength": "Strength",
+ "agility": "Agility",
+ "stamina": "Stamina",
+ "intellect": "Intellect",
+ "spirit": "Spirit",
+ "spell_hit": "Spell Hit",
+ "spell_crit": "Spell Crit",
+ "spell_haste": "Spell Haste",
+ "expertise": "Expertise",
+ "dodge": "Dodge",
+ "parry": "Parry",
+ "mastery": "Mastery",
+ "attack_power": "Attack Power",
+ "ranged_attack_power": "Ranged Attack Power",
+ "spell_power": "Spell Power",
+ "pvp_resilience": "PvP Resilience",
+ "pvp_power": "PvP Power",
+ "armor": "Armor",
+ "bonus_armor": "Bonus Armor",
+ "health": "Health",
+ "mana": "Mana",
+ "mp5": "MP5",
+ "main_hand_dps": "Main Hand DPS",
+ "off_hand_dps": "Off Hand DPS",
+ "ranged_dps": "Ranged DPS",
+ "block": "Block",
+ "melee_speed_multiplier": "Melee Speed Multiplier",
+ "ranged_speed_multiplier": "Ranged Speed Multiplier",
+ "cast_speed_multiplier": "Cast Speed Multiplier",
+ "melee_haste": "Melee Haste",
+ "ranged_haste": "Ranged Haste",
+ "melee_hit": "Melee Hit",
+ "melee_crit": "Melee Crit"
+ }
+ },
+ "sim": {
+ "title": "Mists of Pandaria {spec} {class} simulator",
+ "description": "{spec} {class} simulations for World of Warcraft® Mists of Pandaria Classic."
+ },
+ "gear": {
+ "title": "Gear"
+ },
+ "settings": {
+ "title": "Settings"
+ },
+ "talents": {
+ "title": "Talents"
+ },
+ "rotation": {
+ "title": "Rotation"
+ },
+ "results": {
+ "title": "Results"
+ },
+ "import": {
+ "title": "Import"
+ },
+ "export": {
+ "title": "Export"
+ },
+ "sidebar": {
+ "iterations": "Iterations",
+ "buttons": {
+ "simulate": "Simulate",
+ "stat_weights": "Stat Weights",
+ "suggest_reforges": "Suggest Reforges"
+ },
+ "header": {
+ "title": "WoWSims - Mists of Pandaria",
+ "phase": "{{phase}} - {{status}}"
+ },
+ "character_stats": {
+ "title": "Stats",
+ "melee_crit_cap": "Melee Crit Cap",
+ "tooltip": {
+ "base": "Base:",
+ "gear": "Gear:",
+ "talents": "Talents:",
+ "buffs": "Buffs:",
+ "consumes": "Consumes:",
+ "bonus": "Bonus:",
+ "total": "Total:",
+ "glancing": "Glancing:",
+ "suppression": "Suppression:",
+ "to_hit_cap": "To Hit Cap:",
+ "to_exp_cap": "To Exp Cap:",
+ "spec_offsets": "Spec Offsets:",
+ "final_crit_cap": "Final Crit Cap:",
+ "can_raise_by": "Can Raise By:"
+ },
+ "crit_cap": {
+ "exact": "Exact",
+ "over_by": "Over by",
+ "under_by": "Under by"
+ },
+ "bonus_prefix": "Bonus",
+ "points_suffix": "Points",
+ "percent_suffix": "%"
+ }
+ }
+}
diff --git a/assets/locales/fr.json b/assets/locales/fr.json
new file mode 100644
index 0000000000..9e804b72a8
--- /dev/null
+++ b/assets/locales/fr.json
@@ -0,0 +1,207 @@
+{
+ "landing": {
+ "navigation": {
+ "home": "Accueil",
+ "simulations": "Simulations",
+ "about": "À propos",
+ "toggle": "Basculer la navigation"
+ },
+ "simulations": {
+ "full_raid": "Simulation de raid complet"
+ },
+ "home": {
+ "title": "WoWSims - Mists of Pandaria",
+ "description": "Un puissant outil de simulation pour World of Warcraft: Mists of Pandaria",
+ "welcomeDescription": "Bienvenue sur WoWSims - Mists of Pandaria ! Ce projet communautaire propose des simulations de classes et de raids pour World of Warcraft® Mists of Pandaria Classic, en collaboration avec les meilleurs théoriciens et représentants de classes."
+ },
+ "header": {
+ "wowsims": "WoWSims",
+ "expansion": "Mists of Pandaria",
+ "supportDevs": "Soutenir nos développeurs"
+ }
+ },
+ "common": {
+ "phases": {
+ "1": "Phase 1 (T14)",
+ "2": "Phase 2 (T15)",
+ "3": "Phase 3 (T16)"
+ },
+ "status": {
+ "unlaunched": "Pas Encore Supporté",
+ "alpha": "Alpha",
+ "beta": "Bêta",
+ "launched": "Lancé"
+ },
+ "classes": {
+ "death_knight": "Chevalier de la mort",
+ "druid": "Druide",
+ "hunter": "Chasseur",
+ "mage": "Mage",
+ "monk": "Moine",
+ "paladin": "Paladin",
+ "priest": "Prêtre",
+ "rogue": "Voleur",
+ "shaman": "Chaman",
+ "warlock": "Démoniste",
+ "warrior": "Guerrier"
+ },
+ "specs": {
+ "death_knight": {
+ "blood": "Sang",
+ "frost": "Givre",
+ "unholy": "Impie"
+ },
+ "druid": {
+ "balance": "Équilibre",
+ "feral": "Farouche",
+ "guardian": "Gardien",
+ "restoration": "Restauration"
+ },
+ "hunter": {
+ "beast_mastery": "Maîtrise des bêtes",
+ "marksmanship": "Précision",
+ "survival": "Survie"
+ },
+ "mage": {
+ "arcane": "Arcane",
+ "fire": "Feu",
+ "frost": "Givre"
+ },
+ "monk": {
+ "brewmaster": "Maître brasseur",
+ "mistweaver": "Tisse-brume",
+ "windwalker": "Marche-vent"
+ },
+ "paladin": {
+ "holy": "Sacré",
+ "protection": "Protection",
+ "retribution": "Vindicte"
+ },
+ "priest": {
+ "discipline": "Discipline",
+ "holy": "Sacré",
+ "shadow": "Ombre"
+ },
+ "rogue": {
+ "assassination": "Assassinat",
+ "combat": "Combat",
+ "subtlety": "Finesse"
+ },
+ "shaman": {
+ "elemental": "Élémentaire",
+ "enhancement": "Amélioration",
+ "restoration": "Restauration"
+ },
+ "warlock": {
+ "affliction": "Affliction",
+ "demonology": "Démonologie",
+ "destruction": "Destruction"
+ },
+ "warrior": {
+ "arms": "Armes",
+ "fury": "Fureur",
+ "protection": "Protection"
+ }
+ },
+ "stats": {
+ "strength": "Force",
+ "agility": "Agilité",
+ "stamina": "Endurance",
+ "intellect": "Intelligence",
+ "spirit": "Esprit",
+ "spell_hit": "Toucher des sorts",
+ "spell_crit": "Critique des sorts",
+ "spell_haste": "Hâte des sorts",
+ "expertise": "Expertise",
+ "dodge": "Esquive",
+ "parry": "Parade",
+ "mastery": "Maîtrise",
+ "attack_power": "Puissance d'attaque",
+ "ranged_attack_power": "Puissance d'attaque à distance",
+ "spell_power": "Puissance des sorts",
+ "pvp_resilience": "Résilience JcJ",
+ "pvp_power": "Puissance JcJ",
+ "armor": "Armure",
+ "bonus_armor": "Armure bonus",
+ "health": "Santé",
+ "mana": "Mana",
+ "mp5": "MP5",
+ "main_hand_dps": "DPS main principale",
+ "off_hand_dps": "DPS main gauche",
+ "ranged_dps": "DPS à distance",
+ "block": "Blocage",
+ "melee_speed_multiplier": "Multiplicateur de vitesse de mêlée",
+ "ranged_speed_multiplier": "Multiplicateur de vitesse à distance",
+ "cast_speed_multiplier": "Multiplicateur de vitesse d'incantation",
+ "melee_haste": "Hâte de mêlée",
+ "ranged_haste": "Hâte à distance",
+ "melee_hit": "Toucher de mêlée",
+ "melee_crit": "Critique de mêlée"
+ }
+ },
+ "sim": {
+ "title": "Simulateur {spec} {class} - Mists of Pandaria",
+ "description": "Simulations {spec} {class} pour World of Warcraft® Mists of Pandaria Classic."
+ },
+ "gear": {
+ "title": "Équipement"
+ },
+ "settings": {
+ "title": "Paramètres"
+ },
+ "talents": {
+ "title": "Talents"
+ },
+ "rotation": {
+ "title": "Rotation"
+ },
+ "results": {
+ "title": "Résultats"
+ },
+ "import": {
+ "title": "Importer"
+ },
+ "export": {
+ "title": "Exporter"
+ },
+ "sidebar": {
+ "iterations": "Itérations",
+ "buttons": {
+ "simulate": "Simuler",
+ "stat_weights": "Poids des Statistiques",
+ "suggest_reforges": "Suggérer des Reforges"
+ },
+ "header": {
+ "title": "WoWSims - Mists of Pandaria",
+ "phase": "{{phase}} - {{status}}"
+ },
+ "character_stats": {
+ "title": "Statistiques",
+ "melee_crit_cap": "Plafond de Critique Mêlée",
+ "tooltip": {
+ "base": "Base :",
+ "gear": "Équipement :",
+ "talents": "Talents :",
+ "buffs": "Buffs :",
+ "consumes": "Consommables :",
+ "bonus": "Bonus :",
+ "total": "Total :",
+ "glancing": "Éraflement :",
+ "suppression": "Suppression :",
+ "to_hit_cap": "Vers le Plafond de Précision :",
+ "to_exp_cap": "Vers le Plafond d'Expertise :",
+ "spec_offsets": "Compensations de Spé :",
+ "final_crit_cap": "Plafond de Critique Final :",
+ "can_raise_by": "Peut Augmenter de :"
+ },
+ "crit_cap": {
+ "exact": "Exact",
+ "over_by": "Au-dessus de",
+ "under_by": "En-dessous de"
+ },
+ "bonus_prefix": "Bonus",
+ "points_suffix": "Points",
+ "percent_suffix": "%"
+ }
+ }
+}
diff --git a/docs/adding_sim.md b/docs/adding_sim.md
new file mode 100644
index 0000000000..b74dcda870
--- /dev/null
+++ b/docs/adding_sim.md
@@ -0,0 +1,55 @@
+# Adding a Sim
+So you want to make a new sim for your class/spec! The basic steps are as follows:
+ - [Create the proto interface between sim and UI.](#create-the-proto-interface-between-sim-and-ui)
+ - [Implement the UI.](#implement-the-ui)
+ - [Implement the sim.](#implement-the-sim)
+ - [Launch the site.](#launch-the-site)
+
+
+## Create the proto interface between Sim and UI
+This project uses [Google Protocol Buffers](https://developers.google.com/protocol-buffers/docs/gotutorial "https://developers.google.com/protocol-buffers/docs/gotutorial") to pass data between the sim and the UI. TLDR; Describe data structures in .proto files, and the tool can generate code in any programming language. It lets us avoid repeating the same code in our Go and Typescript worlds without losing type safety.
+
+For a new sim, make the following changes:
+ - Add a new value to the `Spec` enum in proto/common.proto. __NOTE: The name you give to this enum value is not just a name, it is used in our templating system. This guide will refer to this name as `$SPEC` elsewhere.__
+ - Add a 'proto/YOUR_CLASS.proto' file if it doesn't already exist and add data messages containing all the class/spec-specific information needed to run your sim.
+ - Update the `PlayerOptions.spec` field in `proto/api.proto` to include your shiny new message as an option.
+
+That's it! Now when you run `make` there will be generated .go and .ts code in `sim/core/proto` and `ui/core/proto` respectively. If you aren't familiar with protos, take a quick look at them to see what's happening.
+
+## Implement the UI
+The UI and sim can be done in either order, but it is generally recommended to build the UI first because it can help with debugging. The UI is very generalized and it doesn't take much work to build an entire sim UI using our templating system. To use it:
+ - Modify `ui/core/proto_utils/utils.ts` to include boilerplate for your `$SPEC` name if it isn't already there.
+ - Create a directory `ui/$SPEC`. So if your Spec enum value was named, `elemental_shaman`, create a directory, `ui/elemental_shaman`.
+ - Copy+paste from another spec's UI code.
+ - Modify all the files for your spec; most of the settings are fairly obvious, if you need anything complex just ask and we can help!
+ - Finally, add a rule to the `makefile` for the new sim site. Just copy from the other site rules already there and change the `$SPEC` names.
+
+No .html is needed, it will be generated based on `ui/index_template.html` and the `$SPEC` name.
+
+When you're ready to try out the site, run `make host` and navigate to `http://localhost:8080/mop/$SPEC`.
+
+## Implement the Sim
+This step is where most of the magic happens. A few highlights to start understanding the sim code:
+ - `sim/wasm/main.go` This file is the actual main function, for the [.wasm binary](https://webassembly.org/ "https://webassembly.org/") used by the UI. You shouldn't ever need to touch this, but just know its here.
+ - `sim/core/api.go` This is where the action starts. This file implements the request/response messages defined in `proto/api.proto`.
+ - `sim/core/sim.go` Orchestrates everything. Main event loop is in `Simulation.RunOnce`.
+ - `sim/core/agent.go` An Agent can be thought of as the 'Player', i.e. the person controlling the game. This is the interface you'll be implementing.
+ - `sim/core/character.go` A Character holds all the stats/cooldowns/gear/etc common to any WoW character. Each Agent has a Character that it controls.
+
+Read through the core code and some examples from other classes/specs to get a feel for what's needed. Hopefully `sim/core` already includes what you need, but most classes have at least 1 unique mechanic so you may need to touch `core` as well.
+
+Finally, add your new sim to `RegisterAll()` in `sim/register_all.go`.
+
+Don't forget to write unit tests! Again, look at existing tests for examples. Run them with `make test` when you're ready.
+
+# Launch the site
+When everything is ready for release, modify `ui/core/launched_sims.ts` and `ui/index.html` to include the new spec value. This will add the sim to the dropdown menu so anyone can find it from the existing sims. This will also remove the UI warning that the sim is under development. Now tell everyone about your new sim!
+
+# Add your spec to the raid sim
+Don't touch the raid sim until the individual sim is ready for launch; anything in the raid sim is publicly accessible. To add your new spec to the raid sim, do the following:
+ - Add a reference to the individual sim in `ui/raid/tsconfig.json`. DO NOT FORGET THIS STEP or Typescipt will silently do very bad things.
+ - Import the individual sim's css file from `ui/raid/index.scss`.
+ - Update `ui/raid/presets.ts` to include a constructor factory in the `specSimFactories` variable and add configurations for new Players in the `playerPresets` variable.
+
+# Deployment
+Thanks to the workflow defined in `.github/workflows/deploy.yml`, pushes to `master` automatically build and deploy a new site so there's nothing to do here. Sit back and appreciate your new sim!
diff --git a/docs/commands.md b/docs/commands.md
new file mode 100644
index 0000000000..bbb7c1fa11
--- /dev/null
+++ b/docs/commands.md
@@ -0,0 +1,78 @@
+# Commands
+We use a makefile for our build system. These commands will usually be all you need while developing for this project:
+```sh
+# Installs a pre-commit git hook so that your go code is automatically formatted (if you don't use an IDE that supports that). If you want to manually format go code you can run make fmt.
+# Also installs `air` to reload the dev servers automatically
+make setup
+
+# Run all the tests. Currently only the backend sim has tests.
+make test
+
+# Update the expected test results. This will need to be run after adding/removing any tests, and also if test results change due to code changes.
+make update-tests
+
+# Host a local version of the UI at http://localhost:8080. Visit it by pointing a browser to
+# http://localhost:8080/mop/YOUR_SPEC_HERE, where YOUR_SPEC_HERE is the directory under ui/ with your custom code.
+# Recompiles the entire client before launching using `make dist/mop`
+make host
+
+# With file-watching so the server auto-restarts and recompiles on Go or TS changes:
+WATCH=1 make host
+
+# Delete all generated files (.pb.go and .ts proto files, and dist/)
+make clean
+
+# Recompiles the ts only for the given spec (e.g. make host_elemental_shaman)
+make host_$spec
+
+# Recompiles the `wowsimmop` server binary and runs it, hosting /dist directory at http://localhost:3333/mop.
+# This is the fastest way to iterate on core go simulator code so you don't have to wait for client rebuilds.
+# To rebuild client for a spec just do 'make $spec' and refresh browser.
+make rundevserver
+
+# With file-watching so the server auto-restarts and recompiles on Go or TS changes:
+WATCH=1 make rundevserver
+
+# The same as rundevserver, recompiles `wowsimmop` binary and runs it on port 3333. Instead of serving content from the dist folder,
+# this command also runs `vite serve` to start the Vite dev server on port 5173 (or similar) and automatically reloads the page on .ts changes in less than a second.
+# This allows for more rapid development, with sub second reloads on TS changes. This combines the benefits of `WATCH=1 make rundevserver` and `WATCH=1 make host`
+# to create something that allows you to work in any part of the code with ease and speed.
+# This might get rolled into `WATCH=1 make rundevserver` at some point.
+WATCH=1 make devmode
+
+# This is just the same as rundevserver currently
+make devmode
+
+# This command recompiles the workers in the /ui/worker folder for easier debugging/development
+# Can be used with or without WATCH command
+make webworkers
+
+# With file watch enabled
+WATCH=1 make webworkers
+
+# Creates the 'wowsimmop' binary that can host the UI and run simulations natively (instead of with wasm).
+# Builds the UI and the compiles it into the binary so that you can host the sim as a server instead of wasm on the client.
+# It does this by first doing make dist/mop and then copying all those files to binary_dist/mop and loading all the files in that directory into its binary on compile.
+make wowsimmop
+
+# Using the --usefs flag will instead of hosting the client built into the binary, it will host whatever code is found in the /dist directory.
+# Use --wasm to host the client with the wasm simulator.
+# The server also disables all caching so that refreshes should pickup any changed files in dist/. The client will still call to the server to run simulations so you can iterate more quickly on client changes.
+# make dist/mop && ./wowsimmop --usefs would rebuild the whole client and host it. (you would have had to run `make devserver` to build the wowsimmop binary first.)
+./wowsimmop --usefs
+
+# Generate code for the sim database (db.json). Only necessary if you changed the items generator.
+# Useful only if you're actively working on the generator and have already run make db locally at least once.
+make simdb
+
+# Generate data from WoW client files
+# Requires dotnet 9 to run
+# Uses tools/database/generator-settings.json for settings
+# Also runs make simdb
+# This is what you will use most of the time for generation
+make db
+
+# Same as make db but from the ptr client
+# Uses tools/database/ptr-generator-settings.json for settings
+make ptrdb
+```
diff --git a/docs/i18n_guide.md b/docs/i18n_guide.md
new file mode 100644
index 0000000000..bac0096df2
--- /dev/null
+++ b/docs/i18n_guide.md
@@ -0,0 +1,145 @@
+# i18n Guide
+
+Hey there! 👋 This guide will help you work with translations in our WoW sim project.
+
+## Adding New Locale
+
+1. Create `{lang}.json` in `assets/locales`. For example, `de.json`.
+
+2. In `vite.config.mts`, add the file to the list of locales
+
+```
+function copyLocales() {
+ return {
+ ...
+ buildStart() {
+ const locales = [
+ 'en.json',
+ 'de.json', <---- add your new locale file
+ ];
+ ...
+ },
+ } satisfies PluginOption;
+}
+```
+
+3. In `\ui\i18n\config.ts`, import the locale file and add it to the resource list
+
+```
+import de from '../../assets/locales/de.json';
+
+resources: {
+ en: {
+ translation: en
+ },
+ de: {
+ translation: de
+ }
+ }
+```
+
+## Adding New Text
+
+All translations start in `en.json`. Here's how to structure it:
+
+```json
+{
+ "common": {
+ "buttons": {
+ "save": "Save",
+ "cancel": "Cancel"
+ }
+ },
+ "gear": {
+ "equipment": {
+ "head": "Head",
+ "chest": "Chest"
+ }
+ }
+}
+```
+
+### Quick Tips for Keys
+
+✅ Do this:
+```json
+{
+ "talents": {
+ "specSelection": {
+ "chooseSpec": "Choose Spec", // Reusable!
+ "currentSpec": "Current Spec"
+ }
+ }
+}
+```
+
+❌ Don't do this:
+```json
+{
+ "btn1": "Save", // Too vague
+ "CANCEL_BUTTON": "Cancel", // Weird casing
+ "spec-name": "Fire", // No hyphens please
+ "talentPageTitle": "Talents Page" // Too specific
+}
+```
+
+## Using Translations in Code
+
+### In TypeScript/TSX
+
+```typescript
+import { i18n } from '../i18n/config';
+
+// Simple usage
+const saveText = i18n.t('common.buttons.save');
+
+// With variables
+const welcome = i18n.t('common.welcome', { name: playerName });
+```
+
+### In Components
+
+```tsx
+function SettingsMenu() {
+ return (
+
+
{i18n.t('settings.title')}
+
+
+ );
+}
+```
+
+## Pro Tips 🎮
+
+1. **Keep it Reusable**
+ ```json
+ // ✅ Good - can use everywhere
+ "common.buttons.save": "Save"
+
+ // ❌ Bad - too specific
+ "talentPageSaveButton": "Save"
+ ```
+
+2. **Use Variables for Dynamic Stuff**
+ ```json
+ {
+ "character": {
+ "levelUp": "{{name}} hit level {{level}}!" // Nice!
+ }
+ }
+ ```
+
+3. **Group Related Things**
+ ```json
+ {
+ "gear": {
+ "equipment": {
+ "head": "Head",
+ "chest": "Chest"
+ }
+ }
+ }
+ ```
+
+That's it! Keep it simple and reusable. If you need to add new languages, just copy `en.json` and translate away! 🚀
\ No newline at end of file
diff --git a/docs/installation.md b/docs/installation.md
new file mode 100644
index 0000000000..217057811c
--- /dev/null
+++ b/docs/installation.md
@@ -0,0 +1,79 @@
+# Local Dev Installation
+
+This project has dependencies on Go >=1.23, protobuf-compiler and the corresponding Go plugins, and node >= 20.
+
+## Ubuntu
+Do not use apt to install any dependencies, the versions they install are all too old.
+Script below will curl latest versions and install them.
+```sh
+# Standard Go installation script
+curl -O https://dl.google.com/go/go1.23.4.linux-amd64.tar.gz
+sudo rm -rf /usr/local/go
+sudo tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz
+echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.bashrc
+echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
+echo 'export PATH=$PATH:$GOPATH/bin' >> $HOME/.bashrc
+source $HOME/.bashrc
+
+cd mop
+
+# Install protobuf compiler and Go plugins
+sudo apt update && sudo apt upgrade
+sudo apt install protobuf-compiler
+go get -u -v google.golang.org/protobuf
+go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
+
+# Install node
+curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
+nvm install 20.13.1
+
+# Install the npm package dependencies using node
+npm install
+```
+
+## Docker
+Alternatively, install Docker and your workflow will look something like this:
+```sh
+git clone https://github.com/wowsims/mop.git
+cd mop
+
+# Build the docker image and install npm dependencies (only need to run these once).
+docker build --tag wowsims-mop .
+docker run --rm -v $(pwd):/mop wowsims-mop npm install
+
+# Now you can run the commands as shown in the Commands sections, preceding everything with, "docker run --rm -it -p 8080:8080 -v $(pwd):/mop wowsims-mop".
+# For convenience, set this as an environment variable:
+MOP_CMD="docker run --rm -it -p 8080:8080 -v $(pwd):/mop wowsims-mop"
+
+#For the watch commands assign this environment variable:
+MOP_WATCH_CMD="docker run --rm -it -p 8080:8080 -p 3333:3333 -p 5173:5173 -e WATCH=1 -v $(pwd):/mop wowsims-mop"
+
+# ... do some coding on the sim ...
+
+# Run tests
+$(echo $MOP_CMD) make test
+
+# ... do some coding on the UI ...
+
+# Host a local site
+$(echo $MOP_CMD) make host
+```
+
+## Windows
+If you want to develop on Windows, we recommend setting up a Ubuntu virtual machine (VM) or running Docker using [this guide](https://docs.docker.com/desktop/windows/wsl/ "https://docs.docker.com/desktop/windows/wsl/") and then following the Ubuntu or Docker instructions, respectively.
+
+If you prefer working natively:
+
+- Install [Go](https://go.dev/dl/s), [NVM Windows](https://github.com/coreybutler/nvm-windows), and [make](https://gnuwin32.sourceforge.net/packages/make.htm) (you can also install it through Chocolate).
+- Install and use Node 20+ from NVM, for example `nvm install 20 && nvm use 20`
+- Setup GO workspace following [this guide](https://www.freecodecamp.org/news/setting-up-go-programming-language-on-windows-f02c8c14e2f/)
+- Download GO dependencies [protobuf](https://github.com/protocolbuffers/protobuf/releases), [gopls](https://github.com/golang/tools/releases), [air-verse](https://github.com/air-verse/air/releases), [protobuf-go](https://github.com/protocolbuffers/protobuf-go/releases), and [staticcheck](https://github.com/dominikh/go-tools/releases). Unzip them into your GO workspace directory.
+
+With all the dependencies setup, you should be able to run the `make` commands and compile the project.
+
+## Mac OS
+* Docker is available in OS X as well, so in theory similar instructions should work for the Docker method
+* You can also use the Ubuntu setup instructions as above to run natively, with a few modifications:
+ * You may need a different Go installer if `go1.18.3.linux-amd64.tar.gz` is not compatible with your system's architecture; you can do the Go install manually from `https://go.dev/doc/install`.
+ * OS X uses Homebrew instead of apt, so in order to install protobuf-compiler you'll instead need to run `brew install protobuf-c` (note the package name is also a little different than in apt). You might need to first update or upgrade brew.
+ * The provided install script for Node will not included a precompiled binary for OS X, but it's smart enough to compile one. Be ready for your CPU to melt on running `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash`.
diff --git a/package-lock.json b/package-lock.json
index 286e8160e1..302728a19b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,6 +15,9 @@
"bootstrap": "^5.3.0",
"chart.js": "^4.4.8",
"clsx": "^2.1.1",
+ "i18next": "^25.0.2",
+ "i18next-browser-languagedetector": "^8.0.5",
+ "i18next-http-backend": "^3.0.2",
"pako": "^2.0.4",
"tippy.js": "^6.3.7",
"tsx-vanilla": "^1.0.0",
@@ -177,6 +180,18 @@
"node": ">=4"
}
},
+ "node_modules/@babel/runtime": {
+ "version": "7.27.0",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.0.tgz",
+ "integrity": "sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==",
+ "license": "MIT",
+ "dependencies": {
+ "regenerator-runtime": "^0.14.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
"node_modules/@bufbuild/buf": {
"version": "1.35.0",
"resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.35.0.tgz",
@@ -2410,6 +2425,15 @@
}
}
},
+ "node_modules/cross-fetch": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz",
+ "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==",
+ "license": "MIT",
+ "dependencies": {
+ "node-fetch": "^2.6.12"
+ }
+ },
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -3973,6 +3997,55 @@
"node": ">=6"
}
},
+ "node_modules/i18next": {
+ "version": "25.0.2",
+ "resolved": "https://registry.npmjs.org/i18next/-/i18next-25.0.2.tgz",
+ "integrity": "sha512-xWxgK8GAaPYkV9ia2tdgbtdM+qiC+ysVTBPvXhpCORU/+QkeQe3BSI7Crr+c4ZXULN1PfnXG/HY2n7HGx4KKBg==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://locize.com"
+ },
+ {
+ "type": "individual",
+ "url": "https://locize.com/i18next.html"
+ },
+ {
+ "type": "individual",
+ "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.26.10"
+ },
+ "peerDependencies": {
+ "typescript": "^5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/i18next-browser-languagedetector": {
+ "version": "8.0.5",
+ "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-8.0.5.tgz",
+ "integrity": "sha512-OstebRKqKiQw8xEvQF5aRyUujsCatanj7Q9eo5iiH2gJpoXGZ7483ol3sVBwfqbobTQPNH1J+NAyJ1aCQoEC+w==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.23.2"
+ }
+ },
+ "node_modules/i18next-http-backend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-3.0.2.tgz",
+ "integrity": "sha512-PdlvPnvIp4E1sYi46Ik4tBYh/v/NbYfFFgTjkwFl0is8A18s7/bx9aXqsrOax9WUbeNS6mD2oix7Z0yGGf6m5g==",
+ "license": "MIT",
+ "dependencies": {
+ "cross-fetch": "4.0.0"
+ }
+ },
"node_modules/ignore": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
@@ -4810,6 +4883,26 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/node-fetch": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
+ "engines": {
+ "node": "4.x || >=6.0.0"
+ },
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
+ }
+ },
"node_modules/normalize-package-data": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
@@ -5569,6 +5662,12 @@
"node": ">=8"
}
},
+ "node_modules/regenerator-runtime": {
+ "version": "0.14.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
+ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
+ "license": "MIT"
+ },
"node_modules/regexp.prototype.flags": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz",
@@ -6659,6 +6758,12 @@
"node": ">=8.0"
}
},
+ "node_modules/tr46": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
+ "license": "MIT"
+ },
"node_modules/trim-newlines": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz",
@@ -6830,7 +6935,7 @@
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
- "dev": true,
+ "devOptional": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
@@ -7228,6 +7333,22 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/webidl-conversions": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/whatwg-url": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "~0.0.3",
+ "webidl-conversions": "^3.0.0"
+ }
+ },
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
diff --git a/package.json b/package.json
index 3e423c24a8..c5a23659bb 100644
--- a/package.json
+++ b/package.json
@@ -32,6 +32,9 @@
"bootstrap": "^5.3.0",
"chart.js": "^4.4.8",
"clsx": "^2.1.1",
+ "i18next": "^25.0.2",
+ "i18next-browser-languagedetector": "^8.0.5",
+ "i18next-http-backend": "^3.0.2",
"pako": "^2.0.4",
"tippy.js": "^6.3.7",
"tsx-vanilla": "^1.0.0",
diff --git a/sim/druid/guardian/apl_values.go b/sim/druid/guardian/apl_values.go
index f7aa4f9bc9..727f4f3342 100644
--- a/sim/druid/guardian/apl_values.go
+++ b/sim/druid/guardian/apl_values.go
@@ -7,7 +7,6 @@ import (
"github.com/wowsims/mop/sim/core/proto"
)
-
func (bear *GuardianDruid) NewAPLAction(rot *core.APLRotation, config *proto.APLAction) core.APLActionImpl {
switch config.Action.(type) {
case *proto.APLAction_GuardianHotwDpsRotation:
@@ -70,7 +69,7 @@ func (action *APLActionGuardianHotwDpsRotation) Execute(sim *core.Simulation) {
curCp := bear.ComboPoints()
ripDot := bear.Rip.CurDot()
- ripNow := (curCp == 5) && (!ripDot.IsActive() || (ripDot.RemainingDuration(sim) < ripDot.BaseTickLength))
+ ripNow := (curCp == 5) && (!ripDot.IsActive() || (ripDot.RemainingDuration(sim) < ripDot.BaseTickLength))
rakeDot := bear.Rake.CurDot()
rakeNow := !rakeDot.IsActive() || (rakeDot.RemainingDuration(sim) < rakeDot.BaseTickLength)
@@ -109,7 +108,7 @@ func (action *APLActionGuardianHotwDpsRotation) Execute(sim *core.Simulation) {
bear.Wrath.Cast(sim, bear.CurrentTarget)
return
}
-
+
action.nextActionAt = sim.CurrentTime + poolingTime + bear.ReactionTime
bear.WaitUntil(sim, action.nextActionAt)
}
diff --git a/sim/druid/rejuvenation.go b/sim/druid/rejuvenation.go
index e669d75a3c..e350b79a8c 100644
--- a/sim/druid/rejuvenation.go
+++ b/sim/druid/rejuvenation.go
@@ -8,13 +8,13 @@ import (
const (
RejuvenationBonusCoeff = 0.39199998975
- RejuvenationCoeff = 3.86800003052
+ RejuvenationCoeff = 3.86800003052
)
func (druid *Druid) registerRejuvenationSpell() {
baseTickDamage := RejuvenationCoeff * druid.ClassSpellScaling
- druid.Rejuvenation = druid.RegisterSpell(Humanoid | Moonkin, core.SpellConfig{
+ druid.Rejuvenation = druid.RegisterSpell(Humanoid|Moonkin, core.SpellConfig{
ActionID: core.ActionID{SpellID: 774},
SpellSchool: core.SpellSchoolNature,
ProcMask: core.ProcMaskSpellHealing,
diff --git a/sim/druid/talents.go b/sim/druid/talents.go
index 9945354b27..82dd220ea8 100644
--- a/sim/druid/talents.go
+++ b/sim/druid/talents.go
@@ -48,7 +48,7 @@ func (druid *Druid) registerNaturesVigil() {
ThreatMultiplier: 0,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
- spell.CalcAndDealHealing(sim, target, 0.25 * smartHealStrength, spell.OutcomeHealing)
+ spell.CalcAndDealHealing(sim, target, 0.25*smartHealStrength, spell.OutcomeHealing)
},
})
@@ -76,10 +76,10 @@ func (druid *Druid) registerNaturesVigil() {
}
// Assume that the target is randomly selected from 25 raid members.
- if sim.Proc(1.0 / 25.0, "Nature's Vigil") {
+ if sim.Proc(1.0/25.0, "Nature's Vigil") {
smartHealSpell.Cast(sim, aura.Unit)
} else if numAllyTargets > 0 {
- targetIdx := 1 + int(sim.RandomFloat("Nature's Vigil") * numAllyTargets)
+ targetIdx := 1 + int(sim.RandomFloat("Nature's Vigil")*numAllyTargets)
smartHealSpell.Cast(sim, sim.Raid.AllPlayerUnits[targetIdx])
}
diff --git a/sim/druid/wrath.go b/sim/druid/wrath.go
index 61aeaee4a2..6278405eec 100644
--- a/sim/druid/wrath.go
+++ b/sim/druid/wrath.go
@@ -33,7 +33,7 @@ func (druid *Druid) registerWrathSpell() {
ModifyCast: func(sim *core.Simulation, spell *core.Spell, curCast *core.Cast) {
hastedCastTime := spell.Unit.ApplyCastSpeedForSpell(curCast.CastTime, spell).Round(time.Millisecond)
- spell.Unit.AutoAttacks.StopMeleeUntil(sim, sim.CurrentTime + hastedCastTime)
+ spell.Unit.AutoAttacks.StopMeleeUntil(sim, sim.CurrentTime+hastedCastTime)
},
},
diff --git a/sim/encounters/msv/garajal_ai.go b/sim/encounters/msv/garajal_ai.go
index b29dc0ed03..bc318e5a42 100644
--- a/sim/encounters/msv/garajal_ai.go
+++ b/sim/encounters/msv/garajal_ai.go
@@ -71,7 +71,7 @@ func createGarajalHeroicPreset(raidPrefix string, raidSize int32, bossHealth flo
AI: makeGarajalAI(raidSize, false),
})
- targetPathNames = append(targetPathNames, raidPrefix + "/" + addName)
+ targetPathNames = append(targetPathNames, raidPrefix+"/"+addName)
core.AddPresetEncounter(bossName, targetPathNames)
}
@@ -316,7 +316,7 @@ func (ai *GarajalAI) registerTankSwapAuras() {
}
vengeanceAura.ApplyOnStacksChange(func(aura *core.Aura, sim *core.Simulation, _ int32, newStacks int32) {
- if !ai.VoodooDollsAura.IsActive() && !ai.BanishmentAura.IsActive() && (sim.CurrentTime - lastTaunt > time.Second * 25) && (newStacks < priorVengeanceEstimate/2) {
+ if !ai.VoodooDollsAura.IsActive() && !ai.BanishmentAura.IsActive() && (sim.CurrentTime-lastTaunt > time.Second*25) && (newStacks < priorVengeanceEstimate/2) {
aura.Activate(sim)
aura.SetStacks(sim, priorVengeanceEstimate/2)
lastTaunt = sim.CurrentTime
@@ -417,7 +417,7 @@ func (ai *GarajalAI) registerSpiritualGrasp() {
}
func (ai *GarajalAI) rollNextSpiritualGraspTime(sim *core.Simulation) time.Duration {
- return sim.CurrentTime + core.DurationFromSeconds(-math.Log(sim.RandomFloat("Spiritual Grasp")) * ai.meanGraspIntervalSeconds)
+ return sim.CurrentTime + core.DurationFromSeconds(-math.Log(sim.RandomFloat("Spiritual Grasp"))*ai.meanGraspIntervalSeconds)
}
func (ai *GarajalAI) registerFrenzy() {
diff --git a/ui/core/components/character_stats.tsx b/ui/core/components/character_stats.tsx
index 3c04d87dfe..1b7cb2cfa2 100644
--- a/ui/core/components/character_stats.tsx
+++ b/ui/core/components/character_stats.tsx
@@ -4,6 +4,7 @@ import clsx from 'clsx';
import tippy from 'tippy.js';
import { ref } from 'tsx-vanilla';
+import i18n from '../../i18n/config.js';
import * as Mechanics from '../constants/mechanics.js';
import { IndividualSimUI } from '../individual_sim_ui';
import { Player } from '../player.js';
@@ -55,7 +56,7 @@ export class CharacterStats extends Component {
const label = document.createElement('label');
label.classList.add('character-stats-label');
- label.textContent = 'Stats';
+ label.textContent = i18n.t('sidebar.character_stats.title');
this.rootElem.appendChild(label);
const table = document.createElement('table');
@@ -153,7 +154,7 @@ export class CharacterStats extends Component {
if (unitStat.isPseudoStat() && unitStat.getPseudoStat() === PseudoStat.PseudoStatPhysicalCritPercent && this.shouldShowMeleeCritCap(player)) {
const critCapRow = (
- Welcome to WoWSims - Mists of Pandaria! This is a community-driven project to provide class and raid simulations for
- World of Warcraft® Mists of Pandaria Classic together with the leading theorycrafters and class representatives.
-