-
Notifications
You must be signed in to change notification settings - Fork 0
Variables
BubbleFish edited this page Feb 25, 2026
·
3 revisions
Variables are defined by Vintage and can be used in the following places:
- File & directory names, e.g.
data/%[namespace]/function/load.mcfunction. - Inside of MCFunction files, e.g.
execute as @e run say %[id]. - Inside of JSON files, e.g.
"key": "%[value]_test".
The format is %[<query>], where <query> must either be a GJSON query or an iterator using <iterator>.<index?>.
The value of variable must be a string, with the exception of special case.
In JSON files, if a value is "%[<key>]" (with no additional leading or following text), then it can be expanded into any value.
If the key ends with a question mark ?, then it will remove the key in the case that is isn't defined.
| π Input (Definition file) |
|
|
| π Input (Some other file) |
{
"example": "%[key2]",
"may_be_removed": "%[because_it_is_optional?]"
} |
| π¦οΈ Output |
{
"example": {
"abc": true
}
} |
Important
This Wiki is written for a project that does not yet exist.
Vintage is only partially implemented, you must wait until it is production ready.