Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Pathfinder Companion PCGEN stat block parsing issue

I'm getting an infinite loop error when attempting to parse from a PCGEN statblock as per the instructions in the readme for PCS. If I decrease the number of Special Abilities entries, the parse works intermittently, however with all the character's Special Ability entries, it triggers this infinite loop error every time. I am willing to resign myself to excluding this character's special abilities from his character sheet in roll20 (I won't be entering them all manually). But I just wanted to post this in case anyone could possibly have a better solution. 
Also, I cannot figure out why the following (pulled directly from here&nbsp; <a href="https://www.d20pfsrd.com/bestiary/monster-listings/undead/vampire/" rel="nofollow">https://www.d20pfsrd.com/bestiary/monster-listings/undead/vampire/</a> ), doesn't parse the DR, Immunities, Resistances and Weaknesses correctly: Vampire7 CR 9 XP 6,400 Female human vampire sorcerer 8 CE Medium undead (augmented humanoid) Init +8; Senses darkvision 60 ft.; Perception +21 DEFENSE AC 23, touch 17, flat-footed 18 (+2 deflection, +4 Dex, +1 dodge, +6 natural) hp 102 (8d6+72); fast healing 5 Fort +13, Ref +11, Will +12 Defensive Abilities channel resistance +4; DR 10/magic and silver; Immune undead traits; Resist cold 10, electricity 10 Weaknesses vampire weaknesses It will capture the defensive abilities, but that's it. DR, Immunities, Resistances and Weaknesses remain blank. Admittedly, my Javascript is not the best, but this appears to be the line of code that would capture this: defenseMatch = / DEFENSE \n + (AC \s + [ ^ \n ] + ) \n + hp \s + ( [ ^ \n ] + ) \n + Fort \s + ( [ ^ ,;] + )(?:, | ;) \s + Ref \s + ( [ ^ ,;] + )(?:, | ;) \s + Will \s + ( [ ^ \n ] + ) \n * (?:Defensive \s + Abilities \s + ( [ ^ ; \n ] + )) ? (?:; | \n + | \s + ) ? (?:DR \s + ( [ ^ ; \n ] + );) ? (?: \s + ) ? (?:Immune \s ( [ ^ ; \n ] + )(?:;) ? ) ? (?: \s + ) ? (?:Resist \s + ( [ ^ ; \n ] + );) ? (?: \s + ) ? (?:SR \s + ( \d + )) ? (?: \n + ) ? (?:Weaknesses \s + ( [ ^ \n ] + )) ? / , It looks like it should work? What am I missing?
Got the above to parse correctly by changing it to this: Vampire19 CR 9 XP 6,400 Female human vampire sorcerer 8 CE Medium undead (augmented humanoid) Init +8; Senses darkvision 60 ft.; Perception +21 DEFENSE AC 23, touch 17, flat-footed 18 (+2 deflection, +4 Dex, +1 dodge, +6 natural) hp 102 (8d6+72); fast healing 5 Fort +13, Ref +11, Will +12 Defensive Abilities channel resistance +4 DR 10/magic and silver; Immune undead traits; Resist cold 10, electricity 10; Weaknesses vampire weaknesses