Candy Logo

Documentation Databases
The Documentation window displays more than the documentation of Candy Dialogue Engine and Candy Dialogue Creator. Any documentation written as a database is displayed there: your game's writing guide, the reference of your own Commands, the notes of your team. A database is a folder of text files. It uses the format of Candy Database, Candy Arts' documentation browser for the Godot editor, so the same database can be read in both. Adding a Database 1. In the Documentation window, choose Documentation > Open Documentation Folder. 2. Place the database's folder in it. 3. Choose Documentation > Refresh. The database is then offered in the Database picker of the window. Nothing is registered. A Database's Folder
My_Game_Guide/ database.json _header.txt optional _images/ optional 1.0/ a version English/ a language 01_Introduction.txt 02_Characters.txt 02_Characters/ 01_Alice.txt 02_Bob.txt
  • The database's folder contains a database.json file and one folder per version.
  • A version's folder contains one folder per language.
  • A language's folder contains the pages, and folders that sort them in categories.
  • Folders whose name starts with _ or a dot are skipped, so _images can contain pictures.
The window has a picker for the version and one for the language. Pages A page is a .txt file written in BBCode, the same tags a Spoken Line's text uses: [b], [i], [url], [table], [font_size] and so on.
RuleDescription
OrderA number in front of the file name orders the pages: 01_Introduction.txt comes before 02_Characters.txt. The number isn't displayed.
TitleThe file name without its number, with underscores displayed as spaces. A first line @title: My Title sets another.
CategoriesA folder is a category of the page list. A page with the same name as a folder beside it is displayed as that category's own page.
Links A link opens another page of the database, or a web page:
[url=page:Characters/Alice]Alice[/url] [url=https://example.com]Our website[/url]
A page is named by its path from the language folder, without the numbers or the extension. Web pages open in the browser, after a confirmation. Pictures
[img]_images/map.png[/img] [img width=300]_images/map.png[/img]
A picture's path is relative to the page's folder, or to the language, version or database folder. Pictures are only read from inside the database's folder. database.json
{ "title": "My Game Guide", "description": "How we write dialogue for My Game", "home": "Introduction", "tags": { "actor": { "color": "#be185d", "dark_color": "#ff4fa3", "bold": "1" } } }
Every key is optional, and every value is a text.
KeyDescription
titleThe database's name in the picker. Without one, the folder's name.
descriptionA short description.
homeThe page opened first.
default_languageThe language opened when the reader has picked none. English when left out.
headerA BBCode file displayed above every page. _header.txt when left out.
header_scrolls"1": the header scrolls with the page. "0": it stays above it.
tagsTags of your own, to color kinds of words. See below.
theme_nameThe id of a documentation theme to display the database with.
style, themeThe database's own colors, for its pages and for what surrounds them.
Unlike Candy Dialogue Creator's other files, database.json is JSON. Tags of Your Own A tag colors the words it encloses. With the actor tag above, a page writes [actor]Alice[/actor] to display "Alice" in that color.
KeyDescription
colorThe color, as #rrggbb.
dark_colorThe color on a dark page.
bold, italic"1" to display the words in bold or italic.
A tag's name is made of letters, digits and underscores. Don't name a tag after one of BBCode's own tags. About Pages A folder named _About, in the database, a version or a language folder, contains pages listed apart: a change log, credits, a license. They are listed last, under "About", and aren't searched. Sharing and Updating Send the database's folder: the other person places it in their documentation folder. The databases of Candy Dialogue Engine and Candy Dialogue Creator are downloaded and updated from the Documentation window. Don't store your own pages in their folders: place them in a database of your own, which downloads never modify. See Documentation Window.