Key Terms

From PCGen Wiki
Jump to: navigation, search

Associations

Associations are pieces of information about a CDOMObject that are only true within a specific context. Examples of Associations include the specific Skill selected when the Feat Skill Focus is taken (example from SRD 3.5)

Category

CDOM List

A CDOMList is a specific type of CDOM Object used as an identifier to store lists of CDOM Objects. It is important to note that a CDOM List does not contain CDOM Objects, rather it is an index used to identify a list of CDOM Objects stored within the Rules Data Store or Character Data Store.

CDOM Object

A CDOM Object is the base type of object used to store information. Languages, Abilities, Stats, Races, Templates, and many other objects are specific implementations of (in programming terms "extend") CDOMObject. The CDOM Object should only store information that is universally true, meaning it is always applicable to the CDOM Object (to all Player Characters in all circumstances). Transient or contextual information should not be stored in the CDOM Object.

The Data Persistence Format

The data persistence format is typically known to the data developers as "Game Mode", "PCC" or "LST" files. These vary slightly in syntax, but are generally tab-delimited text files. Generally "PCC" files are used to identify which "LST" files should be loaded, although there is also limited support for some Global tokens to be used in "PCC" files.

Data Load

Load is the set of events that occurs when data persistence files are loaded into PCGen. The Data Load process is intended to include full parsing of the data in the data persistence files (see Catch Errors Early) and not while Player Characters are being created.

Deferred Objects

Derived Objects

File Loaders

File Loaders are Classes that perform the specific actions necessary to load a specific LST file from the file system (or URI) and parse the file into individual tags. The File Loaders then identify the appropriate Token and pass the value of the tag to the individual Token to be parsed.

For backwards compatibility in the transition from PCGen 5.14, the File Loaders are in the pcgen.persistence package.

Key

Load Context

The Load Context represents the translator of information loaded in File Loaders and Tokens. The translation is from the persistence data file format to the internal structure used by the Rules Data Store. The LoadContext provides various services; some are discussed in later sections.

Context Classes of the Rules Persistence System are found in the pcgen.rules package.

Prerequisite

Prerequisites are limitations placed onto CDOMObjects in order to constrain the ability of a PlayerCharacter to use the CDOMObject (e.g. to limit selection of a Feat to a minimum Character Level). There are a few key concepts that should be recognized when dealing with Prerequisites:

  1. Prerequisite resolution must take place when a query for information is desired (Testing a Prerequisite is not a static calculation, due to temporary changes that may take place with a PlayerCharacter)
  2. CDOMObjects may have a Prerequisite as a stand-alone requirement
  3. CDOMObjects may have a Prerequisite only in a certain context (e.g. A Feat may have a certain Prerequisite only when it is granted by a specific PCClass)

Prerequisite resolution must take place when an object is added to a PlayerCharacter.

Runtime

Runtime processes and events are those that take place while a Player Character is being created. The Rules Persistence System is not responsible for Runtime behavior, although the Rules Persistence System is responsible for ensuring that the Data Load process produces entries in the Rules Data Store that minimizes the possible errors or unexpected conditions at Runtime.

System Loader

The System Loader is responsible for receiving a set of Campaigns that should be loaded during Data Load. These Campaigns are analyzed by the System Loader, and then the System Loader provides a list of Source Entries to each File Loader to indicate what files (or more generally, URIs) should be loaded.

For backwards compatibility in the transition from PCGen 5.14, the System Loader is in LstSystemLoader in the pcgen.persistence.lst package.

Token Library

The Token Library is the storage location for the Tokens, and is queried by the LoadContext once the key and value of a tag has been established by a File Loader. The Token Library is initialized by the Startup System when plugins are loaded by PCGen.