[Pathfinder] Hero Points Temp Bonus not retained after save/reload
The temporary bonus for hero points from the Hero Point System from the Pathfinder RPG Advanced Player's Guide does not persist when a character is saved and reloaded. To reproduce:
1) Make sure the house rule option "Use Hero Points from_Pathfinder RPG Advanced Player's Guide" is selected.
2) Load Core Rulebook and Advanced Player's Guide
3) Create new character
4) Go to Temp Bonus tab, and activate Abiity/Hero Points, choose, for example, the value 3.
5) Save character
6) Close character
7) Reload character
8) Go to Temp Bonus tab – Hero Points are no longer listed. This used to work when Hero Points were activated as atemplate in a previous version of the data set.
Game Mode: Pathfinder
Loaded Sources: Core Rulebook, Advanced Player's Guide
Loop solution implemented in Subversion revision 22331.
Now temp bonuses from all ability categories are rerstored on load.
Using the loop works in this case, but this method might be problematic if there were abilities with the same name in two different categories. Why are we not saving the category?
Looking at the code in pcgen.io.PCGVer2Parser.parseTempBonusLine(String) (around line 5852) it is checking for an ability in the FEAT or Special Ability category. As this one is internal I think it is getting missed.
This could be corrected by looping through all categories listed in SettingsHandler.getGame().getAllAbilityCategories to check for the ability.
It seems this gets saved; the following is from a PCG file: