Difference between revisions of "Homebrew: Meta"

From 5etools Community Wiki
Jump to: navigation, search
(Created page with "= Meta Tag = The meta tag contains all relevant information of the homebrew file you are creating, creating a homebrew file without a meta tag will not work, hence it is impor...")
 
(Meta Tag)
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Meta Tag =
 
= Meta Tag =
The meta tag contains all relevant information of the homebrew file you are creating, creating a homebrew file without a meta tag will not work, hence it is important to know which keys are necessary.
+
The meta tag contains all relevant information of the homebrew file you are creating, creating a homebrew file without a meta tag will not work, hence it is important to know which fields are necessary.
The meta tag contains an object array labelled "sources", the date the file was added and a new optional conversion table for currencies.
+
The meta tag contains an object array labelled "sources", and other fields.
  
== Sources Key List ==  
+
== Sources Fields List ==  
The following is the list of keys that can be included in the object array, "sources". All keys are enclosed by quotation marks (").
+
The following is the list of fields that can be included in the object array, "sources". All fields are enclosed by quotation marks (").
  
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
! Key Name !! Data Type !! Domain !! Description !! Required
+
! Field Name !! Data Type !! Description !! Required
 
|-
 
|-
| json || String || N/A || The name of the json that is used as a reference by homebrew items, class features etc. || True
+
| json || String || An identifying string, as seen in the JSON in \"source\" fields. || True
 
|-
 
|-
| abbreviation || String || N/A || The abbreviation of the homebrew that is to be displayed in 5eTools || True
+
| abbreviation || String || v || True
 
|-
 
|-
| full || String || N/A || The full name of the homebrew || True
+
| full || String || Full title of the source, to display on the site. || True
 
|-
 
|-
| authors || Array of Strings || N/A || The names of the authors of the homebrew || True
+
| authors || Array of Strings || A list of authors who created the homebrew source. || True
 
|-
 
|-
| convertedBy || Array of Strings || N/A || The names of those who converted the homebrew for 5eTools usage || True
+
| convertedBy || Array of Strings || An optional list of people who contributed to converting the source to 5etools format. || False
 
|-
 
|-
| url || String || N/A || An url to find this file, whether it be in the homebrew repository or a personal one || True
+
| url || String || A direct link to the source, if available in web form or on a store. || True
 
|-
 
|-
| version || String || N/A || The version number of the homebrew file || True
+
| version || String || The source version, e.g. \"1.2.3\". || True
 
|-
 
|-
| targetSchema || String || N/A || The version of the schema that is being used for the homebrew || True
+
| targetSchema || String || The target schema version in 5etools, e.g. \"1.2.3\". || True
 
|-
 
|-
| color|| String || N/A || The hex color value (excluding the hash) for the color of the abbreviation text when used in 5eTools || True
+
| color|| String || HTML hex color code this source should use when displayed in lists, e.g. 'ff00ff'. It defaults to white if not given || False
 +
|}
 +
 
 +
== Other Fields ==
 +
Other fields are given outside of the Sources are able to provide other additions, like new skills, spell schools and similar.
 +
 
 +
All of these additional fields are optional, note that all of these fields are enclosed in quotation marks (").
 +
 
 +
{| class="wikitable sortable"
 +
|-
 +
! Field Name !! Data Type !! Description
 +
|-
 +
| skill || Object || Object keys are Skill names, which can referenced using {@skill <key>} (case sensitive).
 +
|-
 +
| sense || Object || Object keys are Sense names, which can referenced using {@sense <key>} (case insensitive).
 +
|-
 +
| spellSchools || Object|| Object names are spell school abbreviations; values should be objects with `\"full\"`` (used in the main entry, e.g. \"Evocation\") and `\"short\"` (used in the list view, e.g. `\"Evoc.\"`) key/values.
 +
|-
 +
| spellDistanceUnits || Object || Object names are spell distance units; values should be objects with optional `\"singular\"`` (singular form of the unit, e.g. \"foot\" for the singular of \"feet\"--if unspecified, a trailing \"s\" is removed from the plural version, if it exists, and the result is used as the singular form) and `\"feetPerUnit\"` (e.g. for a \"yards\" custom unit, this would be `3`, as there are three feet in a yard) key/values.
 +
|-
 +
| optionalFeatureTypes || Object || Object names are optional feature \"type\" shorthands (e.g. \"EI\" for \"Eldritch Invocation\" which will be displayed in the list view as a sortable column.
 +
|-
 +
| dateAdded || Integer || The epoch timestamp (in seconds) when the homebrew was added to the repository. Not guaranteed to be anywhere near accurate. See [https://en.wikipedia.org/wiki/Unix_time See UNIX Time to get the current value.]
 
|}
 
|}
  
== Date Added ==
 
The value for the date added key is simply a numerical value based on UNIX Time (See https://en.wikipedia.org/wiki/Unix_time for more information).
 
  
 
== Item Value Conversion ==
 
== Item Value Conversion ==
Line 36: Line 56:
  
 
5eTools uses an numerical values based on the amount of copper an item costs and converts between the currencies, hence that is what such a table would be based on.
 
5eTools uses an numerical values based on the amount of copper an item costs and converts between the currencies, hence that is what such a table would be based on.
 +
 +
Enclosed inside the field of itemValueConversions can be the following:
 +
 +
 +
            "SS": [
 +
                {
 +
                    "coin": "gp",
 +
                    "mult": 0.0001
 +
                },
 +
                {
 +
                    "coin": "sp",
 +
                    "mult": 0.01
 +
                },
 +
                {
 +
                    "coin": "cp",
 +
                    "mult": 1
 +
                }
 +
            ]
  
  
 +
In the above block of code:
 +
* "SS" is an example of the name of the currency conversion system, this is also what all items and similar should refer to using the valueConversion field .
 +
* The name of the conversion system ("SS" in this example) contains an array of objects.
 +
* Inside each object is two additional field and value pairs.
 +
* The "coin" field is a string that is what the name of the currency should be.
 +
* The "mult" field is a numerical value that describes how much each value is worth.
  
[[File:Currency Conversion Example.png|thumb]]
+
The above example uses a system called the Silver Standard, where 100cp = 1sp (hence 1/100 = 0.01) and 100sp = 1gp (hence 1/10000 = 0.0001).

Revision as of 16:17, 30 November 2019

Meta Tag

The meta tag contains all relevant information of the homebrew file you are creating, creating a homebrew file without a meta tag will not work, hence it is important to know which fields are necessary. The meta tag contains an object array labelled "sources", and other fields.

Sources Fields List

The following is the list of fields that can be included in the object array, "sources". All fields are enclosed by quotation marks (").

Field Name Data Type Description Required
json String An identifying string, as seen in the JSON in \"source\" fields. True
abbreviation String v True
full String Full title of the source, to display on the site. True
authors Array of Strings A list of authors who created the homebrew source. True
convertedBy Array of Strings An optional list of people who contributed to converting the source to 5etools format. False
url String A direct link to the source, if available in web form or on a store. True
version String The source version, e.g. \"1.2.3\". True
targetSchema String The target schema version in 5etools, e.g. \"1.2.3\". True
color String HTML hex color code this source should use when displayed in lists, e.g. 'ff00ff'. It defaults to white if not given False

Other Fields

Other fields are given outside of the Sources are able to provide other additions, like new skills, spell schools and similar.

All of these additional fields are optional, note that all of these fields are enclosed in quotation marks (").

Field Name Data Type Description
skill Object Object keys are Skill names, which can referenced using {@skill <key>} (case sensitive).
sense Object Object keys are Sense names, which can referenced using {@sense <key>} (case insensitive).
spellSchools Object Object names are spell school abbreviations; values should be objects with `\"full\"`` (used in the main entry, e.g. \"Evocation\") and `\"short\"` (used in the list view, e.g. `\"Evoc.\"`) key/values.
spellDistanceUnits Object Object names are spell distance units; values should be objects with optional `\"singular\"`` (singular form of the unit, e.g. \"foot\" for the singular of \"feet\"--if unspecified, a trailing \"s\" is removed from the plural version, if it exists, and the result is used as the singular form) and `\"feetPerUnit\"` (e.g. for a \"yards\" custom unit, this would be `3`, as there are three feet in a yard) key/values.
optionalFeatureTypes Object Object names are optional feature \"type\" shorthands (e.g. \"EI\" for \"Eldritch Invocation\" which will be displayed in the list view as a sortable column.
dateAdded Integer The epoch timestamp (in seconds) when the homebrew was added to the repository. Not guaranteed to be anywhere near accurate. See See UNIX Time to get the current value.


Item Value Conversion

This is an optional addition to the meta tag, if the economy that your homebrew uses is different from the standard 5e Dungeons and Dragons system this will help to avoid incorrect currency values.

5eTools uses an numerical values based on the amount of copper an item costs and converts between the currencies, hence that is what such a table would be based on.

Enclosed inside the field of itemValueConversions can be the following:


           "SS": [
               {
                   "coin": "gp",
                   "mult": 0.0001
               },
               {
                   "coin": "sp",
                   "mult": 0.01
               },
               {
                   "coin": "cp",
                   "mult": 1
               }
           ]


In the above block of code:

  • "SS" is an example of the name of the currency conversion system, this is also what all items and similar should refer to using the valueConversion field .
  • The name of the conversion system ("SS" in this example) contains an array of objects.
  • Inside each object is two additional field and value pairs.
  • The "coin" field is a string that is what the name of the currency should be.
  • The "mult" field is a numerical value that describes how much each value is worth.

The above example uses a system called the Silver Standard, where 100cp = 1sp (hence 1/100 = 0.01) and 100sp = 1gp (hence 1/10000 = 0.0001).