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#
| File | Purpose |
|---|---|
| ChaosMix_Recipes.xml | The recipes themselves, grouped by NPC / mix context |
| ChaosMix_Options.xml | MixOption / CharmOption / ChaosCharmOption presets that gate which items the player may put in the chaos box |
| ChaosMix_Formulas.xml | Success-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:
| MixType | Context |
|---|---|
0 | Goblin (normal recipes) |
1 | Goblin (chaos item recipes) |
2 | Goblin (item+380 recipes) |
3 | Castle Senior |
4 | Trainer |
5 | Osbourne |
6 | Jerridon |
7 | Elpis |
8 | Chaos Card |
9 | Cherry Blossom |
10 | Extract Seed |
11 | Seed Sphere |
12 | Attach Socket |
13 | Detach Socket |
14 | Goblin (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#
| Setting | Related in |
|---|---|
| Mix log toggle | Common.dat WriteChaosMixLog |
| Announce on +15 | Custom.dat AnnounceChaosMix |
| Roll simulation | Custom.dat ChaosMixSimEnable, ChaosMixSimIterations |
| Source item definitions | Item.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.
| Key | File | Type | Range | Default | Effect |
|---|---|---|---|---|---|
ChaosMixSimEnable | Custom.dat | int | 0-1 | 0 | 0 = off. 1 = on each performed mix, run the simulation below and write the result to the ChaosMix log |
ChaosMixSimIterations | Custom.dat | int | 1+ | 10000 | Number 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.