Content System - localtoast9001/fantasy-framework-RPG GitHub Wiki
The content system is a common set of schemas and distribution formats that allow content developers to share and integrate game content.
The Content Object
The content object is the base class of all distributable content and describes a self-contained game entity, ex. an item, spell, monster, character class, race, adventure, or campaign module. Content must explicitly reference other dependent, but separate, content either in descriptions or in other schematized elements.
Common Attributes
- Id - The unique identifier of the content. This is in GUID or UUID format.
- Version - The version of the content in four part numeric format. Content can be revised to fix typos or other mistakes. This attribute tracks the specific revision.
- Title - A friendly name that is used for informative purposes and can be displayed to a user instead of the Id. The language used for the name is not specified. The name is visible publically and can be searched by non-licensees.
- Author - (optional) The author of the material in string format.
- Date - (optional) The date the content was created.
- CreativeCommonsAttribution - The CC license or public domain attribution in effect.
- Description - The full description of the content in description mark-up. The language of the text is not specified. The description is only available to licensees.
- Image - (optional) An image thumbnail for the content.
Description Mark-up
Description mark-up controls layout of the text description and can be interpreted for display on a console or browser. The content developer cannot assume fixed width fonts, specific line widths, margins, or spacing.
Like HTML, the format is divided into block and span elements. While descriptions can be transmitted in many formats, the formats have to transform to this format to be rendered universally. The basic grammar nodes are as follows:
- description :: block_type*
- block_type :: paragraph | table | unordered_list | ordered_list | blockquote
- paragraph :: span_type*
- table :: table_row*
- unordered_list :: list_element*
- ordered_list :: list_element*
- blockquote :: text
- span_type :: text | bold | italic | reference
- table_row :: table_cell*
- list_element :: block_type*
- bold :: span_type
- italic :: span_type
- reference :: Content Id with optional text for display
- table_cell :: cell | header
- cell :: block_type*
- header :: block_type*