# SimSync Gallery UI support kit 0.1.0

This is a **read-only preparation tool, not the finished EA Gallery button**. It collects the game UI resources needed to investigate and build “Send to SimSync with CC” inside EA's in-game Gallery. Bridge 0.3.0's separate `simsync.gallery` menu remains the available upload route.

## Run it

1. Close The Sims 4 and pause any game update. Extract this kit outside the game's installation, Mods and Tray folders.
2. Use Node.js 22.13 or newer, the same requirement as SimSync Desktop.
3. Windows: run **Collect-Windows.cmd**. macOS: open Terminal in the extracted folder and run **bash Collect-macOS.command**. You can also run **node collect.mjs**.
4. The helper checks a small set of common EA/Steam installation locations. Press Enter to accept a detected path, or paste the path to your installation's **UI.package**. For an installation not detected, use your launcher to open the game's installation folder and locate that filename.
5. Select **GameVersion.txt** from your actual Sims 4 user folder, normally Documents/Electronic Arts/The Sims 4. A relocated folder must be entered manually. Only the version number is retained.
6. Attach the resulting **SimSync-Gallery-UI-Support-….zip** to this development chat. Do not put the support ZIP in Mods.

For explicit paths:

```text
node collect.mjs --ui "path/to/UI.package" --version "path/to/GameVersion.txt" --out "SimSync-Gallery-UI-Support.zip"
```

## What it reads and writes

The two selected files are opened read-only. The helper indexes UI.package, extracts Scaleform GFX resources, and writes a new support ZIP with resource IDs, checksums and the game version. It never executes the extracted UI, edits game files, installs a mod, or connects to a server. It does not read saves, Tray, Mods, EA credentials or SimSync pairing tokens. Absolute source paths are not included in the report. The extracted UI remains EA game content; share the support ZIP privately for this task, not as a public mod download.

Existing output files are never overwritten. Linked input files/folders are rejected. Reading is bounded to a 4 GB source, a 16 MB index, 4,096 GFX resources, 64 MB per resource and 256 MB total resources. Standard uncompressed and DBPF zlib resources are decoded; other compression is retained as `.stored` with a warning. Missing resources or limit failures stop collection. Keep the originals intact.

## Development status

The EA Gallery button and its selection callback are **not implemented or verified**. Next steps are to inspect the supplied UI, identify the selected local creation ID and a supported command callback, add a review action, build a separate compatible UI package, and test it in the matching game version. Online Gallery entries must first exist in My Library. Existing partial CC detection does not guarantee every dependency.

Automated tests cover synthetic DBPF packages, GFX extraction, source integrity, malformed input, linked files, output preservation and bounded expansion. No physical-device or in-game compatibility test has been performed for this kit.

References: https://lot51.cc/simdex/game-concepts and https://simsedit.com/ui-mods/gfx/gfx-intro/ describe the GFX-based UI and its patch dependence. This kit uses fflate under the included MIT license. No EA UI assets are bundled in the download.
