diff --git a/docs/BOSS Metadata Syntax.html b/docs/BOSS Metadata Syntax.html index b47159ef..20a18f32 100644 --- a/docs/BOSS Metadata Syntax.html +++ b/docs/BOSS Metadata Syntax.html @@ -80,9 +80,9 @@ This documentation is a work in progress, covering a syntax that is also still a
While you could write whatever you wanted in a metadata file without problems, so long as it was valid YAML, it would be pointless as BOSS expects the metadata to be laid out using a certain set of data structures, described in this section. -
Messages are given as key-value maps. +
BOSS metadata files can contain suggestions for the addition or removal of Bash Tags, and this is the structure used for them. It has two forms: the first is a simple string, and the second is a key-value map. All values in the map are strings. +
The simple form:
+tag
+
where tag is the Bash Tag, preceded by a minus sign if it is suggested for removal.
+
The map form:
| Key Name | Required | Notes |
|---|---|---|
type | ✓ | The type string can be one of three keywords, see the table below for their semantics. - |
content | ✓ | The actual message content string. URLs in message content strings will be turned into hyperlinks in BOSS's user interface. Recognised URLs are those that start with file:, http: or https:. URLs can be labelled by writing the label after the URL, with a space separating them, and enclosing the URL and label in double quotes.
- |
condition | ✗ | A condition string that is evaluated to determine whether the message should be displayed: if it evaluates to true, the message is displayed, otherwise it is not. See Condition Strings for details. - |
lang | ✗ | The language a message is written in, given as an ISO 639-3 language code. The languages BOSS supports are given in Language Codes. The value of this key decides whether BOSS displays the message as follows:
-
|
id | ✗ | A string that identifies the message. If a message is present in multiple languages, they should be given the same id value, so that BOSS knows that they say the same thing. An id value is local to within the structure that contains the message, so one plugin's messages can use the same id values as another plugin's messages without conflicting.
+ |
name | ✓ | A Bash Tag, preceded by a minus sign if it is suggested for removal. + |
condition | ✗ | A condition string that is evaluated to determine whether this Bash Tag should be suggested: if it evaluates to true, the Tag is suggested, otherwise it is ignored. See Condition Strings for details. |
There are three message types: -
| Keyword | Description - |
|---|---|
say | A generic message, useful for miscellaneous notes. - |
warn | A warning message, describing a non-critical issue with the user's mods (eg. dirty mods). - |
error | An error message, decribing a critical installation issue (eg. missing masters). - |
Examples:
- Not to be confused with the structure of the metadata file itself, this structure can be used to hold filenames. It has two forms: the first is a simple string, and the second is a key-value map. All values in the map are strings.
@@ -216,24 +194,62 @@ condition: 'version("../obse_loader.exe", "0.0.18.0", <)'
display: OBSE v18+
condition: 'file("Silgrad_Tower.esm")'
-type: warn
-content: Use either Silgrad_Tower.esm or Silgrad_Tower_T.esm but not both together.
+
-Relations
+or
+name: -Relations
+condition: "file(\"Mart's Monster Mod for OOO.esm\") or file(\"FCOM_Convergence.esm\")"
-A content string of
-See http://www.example.com for more information.
-would be displayed as
-See http://www.example.com for more information.
-while
-See "http://www.example.com example link" for more information.
-would be displayed as
-See example link for more information.
File Data Structure
BOSS metadata files can contain suggestions for the addition or removal of Bash Tags, and this is the structure used for them. Like the file data structure, it has simple string and key-value map forms. All values in the map are strings. -
The simple form:
-tag
-
where tag is the Bash Tag, preceded by a minus sign if it is suggested for removal.
-
The map form: +
Messages are given as key-value maps.
| Key Name | Required | Notes |
|---|---|---|
name | ✓ | A Bash Tag, preceded by a minus sign if it is suggested for removal. - |
condition | ✗ | A condition string that is evaluated to determine whether this Bash Tag should be suggested: if it evaluates to true, the Tag is suggested, otherwise it is ignored. See Condition Strings for details. + |
type | ✓ | The type string can be one of three keywords, see the table below for their semantics. + |
content | ✓ | Either simply a string, or a list of content data structures. If the latter, one of the structures must be for English. + |
condition | ✗ | A condition string that is evaluated to determine whether the message should be displayed: if it evaluates to true, the message is displayed, otherwise it is not. See Condition Strings for details. |
Examples:
- There are three message types:
+ The content data structure is a key-value map, with all values being strings:
+ BOSS handles messages and languages as follows:
+ Examples (translations by Google):
+ This is the structure that brings all the others together, and forms the main component of a metadata file. It is a key-value map.
Relations
-or
-name: -Relations
-condition: "file(\"Mart's Monster Mod for OOO.esm\") or file(\"FCOM_Convergence.esm\")"
+
+
+
+
+ Keyword Description
+ sayA generic message, useful for miscellaneous notes.
+ warnA warning message, describing a non-critical issue with the user's mods (eg. dirty mods).
+ errorAn error message, decribing a critical installation issue (eg. missing masters).
+
+
+
+
+ Key Name Required Notes
+ str✓ The actual message content string. URLs in message content strings will be turned into hyperlinks in BOSS's user interface. Recognised URLs are those that start with file:, http: or https:. URLs can be labelled by writing the label after the URL, with a space separating them, and enclosing the URL and label in double quotes.
+ lang✓ The language that str is written in, given as an ISO 639-3 language code. The languages BOSS supports are given in Language Codes.
+
+
+
+
+content value is a string, the message will the string as its content if displayed.
+ content value is a list of content structures, then the first structure with a language that matches BOSS's current language will be used as the message's content if displayed. If there are no matches, then the first structure in English will be used.
+type: say
+condition: file("foo.esp")
+content:
+ - lang: eng
+ str: An example link: http://www.example.com
+ - lang: rus
+ str: Это пример ссылки: http://www.example.com
+ - lang: ger
+ str: Ein Beispiel-Link: http://www.example.com
+would be displayed as
+
+отмечать: Это пример ссылки: http://www.example.com
+
+if the current language was Russian and foo.esp was installed, while
+type: say
+content: An alternative "http://www.example.com example link", with no translations.
+
+would be displayed as
+
+отмечать: An alternative example link, with no translations.
+
Plugin Data Structure