Register

Asset Path Auto-Repair

An Add-on Module for Foundry Virtual Tabletop

Author: Enfalion Project: Source Foundry Versions 12.324 to 14.370 (Verified 14.370) Last Updated 1 hour, 40 minutes ago
AI Usage Explanation

The core logic, Foundry VTT V14 API integration, multi-step workflow, and database update mechanisms were conceived, actively debugged, verified against live LevelDB world data, and are fully maintained by the author.
AI tools were strictly used in a supporting capacity for regular expression refinement, syntax linting, and bilingual localization (English/German) of the UI and documentation.
This module is a pure technical utility: it contains zero AI-generated media assets and makes no external API calls.

Asset Path Auto-Repair is an administrative migration and repair utility for Foundry VTT (V12–V14) designed to fix broken asset references after reorganizing files and folders inside your Data directory.
 
Scans local Data directories and automatically repairs broken or orphaned asset file paths across Scenes, Handouts/Journals, Actors, Tokens, Items, Playlists and Rollable Tables.
Features a 4-step dry-run wizard, interactive filename collision resolution, protected folder safeguards, and a live EN/DE UI switcher.

1. **Dynamic Folder Selection**: Automatically discovers all top-level directories in `Data/` via `FilePicker.browse`.
2. **Protected Directory Safeguards**: Core and system folders (`systems`, `modules`, `worlds`, `icons`, `ui`) are unchecked by default and display an immediate inline warning when selected to prevent unwanted icon collisions.
3. **Pre-Update Dry-Run Preview & Interactive Collision Resolution**: Categorizes all detected broken paths into *Ready to Update*, *Collisions* (with a per-entry dropdown selector to pick the exact target path or skip when duplicate filenames exist across folders), and *Missing*.
4. **Resilient Batch Execution & Final Audit Report**: Applies updates safely in isolated `try/catch` blocks, refreshes the active Canvas automatically, and generates a complete audit summary with one-click report.

**Comprehensive Foundry V14 Data Model Coverage**:
- **Scenes**: `background.src`, `foreground` / `foreground.src`, `thumb`, embedded `Tile` (`texture.src`), `Token` (`texture.src` and Dynamic Token Ring `ring.subject.texture`), `AmbientSound` (`path`), and `Note` (`texture.src`).
- **Actors & Items**: `img`, `prototypeToken.texture.src`, `prototypeToken.ring.subject.texture`, embedded `ActiveEffect` (`img`/`icon`), owned `Item` documents, and system HTML biography/description fields.
- **Journal Entries & Handouts**: Image/Video/PDF/Audio pages (`src`) plus regex HTML parsing inside `text.content` for `<img>`, `<video>`, `<audio>`, and `<source>` tags without altering surrounding markup.
- **Playlists, Rollable Tables, Card Stacks (`back.img` & `faces[].img`), and Macros**.
- **Bilingual Interface (EN / DE)**: Full English and German localization with an instant `DE | EN` language toggle right inside the application header.

Categories

Available Versions

  1. Version 1.0.1

    1 hour, 40 minutes ago
    Foundry Version 12.324 - 14.370 (Verified 14.370) Manifest URL Read Notes