Death re-entry: auto-respawn at a resurrection point (no GM needed) #112
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo#112
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of the Alpha epic (pillar 3). Today resurrection is GM-only (
/resurrecttargeting a ghost). In a PvP arena that means the loop dies without an arbiter present: die -> ghost -> stuck. Add automatic re-entry so the arena self-sustains.Scope
GameOptions, single default) at a resurrection point, at full vitals./resurrectcommand working (manual override still allowed).PlayerResurrected.Out of scope
Definition of Done
Base DoD applies on top.
/resurrectstill works as a manual override.marco referenced this issue2026-07-20 18:58:29 +02:00
Design update — resurrection via Ankh (supersedes the timer model above)
The original scope (timed auto-respawn at a res point) is replaced: resurrection is now a diegetic, player-driven action — a ghost double-clicks an Ankh item and is resurrected on the spot. Reviewed via the
critical-design-reviewskill; agreed with the owner.Shape
IUsableon the auto-discoveredBaseItemlayer (mirrorsIEquippable);Ankh : BaseItem, IUsable, resolved viaItemCatalog.Usable(kind).Itemstayssealed(not subclassed).Use(Guid ItemId)(double-click), routed byGameSessionHandlerthrough oneSimulation.InvokeAsync→ thinWorld.UseItem→ItemRegistry(find placed item → range check →Ankh.OnUse(user)). Validation server-side: item exists + is aPlacedankh +user.IsGhost+ Chebyshev ≤UseRange.PlayerMobile.Resurrect()(IsGhost=false; Hits=MaxHits, no position change — res where you stand) andPlayerMobile.Die()(IsGhost=true; Hits=0)._resurrectionsscheduling dict,ProcessResurrections,ForceResurrectindirection,ResurrectDelayTicks, and the old spawn-forcingResurrect. GM/resurrectstays (acts directly on the instance). Broadcast rides a transient per-tick event queue (_pendingResurrections, symmetric to_pendingDeaths) →PlayerResurrected.ItemPlace.Placed+ a persisted section in the world save (mirrorsCreatureSerializer), restored single-threaded at startup, visible via AoI (ItemSpawned). Placed by GM/place ankh(mirrors/spawn).IsGhostis now persisted onPlayerMobile(version bump) so relog isn't a free resurrection.PlayerResurrectedmessage; the client plays a resurrect sparkle off it (no new server→client message). Art via the pack (item_ankh) withPlaceholderArtfallback.SystemMessageId+ catalog.Owner decisions (confirmed)
Placement = GM
/place; UseRange = 2; resurrect HP = full; persist ghost across relog = yes; light per-use rate-limit; ship as one PR.Invariants Check (per
CLAUDE.md → ## Design checklist)/placetile validated vs TileMap) · GM authorization ✓ (/place,/resadmin-gated;Useis a normal intent) · Identity N/A · Protocol versioned ✓ (newUse+ SystemMessageId → bumpProtocolVersion.Current5→6) · String catalog ✓ · Single-threaded sim ✓ (one InvokeAsync; startup restore single-threaded) · World.cs HARD GATE ✓ (World.UseItemdelegates toItemRegistry) · Screen HARD GATE ✓ (input→GameInputController, FX→WorldRenderer, msg→ServerMessageDispatcher) · Client engine-independence ✓ (DoubleClickDetectorin Client.Core) · Gameplay/Networking separation ✓ · Act on the instance ✓ (PlayerMobile.Resurrect/Die; scheduling dict deleted; only a transient event queue remains) · Extend by type, not switch ✓ (Ankh : BaseItem, IUsable,ItemCatalog.Usable) · Server-paced actions N/A (instantaneous) · Persistence (GameServer) ✓ (ItemPlace.Placed+ serializer section, own version;IsGhostpersisted; GM-placed) · Persistence (Auth) N/A · Process separation N/A · Typed options ✓ (UseRangeonGameOptions) · Broadcasts absolute + AoI ✓ (ankh reconciled as entity; res is AoI-scoped) · Multi-platform ✓ · Asset fallback ✓ (item_ankh→ placeholder) · ModernUO ref ✓ (followOnDoubleClick/ankh; reject res-gump/stat-loss/serial-linker) · Docs & DoD ✓ (updategm-commands.md; this DoD).Definition of Done (revised — replaces the timer DoD above)
Base DoD applies on top.
/resurrectstill works); relog does not resurrect a ghost./place ankhplaces an ankh that survives a server restart and is visible to players within AoI.docs/gm-commands.mdgains the/placerow;ProtocolVersion.Currentbumped.Mechanism update (agreed): ghost state is delivered as reconciled appearance state, not one-shot events.
PlayerStategainsPlayerAppearance(bool IsGhost);PlayerJoined/Welcomecarry it (fixes the enter-AoI-sees-ghost-as-alive bug); a newPlayerAppearanceChanged(id, appearance)is emitted by the AoI reconcile when a known player's appearance changes this tick. Removed:PlayerDied,PlayerResurrected,_pendingDeaths,_pendingResurrections,_resurrections,ProcessResurrections. Death/resurrection = intrinsicPlayerMobile.Die()/Resurrect()which flipIsGhost+ mark the entityAppearanceDirty;PlayerRegistrydrains dirty players each tick → the reconcile broadcasts. This is the shared foundation for #18 (worn gear = morePlayerAppearancefields). Invariants Check re-run: 0 blocking; Broadcasts+AoI improves (entering AoI now shows correct state); Act-on-instance improves (two event queues collapse into an intrinsic dirty flag). Client derives ghost render, the #30 death screen, and the resurrect FX from the observed appearance transition. ProtocolVersion 5→6.Superseded by #129 (ankh resurrection, merged) — closing.
The core goal here — a self-sustaining, no-GM re-entry loop — is met: a ghost double-clicks a placed
Ankh(GameServer/Gameplay/Items/Ankh.cs) to return to life, no GM/resurrectrequired. Note the deliberate design pivot from this issue's original auto-after-delay respawn to a walk-to-ankh resurrection fixture — the more MMO-general resurrection-point model. GM/resurrectremains as a manual override. Ankh art polish is tracked in #130.