Difference between revisions of "Architecture"

From PCGen Wiki
Jump to: navigation, search
(A Day in the Life of PCGen)
Line 16: Line 16:
 
There is an [[Index to Architecture Documents]] that provides a complete list and is in the recommended reading order for those who wish to read the complete set of relevant documentation.
 
There is an [[Index to Architecture Documents]] that provides a complete list and is in the recommended reading order for those who wish to read the complete set of relevant documentation.
  
=A Day in the Life of PCGen=
+
=PCGen Subsystems=
  
 
This section lays out the primary sub-systems within PCGen
 
This section lays out the primary sub-systems within PCGen
Line 49: Line 49:
  
 
As a "Data Store", it is very much akin to a complicated database (it could be converted into an actual database with some effort). The Rules Data Store is not designed to have methods that interpret the contents of the Rules Data Store, nor is the Rules Data Store capable of storing the information it contains into a persistent state. The conversion to and from a persistent state is owned by the [[Rules Persistence System]].
 
As a "Data Store", it is very much akin to a complicated database (it could be converted into an actual database with some effort). The Rules Data Store is not designed to have methods that interpret the contents of the Rules Data Store, nor is the Rules Data Store capable of storing the information it contains into a persistent state. The conversion to and from a persistent state is owned by the [[Rules Persistence System]].
 
 
 
  
 
=Other - to Be Edited=
 
=Other - to Be Edited=

Revision as of 22:17, 25 February 2018

Introduction

Welcome to the Wiki section for the Architecture team!

This section of our wiki will explain the different portions of our code base, the current work underway to improve different sections for better performance and flexibility.

Resources

Before reading about the details of the PCGen architecture, it is likely helpful to understand our key Design Concepts for PCGen and Architecture Document Conventions

Index of Architecture Documents

There is an Index to Architecture Documents that provides a complete list and is in the recommended reading order for those who wish to read the complete set of relevant documentation.

PCGen Subsystems

This section lays out the primary sub-systems within PCGen

Startup System

The Startup System is responsible for the activities required to load PCGen to the state where a user can select an option from the Load UI. This includes:

  • Discovery and loading of Plugins (the plugin.* packages)
  • Loading the Game Modes (stored in the system directory)
  • Discovering and loading the PCC files (from the data directory)
  • Loading the Load UI (part of pcgen.gui2.*)

Load UI

The Load UI is responsible for presenting the user with the options of game systems and components available to be loaded. The LoadUI triggers a call to the Rules Persistence system when the user requests for specific data to be loaded, and to the Character Persistence system when the user requests for a Player Character to be loaded...

Rules Persistence System

The Rules Persistence System is one of the major components of PCGen. It is responsible for loading game system and component data from the persistence data file format and (in most cases) saving it back into that data file format. It is aware of the internal storage of information within PCGen only to the point it is required to store information in the Rules Data Store for use by the core of PCGen. The Rules Persistence System is not capable of interpreting much in the way of behavior of the values it is storing (strictly it will know the persistent text format, but doesn't understand what REACH actually means, only that it contains a number to be loaded into a specific location in the Rules Data Store).

We have a number of files in both the system (game mode) and data (effectively book content) directories that represent the data. Specific file "Loaders" load each of the different formats of file that we have, breaking it into lines.

These lines are then split up into the first token (indicating what the line means) and the other tokens. Tokens are separated by one or more tab characters.

Given the combination of Loader (file format) and Token, we can look up the appropriate plugin to process that specific token. This is called to parse the value of the token. This parse method is responsible for loading the information about the token into the Rules Data Store (generally into the object being loaded, but this is not universally true). Any failure means the entire contents of the token will be ignored (the contents of the token are a "transaction" in the sense that it fully succeeds or fully fails).

This includes CDOM References Concept Document and the Load Commit Subsystem

Rules Data Store

The Rules Data Store is the internal data structure used to store the game system and component information.

As a "Data Store", it is very much akin to a complicated database (it could be converted into an actual database with some effort). The Rules Data Store is not designed to have methods that interpret the contents of the Rules Data Store, nor is the Rules Data Store capable of storing the information it contains into a persistent state. The conversion to and from a persistent state is owned by the Rules Persistence System.

Other - to Be Edited

    • Player Character UI: The Player Character UI is responsible for presenting the user with the contents of the PC, including all of the PC's characteristics. Requests to modify a PC are sent to the Character Editor system for action.
    • Character Editor: The Character Editor system is responsible for providing the capability to modify the PC. Changes to the PC are communicated to the Event Controller as well as written into the Character Data Store.
    • Character Persistence: The Character Persistence system is responsible for loading and saving PCs into the specified file format. The Character Persistence system is also responsible for creating and initializing a new Player Character.
    • Character Output: The Character Output system is responsible for resolving the active objects on a PC, searching those objects to find specific information, and preparing that information for consumption by any of the systems that desire PC information.
    • Event Controller: The Event Controller acts as a hub to communicate events (typically triggered by changes to a PC) to the UI and to any loaded Plugins.
    • Character Data Store: The Character Data Store is the internal data structure used to store the PC.

Open Sub Projects

Current

Future

Past Projects

Not used

Things not really part of the current architecture, but for context

Active Team Members

Silverback

2nd

  • TBA

Lemur

Inactive Team Members

2nd

  • Devon Jones