diff options
| author | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2023-07-05 15:28:17 +0100 |
|---|---|---|
| committer | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2023-07-05 15:28:17 +0100 |
| commit | e85f8eea9dfe76dacc86728b20c4a0036ec71c1d (patch) | |
| tree | 3d67553c597e7851b657cfa2638887699b2b4ace /docs/Global-configurations.md | |
| parent | 4c9a7d83a19828e64ea7f90ddf69f9212bb7a7d9 (diff) | |
Add /docs directory
This is part of a migration from GitHub wikis to GitHub pages
Diffstat (limited to 'docs/Global-configurations.md')
| -rw-r--r-- | docs/Global-configurations.md | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/docs/Global-configurations.md b/docs/Global-configurations.md new file mode 100644 index 00000000..a575ebc8 --- /dev/null +++ b/docs/Global-configurations.md @@ -0,0 +1,91 @@ +**Global configurations** are intended to be used in place of +**quest-specific configurations**. This helps reduce repetition across +your configuration as you copy common elements from quest to quest, and +also allows you to quickly propagate edits across quests. + +## Global task configuration + +A global task configuration will add configuration values to all tasks +of a specified type. + +For example (in `config.yml`), + +``` yaml +... +global-task-configuration: + types: + inventory: + update-progress: true +... +``` + +This will add to *all* tasks configurations with `type: inventory` +across *all* quests the following: `update-progress: true`. *'Note that +any errors coming from here will appear as if they are coming from +individual quests.* + +Quest-level configurations will override anything set here. To change +this behaviour, modify the [global task configuration +override](Basic_options#Global_task_configuration_override "wikilink"). + +## Global quest display configuration + +A global quest display configuration adds text to the display items of +items in the GUI. + +By default, this is already configured: + +``` yaml +global-quest-display: + lore: + append-not-started: + - "" + - "&eLeft Click &7to start this quest." + append-started: + - "" + - "&aYou have started this quest." + - "&eMiddle Click &7to track this quest." + - "&eRight Click &7to cancel this quest." + append-tracked: + - "" + - "&aYou are &etracking &athis quest." + - "&eMiddle Click &7to stop tracking this quest." + - "&eRight Click &7to cancel this quest." +``` + +<https://i.imgur.com/l0FI5Ma.png> + +If you do not want this, simply remove the section. + +## Global macros + +Global macros are designed to help you reduce repetition across your +configuration files by centralizing values in your config.yml. Think of +them as your own variables/placeholders which you can use in your quest +files. + +To explain this feature, an example is more appropriate. + +In your config.yml, you can add a macro under the `global-macros` +section: + + global-macros: + ... + # <name of macro>: <string value of macro> + top-bar: "&6---&7---&6---" + +To use these in your quests, simply reference it by using +`<$m name-of-macro $m>`. Macro names **cannot have spaces**. + +For example, to use the `top-bar` macro in `example-quest.yml`: + +``` yaml +tasks: + ... +display: + ... + lore-normal: + - "<$m top-bar $>" + - "..." + ... +``` |
