To use the script for regenerating scene thumbnails in Foundry VTT, you need to run it in the Foundry VTT game console. Here’s a step-by-step guide on how to do this:
-
Open Foundry VTT:
- Launch your Foundry VTT client and log in to your game world.
-
Open the Developer Console:
- For Google Chrome or Chromium-based browsers:
- Right-click anywhere on the Foundry VTT interface and select “Inspect” or “Inspect Element.”
- This will open the Developer Tools panel.
- Go to the “Console” tab.
- For Firefox:
- Right-click anywhere on the Foundry VTT interface and select “Inspect Element.”
- This will open the Developer Tools panel.
- Go to the “Console” tab.
- For Brave Browser:
- Brave is based on Chromium, so the steps are the same as for Chrome.
- For Google Chrome or Chromium-based browsers:
-
Copy the Script:
- Copy the following script:
(async () => {
for (const scene of game.scenes) {
const t = await scene.createThumbnail({img: scene.img || undefined});
if (t?.thumb) {
console.log(`Regenerated thumbnail for ${scene.name}`);
await scene.update({thumb: t.thumb});
}
}
})();
-
Paste and Run the Script:
- In the Developer Console, paste the script you copied.
- Press
Enter
to run the script.
-
Check the Console Output:
- The console will log a message for each scene indicating that the thumbnail has been regenerated.
- You can also check your scenes in the Foundry VTT interface to ensure the thumbnails have been updated.
Additional Tips:
-
Backup Your Game:
- Before running any scripts, it's a good practice to back up your game data to avoid any unintended changes.
-
Run as GM:
- Ensure you are logged in as a Game Master (GM) to have the necessary permissions to modify scenes.
If you encounter any issues or errors, you can refer to the Foundry VTT community forums or the official Discord server for additional support.