Table of Contents
When you have the option to write longer texts in Spellbook, there is a good chance, you are writing a description. You can use description fields to write any normal text, but in addition, you can use a number of annotations to make your text stand out, reference things inside or outside Spellbook and automatically convert between units depending on your settings.
When you write an annotation in edit mode, Spellbook will highlight it to show you how the annotation is interpreted. After exiting edit mode, Spellbook will show the result of the annotation (e.g. the bold text or the respective link)
Annotations in General
Annotations look something like [[Annotation]] (they start with [[ and end with ]]). A description may not contain a [[ without a corresponding ]] (or the other way around) and annotations cannot be nested (i.e. [[ [[Annotation]] ]] is not okay).
An annotation does one of the following three things:
Format
You can use formatting annotations to change how your text is displayed outside of edit mode. Currently, the following formatting annotations are supported:
| Annotation | Result |
|---|---|
[[Italic|Text]] |
Text |
[[Text]] |
Text |
Reference
Reference annotations are links that either reference Spellbook content, or external content (e.g. through weblinks). Currently, the following reference annotations are supported:
| Annotation | Result | Target |
|---|---|---|
[[Item|Name]] |
Name | the Spellbook item Name ^* |
[[Spell|Name]] |
Name | the 2024 Spellbook spell Name |
[[2024Spell|Name]] |
identical to [[Spell|Name]] |
the 2024 Spellbook spell Name |
[[5eSpell|Name]] |
Name | the 2024 Spellbook spell Name |
[[URL|https://git.phantomphoenix.ch/PhoenixPhantom/spellbook/wiki |Name]] |
Name | this wiki |
* You can always link to items that are visible in the Items tab. If the description is part of a character (or their items, abilities, followers, etc.), you can also link to items that only exist for that character specifically. If multiple options for an item exist, Spellbook always chooses the most specific (i.e. if your character has an item named Torch, a link from a description within the character will link to that specific item in the character's inventory, not the general Torch from the Items tab).
Convert
Conversion annotations can be used to automatically convert units to the user's preferred setting given by the Units setting. Currently, the following conversion annotations are supported:
| Annotation | Required Format of Number |
Unit type |
|---|---|---|
[[Inch|Number]] |
Floating Point | Distance |
[[Feet|Number]] |
Integer ^* |
Distance |
[[Foot|Number]] |
Integer ^* |
Distance |
[[Miles|Number]] |
Floating Point | Distance |
[[Ounces|Number]] |
Floating Point | Weight |
[[Pounds|Number]] |
Integer | Weight |
[[Pints|Number]] |
Floating Point | Volume |
[[FOunces|Number]] |
Floating Point | Volume |
[[Gallons|Number]] |
Integer | Volume |
Floating point means that values like 1, 0.1, and 3.21 are allowed. Integer means that only values like 0, 3, or 1033 are allowed.
^* You can also write One, Two, Three, Four, Five, Six, Seven, Eight or Nine instead of a number. This can be used to express something like 'Every one foot you move, costs two feet of movement.' (e.g. 'Every one meter you move, costs two meters of movement.')
Further Reference
You can find the full source-code definition of descriptions in Descriptions.kt