What are world variables

In one sentence, variables are pieces of reusable information that can be used across your world multiple time while staying editable on a single place. There are multiple types of variables and all of them can help you achieve what you want faster, easier and smarter.

The information on this blog post might be outdated! Check the documentation for the most up-to-date information about this feature.

How do I use them

You can manage all your variables from the Tools > Variables Interface ( https://www.worldanvil.com/world/variables/ ). In order to create a variable you will need to create a collection. Imagine Collections, it as folders with extra functionality. Once you create a collection, simply fill the form at the top of the page in order to create a new variable.

Variables can be used in articles and other places in your world. You can either use the clipboard icon by the name of the variable or simply use the system in any article followed by the title of your variable.

For more information: Read the Codex article

What kind of Variables are there and what do they do?

There are six (6) basic types. Each of them built to server a different style of display and processing*. 

Term, Simple (string)

When embedded into an article, the value will appear as a tooltip of the title.

How can you use it: Dictionary translations, quick explanations for things that do not need articles, abbreviations like ship codes, organization names, royal titles

Term, Advanced (string/text)

When embedded into an article, the value will appear as a tooltip of the title.
The value can include BBCode tags and other variables (one additional level), which will be rendered in the tooltip

 

How can you use it: Expanded explanations for terms, mouseover to show RPG statblocks or images, small tables of information.

Rendered Fragment (string/text)

When embedded into an article the included BBCode will be rendered in place of the variable
This can include up to one additional level of variables

How can you use it: Add pieces of regularly used text like announcements for your world/setting, manage important information that you want to be able to access quickly and easily.

Link (string)

When embedded into an article, this will create a link using the title as the text, and the value as the URL

How can you use it: Links to Social media profiles, external tools like your VTTs URL, Links to external tools and resources.

Number (integer)

A simple number. Will not print any other type of content

JSON Array (array)

This is a bit of a more advanced feature. A JSON array is an array of of any data. It is served via the collections and variable endpoints, you can find this under the advanced options of a collection.

FAQ

Who has access to the variables system?

World variables were designed for Grandmasters and above but we decided that all guild members of Master and above have access to the feature. There is no plan at this point for the feature to be trickled down in lower ranks.

 

  • Processing is not yet in place but both Number and JSON variables will be getting some very cool features soon.

 

What’s next?

Well that is a very good question. There’s a lot we can do with this feature but I would love to hear you thoughts on it? What would make YOUR life better / easier

Please, post in the comments below your ideas and thoughts for the implementation or @ me on the #development-discussion channel in Discord

Follow World Anvil Blog on WordPress.com

Want more posts like this? Subscribe to the World Anvil blog!