Center zombie counters and use ASCII HUD separators
This commit is contained in:
+15
-7
@@ -43,7 +43,7 @@ view: 19 nonarchived elements for nine-command help (20 with a multi-page
|
||||
counter), or four for records (five with a multi-page counter). Closing the
|
||||
service or switching kinds destroys the view; idle holds no elements. Pages
|
||||
reuse the active elements, separately from controller and pending-request state.
|
||||
Core + AFK use 11 + 1 archived elements. Hidden elements still occupy slots.
|
||||
Core + AFK use 10 + 1 archived elements. Hidden elements still occupy slots.
|
||||
The [T6 player HUD structure](https://github.com/skiff/t6-gsc-helper/blob/50ff6cb7397c9376894a195f48118d1743812d1d/src/game/structs.hpp#L184)
|
||||
has 31 slots in each bucket; it does not establish current Plutonium stock HUD
|
||||
usage. Keep the live overlap/element-budget checks alongside the portable checks.
|
||||
@@ -54,18 +54,24 @@ creation must not seed the match clock. The unboxed layout has timers at the
|
||||
upper left, branding at top center and zombies/health at bottom center. HP
|
||||
numbers appear to the right of the bar only while injured; AFK sits above the
|
||||
zombie count. Services never reposition the core. Records are right aligned,
|
||||
with `Map record · Round N` followed by up to three bounded holder lines, no
|
||||
with `Map record | Round N` followed by up to three bounded holder lines, no
|
||||
footer and no single-page counter. Their 12-second page timing is unchanged.
|
||||
|
||||
HUD `1.4.0` and AFK `1.2.0` require matching common `1.4.0+`; update all three
|
||||
where installed and restart the map. Leaderboard `1.1.0` remains compatible.
|
||||
HUD `1.4.2` requires matching common `1.4.0+` and
|
||||
[Plutonium r5334+](https://plutonium.pw/docs/changelog/#r5334) for
|
||||
`SetTextUnlimited`. The `N ZOMBIES` counter is one element centered at the
|
||||
health track's midpoint with uniform scale `1.25`, starting as `-- ZOMBIES`.
|
||||
Only changed counts update its text; numeric HP retains `SetValue`. On r5334+,
|
||||
update the HUD script and restart the map. Older Plutonium clients and servers
|
||||
need updates and full restarts first. AFK `1.2.0` and leaderboard `1.1.0` remain
|
||||
compatible; AFK still requires common `1.4.0+`.
|
||||
Overlay helpers use direct normalized `640 × 480` coordinates. Dynamic health
|
||||
fills use `make_overlay_width()` like their tracks. Apply `int()` after `max()`
|
||||
in that helper: native `max()` returns a float, but `SetShader` requires an
|
||||
integer width. Legacy panel helpers retain their `0.75` horizontal conversion
|
||||
for existing consumers. Font scale is at least `1.0`. This introduces no
|
||||
Plutonium/native-plugin/backend dependency or full server-process restart
|
||||
requirement.
|
||||
for existing consumers. Font scale is at least `1.0`. There is no new
|
||||
native-plugin/backend dependency or full server-process restart requirement
|
||||
when already using Plutonium r5334+.
|
||||
|
||||
HUD owns the exact, case-insensitive `.hud` chat command and registers it in
|
||||
help only while installed. Common's core wrappers preserve each element's
|
||||
@@ -195,6 +201,8 @@ Live checks after deploying:
|
||||
spectator placeholders without an early clock start. Check damage-only HP,
|
||||
health/Juggernog changes, AFK placement and timers frozen at game over.
|
||||
Test safe-area settings and different resolutions against stock HUD elements.
|
||||
Check `0`, `6`, `9`, `10`, `99` and `100 ZOMBIES` remain centered above the
|
||||
health track, including after `.hud` toggles and game over freezes the count.
|
||||
2. `.afk` blocks movement, shooting and grenades; `.back` restores them. Try rapid
|
||||
toggles, a round transition, death/respawn and game over.
|
||||
3. Lock fires at the threshold and clears on game over/restart. HUD must be installed.
|
||||
|
||||
+17
-11
@@ -8,7 +8,7 @@ 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` | Unboxed timers, branding, zombies/health and per-player `.hud` visibility toggle | Common 1.4.0+ |
|
||||
| `tws_t6_hud.gsc` | Unboxed timers, branding, zombies/health and per-player `.hud` visibility toggle | Common 1.4.0+, Plutonium r5334+ |
|
||||
| `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 |
|
||||
@@ -73,10 +73,13 @@ populates that field before the `connected` notification. Follow the shared
|
||||
## Core HUD and service window
|
||||
|
||||
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.
|
||||
`TWS ZOMBIES | discord.tws.lol` at the top center, and zombies remaining above a
|
||||
slim health bar at the bottom center. `N ZOMBIES` is one centered element at
|
||||
the health track's midpoint, using uniform font scale `1.25` so the whole group
|
||||
stays centered as the digit count changes. Its initial placeholder is
|
||||
`-- ZOMBIES`. 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.
|
||||
@@ -94,7 +97,7 @@ 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
|
||||
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
|
||||
@@ -103,12 +106,15 @@ 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.
|
||||
requests and interruption/resume behavior. Core + AFK use 10 + 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.
|
||||
HUD `1.4.2` requires common `1.4.0+` and
|
||||
[Plutonium r5334+](https://plutonium.pw/docs/changelog/#r5334) for its
|
||||
`SetTextUnlimited` counter, updated only when the count changes. Deploy the
|
||||
updated HUD script and restart the map on r5334+; no full server-process
|
||||
restart is required. Older Plutonium revisions need client/server updates and
|
||||
full restarts first. AFK `1.2.0` and leaderboard `1.1.0` remain compatible;
|
||||
AFK still requires common `1.4.0+`. No new native-plugin or backend requirement.
|
||||
|
||||
## Map record announcements
|
||||
|
||||
|
||||
@@ -453,7 +453,7 @@ service_render(state)
|
||||
{
|
||||
header = "No recorded high round yet";
|
||||
if (snapshot.round > 0)
|
||||
header = "Map record · Round " + snapshot.round;
|
||||
header = "Map record | Round " + snapshot.round;
|
||||
}
|
||||
if (!isDefined(state.record_header_text) || state.record_header_text != header)
|
||||
{
|
||||
|
||||
@@ -54,12 +54,12 @@ hud_connect()
|
||||
self.tws_hud_round = self hud_text(level.hud_overlay_timer_x,
|
||||
level.hud_overlay_round_y, "left", 1.25, level.hud_c_dim, "--:--");
|
||||
self hud_text(level.hud_overlay_brand_x, level.hud_overlay_brand_y,
|
||||
"center", 1.1, level.hud_c_dim, "TWS ZOMBIES · discord.tws.lol");
|
||||
"center", 1.1, level.hud_c_dim, "TWS ZOMBIES | discord.tws.lol");
|
||||
|
||||
self.tws_hud_count = self hud_text(level.hud_overlay_count_x,
|
||||
level.hud_overlay_count_y, "right", 1.5, level.hud_c_count, "--");
|
||||
self hud_text(level.hud_overlay_count_label_x, level.hud_overlay_count_label_y,
|
||||
"left", 1.05, level.hud_c_dim, "ZOMBIES");
|
||||
// Center the entire readout on the track, regardless of the digit count.
|
||||
count_x = level.hud_overlay_bar_x + level.hud_overlay_bar_width / 2.0;
|
||||
self.tws_hud_count = self hud_text(count_x,
|
||||
level.hud_overlay_count_y, "center", 1.25, level.hud_c_count, "-- ZOMBIES");
|
||||
|
||||
// Independent numeric elements avoid a new config string on every tick.
|
||||
// The readout appears only after a valid damaged-health sample.
|
||||
@@ -239,7 +239,8 @@ hud_zombie_counter()
|
||||
|
||||
if (remaining != last)
|
||||
{
|
||||
count SetValue(remaining);
|
||||
// Plutonium r5334+: reuse text storage as the count changes.
|
||||
count SetTextUnlimited(int(remaining) + " ZOMBIES");
|
||||
last = remaining;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user