Lavaeolous / PF1-StatBlock-Converter-Module

FoundryVTT Module to convert PF1 Statblocks into Foundry Actors (PC or NPC).
MIT License
14 stars 12 forks source link

SBC mis-converts spell with "Arcane" into "Arcana" #515

Closed DrMcCoy closed 2 years ago

DrMcCoy commented 2 years ago

When the spells list of a statblock contains the spell "Arcane Eye", the created actor will have a spell "Arcana Eye" instead. Which doesn't exist, so it's a placeholder.

For example: https://www.d20pfsrd.com/bestiary/monster-listings/aberrations/naga/naga-royal/

The same happens for other spells with "Arcane" in them, like "Arcane Lock", "Arcane Sight", ...

mkahvi commented 2 years ago

It's supposed to only convert KnArcana skill but is affecting everything?`

https://github.com/Lavaeolous/PF1-StatBlock-Converter-Module/blob/master/statblock-converter/scripts/sbcParser.js#L41

DrMcCoy commented 2 years ago

A simple fix, I guess, would be to s/skills \(.*\)arcane/skills \1arcana/igm instead (assuming replace() supports backreferences here)? Or does SBC support skills spread out over multiple lines now, which would make this not work?

Or maybe match for knowledge *( *arcane, also assuming that at least that isn't going to be spread over two lines.

mkahvi commented 2 years ago

The conversion should be only done by skill parser on per-skill basis or whatever uses its result. Not as wholesale conversion on the entire statblock.

DrMcCoy commented 2 years ago

That would probably be the proper non-simple fix, yes :P

Lavaeolous commented 2 years ago

Will be included in 3.3.5!

Lavaeolous commented 2 years ago

Fixed in 3.3.5, these replacements no happen only in th skills

let rawSkill = skills[i]
                    .replace(/\bEnter Choice\b/igm, "any one")
                    .replace(/Arcane/igm, "Arcana")
                    .replace(/\bPer\./igm, "Perception")
                    .replace(/S\. Motive/igm, "Sense Motive")
                    .replace(/\bLing\./igm, "Linguistics");