Add fixed core HUD and shared service window for T5 and T6

This commit is contained in:
2026-10-14 15:55:22 -04:00
parent d15bc50b7d
commit 929bf0354b
18 changed files with 1973 additions and 804 deletions
+85 -10
View File
@@ -359,16 +359,87 @@ For this upgrade also verify stale URL settings are ignored, an empty `.b`
shows zero, `.w all` reports insufficient balance, and an EC rebuild/removal
settles legacy and public journals without duplicate ledger entries or lost points.
## Core HUD and service window (T5 and T6)
The HUD uses a fixed upper-right panel below the top edge, leaving room above
for performance overlays and below for stock player scores, ammo and equipment.
The header contains `TWS ZOMBIES` and `discord.tws.lol`; match and round timers
share the next row. Zombie count and current/maximum HP sit above a full-width
health bar. HP numbers remain visible at full health. A reserved footer holds
the AFK indicator; the former co-op player-name row is removed.
The core is created once per connection and stays in place when services open,
across death and respawn, and while newcomers spectate. Unavailable values use
placeholders until the first-spawn callback binds the data displays. Creating the
panel does not start the match clock. Each engine retains its timer behavior;
clocks, health and zombie-count displays freeze at game over. Health display
fallbacks never modify gameplay max health.
Common owns one fixed-height service window directly below the core. `.help`
and its `.commands` alias show four commands per page, with command and
description columns plus a page count. Pages advance automatically every
12 seconds and close after the last page. Repeating either command restarts
page one. The order is `.help`, `.afk`, `.back`, `.join`, `.leaders`, `.b`, `.d`,
`.w`, omitting commands whose modules are not registered. The `.join` description
continues to identify its newcomer restriction.
Records use the same service window. Help pauses a visible record and resumes
its remaining page time when help ends. `.leaders` during help replaces the
pending record with a fresh replay from page one. One service is visible at a
time, and neither changes the core's position or height. Services are private
to the requesting player and work when the HUD module is omitted.
Install HUD `1.2.0`, leaderboard `1.1.0` and AFK `1.0.1` with the matching
game's common `1.2.0+`; update the installed scripts together and restart the map.
There is no new native-plugin or backend requirement, and this change does not
require a full server-process restart. Existing leaderboard plugin requirements
still apply. Unchanged modules retain their existing common helper interfaces.
### HUD validation
Run `node tools/check_hud.mjs` for portable pagination, service arbitration,
request replacement and cleanup checks, and `node tools/check_leaderboard.mjs`
for record data handling. Run `node tools/check_bank.mjs`,
`node tools/check_join.mjs` and `node tools/check_telemetry.mjs` for unchanged
command/lifecycle regressions. These
checks use engine shims and do not prove GSC VM behavior. Follow the
[T6 compiler instructions](t6/scripts/README.md#validation); T5 requires a live
Plutonium server because gsc-tool has no T5 backend.
Before rollout, validate both engines in Plutonium:
1. Check 16:9 and narrower/wider resolutions, safe-area settings, long match
timers, stock map inventory/objectives, performance overlays, player scores,
ammo and interaction prompts. The core and service panels must stay clear of
these areas and retain their geometry for every page.
2. Join before spawning, join mid-match, die/respawn and reconnect. Verify one
core per player, spectator placeholders, no early match-clock start, correct
health/Juggernog changes, and frozen timers at game over. Toggle AFK and back
without overlapping the health bar or changing existing protection behavior.
3. Open `.help`, `.HELP` and `.commands` with all modules installed. Verify two
pages of four commands, 12 seconds per page and automatic dismissal. Repeat
on page two to return to page one. Remove optional modules and restart the
map to confirm filtered pages, then restore them.
4. Interrupt records with help and check that the interrupted page resumes for
its remaining time. Repeat `.leaders` while help is open; only the latest
replay should start, at page one. Check long holder names, ties spanning
pages, no records, and unavailable records. Repeat without the HUD installed.
5. Disconnect or end the game while help/records are active, reconnect and
request them again. Verify no duplicate elements, stale timeout closures or
surviving service windows. Confirm `.join`, bank commands and lobby lock
retain their existing behavior with their required modules installed.
## Map record announcements
Install `tws_t5_leaderboard.gsc` for T5 or `tws_t6_leaderboard.gsc` for T6,
**along with the updated common module** for that game.
The new module privately announces the current map's fleet-wide highest recorded
**along with common `1.2.0+`** for that game when using leaderboard `1.1.0`.
The module privately announces the current map's fleet-wide highest recorded
round and every tied holder once per connection, including spectator newcomers.
Type `.leaders` to replay the record privately from the latest usable cache.
Repeating the command restarts the announcement from its first page. It appears
in `.help` when the leaderboard module is enabled. If no usable record is
available, the command asks you to try again shortly.
available, the service window identifies the record as unavailable and keeps
the `.leaders` retry reminder; this differs from a valid empty record history.
It reads Electric Cherry's public `/api/leaderboard` endpoint without a token;
only completed matches contribute. Ties may come from the same run or separate
runs. Names are the API's latest player names, with players identified by GUID.
@@ -390,13 +461,17 @@ exist in the API's map list and match the current game and engine map. Clear it
when changing variants; restart the map after changing these settings.
The announcement starts five seconds after player readiness and waits for the
initial record fetch if necessary. It appears in the same HUD area as `.help`,
below the health bar, with a heading such as `Record: Round 23` and holder names
underneath. Each page shows up to three holder lines for 12 seconds. Opening
`.help` hides the record and pauses its display time until help closes.
All holders are included; colour/control codes are removed, and unusually long
names are shortened to keep messages readable. HUD elements are removed when
the announcement finishes, the player disconnects, or the game ends.
initial record fetch if necessary. It appears in the common-owned service
window beneath the core, with a `MAP RECORD` heading, prominent round value,
holder names, page count and `.leaders` replay hint. Each page shows up to three
holder lines for 12 seconds. Opening `.help` pauses the record's remaining
page time until help closes. A `.leaders` request during help replaces any
pending replay and starts from page one after help closes.
All holders are included; colour/control codes are removed, and overlong
individual names are abbreviated without splitting UTF-8 characters. Bounded
lines and additional pages preserve every tied holder. The window hides when the
announcement finishes and its elements are reused for subsequent services.
Disconnect or game end cleans up service elements.
One level worker fetches the map list and pages of three players, stopping when
the highest-round tie ends. Successful snapshots refresh every five minutes.