Skip to content
96LawDawg edited this page Jul 1, 2024 · 7 revisions

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.

  1. 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.

  2. 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.)

  1. You can use a VSCode extension that has limited documentation and support at https://github.com/ArnoldSmith86/virtualtabletop-misc/tree/main/vscode-extension.
Clone this wiki locally