Simplify T5 and T6 HUD overlays and service displays
This commit is contained in:
+50
-22
@@ -8,8 +8,8 @@ private server token.
|
||||
| File | Role | Dependencies |
|
||||
| --- | --- | --- |
|
||||
| `tws_t6_common.gsc` | Shared HUD values, helpers, paginated `.help`, service window, connection and first-spawn dispatchers | Stock T6 |
|
||||
| `tws_t6_hud.gsc` | Fixed upper-right core: branding, timers, zombie count, current/maximum HP and health bar | Common 1.2.0+ |
|
||||
| `tws_t6_afk.gsc` | `.afk` / `.back`, protection, movement and weapon blocking | Common 1.2.0+ |
|
||||
| `tws_t6_hud.gsc` | Unboxed timers, branding, zombies/health and per-player `.hud` visibility toggle | Common 1.4.0+ |
|
||||
| `tws_t6_afk.gsc` | `.afk` / `.back`, protection, movement and weapon blocking | Common 1.4.0+ |
|
||||
| `tws_t6_lock.gsc` | Lock at round 20; clear password on game over | Common, HUD |
|
||||
| `tws_t6_telemetry.gsc` | Async queued game reports (game_start/heartbeat/round_change/game_end) | tws-t6-gsc-utils |
|
||||
| `tws_t6_join.gsc` | `.join` chat command lets a spectator newcomer enter mid-match once | Common |
|
||||
@@ -70,22 +70,43 @@ populates that field before the `connected` notification. Follow the shared
|
||||
|
||||
## Core HUD and service window
|
||||
|
||||
The fixed upper-right core shows `TWS ZOMBIES`, `discord.tws.lol`, side-by-side
|
||||
match/round timers, zombie count, current/maximum HP and a full-width health bar.
|
||||
HP stays visible at full health. A reserved footer holds the AFK indicator;
|
||||
there is no co-op name row. The core is created once per connection, including
|
||||
for spectator newcomers with placeholders until values are available. Creation
|
||||
does not seed the match clock. It persists across death and respawn.
|
||||
Clocks, health and zombie-count displays freeze at game over. Health fallbacks
|
||||
only affect the display and never modify gameplay max health.
|
||||
The unboxed core puts match time above round time at the upper left,
|
||||
`TWS ZOMBIES · discord.tws.lol` at the top center, and zombies remaining above a
|
||||
slim health bar at the bottom center. Current/maximum HP appears to the right
|
||||
of the bar only while injured; it disappears at full health. The AFK indicator
|
||||
sits above the zombie count. There are no panel backgrounds or timer labels.
|
||||
Fullscreen X/Y anchors use the normalized `640 × 480` viewport directly and
|
||||
bypass safe-area insets. Font scale is at least `1.0`; verify text fit, stock
|
||||
HUD overlap and Plutonium tag clearance at each aspect ratio in-game.
|
||||
|
||||
Common provides one fixed-height service window beneath the core for help or
|
||||
records. Services never move or resize the core. They remain private and work
|
||||
without the HUD module installed. See the [shared layout and validation guide](../../README.md#core-hud-and-service-window-t5-and-t6).
|
||||
The core is created once per connection, including for spectator newcomers
|
||||
with placeholders until values are available. Creation does not seed the match
|
||||
clock. It persists across death and respawn. Clocks, health and zombie-count
|
||||
displays freeze at game over. Health fallbacks only affect the display and
|
||||
never modify gameplay max health.
|
||||
|
||||
Install HUD `1.2.0`, leaderboard `1.1.0` and AFK `1.0.1` with common `1.2.0+`.
|
||||
Update the installed scripts together and restart the map; this change requires
|
||||
no new plugin/backend dependency or full server-process restart.
|
||||
The exact, case-insensitive `.hud` command toggles your core and AFK indicator.
|
||||
It defaults visible, keeps your choice across death/respawn on the current
|
||||
connection/map, and resets visible on reconnect or map restart. Timers and data
|
||||
continue updating while hidden; game-over values remain frozen. Help, records
|
||||
and the stock HUD are unaffected. `.hud` requires the HUD module.
|
||||
|
||||
Common provides one unboxed upper-right service area below the Plutonium tag.
|
||||
Records are right aligned, with `Map record · Round N` followed by up to three
|
||||
holder lines; there is no replay footer or single-page counter. Help displays
|
||||
the full nine-command list in aligned rows. Services remain private, leave the
|
||||
core in place and work without the HUD module installed. See the
|
||||
[shared layout and validation guide](../../README.md#core-hud-and-service-window-t5-and-t6).
|
||||
Only the active service view holds HUD elements: 19 for nine-command help
|
||||
(20 with a multi-page counter), or four for records (five with a multi-page
|
||||
counter). Pages reuse elements; switching views or closing the service releases
|
||||
them. Idle services hold no HUD elements, while the controller retains pending
|
||||
requests and interruption/resume behavior. Core + AFK use 11 + 1 elements.
|
||||
|
||||
HUD `1.4.0` and AFK `1.2.0` require common `1.4.0+`. Update common, HUD and AFK
|
||||
together where installed, then restart the map. Leaderboard `1.1.0` remains
|
||||
compatible. This change requires no new Plutonium/plugin/backend dependency or
|
||||
full server-process restart.
|
||||
|
||||
## Map record announcements
|
||||
|
||||
@@ -110,14 +131,17 @@ apply to both versions. All T6 script filenames use the `tws_t6_` prefix.
|
||||
Type `.help` or `.commands` in chat to see the commands supplied by the loaded TWS modules and
|
||||
a short description of each. The list is shown only to the requesting player,
|
||||
including spectators who have not spawned. Commands are case-insensitive.
|
||||
Help uses the service window below the core. It shows four commands per page,
|
||||
advances automatically every 12 seconds and closes after the last page. The
|
||||
panel retains its height on short pages. Typing either command again returns to
|
||||
page one with a fresh timer.
|
||||
Help uses the unboxed upper-right service area. All nine installed commands
|
||||
fit in one list with command and description columns. Additional registered
|
||||
commands use pages of nine rows, with a counter only for multi-page lists.
|
||||
Pages advance every 12 seconds and close after the last page. Typing either
|
||||
command again returns to page one with a fresh timer. Both engines use
|
||||
explicit row positions so T5 does not concatenate newline-separated text.
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `.help`, `.commands` | List available commands |
|
||||
| `.hud` | Hide or show your core HUD and AFK indicator (HUD module required) |
|
||||
| `.afk` | Pause with protection |
|
||||
| `.back` | Return from AFK |
|
||||
| `.join` | Join mid-round (newcomers only) |
|
||||
@@ -126,11 +150,14 @@ page one with a fresh timer.
|
||||
| `.d <amount\|all>` | Deposit points (bank module required) |
|
||||
| `.w <amount\|all>` | Withdraw points (bank module required) |
|
||||
|
||||
AFK and Join register their commands during `init()` through
|
||||
Command modules register their commands during `init()` through
|
||||
`tws_t6_common::register_help_command(command, description)`. If a module is
|
||||
omitted, its commands are omitted from `.help`. Commands follow the order above,
|
||||
independent of initialization order. Register new commands alongside their
|
||||
module's initialization so the list stays current.
|
||||
With all command modules installed, help shows one page of nine commands,
|
||||
including the full `.d <amount|all>` / `.w <amount|all>` syntax. Removing HUD
|
||||
removes `.hud` from the list.
|
||||
The enabled leaderboard module registers `.leaders`, which replays the latest
|
||||
cached map record privately. Repeating it restarts the record from the first page;
|
||||
help pauses the record's remaining page time and resumes it after the final
|
||||
@@ -140,7 +167,8 @@ help page. `.leaders` during help replaces the pending record replay from page o
|
||||
|
||||
- HUD values live in `tws_t6_common::common_config()`. That function and
|
||||
`ensure_config()` came from T5; they initialize in-script values and do not
|
||||
load a config file. Core and service panels use fullscreen upper-right anchors.
|
||||
load a config file. Core and service overlays use fullscreen X/Y anchors in
|
||||
normalized `640 × 480` coordinates to bypass safe-area insets.
|
||||
- AFK uses T5's native `level waittill("say", message, player)` listener.
|
||||
`.back` restores movement and weapons immediately, then ends protection after
|
||||
two seconds. The T6 control/weapon fix remains in place.
|
||||
|
||||
Reference in New Issue
Block a user