Difference between revisions of "Architecture"
Tom Parker (talk | contribs) |
Tom Parker (talk | contribs) |
||
Line 45: | Line 45: | ||
− | |||
*** [[Load Commit Subsystem]] | *** [[Load Commit Subsystem]] | ||
− | |||
** Character Editor: The <i>Character Editor</i> system is responsible for providing the capability to modify the PC. Changes to the PC are communicated to the <i>Event Controller</i> as well as written into the <i>Character Data Store</i>. | ** Character Editor: The <i>Character Editor</i> system is responsible for providing the capability to modify the PC. Changes to the PC are communicated to the <i>Event Controller</i> as well as written into the <i>Character Data Store</i>. | ||
** Character Persistence: The <i>Character Persistence</i> system is responsible for loading and saving PCs into the specified file format. The <i>Character Persistence</i> system is also responsible for creating and initializing a new Player Character. | ** Character Persistence: The <i>Character Persistence</i> system is responsible for loading and saving PCs into the specified file format. The <i>Character Persistence</i> system is also responsible for creating and initializing a new Player Character. |
Revision as of 22:11, 25 February 2018
Contents |
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
A Day in the Life of PCGen
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).
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.
- Rules Data Store: The Rules Data Store is the internal data structure used to store the game system and component 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.
- Code Base - Key Concepts
- Walkthroughs
- Rules Data Store Concepts
Open Sub Projects
Current
- Formula System Conversion
- FreeMarker Facet Output
- Incompatible Change List v6
- Current Architecture Projects (personal scratchpad)
- LST Token Information (scratchpad - relates to facet design and abstracting behaviors)
- BONUS Tag conversion list
- SELECTION - A CHOOSE Replacement
Future
- Internationalization
- Data Cleanup Projects
- PREREQ Cleanup
- PCG Round Robin Work (Tom's scratchpad)
- Bonus Subsystem Thoughts
- Bonus Subsystem Design
Past Projects
- FACT Token, FACTSET Token
- Architecture Update 1Q2013
- Subsystem Isolation (out of date?)
- PObject - The Refactoring (effectively completed for most items - CDOMObject)
- Rebuild of the Token/Loader System (effectively completed for most items)
- Architecture Changes 5.17 (completed as much as would be in 5.17)
- Things to Test (now uses TEST- trackers)
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