-
-
Notifications
You must be signed in to change notification settings - Fork 32
URL Properties
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. |
{
"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>
- Widgets
- Functions, automation, and routines
- Dynamic Expressions and using variables
- Math, string, array, color, JSON functions
- Cards and Decks
- Editing JSON
- Using CSS
- Fonts
- Publicly available games
- Tutorials
- Available icons, card backs, button styles, and other images
- Demonstration Features
- Useful Code Snippets