CR Calculation Overhaul Proposal

From PCGen Wiki
Jump to: navigation, search

This is a concise summary about the problems of CR calcuation in PCGen and a proposal how to fix these problems.

Problems with CR Calculation

Problem I

PCGen takes an easy road for CR calculation, stemming from the original D&D 3.0 days. CRs for classes are determined by class type. For 3e and 35e, this means that for a PC class, the CR is equal to the level, and for an NPC class, the CR is equal to the level – 1. CRs for creatures are assigned to the race. CRs for prestige classes are zero (no idea why). In Pathfinder, however, the CR of a PC class character is level – 1, while an NPC class character is at CR = level – 2.

It's even more complicated for creatures with racial hit dice and class levels. Here. it's necessary to determine if the class in question is a "key" class for the creature, or not. (Pathfinder uses the term "key class", while 3e/35e used "associated class". I will continue with "key".) Pathfinder defines a "monster role" for each race, and has a list of which classes are key classes for which role, while 3e/35e do not specify that explicitly. If a class is a key class, the creature's CR is increased by 1 per class level. If the class is not a key class, a certain number of levels only increase the creature's CR by 1/2 (i.e. +1 CR per two levels), and only class levels in excess of that certain number are added on a +1 CR per level basis. The number is the creature's original CR in Pathfinder, and the creature's racial hit dice in 3e/35e.

PCGen, however, just goes and adds up all CRs from the race ant the various classes. For most PCs this works fine in 3e/35e, but the method is fundamentally flawed for any character with more than one class in Pathfinder, or with a class and racial hit dice. The problem even occurs in 3e/35e gamemodes. For example, a warrior 4 is CR 3, an expert 4 is CR 4, and so is a warrior 2/expert 2, but PCGen shows CR 2 because it applies the formula "CR = Level -1" for NPC classes to each class and then just adds them up.

Problem II

Another problem that figures into this issue has previously been raised by Tom Parker. PCGen determines the formula used to calculate CR for a certain type of a class by that class's TYPE tag, for instance, a class might have the tag TYPE:Base.PC, and so, the PC class formula is used, or it may have TYPE:Monster, and the monster formula is used. However, TYPEs are not exclusive, to in theory a class might even be designated as TYPE:PC.Monster. What then? I found this comment by Tom in the source code, addressing this problem:

TODO I don't like the fact that this method is accessing the
ClassTypes and using one of those to set one of its variables. In
theory, we should have a ClassType that triggers CR that is not a
TYPE, but a unique token. See this thread:
http://tech.groups.yahoo.com/group/pcgen_experimental/message/10778

The overhaul proposed in this posting will also include this issue.

Problem III

Another problem lies in the fact that PCGen currently sets fixed CRs for races with no racial hit dice, such as, e.g. the bases PC races. Some are set to 1/2, some to 1/3, probably according to the sample character listed in the Bestiary/Monster Manual (1/2 if it's a PC class sample character, 1/3 if NPC class). For Pathfinder, the base races have CR:1/2, and I have no idea where this might be taken from, there is no Bestiary entry for these races - probably these are holdovers from the original 35e files.

Setting these fixed CRs, however, leads to problems when calculating the CR for low level characters. For races with no racial hit dice, a level 1 PC class character, or a level 2 NPC class character should always be CR 1/2, and a level 1 NPC class character should always be CR 1/3. With fixed CRs in the race files this does not always work correctly.

PCGen cannot correctly evaluate the expression "decrease CR by x" if the resulting CR is below CR 1. Pathfinder specifies this rule: "If this reduction would reduce a creature's CR to below 1, its CR drops one step on the following progression for each step below 1 this reduction would make: 1/2, 1/3, 1/4, 1/6, 1/8." This rule also applies when a template reduces a creatures CR. (3e/35e do not have such a rule, but would probably follow the same pattern, however, the only place where I see it would apply in these gamemodes is for level 1 NPC class characters with no racial hit dice.)

Problem IV

Ancillary to this issue, but still slightly connected: Pathfinder uses fixed XP awards per CR and the XP award of a creature is part of the standard Pathfinder statblock. Currently PCGen has no way of determining and outputting this data.


Proposal

Gamemode tags

CLASSTYPE (update)

This tag needs two new subtypes. Currently it has CRFORMULA which contains the full formula, including the "minus one" part that is erroneously applied multiple times if a character has multiple classes. Thus the "minus one" part needs to be separated from the formula. These new subtags can be used to fix Problem I.

CRMOD:x (new)

This subtag contains the CR reduction mandated by a certain class type. E.g., for Pathfinder, the entry for CLASSTYPE:PC would change from "CRFORMULA:max(CL-1,0)" to "CRFORMULA:CR" and "CRMOD:-1". The value from CRMOD is only added after all CRFORMULA values have been added up. This tag should be able to take a formula.

CRMODPRIORITY:x (new)

If a character has multiple classes with different class types (such as, for example, an aristocrat/fighter), this tag determines which CRMOD is applied. For Pathfinder, if a character has a PC class, the CRMOD is –1, but if he has ONLY NPC classes, the CRMOD is –2. Thus, the PC CRMOD takes priority. The CRMODPROIRITY tag determines the priority in a way that PCGen will choose the CRMOD with the lowest value of CRMODPROIRITY.

CRFORMULA (update)

This subtag will now take the value NONE, which will cause the CR calculation to return a zero CR which can then be converted to show up as en em-dash ("CR —") by the output sheet. This can be used for creatures who do not have their own CR, such as animal companions or familiars.

CLASSTYPE (usage)

For the Pathfinder RPG gamemode, the CLASSTYPE:Prestige can be eliminated. For CR calculation purposes, it is identical to CLASSTYPE:PC. With the class type now using its own class file tag (see below), there is no more need for this separation at this level. The same is true for CLASSTYPE:Prestige and CLASSTYPE:Advanced in the Modern gamemode.

A new CLASSTYPE:Companion will be added. This will be used as the CLASSTYPE for all animal companions, familiars, and the like. These creatures never have their own CR—they are included in the CR of their master. This CLASSTYPE will use CRFORMULA:NONE to reflect this.

CRSTEPS:x=y|x=y|... (new)

This tag lists the "lower than CR 1" CRs in decreasing steps, so that PCGen can do correct CR reductions and return a string result as used in the rules, fixing Problem III. This tag would be listed in most gamemodes as:

CRSTEPS:1/2|1/3|1/4|1/6|1/8

MONSTERROLES (new)

To implement the system that compares classes and monster races for the synergy of "key" classes to determine CR, and thus fix Problem II, this tag will be used in the gamemode to list all valid "roles". As the "Spell" role, as listed in the rules, only applies if a creature has a spellcasting abilty of the exact same type as the class in question, it is replaced by using the spellcasting classes as individual roles. For Pathfinder, the tag would be listed in miscinfo.lst as follows:

MONSTERROLES:Combat|Skill|Special|Cleric|Druid|Sorcerer|Wizard

MONSTERROLEDEFAULT (new)

This tag defines which monster role is to be assumed if none is listed. In Pathfinder, many creatures with an Intelligence score of 2 or less are listed as "No Role", because these creatures cannot take any class levels. However, if they should acquire an Intelligence score of 3 or more in some way, they can take class levels, and a monster role of "Combat" should be assumed. In order not to have to assign the Combat role to all these "No Role" creatures, it is easier to leave off the ROLE tag (see below) altogether in their race line and default to the value of this tag in case they should acquire class levels, like this:

MONSTERROLEDEFAULT:Combat

CRTHRESHOLD (new)

This tag defines the threshold beyond which further class levels are counted as 1 CR per level for non-key classes. This tag takes a formula. For 3e/35e this would be CRTHRESHOLD:HD, for Pathfinder CRTHRESHOLD:BASECR. (using a new variable, see below).

XPAWARD (new)

A gamemode tag that pairs each CR with its fixed XP award to fix Problem IV, if that is applicable to the gamemode. If not, such as in 3e/35e, the tag can be left off. For Pathfinder, the tag would be listed in miscinfo.lst as follows:

XPAWARD:1/8=50|1/6=65|1/4=100|1/3=135|1/2=200|1=400|2=600|3=800|4=1200|5=1600|6=2400|7=3200|8=4800|9=6400|10=9600|11=12800|12=19200|13=25600|14=38400|15=51200|16=76800|17=102400|18=153600|19=204800|20=307200|21=409600|22=614400|23=819200|24=1228800|25=1638400

It might be possible to define differently, and user a formula instead. All awards for CRs of 1 and higher can easily be calculated from a single forumla. The awards for CRs less than CR 1, however, need a different forumal, and some must rounded to multiples of 5.

Race file tags

CR (usage change)

To fix Problem III and calculate CRs for creatures with no racial hit dice correctly, I propose that the fixed CR tags are removed from all of these races. The CR for these races is normally a function of the class levels, and not of the race.

CRMOD:x.x|y (new)

This tag can overrule the general CRMOD for certain races. In Pathfinder, for example, the descripiton of the drow noble specifies that a drow noble character's CR is alway equal to his class levels, or that for a kobold that has only NPC classes, the CR is "level – 3". x is used to specify one or more class types for which this CRMOD applies, while y specifies the value of the CRMOD. This subtag would be used on the race's line as follows:

Drow Noble      CRMOD:PC.NPC|0
Kobold          CRMOD:NPC|-3

ROLE:x.x (new)

This tag specifies the monster role(s) of a race, using values taken from the list defined in the gamemode by the MONSTERROLES tag. These are examples:

Gnoll          ROLE:Combat
Demon (Babau)  ROLE:Combat.Skill
Nymph          ROLE:Druid

Class file tags

ROLE:x.x (new)

This tag specifies for which monster role(s) a class counts as a "key" class, using values taken from the list defined in the gamemode by the MONSTERROLES tag. These are examples:

CLASS:Fighter  ROLE:Combat.Skill
CLASS:Druid    ROLE:Druid
CLASS:Paladin  ROLE:None
CLASS:Rogue    ROLE:Skill

CLASSTYPE:x (new)

To solve Problem II, this tag specifies the type of a class to be used from the list of CLASSTYPEs defined in the gamemode. (Note that this will mandate that ALL classes in all datasets are adapted to use this tag. For migration purposes, a fallback can be implemented to continue to use TYPE as long as CLASSTYPE is not present.) These are examples:

CLASS:Fighter        CLASSTYPE:PC
CLASS:Warrior        CLASSTYPE:PC

Variables

BASECR (new)

This variable returns the unmodified CR of the creature's race. This is needed to calculate the CR threshold for the Pathfinder gamemode.

Export tokens

CLASS (modified)

CLASS.x.CLASSTYPE

The token expands to the name of the classtyppe of the class.

CLASS.x.ISMONSTER

The token expands Y or N depending on the setting of the ISMONSTER tag in the class's classtype.

XPAWARD (new)

This export token contains the formatted value (i.e. using a comma as a thousands separator) of the XP award appropriate to the CR of the creature. If fixed XP awards are not used, such as in 3e/35e, the token should return an empty string.