Skip to content

feat(warps): attribute requirements for warps, sent to the open source client - #11

Open
Mosch0512 wants to merge 14 commits into
masterfrom
feat/warp-requirements
Open

Mosch0512 wants to merge 14 commits into
masterfrom
feat/warp-requirements

Conversation

@Mosch0512

@Mosch0512 Mosch0512 commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Warps can now require attributes, like maps already can: a server can say "Swamp of Calmness needs 5 resets" or "this warp needs master level 50". The open source client (MuMain) learns the master level and resets minimums, so it can grey out the warps a character can't use yet.

What it does

  • WarpInfo.Requirements: a list of AttributeRequirement, set up like GameMapDefinition.MapRequirements (persistence, migration AddWarpInfoRequirements, captions in en, de, zh-CN). The admin panel edits it like the map requirements.
  • Checks: WarpInfoExtensions decide who may use a warp (its class-reduced level and its requirements); WarpAction, both bot paths and the bots' warp floor use them. WarpAction checks the warp's requirements after the map's and before the money. The summon party skill lets a member come when any warp into the map lets them in (before, only the warp with the lowest level counted).
  • Messages: a missed warp requirement is refused with "Missing requirement for this warp: Master Level 50" (en, de, pt). The map requirement message gets the same "name minimum" text: on master it was looked up by its English value instead of its resource name, so it came out empty.
  • New message WarpRequirementsExtended (C2 F5 0B), only for the open source client (106.3 and later), sent right after WarpListExtended: count, then per warp Index (u16), MasterLevel (u16), Resets (u32). It lists only the warps with a master level or resets minimum above 0 (the highest minimum of each attribute; a negative minimum is sent as 0) and isn't sent when none has one. Other attributes are checked by the server only.
  • No packet without a suffix changes, so the original client gets nothing new (coding rule 2). WarpListExtended is unchanged too, so released MuMain builds keep working; they ignore the new sub code.
  • Docs: the warp list section of the admin panel docs; the generated packet doc.
  • The Season 6 data keeps its warps without requirements.

How it was checked

  • MUnique.OpenMU.Tests: 3107 passed, 2 skipped. New: WarpAction with requirements met and missed (with the message), the map requirement message, the plugin's exact bytes (also a negative minimum), no message when only other attributes are required, the summon with two warps into a map, bots skipping warps and their warp floor. Each new test fails when its fix is reverted.
  • MUnique.OpenMU.Network.Packets.Tests: 719/719; MUnique.OpenMU.PlugIns.Tests: 55/55.
  • MUnique.OpenMU.Web.Tests: the 16 NetworkAnalyzer tests that fail in a German culture pass with DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1; the rest pass.
  • Persistence.Initialization.Tests: 868 passed; ItemStatProfilesDataTest.Season6ItemCountsPerProfile fails here, a master failure fixed by test(items): update the item count of the default stat profile MUnique/OpenMU#1528.
  • In game with MuMain (feat(warps): the warp list and its move rules as data, with a Warp List editor MuMain#177): Swamp of Calmness needing 1 reset and Noria needing master level 1 show greyed out with "R 1" / "ML 1" for a level 400 character without resets; the migration ran on an existing database (tried before the review fixes).

Decided by me

  1. The requirements message comes from ShowWarpListExtendedPlugIn, so it always follows the list and covers the same warps.
  2. Game masters must fulfill the warp's requirements like its level; only warps which aren't warpable are open to them alone.
  3. Master level is clamped to 0–65535 in the message.
  4. The summon keeps its own level rule from master (total level, no class reduction).

Client side

MuMain reads the message in Mosch0512/MuMain#177 (warp list as data, with master level and resets per warp).

WarpInfo.Requirements is a collection of attribute requirements, like the
MapRequirements of a map, e.g. a minimum master level or number of resets.
It's editable in the admin panel like the other requirement collections and
part of the configuration aggregate.

The migration adds the foreign key of the warp to the AttributeRequirement
table; existing warps get no requirements. The persistence model classes,
the compiled model and the generated loader code are regenerated.
WarpAction refuses a warp whose requirements the character doesn't meet,
with the same check and message as the requirements of the target map, and
before the costs are paid. The check of the map requirements is extracted
into an extension of the requirement collection, which both use.

The move chat command warps through WarpAction. Bots don't pick warps whose
requirements they miss, and the summon party skill doesn't summon a member
who misses the requirements of the warp to the map.
…r the open source client

WarpRequirementsExtended (C2 F5 0B) follows the WarpListExtended and carries,
per warp which requires them, the minimum master level and the minimum number
of resets, so that the client can grey out the warps which the character can't
use yet.

The regenerated packet structure tests also contain the tests of the lucky coin
packets, which were missing in the committed file.
Right after the warp list, ShowWarpListExtendedPlugIn sends the minimum master
level and resets of the listed warps which have such a requirement; of several
requirements of the same attribute, the highest one. Requirements of other
attributes stay on the server, and nothing is sent when no warp has one. The
original client doesn't get it, because the plugin is only for the open source
client.
… place

WarpInfoExtensions decide whether a player may use a warp (its class-reduced level and its
requirements); WarpAction and both bot paths use them. A missed warp requirement is refused with
its own message, which names the attribute and its minimum ("Master Level 50"). The map
requirement message gets the same text: it was looked up by its English value instead of its
resource name, so it came out empty.
…m in

The summon picked the warp with the lowest level and checked only its requirements, so a member
who misses them was left behind although another warp into the same map would let them in.
Tests for the summon and for the bots, which skip warps whose requirements they miss.
@Mosch0512
Mosch0512 force-pushed the feat/warp-requirements branch from 60a5d93 to 6e75522 Compare November 16, 2026 22:31
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