auto sync

This commit is contained in:
slaguru666
2026-06-18 05:50:05 +01:00
parent 420360048a
commit 4318dcee48
3 changed files with 70 additions and 11 deletions
+1
View File
@@ -5,3 +5,4 @@
- [Semaphore Gitea URL](feedback_semaphore_gitea_url.md) — use `http://gitea:3000/tevans/<repo>.git` inside Semaphore, not the external Cloudflare URL
- [Canvas OSS course](canvas_oss_course.md) — Canvas test server canvas.timevans.uk + `~/gema-oss-canvas-course/` idempotent course-builder (pin account id 1).
- [Mapwright module](mapwright-module.md) — new standalone Foundry v13 battle-map generator at `~/FoundryVTT/Data/modules/mapwright/`; procedural-vector, buildings-first, one-geometry-model design.
- [Blueprint News](blueprint-news.md) — engine-agnostic SLA BPN briefing generator at `~/blueprint-news/`; reusable component + standalone app, seeded procedural SVG art, Player/GM split, NPC seam for a separate module.
+54
View File
@@ -0,0 +1,54 @@
---
name: blueprint-news
description: Engine-agnostic SLA BPN briefing generator at ~/blueprint-news/ (component + standalone app)
metadata:
node_type: memory
type: project
originSessionId: 5042e85b-5232-4f59-bf1d-92d635c764de
---
"Blueprint News" — a new **engine-agnostic** SLA Industries BPN (Blue Print News)
mission-briefing generator at `~/blueprint-news/`. Rebuild of the earlier
Foundry-bound experiments with every engine call stripped out.
Shape: a framework-free ES-module **component** + a standalone web **app** built on it.
- `core/` — `generateBPN({seed,colourKey,frameId,squadSize,overrides})`, deterministic; `data/` colours, frames, tables.
- `art/bpn-art.js` — seeded procedural SVG (`crestSVG`, `bannerSVG`): flat stencil/propaganda SLA style, never photorealistic. Seed drives the art.
- `render/` — `briefHTML()` (Player Brief) + `dossierHTML()` (GM Dossier), scoped under `.bpn`; responsive + print CSS.
- `assets/fonts/` — bundled local Josefin Sans + Roboto Mono + Modesto Condensed.
- `app/` + `index.html` — generator UI: Player/GM/Both, library (localStorage), Print, Export HTML.
Two **separate surfaces** per briefing: Player Brief (official dispatch) vs GM Dossier
(twist, withheld fact, true threat read, levers, dice state).
NPC/monster generation is a **separate future module** — each briefing exposes
`bpn.npcSeam {contactArchetype, threatArchetype, threatRole}` as the hand-off seam.
Per-band art: `art/bpn-art.js` `SCENES` map drives distinct foreground motifs
(tunnel/transit/wall/cordon/gantry/stage/canal/tower/vault/exec) + atmosphere/lighting;
`portraitSVG()` gives a halftone non-photorealistic contact ident in the Player Brief.
Published PUBLIC at https://github.com/slaguru666/blueprint-news (default branch `master`).
GitHub **MCP is not authenticated** here — use the `gh` CLI (logged in as slaguru666) for pushes.
**Zero Engine variant**: separate module **Blueprint News 0 Engine** (id `sla-blueprint-news-zero`)
at `~/FoundryVTT/Data/modules/sla-blueprint-news-zero/`, repo https://github.com/slaguru666/sla-blueprint-news-zero (v0.5.0).
Superset of the base module that, in a `zero-engine` world, also spawns real Zero Engine `npc`
actors on Create — a threat group (leader + mooks: gangs/Carrien/corpsec/Stormer/black-ops) + cast —
with attributes, HP, armour, damage, threat and embedded weapons, replicating the system's own NPC
Creator (`SLA_NPC_TYPES`/`_slaWeaponData` in systems/zero-engine). Logic in `module/zero-adapter.mjs`.
De-collided (global `game.slaBlueprintNewsZero`) so it coexists with the base module. Original
module backed up to `sla-blueprint-news-backup-20260617-185229.tar.gz`. Not load-tested in Foundry yet.
**Foundry module** (the installable deliverable): `sla-blueprint-news` at
`~/FoundryVTT/Data/modules/sla-blueprint-news/`, ApplicationV2 generator (idiom from
mapwright), vendors the component under `module/vendor/`, writes one JournalEntry with a
player **Mission Brief** page (Observer) + GM-only **Dossier** page (None). Uses render
`artMode:"img"` so Foundry doesn't strip inline SVG. Published at
https://github.com/slaguru666/sla-blueprint-news (release v0.1.0); remote install manifest:
`https://raw.githubusercontent.com/slaguru666/sla-blueprint-news/main/module.json`.
Not yet load-tested in a running Foundry world.
Source aesthetic/palette/fonts come from `~/FoundryVTT/Data/systems/sla-industries-brp`.
Run with any static server (ES modules need HTTP); `.claude/launch.json` serves it on :8778.
Related: [[mapwright-module]].
+15 -11
View File
@@ -1,24 +1,28 @@
---
name: mapwright-module
description: Mapwright — new standalone Foundry v13 battle-map generator module being built from scratch
description: Mapwright — standalone Foundry v14 battle-map generator; published on GitHub (slaguru666/mapwright)
metadata:
node_type: memory
type: project
originSessionId: 876e6f57-7721-4a19-83bd-1400e94b8c64
---
Building `mapwright`, a standalone Foundry VTT v13 module at `~/FoundryVTT/Data/modules/mapwright/` that auto-generates tactical battle maps with Foundry walls/doors/windows/lighting pre-placed. Fresh rebuild — replaces the underwhelming `quick-battlemap-builder` and the sprawling `scifi-deckplan-generator` (7k lines, 37+ options, programmer-art SVG).
`mapwright` — standalone Foundry VTT battle-map generator at `~/FoundryVTT/Data/modules/mapwright/`. Auto-generates good-looking tactical maps with Foundry walls/doors/windows/lighting pre-placed. Fresh rebuild replacing the underwhelming `quick-battlemap-builder` / sprawling `scifi-deckplan-generator`.
**Decisions made with Tim (2026-06-16):**
- Visual approach: **procedural-vector** (Watabou-style ink look drawn in code), NOT compositing real tile art. Open to bundling a small curated art pack later.
- First milestone: **indoor buildings (modern + fantasy)** done excellently before other categories.
- Population: **system-agnostic** — labelled GM Notes + prop tiles only; never assume a game system/compendium.
- Distribution: self-contained, OK to bundle a curated art pack.
**PUBLISHED (2026-06-17, v0.5.0):** GitHub repo `https://github.com/slaguru666/mapwright` (public). Install in Foundry via manifest URL: `https://github.com/slaguru666/mapwright/releases/latest/download/module.json`. Releases via `gh` CLI (auth'd as slaguru666) — GitHub MCP has no release tool, so use gh for releases. Release assets: `module.json` + `mapwright.zip` (clean module files, no dev/). To ship a new version: bump module.json version → zip `module.json module templates styles lang README.md` → `gh release create vX.Y.Z module.json mapwright.zip`. `.gitignore` excludes dev/*.svg|png|jpeg|html.
**Core architectural principle:** one geometry model feeds BOTH the SVG picture and the Foundry walls, so visible walls always line up with sight-blocking walls (the thing both old modules got wrong). Pipeline: `building.mjs` (BSP → rooms+region grid) → `walls.mjs` (segments + spanning-tree door connectivity) → `render-vector.mjs` (SVG) + `scene.mjs` (Foundry docs). `lib/*` is pure/Node-testable; validate visuals with `node dev/render-sample.mjs` then `qlmanage` to PNG.
**Live Foundry is v14.361** (world SLA_Industries, system zero-engine). Can log into the GM session via Playwright (Gamemaster user, no password, localhost:30000) to test live. Module is ENABLED there.
**Live Foundry is v14.361** (not v13) — world SLA_Industries, system zero-engine. Module declares max 14, verified bumped to 14.361. Hardened FilePicker call to use `foundry.applications.apps.FilePicker.implementation` with global fallback (v14 namespacing). Scene-control toolbar button may need v14 tweaks; reliable entry points are `game.mapwright.open()` console + Scenes-tab button.
**Core principle:** one geometry model feeds BOTH the picture and the Foundry walls. Pipeline per category: generate layout → wall segments → SVG (preview + scene background PNG) + Foundry walls/doors/lights/notes/tiles.
v0.3 status (draft 3, built this session): expanded buildings per Tim's feedback (rectangular was too plain). NEW: (1) non-rectangular footprints — buildFootprintMask() in building.mjs supports rectangle/L/T/U/plus; BSP splits bbox then clips rooms to mask via region grid, so exterior walls follow the non-rect outline for free. (2) Multi-floor — generateBuildingComplex() makes 1–4 floors sharing ONE footprint (maskSeed constant) with a vertical-circulation column (elevator=modern, stairs=fantasy) forced at the same cell on every floor; createSceneSet() in scene.mjs makes a Folder of linked scenes + up/down GM notes. (3) Era-aware door/window ARTWORK in render-vector.mjs — filled door leaves (planked wood / metal-slab glass), handles, swing arcs; framed mullioned windows. doorFill added to THEMES. (4) furniture.mjs — vector props per room type (bed/desk/bigtable/racks/counter/crates/shelf/toilet/bunk + stairwell/elevator glyph). render-vector now builds floor + hatching from the REGION grid (buildFloorPath) not the footprint rect. All verified visually (L/U/plus shapes, furniture, era doors, multi-floor staircase) + multi-floor consistency test (identical mask + aligned circ across floors). All JS syntax-checked. STILL not tested inside running Foundry (v14.361). Earlier engines unchanged: caves (organic.mjs), outdoor (outdoor.mjs). Next: prop/furniture as interactive Tiles, built-dungeon rooms+corridors style, water/elevation in caves, UVTT export.
**Categories (6):** Modern Building, Fantasy Building (BSP, footprint shapes rect/L/T/U/plus + "auto" random, multi-floor 1-4 with stairs/elevator, era-aware door/window art, furniture as LOCKED TILES); Cave/Dungeon (organic CA, themes cave/crypt/sewer); Outdoors (grassland/desert/snow/badlands); Town/Village + City Block (solid rooftop blocks + perimeter walls, dense + colourful + lots of baked scenery: cars/trees/lamps/crosswalks/wells/stalls).
Reference module to study: **Dungeon Draw** (mcglincy) — themed bg + auto-walls from one geometry. Consider UVTT export for ecosystem interop.
**KEY v14 GOTCHAS (hard-won):**
- Scene background moved to LEVELS: set `scene.updateEmbeddedDocuments("Level",[{_id, background:{src,color}}])` on the default level (`defaultLevel0000`), NOT the deprecated `scene.background`. See `applyBackground()` in scene.mjs.
- FilePicker is `foundry.applications.apps.FilePicker.implementation`; normalise upload paths to relative.
- Tiles use `texture.src` (not `img`); furniture tiles are `locked:true`, generated sprites cached in `mapwright/furniture/`.
- Default scenes: tokenVision:false (flat fully-lit map = matches preview); dynamic lighting opt-in.
**File map:** lib/{rng,building,walls,render-vector,furniture,furniture-layout,organic,dungeon,render-cave,outdoor,render-outdoor,settlement,render-settlement,population,scene}.mjs; app/generator-app.mjs; mapwright.mjs (entry). Pure libs are Node-testable via dev/*.mjs harnesses (render → qlmanage to PNG to eyeball).
**Next ideas:** enterable hero buildings; more biomes; moving-traffic city look; village cobble plaza.