ChaosMix Plugin

The ChaosMix plugin owns almost every recipe in the Chaos Machine. Three XML files define the full system: formulas for computing success rate, option presets, and the recipe list itself.

File Location#

Data/Plugins/Items/ChaosMix/
├── ChaosMix_Formulas.xml
├── ChaosMix_Options.xml
└── ChaosMix_Recipes.xml

All three loaded once at GameServer startup. Plugin supports hot reload via admin command.

Authority Over Chaos Mix#

The plugin is the sole authority for the Chaos Machine. Every recipe, rate, and item filter comes from these three XML files. There is no legacy fall-through: if no recipe matches the submitted MixType + MixIndex, the server refuses the mix (the client shows "wrong combination", nothing is consumed). MixID does not pick the recipe, but it is checked: if the client's MixID is not the found recipe's MixID, the mix is refused too (logged as [MixIDMismatch]). The old hardcoded chaos system no longer supplies rates, recipes, or a fallback for any mix.

When a recipe matches, the plugin owns the mix end-to-end: input validation, zen cost, success rate, the success/fail roll, and the reward. Talisman of Luck / Elemental Talisman bonuses and the item Luck option bonus are applied inside the plugin, so the rate the player sees in the chaos box widget is the same rate the server rolls against (post-tax included; identical between display and execute).

The legacy GameServerInfo - ChaosMix.dat file is no longer shipped or read. Recipes that previously lived there (Devil Square / Blood Castle / Illusion Temple entry tickets, Plus Item Mix, wing mixes, Fenrir mixes, Lucky Item Create/Refine, etc.) all moved into ChaosMix_Recipes.xml. The old per-mix rate keys are no longer the source of truth for any recipe; rates live in ChaosMix_Formulas.xml.

The plugin serves both the chaos-box NPC dialog and the trainer NPC dialog; recipes can be opened from either context without extra configuration.

Every chaos mix interface reads the same recipe data, so all of them (chaos machine, chaos cards, cherry blossom, Lucky Item create/refine, and the rest) display the zen cost and success rate before the player combines.

System Components#

FilePurpose
ChaosMix_Recipes.xmlThe recipes themselves, grouped by NPC / mix context
ChaosMix_Options.xmlMixOption / CharmOption / ChaosCharmOption presets that gate which items the player may put in the chaos box
ChaosMix_Formulas.xmlSuccess-rate expressions each recipe can reference by Id

For admin reading order, start with recipes (what mixes exist), then options (what filters apply), then formulas (how rates are computed). Recipes reference formulas and options by Id. Plugin load order at startup is the inverse: Formulas first, Options second, Recipes last, so cross-references resolve correctly.

MixType Reference#

Each recipe carries a MixType that identifies the NPC or mix context the client was using when it submitted the mix:

MixTypeContext
0Goblin (normal recipes)
1Goblin (chaos item recipes)
2Goblin (item+380 recipes)
3Castle Senior
4Trainer
5Osbourne
6Jerridon
7Elpis
8Chaos Card
9Cherry Blossom
10Extract Seed
11Seed Sphere
12Attach Socket
13Detach Socket
14Goblin (Inscription tab). These recipes come from the Inscription plugin (Data/Plugins/Inscription/Recipes.xml), not from ChaosMix_Recipes.xml

The client chooses MixType based on which NPC dialog or button opened the chaos box. MixIndex is the row within that MixType (a 0-based slot).

Logging#

Every mix attempt is written to the ChaosMix log so admins can audit and reproduce transactions. Logs are written to GameServer/ChaosMix/YYYY-MM-DD.txt (one file per day), gated by WriteChaosMixLog in Common.dat (default 1 = on).

Each mix records the account and character name, the MixID / MixType / MixIndex, the computed success rate and zen cost, the outcome, and a full dump of every item that was in the chaos box at submission time (category, index, level, durability, stack count, serial, and all options). This is enough to reconstruct exactly what the player put in and what the mix decided.

The AxiomEditor ChaosMix logs parser (Beta) reads these daily files and presents per-user and per-character transaction history, so you do not have to read the raw text logs by hand.

Hot Reload#

Admins can reload ChaosMix XML without restarting the GameServer via the plugin's admin command. Reload clears all three maps (formulas, options, recipes) and re-parses the files in order: formulas first, options second, recipes last. If any file is missing or malformed, that file's map stays empty after reload and a warning is logged; the plugin will still serve whatever parsed successfully. Reload does not block in-flight mixes, so trigger it during low-traffic windows.

Cross-File Dependencies#

SettingRelated in
Mix log toggleCommon.dat WriteChaosMixLog
Announce on +15Custom.dat AnnounceChaosMix
Roll simulationCustom.dat ChaosMixSimEnable, ChaosMixSimIterations
Source item definitionsItem.xml
Reward items (when ItemBagId != 0)EventItemBag

Roll Simulation#

For tuning success rates before going live, the plugin can simulate a batch of rolls each time a real mix is performed and log the observed win rate against the configured rate. This is a diagnostic aid; it does not change the actual mix outcome, which is still a single roll.

KeyFileTypeRangeDefaultEffect
ChaosMixSimEnableCustom.datint0-100 = off. 1 = on each performed mix, run the simulation below and write the result to the ChaosMix log
ChaosMixSimIterationsCustom.datint1+10000Number of simulated rolls to run against the mix's computed success rate. The log line reports how many of the N rolls succeeded and the resulting percentage

Turn ChaosMixSimEnable off in production - it adds a log line and a batch of rolls to every mix.

Last updated October 1, 2026