URL Properties - ArnoldSmith86/virtualtabletop GitHub Wiki
You can provide a JSON object with several properties to the URL to control the behaviour of the site:
| Property | Description |
|---|---|
| askID | If this property is set, the user will be asked for a room ID instead of reading it from the URL. This is a string that gets prefixed to the ID entered by the player. |
| css | A URL to a CSS file that gets applied on the site level. When embedding VTT into a site, this can be used to make the look and feel of overlays consistent with the parent site. |
| hideToolbar | If set to true the toolbar will be completely hidden. This is useful if VTT shows a fixed game in an iFrame. |
| load | A URL to a VTT file that gets loaded if the current room is empty. |
| trace | Start tracing as soon as the user connects. The room records extra details about what happens, such as player actions, room updates, random results, and error information. |
{
"load": "https://virtualtabletop.io/library/Tutorials/Tutorial%20-%20Grid.vtt"
}Use a urlencoder to turn it into this:
%7B%0A%20%20%22load%22%3A%20%22https%3A%2F%2Fvirtualtabletop.io%2Flibrary%2FTutorials%2FTutorial%2520-%2520Grid.vtt%22%0A%7D%0A
Then append it with a # after a VTT URL:
https://virtualtabletop.io/#%7B%0A%20%20%22load%22%3A%20%22https%3A%2F%2Fvirtualtabletop.io%2Flibrary%2FTutorials%2FTutorial%2520-%2520Grid.vtt%22%0A%7D%0A
This link could then be added to the wiki as a direct link to an example.
{
"askID": "chess-",
"hideToolbar": true,
"load": "https://virtualtabletop.io/library/Chess.vtt"
}Use a urlencoder to turn it into this:
%7B%0A%20%20%22askID%22%3A%20%22chess-%22%2C%0A%20%20%22hideToolbar%22%3A%20true%2C%0A%20%20%22load%22%3A%20%22https%3A%2F%2Fvirtualtabletop.io%2Flibrary%2FChess.vtt%22%0A%7D
Then append it with a # after a VTT URL:
https://virtualtabletop.io/#%7B%0A%20%20%22askID%22%3A%20%22chess-%22%2C%0A%20%20%22hideToolbar%22%3A%20true%2C%0A%20%20%22load%22%3A%20%22https%3A%2F%2Fvirtualtabletop.io%2Flibrary%2FChess.vtt%22%0A%7D
This example hides the toolbar and would be most useful in an iframe:
<iframe src="https://virtualtabletop.io/#%7B%0A%20%20%22askID%22%3A%20%22chess-%22%2C%0A%20%20%22hideToolbar%22%3A%20true%2C%0A%20%20%22load%22%3A%20%22https%3A%2F%2Fvirtualtabletop.io%2Flibrary%2FChess.vtt%22%0A%7D"></iframe>