[Foundry] Token image on pushed actors #150
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation/Context
A pushed NPC actor with no token art is a flat, generic token in Foundry — undercuts the value of pushing at all during live play, where the GM wants a recognizable token to drop onto the scene.
LoreEntry.image_url(webapp/backend/app/models/lore_entry.py:232) already stores the portrait/token art source for npc/creature entries, so the data already exists; this issue wires it into the pushed actor'sprototypeToken.Approach
Set
prototypeToken.texture.srcon the pushed Actor fromLoreEntry.image_url. Two possible mechanisms, per the live-push investigation (2026-07-15):image_urldirectly. This works today with zero extra API surface, since Foundry just needs the URL reachable from Foundry clients — true for this deployment, since Quest Board is the group's web app and players' Foundry clients already reach it.Document the caveat explicitly (in code comments and campaign-facing docs if applicable): hotlinking means the image URL is technically fetchable by anyone who obtains it, including for entries whose art is meant to be GM-only. This is an accepted v1 trade-off, not a security gap to silently ship — flag it in the same place #24's other residual-risk notes live.
Dependencies
npc_to_actorstat mapping) or at minimum #9's base actor-push path existing — token image is set on an actor that must already be created/updated by the push flow.foundry_links) implicitly via the actor push path — no direct table interaction of its own.Out of scope
image_url.Acceptance criteria
prototypeToken.texture.srcpopulated fromLoreEntry.image_urlwhen present.image_urldegrade gracefully (default Foundry token, no error).