If you want step-by-step instructions for how to use Edit Mode, look in the Edit-Mode link on the sidebar to the right. Also check out the video on our YouTube channel for an Edit Mode Guided Tour at https://www.youtube.com/watch?v=xmdMTWuRO-E. Otherwise, this page contains just a brief overview.
There are two primary ways to enter and modify the JSON for your game: by pressing Ctrl-J or you can click on the blue and white icon on the toolbar that looks like a hammer and wrench and says "Edit Mode." There is a detailed description of this editor in the Edit-Mode link. A major advantage of this mode of editing is that changes you make are live and instantaneous in the room.
There are a few of other ways of editing JSON as well.
-
You can edit the JSON in an offline text editor, or some programming developer tool that color codes various features. This would be useful, for example, in cutting and pasting significant amounts of code between JSON files or for mass searching and replacing of properties or names. You can get access to the JSON in by unzipping a downloaded .vtt file using a zip extractor; the JSON file will be extracted into your current directory.
-
If the game is already loaded into a room, you can dynamically extract the JSON from the room using curl:
curl https://virtualtabletop.io/state/fpxb > ~/json.txt
where fpxb is the room ID. After editing, you can return it to the room using
curl -X PUT -H "Content-Type: application/json" --data-binary @json.txt https://virtualtabletop.io/state/fpxb
(Note that if you use curl, you have to save the room in order to have your changes to the JSON persist.)
- You can use a VSCode extension that has limited documentation and support at https://github.com/ArnoldSmith86/virtualtabletop-misc/tree/main/vscode-extension.
Quick Links
Home
1. Basics
2. Developer Documentation
- Widgets
- Functions, automation, and routines
- Dynamic Expressions and using variables
- Math, string, array, color, JSON functions
- Cards and Decks
- Editing JSON
- Using CSS
- Fonts and Symbols
3. Available Resources
- Publicly available games
- Tutorials
- Demonstration Features
- Useful Code Snippets
- Useful Global CSS Snippets
4. Usage Guidelines and Copyrights
5. Other Technical Information
- Download Repository
- Using GitHub and creating Pull Requests
- Internals Overview
- Testing with TestCafé
- URL-addressing rooms
- Using Docker containers
- Config.json file