Difference between revisions of "Architecture Changes 5.17"
Tom Parker (talk | contribs) (→CHOOSE Rebuild) |
Tom Parker (talk | contribs) (→CHOOSE Rebuild) |
||
Line 47: | Line 47: | ||
This is the major token rebuild of CHOOSE, as proposed. Each of these are items that need to be built as "new" CHOOSE tokens: | This is the major token rebuild of CHOOSE, as proposed. Each of these are items that need to be built as "new" CHOOSE tokens: | ||
− | # CHOOSE: | + | # [[Type Safe Constant Proposals#CHOOSE:NOCHOICE|CHOOSE:NOCHOICE]] (syntax remains unchanged) |
− | # [[CHOOSE | + | # [[Type Safe Constant Proposals#CHOOSE:STRING|CHOOSE:STRING]] (syntax remains unchanged) |
− | # [[CHOOSE | + | # [[Type Safe Constant Proposals#CHOOSE:SCHOOLS|CHOOSE:SCHOOLS]] |
− | # [[CHOOSE | + | # [[Simple_CDOMObject_Proposals#CHOOSE:PCSTAT|CHOOSE:PCSTAT]] |
− | # [[ | + | # [[Simple_CDOMObject_Proposals#CHOOSE:CHECK|CHOOSE:CHECK]] |
− | # [[ | + | # [[Simple_CDOMObject_Proposals#CHOOSE:SIZE|CHOOSE:SIZE]] |
− | # [[ | + | # [[Simple_CDOMObject_Proposals#CHOOSE:ALIGNMENT|CHOOSE:ALIGNMENT]] |
− | # [[ | + | # [[Qualified_CDOMObject_Proposals#CHOOSE:FEAT|CHOOSE:FEAT]] |
− | # [[ | + | # [[Qualified_CDOMObject_Proposals#CHOOSE:ABILITY|CHOOSE:ABILITY]] |
− | # [[ | + | # [[Qualified_CDOMObject_Proposals#CHOOSE:LANG|CHOOSE:LANG]] [https://sourceforge.net/tracker/?func=detail&aid=2703701&group_id=25576&atid=384722] |
− | # [[ | + | # [[Qualified_CDOMObject_Proposals#CHOOSE:EQUIPMENT|CHOOSE:EQUIPMENT]] |
− | # CHOOSE: | + | # [[Qualified_CDOMObject_Proposals#CHOOSE:TEMPLATE|CHOOSE:TEMPLATE]] |
− | # CHOOSE: | + | # [[Unique_Primitive_CDOMObject_Proposals#CHOOSE:SPELLS|CHOOSE:SPELLS]] (syntax remains unchanged) |
− | + | # [[Unique_Primitive_CDOMObject_Proposals#CHOOSE:ARMORPROFICIENCY|CHOOSE:ARMORPROFICIENCY]] | |
− | # CHOOSE: | + | # [[Unique_Primitive_CDOMObject_Proposals#CHOOSE:SHIELDPROFICIENCY|CHOOSE:SHIELDPROFICIENCY]] |
− | # CHOOSE:RACE | + | # [[Unique_Primitive_CDOMObject_Proposals#CHOOSE:DOMAIN|CHOOSE:DOMAIN]] |
− | # CHOOSE: | + | # [[Unique_Primitive_CDOMObject_Proposals#CHOOSE:DEITY|CHOOSE:DEITY]] [https://sourceforge.net/tracker/?func=detail&aid=1738608&group_id=25576&atid=384722] |
+ | # [[Unique_Primitive_CDOMObject_Proposals#CHOOSE:CLASS|CHOOSE:CLASS]] | ||
+ | # [[Unique_Primitive_CDOMObject_Proposals#CHOOSE:RACE|CHOOSE:RACE]] | ||
+ | # [[Complex_CDOMObject_Proposals#CHOOSE:SKILL|CHOOSE:SKILL]] | ||
# CHOOSE:WEAPONPROFICIENCY | # CHOOSE:WEAPONPROFICIENCY | ||
− | |||
− | |||
− | |||
− | |||
− | |||
# CHOOSE:USERINPUT | # CHOOSE:USERINPUT | ||
Revision as of 22:07, 24 March 2009
Primary Goals - Token/Loader
Prepare for LST Editor
These items benefit the LST editor system and are required in order to allow the editor system a "clean" round-robin of the data stored in PCC/LST files
Eliminate PCClass ABB being recognized by LoadContext as source-dependent[1] (DONE - SVN 9734)Make .COPY in LST-files editor friendly[2] (DONE - SVN 9735)- Make .MOD in LST-files editor friendly [3]
- Make PCClassLevel REPEATLEVEL in LST-files editor friendly [4]
- Rebuild/rename UDAM token to not "cross-pollute" in PCClassLevel [5]
- Make Ability CATEGORY recognized by LoadContext as source-dependent [6]
- Make Global KEY recognized by LoadContext as source dependent
Major Token Changes
These are major token changes that need to take place to sufficiently clean up the data syntax to avoid strange effects and requirements on the code.
- Domain's CHOOSE:WEAPONPROF can have [WEAPONPROF], should be AUTO:WEAPONPROF:%LIST [7]
- Domain's CHOOSE:WEAPONPROF can have [FEAT=x] should get something like: AUTO:FEAT|x(%LIST) [8]
- CHOOSE:SPELLLEVEL can have funky arguments (BONUS), should be separate and use %LIST
(also See UDAM in Editor preparation)
Continue Token/Field Cleanup
These are cleanups similar to the major work that was done in PCGen 5.16. These are generally minor refactoring and cleanup, and most are non-invasive. Few of these are critical for the 5.17 cycle and could be ignored if necessary
- PCAlignment fields validForDeity, validForFollower can be in ObjectKey
- SizeAdjustment fields abbreviation, isDefaultSize can be in StringKey, ObjectKey
- PCStat fields abbreviation, statMod can be in StringKey
- PCStat field penaltyVar is useless - eliminate
- PCStat fields maxValue, minValue can be in IntegerKey
- PCStat field rolled can be in ObjectKey
- Kit statList can be in ListKey
- Kit tableMap can be in MapKey
- Global TEMPLATE supports .REMOVE suffix, should really be of the form REMOVE:TEMPLATE [9]
- Campaign isLoaded and isInitted are load-based (not static) and thus should be moved into CampaignLoader vs. stored in the Campaign itself
CHOOSE Rebuild
This is the major token rebuild of CHOOSE, as proposed. Each of these are items that need to be built as "new" CHOOSE tokens:
- CHOOSE:NOCHOICE (syntax remains unchanged)
- CHOOSE:STRING (syntax remains unchanged)
- CHOOSE:SCHOOLS
- CHOOSE:PCSTAT
- CHOOSE:CHECK
- CHOOSE:SIZE
- CHOOSE:ALIGNMENT
- CHOOSE:FEAT
- CHOOSE:ABILITY
- CHOOSE:LANG [10]
- CHOOSE:EQUIPMENT
- CHOOSE:TEMPLATE
- CHOOSE:SPELLS (syntax remains unchanged)
- CHOOSE:ARMORPROFICIENCY
- CHOOSE:SHIELDPROFICIENCY
- CHOOSE:DOMAIN
- CHOOSE:DEITY [11]
- CHOOSE:CLASS
- CHOOSE:RACE
- CHOOSE:SKILL
- CHOOSE:WEAPONPROFICIENCY
- CHOOSE:USERINPUT
Primary Goals - Core
Eliminate Cloning
Cloning takes place when a PlayerCharacter uses an object and results in extra memory and a minor performance issue. However, once clones are removed, additional type safety work can be done to vastly improve performance.
Currently, Equipment and EquipmentModifier objects have been scoped out of PCGen 5.17 in order to minimize the required changes to the core
Eliminate Cloning of PCStat objects (Ability Scores)(DONE - SVN 9690)Eliminate Cloning of Skill objects(DONE - SVN 9696)Eliminate Cloning of Race objects(DONE - SVN 9700)Eliminate Cloning of CompanionMod objects(DONE - SVN 9704)Eliminate Cloning of Template objects(DONE - SVN 9705)Eliminate Cloning of Spell objects(DONE - SVN 9707)Eliminate Cloning of Domain objects(DONE - SVN 9709)- Eliminate Cloning of PCClass objects
- Eliminate Cloning of Feat/Ability objects
Eliminate Cloning of EquipmentModifier objects(OUT OF SCOPE)Eliminate Cloning of Equipment objects(OUT OF SCOPE)
Drive Type Safety and Performance
This represents the additional type safety work around performance for these object types. These changes cannot be done at the same time as the changes above, because they are significantly invasive, and must wait for a stable PCGen 5.16.0 where multi-version patching is no longer required.
Currently, Equipment and EquipmentModifier objects have been scoped out of PCGen 5.17 in order to minimize the required changes to the core
- Eliminate Key/ABB comparison of PCStat objects
- Eliminate Key comparison of Skill objects
- Eliminate Key comparison of Race objects
- Eliminate Key comparison of CompanionMod objects
- Eliminate Key comparison of Template objects
- Eliminate Key comparison of Spell objects
- Eliminate Key comparison of Domain objects
- Eliminate Key comparison of PCClass objects
- Eliminate Key comparison of SizeAdjustment objects
- Eliminate Key comparison of PCAlignment objects
- Eliminate Key comparison of Language objects
- Eliminate Key comparison of PCClass objects
- Eliminate Key comparison of Check (PObject) objects
- Eliminate Key comparison of Feat/Ability objects
Eliminate Key comparison of EquipmentModifier objects(OUT OF SCOPE)Eliminate Key comparison of Equipment objects(OUT OF SCOPE)
Player Character Subsystems
- PC Subsystem for PCStat objects
- PC Subsystem for Skill objects
- PC Subsystem for Race objects
- PC Subsystem for CompanionMod objects
- PC Subsystem for Template objects
- PC Subsystem for Spell objects
- PC Subsystem for Domain objects
- PC Subsystem for PCClass objects
- PC Subsystem for SizeAdjustment objects
- PC Subsystem for PCAlignment objects
- PC Subsystem for Language objects
- PC Subsystem for PCClass/PCClassLevel objects
- PC Subsystem for Check (PObject) objects
- PC Subsystem for Feat/Ability objects
- PC Subsystem for CompanionMod objects
- PC Subsystem for Proficiency objects
- PC Subsystem for Variables
- PC Subsystem for Bonuses
- PC Subsystem for XP
- PC Subsystem for Levels
- PC Subsystem for Pure Facts
- PC Subsystem for Movement
- PC Subsystem for AC
PC Subsystem for Equipment(OUT OF SCOPE)
Storage
- Source-based (CDOM) storage of PCStat objects
- Source-based (CDOM) storage of Skill objects
- Source-based (CDOM) storage of Race objects
- Source-based (CDOM) storage of CompanionMod objects
- Source-based (CDOM) storage of Template objects
- Source-based (CDOM) storage of Spell objects
- Source-based (CDOM) storage of Domain objects
- Source-based (CDOM) storage of PCClass objects
- Source-based (CDOM) storage of SizeAdjustment objects
- Source-based (CDOM) storage of PCAlignment objects
- Source-based (CDOM) storage of Language objects
- Source-based (CDOM) storage of PCClass objects
- Source-based (CDOM) storage of Proficiency objects
- Source-based (CDOM) storage of CompanionMod objects
- Source-based (CDOM) storage of Check (PObject) objects
- Source-based (CDOM) storage of Feat/Ability objects
Eliminate Key comparison of EquipmentModifier objects(OUT OF SCOPE)Eliminate Key comparison of Equipment objects(OUT OF SCOPE)
Refactoring
These are architecture refactoring issues that generally involve breaking tangles and other work that is helpful to cleaning up the structure of the code
- CharacterDomain is a useless class - delete
- StatList is a useless class - delete
- UnconstructedValidator should be an interface, not a class
- Qualifier (in cdom.helper) is used in .reference, thus it should be in .reference, not .helper
- CDOMObject methods addAdds, removeAdds, checkRemovals, driveChoice cause tangles, and should be in CDOMObjectUtilities not in CDOMObject
- LoadContext should be an interface, not a class
- PersistentChoiceActor decodeChoice often references the LoadContext, and should be discouraged from using Globals. This method should take the LoadContext as an argument.
- Give CDOMObject (or a utility class) a method of consolidating out all of the ListKey-based joins in pcgen.core.spell.Spell.java
- Ability.Nature should be in pcgen.cdom.enumeration
- Spell Components should be in pcgen.cdom.enumeration
- StatList getModForNumber(int, int) does a String replacement directly prior to a Formula evaluation, this should be moveable into a JEP variable for SCORE that is specific to stats. Actually, need to have the "SOURCE" field for TermEvaluatorBuilderPCVar COMPLETE_PC_SCORE be able to distinguish between STAT:Foo and BASESTAT:Foo and then this replacement would not be necessary.
Primary Goals - LST Editor
Primary Goals - UI
Other
Unresolved Architectural Issues
Variables under Cloning
Certain items, such as variables that are dependent upon an object's name, are ill defined on cloning. Should the key name be swapped out, or should it remain intact. Behavior is inconsistent across objects. This problem is also apparent if KEY or CATEGORY is used in a .MOD
Languages with matching Key
The MSRD has multiple languages (some TYPE:Spoken, some TYPE:Read.Write) that share an identical key. Eventually this will become a significant problem, and it may need to be addressed during 5.17
Spells with matching Key
Similar to the TYPE issue for Languages above, the SRD has multiple "spells" (typically one Magical and one Psionic) that have the same name. They are distinguished by TYPE (Divine vs. Psionic, for example). This should be changed to something more intelligent than type, restoring KEY as a unique identifier. (One option here is to allow a form of CATEGORY for Spells - although the sharing of Arcane and Divine Types makes this a wee bit more complicated than just using CATEGORY as we know it today in Abilities)
Retroactivity
Much of this issue is discussed in this thread: http://tech.groups.yahoo.com/group/pcgen_experimental/message/6864
Prerequisite behavior
This is surfaced starting at this message: http://tech.groups.yahoo.com/group/pcgen_experimental/message/8133