From 73dbcbe5813a6dc9311325714d9b7e948eb09738 Mon Sep 17 00:00:00 2001 From: Mike Liu Date: Tue, 3 Mar 2026 21:09:06 +0000 Subject: [PATCH] refactor: move reskin pipeline from scripts/ to tools/reskin/ Move all reskin Python scripts, shell wrappers, and documentation into a self-contained tools/reskin/ directory. All 44 tests pass after the move with no path reference updates needed. Co-Authored-By: Claude Opus 4.6 --- {scripts => tools}/reskin/batch_sprites.py | 0 .../reskin/build-object-upload.sh | 6 +- .../reskin/build-upload.sh | 0 {scripts => tools}/reskin/categories.py | 0 .../reskin/create-overlay.sh | 4 +- {scripts => tools}/reskin/describe_grid.py | 0 .../reskin/docs/object-authoring.md | 6 +- .../reskin/docs/pipeline.md | 16 ++--- .../2026-02-25-reskin-pipeline-design.md | 26 ++++----- .../docs}/plans/2026-02-25-reskin-pipeline.md | 58 +++++++++---------- .../reskin/docs/web-upload.md | 8 +-- .../reskin/generate_restyled.py | 0 .../reskin/init-workspace.sh | 0 {scripts => tools}/reskin/judge_screenshot.py | 0 {scripts => tools}/reskin/parse_restyled.py | 0 {scripts => tools}/reskin/reskin.py | 0 {scripts => tools}/reskin/screenshot_game.py | 0 .../reskin/test_batch_sprites.py | 0 .../reskin/test_describe_grid.py | 0 .../reskin/test_generate_restyled.py | 0 .../reskin/test_judge_screenshot.py | 0 .../reskin/test_parse_restyled.py | 0 {scripts => tools}/reskin/test_reskin.py | 0 .../reskin/test_screenshot_game.py | 0 {scripts => tools}/reskin/verify_sprites.py | 0 25 files changed, 62 insertions(+), 62 deletions(-) rename {scripts => tools}/reskin/batch_sprites.py (100%) rename scripts/build-reskin-object-upload.sh => tools/reskin/build-object-upload.sh (95%) rename scripts/build-reskin-upload.sh => tools/reskin/build-upload.sh (100%) rename {scripts => tools}/reskin/categories.py (100%) rename scripts/create-reskin-overlay.sh => tools/reskin/create-overlay.sh (93%) rename {scripts => tools}/reskin/describe_grid.py (100%) rename docs/object-authoring-workflow.md => tools/reskin/docs/object-authoring.md (95%) rename docs/reskin-pipeline.md => tools/reskin/docs/pipeline.md (84%) rename {docs => tools/reskin/docs}/plans/2026-02-25-reskin-pipeline-design.md (69%) rename {docs => tools/reskin/docs}/plans/2026-02-25-reskin-pipeline.md (94%) rename docs/reskin-web-upload.md => tools/reskin/docs/web-upload.md (88%) rename {scripts => tools}/reskin/generate_restyled.py (100%) rename scripts/init-reskin-object-workspace.sh => tools/reskin/init-workspace.sh (100%) rename {scripts => tools}/reskin/judge_screenshot.py (100%) rename {scripts => tools}/reskin/parse_restyled.py (100%) rename {scripts => tools}/reskin/reskin.py (100%) rename {scripts => tools}/reskin/screenshot_game.py (100%) rename {scripts => tools}/reskin/test_batch_sprites.py (100%) rename {scripts => tools}/reskin/test_describe_grid.py (100%) rename {scripts => tools}/reskin/test_generate_restyled.py (100%) rename {scripts => tools}/reskin/test_judge_screenshot.py (100%) rename {scripts => tools}/reskin/test_parse_restyled.py (100%) rename {scripts => tools}/reskin/test_reskin.py (100%) rename {scripts => tools}/reskin/test_screenshot_game.py (100%) rename {scripts => tools}/reskin/verify_sprites.py (100%) diff --git a/scripts/reskin/batch_sprites.py b/tools/reskin/batch_sprites.py similarity index 100% rename from scripts/reskin/batch_sprites.py rename to tools/reskin/batch_sprites.py diff --git a/scripts/build-reskin-object-upload.sh b/tools/reskin/build-object-upload.sh similarity index 95% rename from scripts/build-reskin-object-upload.sh rename to tools/reskin/build-object-upload.sh index 60457b01f4..e82ce8bf3c 100755 --- a/scripts/build-reskin-object-upload.sh +++ b/tools/reskin/build-object-upload.sh @@ -104,9 +104,9 @@ if [[ "$rebuild" -eq 1 && -n "$cli_cmd" && ! -x "$cli_cmd" ]]; then exit 1 fi -repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -overlay_builder="$repo_root/scripts/create-reskin-overlay.sh" -upload_builder="$repo_root/scripts/build-reskin-upload.sh" +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +overlay_builder="$repo_root/tools/reskin/create-overlay.sh" +upload_builder="$repo_root/tools/reskin/build-upload.sh" if [[ ! -x "$overlay_builder" ]]; then echo "Missing executable script: $overlay_builder" >&2 diff --git a/scripts/build-reskin-upload.sh b/tools/reskin/build-upload.sh similarity index 100% rename from scripts/build-reskin-upload.sh rename to tools/reskin/build-upload.sh diff --git a/scripts/reskin/categories.py b/tools/reskin/categories.py similarity index 100% rename from scripts/reskin/categories.py rename to tools/reskin/categories.py diff --git a/scripts/create-reskin-overlay.sh b/tools/reskin/create-overlay.sh similarity index 93% rename from scripts/create-reskin-overlay.sh rename to tools/reskin/create-overlay.sh index 8dd441f59c..96f049b277 100755 --- a/scripts/create-reskin-overlay.sh +++ b/tools/reskin/create-overlay.sh @@ -14,7 +14,7 @@ Each workspace must contain: - object-path-in-assets-zip.txt - reskinned.parkobj (for .parkobj targets) OR object.json (for .json targets) -The generated overlay can be consumed by scripts/build-reskin-upload.sh. +The generated overlay can be consumed by tools/reskin/build-upload.sh. EOF } @@ -43,7 +43,7 @@ for workspace_dir in "$@"; do object_path_file="$workspace_dir/object-path-in-assets-zip.txt" if [[ ! -f "$object_path_file" ]]; then echo "Missing workspace metadata file: $object_path_file" >&2 - echo "Re-run scripts/init-reskin-object-workspace.sh for this workspace." >&2 + echo "Re-run tools/reskin/init-workspace.sh for this workspace." >&2 exit 1 fi diff --git a/scripts/reskin/describe_grid.py b/tools/reskin/describe_grid.py similarity index 100% rename from scripts/reskin/describe_grid.py rename to tools/reskin/describe_grid.py diff --git a/docs/object-authoring-workflow.md b/tools/reskin/docs/object-authoring.md similarity index 95% rename from docs/object-authoring-workflow.md rename to tools/reskin/docs/object-authoring.md index 43b6914ffe..3c25239daa 100644 --- a/docs/object-authoring-workflow.md +++ b/tools/reskin/docs/object-authoring.md @@ -11,7 +11,7 @@ This guide uses scripts in this repo to create editable object workspaces from a ## 1) Initialize an editable workspace ```bash -scripts/init-reskin-object-workspace.sh \ +tools/reskin/init-workspace.sh \ /Users/meiliu/Downloads/openrct2-upload.zip \ object/official/scenery_small/official.scenery_small.support_structure_half.parkobj \ /Users/meiliu/git/rosebud/OpenRCT2-Web/reskin-workbench/support-structure-half @@ -48,7 +48,7 @@ Outputs: ## 4) Build a patched upload zip ```bash -scripts/build-reskin-object-upload.sh \ +tools/reskin/build-object-upload.sh \ --rebuild \ /Users/meiliu/Downloads/openrct2-upload.zip \ /tmp/openrct2-upload-reskinned.zip \ @@ -58,7 +58,7 @@ scripts/build-reskin-object-upload.sh \ This command rebuilds the workspace artifact, maps it to the original object path from `object-path-in-assets-zip.txt`, and writes a patched upload zip. For additional options and multi-object packaging, see: -`docs/reskin-pipeline.md` +`tools/reskin/docs/pipeline.md` ## Notes diff --git a/docs/reskin-pipeline.md b/tools/reskin/docs/pipeline.md similarity index 84% rename from docs/reskin-pipeline.md rename to tools/reskin/docs/pipeline.md index 5559921c8b..dcfc1b5619 100644 --- a/docs/reskin-pipeline.md +++ b/tools/reskin/docs/pipeline.md @@ -4,9 +4,9 @@ This pipeline packages object reskins into a playable OpenRCT2 web upload zip. It is built from these scripts: -- `scripts/init-reskin-object-workspace.sh` -- `scripts/build-reskin-object-upload.sh` -- `scripts/build-reskin-upload.sh` +- `tools/reskin/init-workspace.sh` +- `tools/reskin/build-object-upload.sh` +- `tools/reskin/build-upload.sh` ## Prerequisites @@ -17,7 +17,7 @@ It is built from these scripts: ## 1) Initialize one or more workspaces ```bash -scripts/init-reskin-object-workspace.sh \ +tools/reskin/init-workspace.sh \ /Users/meiliu/Downloads/openrct2-upload.zip \ object/official/scenery_small/official.scenery_small.support_structure_half.parkobj \ ./reskin-workbench/support-structure-half @@ -34,7 +34,7 @@ Edit PNGs under each workspace `sprites/` directory. For one workspace: ```bash -scripts/build-reskin-object-upload.sh \ +tools/reskin/build-object-upload.sh \ --rebuild \ /Users/meiliu/Downloads/openrct2-upload.zip \ /tmp/openrct2-upload-reskinned.zip \ @@ -44,7 +44,7 @@ scripts/build-reskin-object-upload.sh \ For multiple workspaces: ```bash -scripts/build-reskin-object-upload.sh \ +tools/reskin/build-object-upload.sh \ --rebuild \ /Users/meiliu/Downloads/openrct2-upload.zip \ /tmp/openrct2-upload-reskinned.zip \ @@ -57,7 +57,7 @@ If you already rebuilt the workspace artifacts, omit `--rebuild`. ## Optional: Keep the generated overlay for inspection ```bash -scripts/build-reskin-object-upload.sh \ +tools/reskin/build-object-upload.sh \ --rebuild \ --overlay-dir /tmp/reskin-overlay \ /Users/meiliu/Downloads/openrct2-upload.zip \ @@ -68,7 +68,7 @@ scripts/build-reskin-object-upload.sh \ ## Optional: Use a custom `openrct2-cli` command ```bash -scripts/build-reskin-object-upload.sh \ +tools/reskin/build-object-upload.sh \ --rebuild \ --cli-cmd ./scripts/openrct2-cli-docker.sh \ /Users/meiliu/Downloads/openrct2-upload.zip \ diff --git a/docs/plans/2026-02-25-reskin-pipeline-design.md b/tools/reskin/docs/plans/2026-02-25-reskin-pipeline-design.md similarity index 69% rename from docs/plans/2026-02-25-reskin-pipeline-design.md rename to tools/reskin/docs/plans/2026-02-25-reskin-pipeline-design.md index acad252001..50c97ab6b1 100644 --- a/docs/plans/2026-02-25-reskin-pipeline-design.md +++ b/tools/reskin/docs/plans/2026-02-25-reskin-pipeline-design.md @@ -11,11 +11,11 @@ The existing OpenRCT2-Web reskin workflow requires manual sprite editing. The ot OR Arbitrary sprite PNG directories | -scripts/reskin/batch_sprites.py <- generic: creates 4x4 grids + manifest.json +tools/reskin/batch_sprites.py <- generic: creates 4x4 grids + manifest.json | -scripts/reskin/generate_restyled.py <- generic: sends grids to FAL.ai Gemini 3 Pro +tools/reskin/generate_restyled.py <- generic: sends grids to FAL.ai Gemini 3 Pro | -scripts/reskin/parse_restyled.py <- generic: extracts sprites, restores alpha, blends edges +tools/reskin/parse_restyled.py <- generic: extracts sprites, restores alpha, blends edges | Restyled PNGs back in workspace sprites/ dir | @@ -26,11 +26,11 @@ rebuild-object.sh -> create-reskin-overlay.sh -> build-reskin-upload.sh (existi | File | Role | |------|------| -| `scripts/reskin/categories.py` | Category configs: style prompts, tiling flags, description hints. Starts with scenery presets, extensible. | -| `scripts/reskin/batch_sprites.py` | Scans a sprite directory, groups by size into 4x4 grids (2048x2048), writes manifest.json. Game-agnostic. | -| `scripts/reskin/generate_restyled.py` | Reads manifest, sends each grid to FAL.ai Gemini 3 Pro, saves restyled grids. | -| `scripts/reskin/parse_restyled.py` | Extracts sprites from AI grids using manifest coordinates, restores original alpha masks, blends tile edges. | -| `scripts/reskin/reskin.py` | Orchestrator: chains batch -> generate -> parse. Supports `--step` and `--through`. | +| `tools/reskin/categories.py` | Category configs: style prompts, tiling flags, description hints. Starts with scenery presets, extensible. | +| `tools/reskin/batch_sprites.py` | Scans a sprite directory, groups by size into 4x4 grids (2048x2048), writes manifest.json. Game-agnostic. | +| `tools/reskin/generate_restyled.py` | Reads manifest, sends each grid to FAL.ai Gemini 3 Pro, saves restyled grids. | +| `tools/reskin/parse_restyled.py` | Extracts sprites from AI grids using manifest coordinates, restores original alpha masks, blends tile edges. | +| `tools/reskin/reskin.py` | Orchestrator: chains batch -> generate -> parse. Supports `--step` and `--through`. | ## Adaptations from ottd pipeline @@ -55,32 +55,32 @@ rebuild-object.sh -> create-reskin-overlay.sh -> build-reskin-upload.sh (existi ```bash # 1. Init workspace (existing) -scripts/init-reskin-object-workspace.sh \ +tools/reskin/init-workspace.sh \ upload.zip \ object/official/scenery_small/official.scenery_small.support_structure_half.parkobj \ ./reskin-workbench/support-structure # 2. AI reskin (NEW) -python3 scripts/reskin/reskin.py \ +python3 tools/reskin/reskin.py \ --workspace ./reskin-workbench/support-structure \ --style "Cartoony hand-painted fantasy. Bold outlines, vibrant colors." \ --through generate # 3. Review, then apply -python3 scripts/reskin/reskin.py \ +python3 tools/reskin/reskin.py \ --workspace ./reskin-workbench/support-structure \ --step parse # 4. Rebuild + package (existing) ./reskin-workbench/support-structure/rebuild-object.sh -scripts/build-reskin-object-upload.sh \ +tools/reskin/build-object-upload.sh \ upload.zip /tmp/reskinned.zip ./reskin-workbench/support-structure ``` ### Standalone mode (any PNGs) ```bash -python3 scripts/reskin/reskin.py \ +python3 tools/reskin/reskin.py \ --sprites-dir ./my-sprites/ \ --style "Pixel art, 16-bit SNES style" \ --tiling diff --git a/docs/plans/2026-02-25-reskin-pipeline.md b/tools/reskin/docs/plans/2026-02-25-reskin-pipeline.md similarity index 94% rename from docs/plans/2026-02-25-reskin-pipeline.md rename to tools/reskin/docs/plans/2026-02-25-reskin-pipeline.md index 338a9648d7..8985b0e32b 100644 --- a/docs/plans/2026-02-25-reskin-pipeline.md +++ b/tools/reskin/docs/plans/2026-02-25-reskin-pipeline.md @@ -4,7 +4,7 @@ **Goal:** Add AI-powered sprite reskinning scripts that batch OpenRCT2 sprite PNGs into grids, send them to FAL.ai for restyling, and extract the results back — integrating with the existing workspace/overlay/upload pipeline. -**Architecture:** Five Python scripts under `scripts/reskin/`. The core pipeline is game-agnostic (batch PNGs into grids, call FAL.ai, extract results). An orchestrator script (`reskin.py`) provides both workspace mode (integrates with `init-reskin-object-workspace.sh` outputs) and standalone mode (any directory of PNGs). Category presets in `categories.py` provide reusable style configs. +**Architecture:** Five Python scripts under `tools/reskin/`. The core pipeline is game-agnostic (batch PNGs into grids, call FAL.ai, extract results). An orchestrator script (`reskin.py`) provides both workspace mode (integrates with `init-reskin-object-workspace.sh` outputs) and standalone mode (any directory of PNGs). Category presets in `categories.py` provide reusable style configs. **Tech Stack:** Python 3.8+, Pillow, numpy, fal-client. FAL.ai Gemini 3 Pro image-edit API. @@ -16,18 +16,18 @@ The source code being adapted lives at `/workspace/ottd-reskin-pipeline/`. Key f | ottd file | Becomes | What changes | |-----------|---------|--------------| -| `batch_env.py` | `scripts/reskin/batch_sprites.py` | Remove NFO parsing. Input is just a PNG directory. No sprite ID ranges — discover files from disk. | -| `generate_restyled.py` | `scripts/reskin/generate_restyled.py` | Nearly identical. Update default paths. Keep FAL.ai logic as-is. | -| `parse_and_replace.py` | `scripts/reskin/parse_restyled.py` | Remove GRF rebuild / sheet patching. Output is restyled PNGs to a target dir. Keep alpha restore + edge blending. | -| `restyle_env.py` | `scripts/reskin/reskin.py` | Replace subprocess calls with direct function imports. Add `--workspace` mode. | -| `env_categories.py` | `scripts/reskin/categories.py` | Replace zBase sprite ID ranges with OpenRCT2 style presets (scenery, terrain, rides). No ID ranges needed. | +| `batch_env.py` | `tools/reskin/batch_sprites.py` | Remove NFO parsing. Input is just a PNG directory. No sprite ID ranges — discover files from disk. | +| `generate_restyled.py` | `tools/reskin/generate_restyled.py` | Nearly identical. Update default paths. Keep FAL.ai logic as-is. | +| `parse_and_replace.py` | `tools/reskin/parse_restyled.py` | Remove GRF rebuild / sheet patching. Output is restyled PNGs to a target dir. Keep alpha restore + edge blending. | +| `restyle_env.py` | `tools/reskin/reskin.py` | Replace subprocess calls with direct function imports. Add `--workspace` mode. | +| `env_categories.py` | `tools/reskin/categories.py` | Replace zBase sprite ID ranges with OpenRCT2 style presets (scenery, terrain, rides). No ID ranges needed. | ## Reference: existing OpenRCT2-Web reskin scripts -- `scripts/init-reskin-object-workspace.sh` — creates `/sprites/` with exported PNGs + `sprites.json` +- `tools/reskin/init-workspace.sh` — creates `/sprites/` with exported PNGs + `sprites.json` - `/rebuild-object.sh` — rebuilds `images.dat` + `reskinned.parkobj` from sprites -- `scripts/create-reskin-overlay.sh` — maps workspaces into overlay dirs -- `scripts/build-reskin-upload.sh` — merges overlays into web upload zip +- `tools/reskin/create-overlay.sh` — maps workspaces into overlay dirs +- `tools/reskin/build-upload.sh` — merges overlays into web upload zip The new Python pipeline slots in between steps 1 and the rebuild: it reads from `sprites/`, writes restyled PNGs back there (or to a separate output dir). @@ -36,7 +36,7 @@ The new Python pipeline slots in between steps 1 and the rebuild: it reads from ### Task 1: `categories.py` — Style preset definitions **Files:** -- Create: `scripts/reskin/categories.py` +- Create: `tools/reskin/categories.py` **Step 1: Create the categories module** @@ -108,7 +108,7 @@ CATEGORIES = { **Step 2: Verify it imports cleanly** -Run: `python3 -c "import sys; sys.path.insert(0, 'scripts/reskin'); from categories import CATEGORIES; print(f'{len(CATEGORIES)} categories loaded')" ` +Run: `python3 -c "import sys; sys.path.insert(0, 'tools/reskin'); from categories import CATEGORIES; print(f'{len(CATEGORIES)} categories loaded')" ` Expected: `6 categories loaded` **Step 3: Commit** @@ -122,7 +122,7 @@ Expected: `6 categories loaded` ### Task 2: `batch_sprites.py` — Grid batching **Files:** -- Create: `scripts/reskin/batch_sprites.py` +- Create: `tools/reskin/batch_sprites.py` This is adapted from `/workspace/ottd-reskin-pipeline/batch_env.py`. Key changes: - No NFO parsing — sprites come from a flat PNG directory @@ -373,7 +373,7 @@ if __name__ == "__main__": **Step 2: Write a smoke test** -Create `scripts/reskin/test_batch_sprites.py`: +Create `tools/reskin/test_batch_sprites.py`: ```python """Smoke tests for batch_sprites.py.""" @@ -474,7 +474,7 @@ def test_batch_sprites_end_to_end(): **Step 3: Run tests** -Run: `cd /workspace/OpenRCT2-Web && python3 -m pytest scripts/reskin/test_batch_sprites.py -v` +Run: `cd /workspace/OpenRCT2-Web && python3 -m pytest tools/reskin/test_batch_sprites.py -v` Expected: All 6 tests PASS. **Step 4: Commit** @@ -488,7 +488,7 @@ Expected: All 6 tests PASS. ### Task 3: `generate_restyled.py` — FAL.ai generation **Files:** -- Create: `scripts/reskin/generate_restyled.py` +- Create: `tools/reskin/generate_restyled.py` Adapted from `/workspace/ottd-reskin-pipeline/generate_restyled.py`. Changes: - Update default paths to match our directory layout @@ -724,7 +724,7 @@ if __name__ == "__main__": **Step 2: Write tests for the non-API functions** -Add to `scripts/reskin/test_generate_restyled.py`: +Add to `tools/reskin/test_generate_restyled.py`: ```python """Tests for generate_restyled.py (non-API functions only).""" @@ -787,7 +787,7 @@ def test_load_descriptions_missing_file(): **Step 3: Run tests** -Run: `cd /workspace/OpenRCT2-Web && python3 -m pytest scripts/reskin/test_generate_restyled.py -v` +Run: `cd /workspace/OpenRCT2-Web && python3 -m pytest tools/reskin/test_generate_restyled.py -v` Expected: All 4 tests PASS. **Step 4: Commit** @@ -801,7 +801,7 @@ Expected: All 4 tests PASS. ### Task 4: `parse_restyled.py` — Extract and restore sprites **Files:** -- Create: `scripts/reskin/parse_restyled.py` +- Create: `tools/reskin/parse_restyled.py` Adapted from `/workspace/ottd-reskin-pipeline/parse_and_replace.py`. Changes: - Remove `patch_sprite_sheets()` and `rebuild_grf()` — not needed for OpenRCT2 @@ -1091,7 +1091,7 @@ if __name__ == "__main__": **Step 2: Write tests** -Create `scripts/reskin/test_parse_restyled.py`: +Create `tools/reskin/test_parse_restyled.py`: ```python """Tests for parse_restyled.py.""" @@ -1203,7 +1203,7 @@ def test_validate_sprite_transparent(): **Step 3: Run tests** -Run: `cd /workspace/OpenRCT2-Web && python3 -m pytest scripts/reskin/test_parse_restyled.py -v` +Run: `cd /workspace/OpenRCT2-Web && python3 -m pytest tools/reskin/test_parse_restyled.py -v` Expected: All 7 tests PASS. **Step 4: Commit** @@ -1217,7 +1217,7 @@ Expected: All 7 tests PASS. ### Task 5: `reskin.py` — Orchestrator **Files:** -- Create: `scripts/reskin/reskin.py` +- Create: `tools/reskin/reskin.py` This chains batch -> generate -> parse and supports both workspace mode and standalone mode. @@ -1478,7 +1478,7 @@ if __name__ == "__main__": **Step 2: Write tests** -Create `scripts/reskin/test_reskin.py`: +Create `tools/reskin/test_reskin.py`: ```python """Tests for reskin.py orchestrator.""" @@ -1547,7 +1547,7 @@ def test_resolve_tiling_from_category(): **Step 3: Run tests** -Run: `cd /workspace/OpenRCT2-Web && python3 -m pytest scripts/reskin/test_reskin.py -v` +Run: `cd /workspace/OpenRCT2-Web && python3 -m pytest tools/reskin/test_reskin.py -v` Expected: All 6 tests PASS. **Step 4: Commit** @@ -1562,22 +1562,22 @@ Expected: All 6 tests PASS. **Step 1: Run all tests together** -Run: `cd /workspace/OpenRCT2-Web && python3 -m pytest scripts/reskin/ -v` +Run: `cd /workspace/OpenRCT2-Web && python3 -m pytest tools/reskin/ -v` Expected: All tests pass (6 + 4 + 7 + 6 = 23 tests). **Step 2: Verify CLI help works** Run these four commands and verify each prints usage/help: ```bash -python3 scripts/reskin/batch_sprites.py --help -python3 scripts/reskin/generate_restyled.py --help -python3 scripts/reskin/parse_restyled.py --help -python3 scripts/reskin/reskin.py --help +python3 tools/reskin/batch_sprites.py --help +python3 tools/reskin/generate_restyled.py --help +python3 tools/reskin/parse_restyled.py --help +python3 tools/reskin/reskin.py --help ``` **Step 3: Verify category listing** -Run: `python3 scripts/reskin/reskin.py --list-categories` +Run: `python3 tools/reskin/reskin.py --list-categories` Expected: Lists 6 categories with tiling flags. **Step 4: Final commit with all files** diff --git a/docs/reskin-web-upload.md b/tools/reskin/docs/web-upload.md similarity index 88% rename from docs/reskin-web-upload.md rename to tools/reskin/docs/web-upload.md index 9a0875cec0..326ef04fa4 100644 --- a/docs/reskin-web-upload.md +++ b/tools/reskin/docs/web-upload.md @@ -8,13 +8,13 @@ This repo's web package is typically distributed as: - `assets/rct2-content.zip` - `assets/openrct2.zip` -Use `scripts/build-reskin-upload.sh` to apply your own files on top of an existing upload zip. +Use `tools/reskin/build-upload.sh` to apply your own files on top of an existing upload zip. If your inputs come from initialized object workspaces (`reskin-workbench/...`), prefer: -`scripts/build-reskin-object-upload.sh` (see `docs/reskin-pipeline.md`). +`tools/reskin/build-object-upload.sh` (see `tools/reskin/docs/pipeline.md`). For creating/editing object sprite files first, see: -`docs/object-authoring-workflow.md` +`tools/reskin/docs/object-authoring.md` ## Overlay Structure @@ -30,7 +30,7 @@ Only include files you want to replace or add. ## Command ```bash -scripts/build-reskin-upload.sh \ +tools/reskin/build-upload.sh \ /path/to/openrct2-upload.zip \ /path/to/overlay \ /tmp/openrct2-upload-reskinned.zip diff --git a/scripts/reskin/generate_restyled.py b/tools/reskin/generate_restyled.py similarity index 100% rename from scripts/reskin/generate_restyled.py rename to tools/reskin/generate_restyled.py diff --git a/scripts/init-reskin-object-workspace.sh b/tools/reskin/init-workspace.sh similarity index 100% rename from scripts/init-reskin-object-workspace.sh rename to tools/reskin/init-workspace.sh diff --git a/scripts/reskin/judge_screenshot.py b/tools/reskin/judge_screenshot.py similarity index 100% rename from scripts/reskin/judge_screenshot.py rename to tools/reskin/judge_screenshot.py diff --git a/scripts/reskin/parse_restyled.py b/tools/reskin/parse_restyled.py similarity index 100% rename from scripts/reskin/parse_restyled.py rename to tools/reskin/parse_restyled.py diff --git a/scripts/reskin/reskin.py b/tools/reskin/reskin.py similarity index 100% rename from scripts/reskin/reskin.py rename to tools/reskin/reskin.py diff --git a/scripts/reskin/screenshot_game.py b/tools/reskin/screenshot_game.py similarity index 100% rename from scripts/reskin/screenshot_game.py rename to tools/reskin/screenshot_game.py diff --git a/scripts/reskin/test_batch_sprites.py b/tools/reskin/test_batch_sprites.py similarity index 100% rename from scripts/reskin/test_batch_sprites.py rename to tools/reskin/test_batch_sprites.py diff --git a/scripts/reskin/test_describe_grid.py b/tools/reskin/test_describe_grid.py similarity index 100% rename from scripts/reskin/test_describe_grid.py rename to tools/reskin/test_describe_grid.py diff --git a/scripts/reskin/test_generate_restyled.py b/tools/reskin/test_generate_restyled.py similarity index 100% rename from scripts/reskin/test_generate_restyled.py rename to tools/reskin/test_generate_restyled.py diff --git a/scripts/reskin/test_judge_screenshot.py b/tools/reskin/test_judge_screenshot.py similarity index 100% rename from scripts/reskin/test_judge_screenshot.py rename to tools/reskin/test_judge_screenshot.py diff --git a/scripts/reskin/test_parse_restyled.py b/tools/reskin/test_parse_restyled.py similarity index 100% rename from scripts/reskin/test_parse_restyled.py rename to tools/reskin/test_parse_restyled.py diff --git a/scripts/reskin/test_reskin.py b/tools/reskin/test_reskin.py similarity index 100% rename from scripts/reskin/test_reskin.py rename to tools/reskin/test_reskin.py diff --git a/scripts/reskin/test_screenshot_game.py b/tools/reskin/test_screenshot_game.py similarity index 100% rename from scripts/reskin/test_screenshot_game.py rename to tools/reskin/test_screenshot_game.py diff --git a/scripts/reskin/verify_sprites.py b/tools/reskin/verify_sprites.py similarity index 100% rename from scripts/reskin/verify_sprites.py rename to tools/reskin/verify_sprites.py