Version: 1.0 Beta
Author: Pavel Orlov Β©
Adaptation: SillyTavern 1.13.5+
Status: preliminary version
License: CC BY-NC-SA 4.0 http://creativecommons.org/licenses/by/4.0/
πLOADING: Copy the repository link into the extension download window https://github.com/PavOrlov/SillyTavern-Interactive-Map Then activate it in the "Installed extensions" menu by checking β
Created with love for the SillyTavern community (and for myself).
Special thanks to:
- Kevin MacLeod (incompetech.com). His music, graciously donated to all humanity for free, is used in this extension.
- The SillyTavern team for an amazing platform
- Volunteer testers
An extension for SillyTavern that adds support for interactive maps with clickable zones, sound accompaniment, image and video display.
For clarity, my artwork inspired by The SIMS 4 game is used as map images, and the beautiful Seraphina is featured as a character in the final location.
There is absolute creative freedom β from interactive maps of galaxies and starships to maps from your favorite games.
This plugin complies with the CC Attribution β Noncommercial β Share Alike license agreement (abbreviated CC BY-NC-SA 4.0), with the original author being Pavel Orlov Β©.
π Terms of Use:
This license allows others to adapt, modify, and develop the work on a non-commercial basis, provided they credit the original author and license derivative works under the same license terms. Users can not only obtain and distribute the work under terms identical to this license ("by-nc-sa"), but also translate and create other derivative works based on this work. All new works based on this will have the same licenses, so all derivative works will also be non-commercial in nature.
Removal or falsification of author information, or commercial use, violates the CC BY-NC-SA 4.0 license agreement, for which the violator bears legal responsibility in accordance with the severity of the violation. This project has a complete commit history on GitHub to verify originality.
- πΊοΈ Loading and displaying interactive SVG maps with background images
- π±οΈ Clickable zones with STScript command execution β single or multiple commands (character in location, introduction line, sound, image, video)
- π Sound accompaniment for maps (MP3, OGG, WAV, M4A, WebM)
- πΌοΈ Image display in map window (PNG, JPG, JPEG, WebP, GIF)
- π¬ Video playback in map window (MP4, WebM, OGG, M4V)
- π Automatic map detection via
index.json - π Support for multiple maps with dynamic selection and the ability to nest them in a hierarchy
- π¨ Visual effects when hovering over interactive zones
- πΎ Caching of loaded maps for improved performance
scripts/extensions/third-party/SillyTavern-Interactive Map/
βββ index.js # Main extension file
βββ index.json # Index of available maps (optional)
βββ maps/ # Folder with JSON map files
β βββ example.json
βββ images/ # Background images for maps
β βββ example.png
βββ sounds/ # Sound files
β βββ ambient.mp3
βββ movies/ # Video files
β βββ cutscene.mp4
βββ README.md # Documentation
Each map is a .png image and a JSON file of the same name, which defines the zones marked on the image and the scripts linked to them with the following structure (example):
{
"version": "1.0 Beta",
"mapSound": "Test.mp3",
"metadata": {
"name": "Chess-table",
"author": "Pavel Orlov",
"description": "Interactive map with chess table by the fountain",
"created": "2025-11-01",
"updated": "2025-11-01"
},
"backgroundImage": {
"file": "images/background.png",
"width": "1920",
"height": "1080"
},
"mapSound": "sounds/ambient.mp3",
"shapes": [
{
"id": "zone1",
"type": "object",
"path": "M 100, 100 L 200, 100 L 200, 200 L 100, 200 Z",
"color": "#FF0000",
"tooltip": "Click for action",
"script": "/..."
}
]
}file(string): Path to map image relative to extension folderwidth(number/string): Image width in pixelsheight(number/string): Image height in pixels
- Path to audio file for automatic playback when map is loaded
Array of interactive zones:
id(string): Unique zone identifiertype(string): Object typepath(string): SVG path for defining zone area in inline notationcolor(string): Fill color on hover (HEX format: #RRGGBB or #RGB)script(string): STScript command or commands to execute when clicking on SVG zonetooltip(string, optional): Tooltip text
To enable automatic map detection, create an index.json file in the extension root:
[
"maps/city.json",
"maps/dungeon.json",
"maps/world.json"
]If the file is not found, the extension will use the default map: SillyTavern.json.
Opens the map window and loads the specified map.
Examples:
/showmap city
/showmap maps/dungeon.json
/showmap
- Without parameters, loads the last selected map
- Supports partial file name matching
- Automatically adds
.jsonextension if not specified
Plays sound from the sounds/ folder.
Examples:
/showmap_sound ambient
/showmap_sound sounds/forest.mp3
/showmap_sound "Secluded corner"
Parameters:
- Main argument: file name (extension optional, defaults to
.mp3) sound=: alternate file name for playback
Similar for video and image files.
Stops current map sound playback.
Example:
/stopsound
Displays image in map window from images/ folder.
Examples:
/showmap_image portrait.png
/showmap_image scene size=80
/showmap_image images/artwork.jpg size=50
Parameters:
- Main argument: file name (extension optional, defaults to
.png) size=NN: size in percentage (10-100)
Supported formats: PNG, JPG, JPEG, WebP, GIF
Hides current image in map window.
Example:
/stopimage
Plays video in map window from movies/ folder.
Examples:
/showmap_video cutscene.mp4
/showmap_video intro muted=1 loop=1
/showmap_video battle size=60
/showmap_video movies/outro.webm muted=0 loop=0 size=80
Parameters:
- Main argument: file name (extension optional, defaults to
.mp4) muted=1: mute audio (0 or 1)loop=1: loop playback (0 or 1)size=NN: size in percentage (10-100)- By default, video plays automatically
Supported formats: MP4, WebM, OGG, M4V
Stops and hides current video in map window.
Example:
/stopvideo
After installation, a "π Last selected map" button appears in the extensions menu that opens the last selected map.
In the Extensions Settings section, available options include:
- Dropdown list for map selection
- "Load map" button
- "Refresh" button to update the list of available maps
Settings are specified in the mapSettings object in the index.js file:
const mapSettings = {
hoverOpacity: 0.3, // Opacity of zones on hover (0-1)
transitionDuration: 200, // Animation duration in ms
enableTooltips: true, // Enable tooltips
debugMode: false, // Debug mode in console
maxMapCache: 10, // Maximum maps in cache
fetchTimeout: 10000, // Map load timeout (ms)
indexTimeout: 3000, // index.json load timeout (ms)
defaultMap: 'SillyTavern.json' // Default map
};When creating SVG zone boundary definitions, I used Image Coordinate Picking Online.
To convert data into inline format and copy it into JSON maps, I created a utility SVG_points_β_M-L-Z.html (located in the Tools directory).
SVG paths can be created in several ways:
- Inkscape (free): draw shape β copy
dattribute from XML - Adobe Illustrator: export as SVG β copy path
- Figma/Sketch: export SVG β extract path
Rectangle:
M 10,10 L 100,10 L 100,100 L 10,100 Z
Circle (approximate):
M 50,10 A 40,40 0 1,1 50,90 A 40,40 0 1,1 50,10 Z
Polygon:
M 50,10 L 90,90 L 10,50 Z
The extension includes protection against path traversal attacks:
- Paths containing
..are forbidden - Absolute paths are forbidden
- All paths must be relative within the extension folder
- SillyTavern (latest version)
- jQuery (built into SillyTavern)
- Modern browser with ES6+ support
Documentation version: 1.0
Date: December 2025
If you liked it and would like to treat the author to a cup of coffee: https://buymeacoffee.com/pav00rl0v6
