This package contains art, text, or software code produced using generative AI.
AI was used to refine and iterate code for this module.
Gate City Shadows — SR6 Eden Importer
A lightweight Foundry VTT helper that turns Shadowrun 6e (shadowrun6-eden) character JSON into real Actors with as little fuss as possible.
What it does
This module adds an Import Eden JSON control right to the Actors Directory header (and also supports drag & drop onto that directory). Click the button or drop a file, choose a target folder, and your JSON is transformed into a proper shadowrun6-eden
Actor.
Under the hood, the importer:
-
Understands the SR6 Eden shape.
It expects “player-style” character JSON withname
,type: "Player"
,img
, and asystem
block containing SR6 attributes and basics (bod, agi, rea, str, wil, log, int, cha, mag, res, edg
, etc.). It aligns your fields with the Shadowrun6 Eden data model so the sheet opens without red errors. -
Sanitizes aggressively (for safety).
It strips or reconstructs problem fields before creation:-
Removes
_id
,_key
,ownership/permission
,_stats
(and rebuilds pieces Foundry/SR6 Eden need). -
Normalizes
flags
and clears anyexportSource.uuid
values that would fail validation. -
Ensures
_stats.lastModifiedBy
is set to the current user and other values are well-formed for Foundry v13 + SR6 Eden v3.3.3.
-
-
Creates in the right place.
You can pick a target folder in the Actors Directory (or create at the root if you prefer), keeping your world tidy as you bring characters in. -
Gives useful feedback.
If something isn’t right (missing key fields, malformed JSON), you’ll see a clean error dialog and a more detailed console log so you can quickly fix the source file.
In short: drop or select JSON → pick folder → confirm → done.
What it doesn’t do (yet)
This importer focuses on frictionless actor creation, not full-blown character rebuilds. A few explicit limitations:
-
Player Characters first.
The safest path today is JSON that represents a Player actor. Other types (NPCs/Grunts/Spirits, etc.) are not mapped by default. (Presets for more types are on the roadmap.) -
No compendium import (yet).
Actors are created in your world Actors Directory, not directly into a compendium pack. -
UI: still using Dialog (V1).
It uses the classic Foundry Dialog UI today. It works fine on v13, but we’re migrating to ApplicationV2 so the experience stays future-proof. -
Directory refresh quirk.
After import, you may need to reload the view once to see the new actors listed (the actor is created immediately; this is a display refresh issue we’ll smooth out). -
Scope: base character only.
This tool is for core fields (name, metatype, attributes, basic resources, basic skills/contacts if present). It doesn’t attempt to reconstruct full gear inventories, spells, powers, etc.
What’s inside the module
The project is intentionally small—easy to read, easy to maintain.
-
module.json
The manifest Foundry reads: id, title, version, compatibility, file entries, localization, and an optional readme link. -
scripts/importer.js
The heart of the module. It:-
Registers hooks (
init
,setup
,ready
) and directory header controls. -
Adds the Import Eden JSON button and drag & drop handler to the Actors Directory.
-
Opens a lightweight dialog (file chooser + folder selector).
-
Parses, validates, and sanitizes incoming JSON.
-
Rebuilds minimal
_stats
and other required pieces for SR6 Eden. -
Calls
Actor.createDocuments
with safe data and reports success/failure.
-
-
lang/en.json
Human-readable strings for UI labels, tooltips, notifications, and error messages. Easy to extend for additional languages. -
(Optional)
styles/importer.css
A tiny stylesheet (if present) that keeps the dialog neat and readable. The module doesn’t depend on heavy CSS. -
LICENSE
(MIT)
Open license for reuse and contribution. -
README.md
Explanation, quick start, screenshots/gifs (if you add them), and tips.
There are no external dependencies beyond Foundry core and the shadowrun6-eden
system. The code does not patch the system; it simply creates valid Actors that the system already knows how to use.
How it fits your workflow
-
You (or your players) generate a character JSON (e.g., from your Gate City Shadows generator on WordPress).
-
In Foundry (v13.348 + SR6 Eden v3.3.3), open Actors and click Import Eden JSON (or drop the file onto the directory).
-
Choose a folder, import, and reload once if the actor doesn’t appear immediately. Open the sheet and start playing.
Roadmap at a glance
-
ApplicationV2 UI: modern dialog with cleaner markup, better accessibility, and smoother rendering.
-
Actor mapping presets: easy toggles for NPC/Grunt/Spirit and other SR6 Eden actor types.
-
Compendium import: send imports directly to a chosen pack.