Character definitions are three dictionaries, two of which are of primary importance. NPC versions of these are templates (unless deployed to a Board). The version included in the Game definition will have a Primer but exported or deployed versions will not.

Primer

Only in the Game definition, acts as a map between attributes and system-aware variables. This is a lookup table, where the key is the system term for the thing, and the value is the local character attribute term. In the example below, the equivalent value for "maxhealth" is set to "wounds", and "currhealth" is set to "curr_wounds". Those could be "max_hit_points" and "curr_hit_points" - or any other term that indicates character health.

Your Game may not need these things.

{ "primer": { "move": "half_move", "doublemove":"full_move", "maxhealth": "wounds", "currhealth": "curr_wounds", "defense": "armor", "turnorder": "initiative", "soak": "toughness_bonus" } }

Meta

Only exists in instanced applications of the definition (e.g., PC, NPC, or NPC Template). This section contains values that are not intended to be addressed by the Game engine parser. They are things like avatar icons, creator information, update information, etc.

Attributes

There are one-to-one values; that is, a character can only have one of them, such as a "Strength" score, or an "Attack Bonus". These can be of several data types and may be calculated or derived rather than hard set. Some attributes (such as "description") will always exist.

An Attribute definition is a dictionary that describes several values:

  • label: A string, but will be passed through the localizer
  • type: Enumeration: "meta", "attribute", or "derived_attribute"
  • value: Enumeration: "number", "string", "paragraph"
  • calculation: Math calculation for derived values
  • volatile: Boolean, the default is false
  • generate: Calculation

type: Functionally, "meta" and "attribute" behave the same but may or may not appear in certain list views. "derived_attribute" means it is calculated at run time.

value: "Number" values are checked to be sure that they are numbers. "String" means "never try to treat this as a number". "Paragraph" implies a large text field that may include Rich Text. This should have minvalue, maxvalue, default, but it doesn't yet.

calculation: If present, the value is derived, and uses the calculation provided (see below for syntax).

volatile: If present and true, then players who only have OPERATE permissions may edit these values. Otherwise, only those with EDIT permissions may change things.

generate: Tell us how to generate this [ NOT IMPLEMENTED YET]

{ "attributes":{ "speed":{ "type":"attribute", "label":"speed", "value":"number" }, "strength":{ "type":"attribute", "label":"strength", "value":"number" }, "strength_mod":{ "calc":"floor((attribute[strength] - 10) / 2)", "type":"derived_attribute", "label":"strength_mod" } } }

Calculation Macros

In a calculation, the following attributes get expanded:

  • attribute[name]: Get character attribute
  • d[die]: Roll a die
  • \dd[die]: Roll a die x times
  • global[name]: Global variable (game level)
  • party[name]: Party-level game variable (e.g. Profit Factor) [UNIMPLEMENTED]
  • tabletop[name]: Tabletop variable (a setting) [UNIMPLEMENTED]
  • target[name]: Selected token attribute
  • map[name]: Attribute of the map (x, y, currcoords, coords)
  • self[name]: Refers to attributes on the self, used in things like collection calculations("attribute[ballistic_skill] + self[bonus] + target[rangemod]")
  • collectionitem[name]: [poorly implemented]
  • character[name]: [poorly implemented]

Character Collections

In the character definition, the collections dictionary shows what the character has in its pocketses. Often empty by default ("gear"), and often pre-populated at creation ("skills").

{ "collections":{ "collection1":{ "itemid":{ "value":0 }, "itemid2":{ "value":4 } }, "collection2":{ }, "collection3":{ } } }