W3 / DevelopersSDK 4.6.0Source & examples ↗

SDK 4.5: menus, replays and departed players

Install @w3booster/sdk@4.5.1, update your lockfile and rebuild. Protocol 4.0 and existing scopes are unchanged. Restart W3Booster to load the matching recorder. The 4.5.1 patch also fixes browser timer cleanup when changing matches or disconnecting while an interpolation frame is pending.

In-game menu visibility

Optional GameContext.menuOpen reports a recognized Warcraft menu or dialog. true means open, false means gameplay, and absence means unavailable. It is independent of pause, foreground status, replay playback and observer identity. Keep subscriptions alive while hiding your UI so that the close event can restore it.

import type { MatchState } from '@w3booster/sdk';
import { isActiveMatch } from '@w3booster/sdk/selectors';

// Apply this to your overlay container; keep the SDK subscription active.
export function overlayVisible(state: MatchState): boolean {
  return isActiveMatch(state.match) && state.gameContext.menuOpen !== true;
}

Match Vision hides both ingameOverlay and OBS streamOverlay while a menu is open, then restores them when it closes. F10/options, alliances, quests, chat history and script dialogs are menus. Ordinary chat entry, targeting, selection and dragging remain gameplay. A paused replay with its menu closed remains visible. Unknown input modes and older recorders leave the field absent; do not interpret absence as proof of an open menu. A new match clears the observation.

Initial platform state and local replay/observer recorder updates carry the same field. SDK 4.5 is needed to interpret the new local update. Older SDKs can preserve an additive field arriving from the API but do not understand a new local event. See the SDK menu contract.

Replay and observer identity

Use match.isReplay and match.isObserver; either or both may be true. A recording made from an observer slot can retain both flags. Do not infer replay mode from a menu, pause, selected player, filename or observer flag. The recorder now follows the engine session state and confirms transitions before publishing a new match. An uncertain session observation suspends publication instead of guessing self-play.

Replay and observer data continue to use the desktop's local relay, including in production builds. The platform snapshot supplies identity, scopes and settings; the SDK overlays permitted local observations. Self-play retains its own visibility and entitlement rules. A classification change is a new match context, not a reason to reuse data from the previous match.

Players leaving an observer game or replay

In standard melee, a player leaving without allies can transfer surviving units to Warcraft's Neutral Victim owner. The recorder retains those known units under the participant they belonged to for observer/replay presentation. Heroes, workers, buildings, production and health continue updating. Real destruction still removes the unit, and a real transfer to another participant changes its attribution. This behavior does not grant extra self-play visibility.

A fresh recorder attachment can recover attribution when the preserved unit color matches one unambiguous departed participant. Custom maps that recolor units or create Neutral Victim units independently may not provide enough information; do not assume this inference is universal. Known ownership takes precedence.

Resources remain actual observed values. Zero supply after neutralization is valid; it is not a reason to freeze older values or hide the player. Failed reads remain unavailable. This recorder correction requires no new SDK fields or scopes.

Legacy cleanup

Unused Netease integration has been removed. Supported stats providers are bnet and w3champions. Existing supported-provider contracts are unchanged.

For the other September improvements, see SDK 4.4 for smooth live values, interactive regions, inventory charges and native hero-bar spacing.