Skip to content

Add player tools, local map previews, and configurable windows - #127

Open
Saharory wants to merge 4 commits into
encounterplus:developfrom
Saharory:contribution/player-client-tools
Open

Saharory wants to merge 4 commits into
encounterplus:developfrom
Saharory:contribution/player-client-tools

Conversation

@Saharory

@Saharory Saharory commented Oct 4, 2026 •

Copy link
Copy Markdown

Players can inspect and update their assigned character, plan distances and areas on the map, and keep sheets and references open independently. This contribution adds those tools alongside appearance settings and initiative docking, using the current upstream Angular/Pixi architecture.

Player features

  • My Character: the selected friendly token's host-provided HP range, pre-combat initiative, enabled effects, and character sheet.
  • Map planning: precise/grid rulers, saved rulers for the current browser session, and local sphere/cylinder/cone/cube/line previews with affected-square highlighting on square grids.
  • Sheets and references: independent draggable windows, with hosted roll/reference link handling when the frame document is accessible.
  • Interface: automatic/light/dark appearance, right/bottom initiative docking, and assigned-character turn notifications.

Integration

Based on official develop at fcebe0a, including the token status-effect renderer. It retains AppModule declarations, zoneless signal-driven application updates, the data service, existing model/event paths, and the video-aware asset pipeline. A revision input refreshes the player panel when mutable API/WebSocket state changes.

HP and initiative use the documented updateCombatant WebSocket event; rolls use createMessage. Rulers and area previews stay local to the browser and do not create shared host objects. Integration with the new shared measurement/area-effect write endpoints remains a separate follow-up. Incoming host measurements and area effects retain their existing rendering paths.

Status effects remain typed and synchronize across the game combatant, token model, and rendered token. Suspended effects are excluded consistently. Plain colored token discs render beneath the status-effect badges; artwork tokens retain their foreground labels. Local rulers refresh after grid changes; floating-window stacking stays bounded; cross-origin sheets clear their loading state even when their documents cannot be inspected.

Validation

  • Native Encounter+ testing: the contributor tested the packaged client on October 4, 2026 and subsequently rechecked the corrected effect-badge package. The contributor confirms the icons now display correctly and the client looks functional.
  • Automated: 266 unit tests and the production build passed through the canonical verification script.
  • Clean-install CI: Ubuntu/Node 22 verification of the effect-layering fix passed after npm ci and npm run verify.
  • Consistency: git diff --check and package/manifest version checks passed. The upstream PR workflow awaits maintainer approval.

Four commits with explanatory bodies separate verification tooling, client behavior, documentation, and the effect-badge layering fix. Upstream branding, version 0.9.17, and production dependency versions are retained.

API compatibility was checked against the official server API and status-effect schema.

Run the maintained Karma suites and production application build through one verification command and GitHub Actions. Remove the unused Protractor target and obsolete starter tests, and use the console reporter without its unused HTML-reporter dependency. Preserve upstream dependency versions and release metadata.
Add an assigned-character panel for host-provided HP ranges, pre-combat initiative, enabled effects, sheets, and rolls. Keep live player state reactive in the zoneless client and preserve upstream token status-effect rendering and typed models.

Add local precise/grid rulers, session-local saved measurements, and area previews using the existing Pixi grid and area renderers. Refresh their grid settings with map updates and release replaced preview graphics. These tools do not write shared measurements or area effects.

Add automatic/light/dark appearance, independent draggable character and reference windows, a right/bottom initiative dock, and turn notices. Preserve stored settings, bound window stacking, and handle inaccessible cross-origin frames. All 263 unit tests and the production build pass through the canonical verification script.
Describe the assigned-character controls, local ruler and area previews, floating sheets, appearance settings, and initiative dock. Explain the existing combatant/message WebSocket events and same-origin sheet interaction requirement, and document the canonical verification command without fork branding or version changes.
@Saharory
Saharory marked this pull request as ready for review October 4, 2026 03:08
The label graphic also draws the full colored disc when a token has no artwork. Its label-layer stacking placed the token body over the status-effect badges. Draw that body below overlays and effects while retaining the foreground label layer for artwork and tracked tokens.

Add regressions for friendly and hostile plain tokens and for the transition from artwork to a plain disc. The regression fails before the fix and passes afterward; all 266 unit tests and the production build pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant