Auto Wall Companion
A module that enhances wall management by providing tools to import, export, and manage walls.
Features
- Wall Import/Export: Easily transfer walls between scenes or share them with others
- Import walls from JSON files or clipboard
- Export walls to JSON files or clipboard
- Scene Image URL: Copy the current scene's background image URL with one click
- Integrated UI: Adds tools directly to Foundry's wall controls panel
- Padding Protection: Warns when scene padding might affect wall positioning
- Batch Processing: Handles large wall collections efficiently
Usage
Accessing the Tools
- Open a scene in Foundry VTT
- Select the Walls Tool in the left toolbar
- Find the "Wall Import/Export" and "Copy Scene Image URL" buttons in the walls submenu
Importing Walls
Two methods are available for importing walls:
-
From Clipboard:
- Copy wall JSON to your clipboard
- Click the "Wall Import/Export" button
- Select "Import from Clipboard"
-
From File:
- Click the "Wall Import/Export" button
- Select "Import from File"
- Choose your wall JSON file
Exporting Walls
Two methods are available for exporting walls:
-
To Clipboard:
- Click the "Wall Import/Export" button
- Select "Export to Clipboard"
- The wall data will be copied to your clipboard as JSON
-
To File:
- Click the "Wall Import/Export" button
- Select "Export to File"
- The wall data will be saved as a JSON file named after your scene
Scene Image URL
- Click the "Copy Scene Image URL" button in the walls tool submenu
- The background image URL will be copied to your clipboard
Important Notes
Scene Padding
For accurate wall positioning, it's recommended to set scene padding to 0 before importing or exporting walls. If padding is not 0, the module will warn you before proceeding.
To adjust scene padding:
- Right-click on your scene in the Scenes panel
- Select "Configure"
- In the scene configuration, set "Padding" to 0
- Save changes
Configuration
The module includes settings for log level control, accessible in the Module Settings.
For Developers
Using the API
The module exposes functions on the global AutoWallCompanion
object:
// Import walls from clipboard
window.AutoWallCompanion.importWallsFromClipboard();
// Import walls from file
window.AutoWallCompanion.importWallsFromFile();
// Export walls to clipboard
window.AutoWallCompanion.exportWallsToClipboard();
// Export walls to file
window.AutoWallCompanion.exportWallsToFile();
// Copy scene image URL
window.AutoWallCompanion.copySceneImageUrl();
Support
For issues, suggestions, or contributions, please visit the GitHub repository.