You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depend on libWrapper, socketlib, simple-timekeeping instead of hand-rolled infra
Per the module-library direction: use vetted community libraries as
prerequisites rather than recreating core infrastructure, and prefer
editing this module over injecting another layer.
- module.json hard-requires lib-wrapper, socketlib, and simple-timekeeping.
- measure-fuzz.mjs wraps the ruler classes' _getWaypointLabelContext via
libWrapper (WRAPPER on CONFIG.*.rulerClass paths) so it composes with other
ruler modules instead of subclass-clobbering.
- New socket.mjs centralizes socketlib registration with an import-time queue;
map-items fog reload uses executeForEveryone, player-requests uses
executeAsGM. Removes the hand-rolled game.socket channel and manual
active-GM routing.
- simple-timekeeping owns the world clock and scene-darkness sync; dungeon
turns already feed it through game.time.advance, and the module only reads
scene darkness (never writes it), so they never conflict. Documented in
DESIGN.md.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/DESIGN.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,14 @@
2
2
3
3
Follows the conventions of `acks-influence` (ApplicationV2 + HandlebarsApplicationMixin, Foundry v13/v14, `acks` system).
4
4
5
+
## Required libraries
6
+
7
+
Rather than recreate core infrastructure, the module hard-requires three community libraries (`relationships.requires` in `module.json`):
8
+
9
+
-**libWrapper** — wraps the ruler classes' `_getWaypointLabelContext` (`measure-fuzz.mjs`) so it composes with other ruler modules instead of clobbering the class.
10
+
-**socketlib** — all cross-client messaging (`socket.mjs`): named handlers with GM routing for player action requests and fog reloads.
11
+
-**simple-timekeeping** — owns the world clock, calendar, and scene-darkness sync. Dungeon turns feed it through the standard `game.time.advance` contract; the module only *reads* scene darkness (`isPartyInDark`), never writes it, so the two never fight over darkness.
12
+
5
13
## Files
6
14
7
15
| File | Responsibility |
@@ -12,6 +20,7 @@ Follows the conventions of `acks-influence` (ApplicationV2 + HandlebarsApplicati
12
20
|`scripts/formation-app.mjs`| The formation window (GM controls, player read-only). |
13
21
|`scripts/encounter-zone.mjs`|`acks-formation.encounterZone` RegionBehavior subtype (table UUID + cadence overrides) and point-in-region lookup for the party token (core `testPoint` when available, manual shape math as a headless fallback). |
14
22
|`scripts/scene-sync.mjs`| Mapper-gated fog (`scene.fog.exploration`, original value stashed in a scene flag) and party-token light emission mirroring lit sources. Reconciled by the primary GM after every formation change (idempotent, compare-before-write). |
23
+
|`scripts/socket.mjs`| socketlib registration (`socketlib.ready`) and a queue so handlers can register at import time; exposes `getSocket`/`registerHandler`. |
Copy file name to clipboardExpand all lines: module.json
+27-1Lines changed: 27 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"id": "acks-formation",
3
3
"title": "ACKS II — Exploration Formations",
4
4
"description": "Condenses the party into exploration formations for cleaner dungeon delving. Members join a formation and are represented on the canvas by a single party token that moves at exploration speed. Movement automatically consumes dungeon turns (10 minutes), driving light-source burn, rest requirements, wandering-monster checks, spell-duration expiry, and ration tracking per the ACKS II dungeon delve sequence of play.",
5
-
"version": "0.15.0",
5
+
"version": "0.16.0",
6
6
"socket": true,
7
7
"compatibility": {
8
8
"minimum": "14",
@@ -76,6 +76,32 @@
76
76
"minimum": "13"
77
77
}
78
78
}
79
+
],
80
+
"requires": [
81
+
{
82
+
"id": "lib-wrapper",
83
+
"type": "module",
84
+
"reason": "Wraps ruler measurement labels safely alongside other ruler modules.",
85
+
"compatibility": {
86
+
"minimum": "1.12.0"
87
+
}
88
+
},
89
+
{
90
+
"id": "socketlib",
91
+
"type": "module",
92
+
"reason": "Routes player action requests and fog-reload messages between clients.",
93
+
"compatibility": {
94
+
"minimum": "1.1.0"
95
+
}
96
+
},
97
+
{
98
+
"id": "simple-timekeeping",
99
+
"type": "module",
100
+
"reason": "Shared world clock, calendar, and scene-darkness synchronisation for dungeon turns.",
0 commit comments