Skip to content

feat(warps): the warp list is data, with a Warp List editor window - #1167

Merged
Mosch0512 merged 1 commit into
Mutizens:mainfrom
Mosch0512:feat/warp-list-data
Nov 20, 2026
Merged

Mosch0512 merged 1 commit into
Mutizens:mainfrom
Mosch0512:feat/warp-list-data

Conversation

@Mosch0512

Copy link
Copy Markdown
Collaborator

The M window's warp list (and /move, /warp) is data now: src/bin/Data/Maps/Warps.json replaces the movereq_<lang>.bmd files, the move rules that were hard-coded are fields of each warp, and MuEditor gets a Warp List window. The client also saves the key configuration as it changes and before a warp from the M window, /warp or the control socket.

What it does

  • Warps.json: the 37 warps in M-window order, with their names per language (en, pt, es), the /move name, level, zen and gate. The four movereq bmd files are removed (also the unused Japanese Data/Local/Movereq.bmd). The max level is dropped: neither the client nor OpenMU checks it.
  • Rules as data (one check for the M window, the shown level, /move and the control socket):
    • class level discount: Magic Gladiator, Dark Lord and Rage Fighter need 2/3 of the level; noClassDiscount on Swamp of Calmness (33) replaces the old "level 400" check;
    • needsOneOf / notWith: single items, item tags (with except) or any wings. Icarus (23) needs wings or a flying mount and not Horn of Uniria or a transformation ring except panda/skeleton; Atlans (11-13) not Horn of Uniria or Dinorant;
    • pvpServersOnly and gensOnly (Vulcanus 42);
    • blockedMessage: which text a blocked /move shows; the two old messages stay, a new general text covers other warps;
    • new: minMasterLevel and minResets (0 = none); the M window shows "ML n" / "R n" when set, on a second line of the row under the level (beside it they ran into the zen; a layout test checks all three themes), red when they are missing (the level only when the level is); the wheel moves row top to row top.
  • Names follow the UI language like monster names, English fallback, renamed at once when the language changes.
  • Warp List window (Windows > Warp List): list in M-window order with add, copy, remove, move up/down; every field and rule; class discount section; a Translations tab with the names of all UI languages (the names grid of Monster Translations), the details keep the English name; Undo/Redo, Save/Revert; changes show in the M window at once. Data Checks: unknown items or tags, duplicate index, missing English name, spaces in names (they break /move), unknown message keys, odd values.
  • Key configuration (skill and potion keys, auto attack, whisper sound, slide help, chat box): sent as each setting changes, so a crash or a lost connection doesn't lose it, and before a warp from the M window, /warp or the control socket (/move goes to the server as chat and saves nothing first). Saves wait until the stored configuration has arrived, or 2 seconds after the join once the map has loaded (a new character gets none); a save asked in that time goes once it is over, and is dropped when the stored configuration arrives first, unless its chat box byte holds no size or transparency. Leaving the game, the session or the game server (the menu exit, logout, a server change, closing the window, the control socket's quit) saves only when a save would go at once, so in the first 2 seconds the reset keys never overwrite the stored layout. Entering the game resets everything the key configuration holds in one place (ResetKeyConfiguration: empty skill keys and Q/W/E/R, auto attack on, whisper sound off, slide help on, a 6-line chat box at transparency 0.6), so one character's keys and options don't carry over to the next; InitGame no longer resets auto attack and whisper sound on its own. IsTheMapInDifferentServer is removed, and so are the unused IsMapMove, IsLuckySealBuff, IsLuckySeal and their hard-coded map name list. The join now restores the chat box size and transparency from the stored configuration (the client used to read them and throw them away), and the client saves the lines the box shows (it used to send the number of chat messages in the log / 3). A character last saved by an older client therefore gets an unrelated chat box size once (for example 12 lines from 12 logged messages), until the player changes it; the byte has no free bits to tell old values apart.
  • Docs: docs/warp-list.md rewritten; links from dev-editor, map-data, item-data, translation-system.

OpenMU's WarpListExtended still overrides level and zen, as before; a warp that is also in the data file keeps its rules. The new WarpRequirementsExtended (C2 F5 0B, MUnique/OpenMU#1547) also sets master level and resets for the server's warps; the server's list wins for them like for level and zen.

How it was checked

  • Comparison before removal (D50):
    • the JSON list against the old bmd reader for en, pt and es, every warp and field;
    • the new rules against a copy of the old logic: 3.49 million cases (all warps, a merged server list, every class, level/zen/PK limits, PvP or not, Gens or not, every helper, wing and ring with broken and whole durability, and the chat texts with their messages), 0 differences.
  • Tests (Release): map_data_tests 53/53 (reader/writer, rules, the chat check, master level and resets, UI-language rename, the Warp List window, Data Checks), test_warp_list 11/11, the new test_key_configuration_gate (6) and test_chat_box_configuration (2), and three layout tests in rml_styling_regression_tests, in all three themes: the M window's second line against the widest zen, with the model bound only a row with a master level or resets gets it (with its own red), and the wheel moves one row per notch, a two-line row too; every new test fails under a mutation. The warp tests restore the item list they load (ShippedItemsScope) and the M window's list (MoveListScope).
  • Build: Windows x64 Release (MuEditor build) locally. Fork CI (feat(warps): the warp list and its move rules as data, with a Warp List editor Mosch0512/MuMain#177: Quality Gates with clang-format 21.1.8 and cppcheck, and the Linux x64, macOS arm64 and Windows x64 Release builds with the editor off) passed on an earlier head of the branch (07772d9); the review fixes after it were built and tested in Release locally, and clang-format 21.1.8 passes on their changed lines. This PR is those commits squashed into one, with the same tree.
  • In game: the Release editor build, tried by the owner; also against OpenMU with feat(warps): attribute requirements for warps, sent to the open source client MUnique/OpenMU#1547 (a warp needing 1 reset and one needing master level 1 are greyed out with "R 1" / "ML 1" for a level 400 character). Not tried in game yet: the second line for "ML n" / "R n" (the earlier test showed them beside the level), the later key configuration changes (the 2-second wait, Q/W/E/R on a character switch, the saves on leaving inside and after the first 2 seconds) and the chat box restore.

Before / After

To be added by the PR author: screenshots of the M window (a warp that needs a master level or resets, with its second line) and of the Warp List window. They were written without running the game here.

What players see change

  • The key configuration is saved as it changes and before a warp from the M window or /warp; a new character no longer gets the previous character's Q/W/E/R, slide help or chat box.
  • The chat box size and transparency come back at login (the client used to throw the stored values away).
  • /move Atlans2 checks Atlans2's rules (it used to check Atlans's, whose name is also in the text).
  • Warp names follow the UI language.
  • /move Icarus with wings and a Panda or Skeleton ring works, as the M window already allowed.
  • The Icarus, Atlans and Vulcanus rules now apply in every language. The old checks compared the data-language name with the UI-language text and only matched when both were English.

Decided by me

  1. File Data/Maps/Warps.json; the key is name per language, as Monsters.json.
  2. Item references as in Buffs.json: {"item": {"group": 13, "number": 2}}.
  3. Rules match an item in any equipment slot (checked: flying mounts and horns are pet-slot items, transformation rings ring-slot items); needsOneOf counts only items that are not broken.
  4. Blocked message keys come from a small table (WarpMessages): the game texts have no lookup by key.
  5. A server-only warp has no rules; a server list that changes warp 33's level keeps it without discount.
  6. The chat check takes the warp the word after /move (or the warp word) names, by its shown name or /move name in any case, as /warp finds it; only when no warp is that word does the original client's quirk apply (the first warp whose name is in the text). Only the equipment rules are checked there (the server checks the rest).
  7. Editor texts in en, de and pl; a new warp gets the smallest free index and the name "Warp"; Add and Copy add _2, _3 and so on when another warp already has the name or /move name, in any case.

Not done here

Size

About 7.0k added lines (115 files) in one commit.

Coding rules

docs/CODING_RULES.md and docs/PULL_REQUESTS.md were read and followed.

The M window's warp list, /move, /warp and the control socket's warp
read Data/Maps/Warps.json instead of the movereq_<lang>.bmd files. The
move rules that were hard-coded are fields of each warp: the class
level discount, needsOneOf/notWith equipment rules, PvP-server-only
and Gens-only warps, the blocked message, and the new minMasterLevel
and minResets, which OpenMU's WarpRequirementsExtended also sends.
Warp names follow the UI language. MuEditor gets a Warp List window
with a Translations tab and Data Checks.

The client saves the key configuration as each setting changes and
before a warp, once the character's stored one has arrived (or 2
seconds after the join for a new character), resets it for each new
character, and restores the chat box size and transparency at login.
@Mosch0512
Mosch0512 merged commit 8ab2089 into Mutizens:main Nov 20, 2026
7 checks passed
@Mosch0512
Mosch0512 deleted the feat/warp-list-data branch November 20, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant