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

Importing from custom compendium not working #444

Closed karpana closed 3 years ago

karpana commented 3 years ago

Hi There, I'm new to Foundry, and new to this tool, but I REALLY like what I'm seeing.

I'm having trouble with importing a Level 1 NPC, partly because of how Herolab Online HLO is 'laying out some of the items'. The specific example in question is the "Studded Leather Armor" (as described in the Foundry VTT (VTT) PF1 armor and shields compendium).

When I manually fix this stat block (before import) to say "Studded Leather Armor", it works fine, properly importing/loading derived attributes such as "Armor Check Penalty". But if I leave it as "Studded Leather" it doesn't work, and things like ACP aren't populated, and thus all the skill modifiers are incorrect.

I don't want to have to hand-bomb dozens of corrections manually to the stat blocks as I build and inport PCs and NPCs, and learned that SBC can support a custom compendium. I thought this would be great, as I could drag the "working item" out of a working compendium (but with the wrong name), into a custom compendium, and fix the name to match HLO, and thus it should be able to find "corrected name versions" of the base items and import them correctly.

So I did the following

Once this was all done, I tried to reimport the HLO statblock, and what I get in FVTT is a placeholder item, under MIscellaneous that shows: "Studded Leather" "sbc | As studded leather could not be found in any compendium, a placeholder was generated."

How do I get SBC to use a custom compendiumproperly?

The Stat Block in question is this:

S.O.U. 6 of 8 Machine humanoid investigator (empiricist) 1 (Pathfinder RPG Advanced Class Guide 30, 100, Pathfinder RPG Bestiary 5 19) LN Medium humanoid (android) Init 4; Senses darkvision 60 ft., low-light vision; Perception +7

Defense

AC 17, touch 14, flat-footed 13 (+3 armor, +4 Dex) hp 11 (1d8+3) Fort +2, Ref +6, Will +3; +4 vs. mind-affecting, paralysis, poison, and stun Defensive Abilities constructed; Immune disease, emotion, exhaustion, fatigue, fear, sleep

Offense

Speed 30 ft. Melee rapier +4 (1d6+4/18-20) Investigator (Empiricist) Extracts Prepared (CL 1st; concentration +5) 1st—heightened awareness[ACG], tears to wine (DC 15)

Statistics

Str 12, Dex 18, Con 14, Int 18, Wis 12, Cha 5 Base Atk +0; CMB 1; CMD 15 (13 vs. dirty trick) Feats Weapon Finesse Traits student of philosophy Skills Bluff -3 (+4 to lie (as a result of using Int instead of Cha)), Craft (alchemy) +8 (+9 to create alchemical items), Diplomacy +1 (+8 to persuade others but not to gather information (as a result of using Int instead of Cha)), Disable Device +8, Knowledge (arcana) +8, Knowledge (dungeoneering) +8, Knowledge (engineering) +8, Knowledge (local) +8, Knowledge (nature) +8, Knowledge (planes) +8, Knowledge (religion) +8, Linguistics +8, Perception +7, Sense Motive -3; Racial Modifiers +2 Perception, -4 Sense Motive Languages Common, Draconic, Dwarven, Elven, First Speech, Orc SQ alchemy (alchemy crafting +1), emotionless, exceptional senses, inspiration (4/day), naive, nanite surge, trapfinding +1 Combat Gear alchemist's fire (6), clear ear (6); Other Gear studded leather, rapier, alchemy crafting kit[APG], backpack, investigator starting formula book, thieves' tools, 8 gp

Special Abilities

Alchemy +1 (Su) +1 to Craft (Alchemy) to create alchemical items, can Id potions by touch. Constructed (Ex) Counts as both humanoids and constructs for effects that target type. Darkvision (60 feet) You can see in the dark (black and white only). Emotionless (Ex) Androids have problems processing emotions properly, and thus take a –4 penalty on Sense Motive checks. Exceptional Senses Androids have darkvision to a range of 60 feet and low-light vision. They also gain a +2 racial bonus on Perception checks. Immunity to Disease You are immune to diseases. Immunity to Emotion (Ex) You are immune to all emotion effects. Immunity to Exhausted You are immune to the exhausted condition. Immunity to Fatigue You are immune to the fatigued condition. Immunity to Fear (Ex) You are immune to all fear effects. Immunity to Sleep You are immune to sleep effects. Inspiration (+1d6, 4/day) (Ex) Use 1 point, +1d6 to trained skill or ability check. Use 2 points, to add to attack or save. Low-Light Vision See twice as far as a human in dim light, distinguishing color and detail. Naive -2 to AC vs. improvised weapons. Nanite Surge +4 (1/day) (Ex) Bonus to any one d20 roll. Glow like a torch for 1 round when used. Trapfinding +1 Gain a bonus to find or disable traps, including magical ones.

karpana commented 3 years ago

This feels a lot like Issue #360, specifically the last comment, here feats weren't being pulled in properly from Custom Compendia. I'm wondering if a similar fix is needed for "items"?

Lavaeolous commented 3 years ago

This relates to #371 i think, as the search for items/entities/etc. is currently not fuzzy but only finds exact matches. I'll take a look, but currently i have no easy solution to fix this.

karpana commented 3 years ago

A perfect match is perfectly fine by me. In fact I had assumed it was, which is why I created an identically named item (by cloning from the proper item in the base compendium) into my own compendium, that matched what was in the stat block.

But it's still not finding the new 'exactly named item's.

karpana commented 3 years ago

So I guess I'm trying to find out, how do I confirm that the custom compendium is even being used?

Lavaeolous commented 3 years ago

Ah, thanks for the headsup! This led to me finding a deeper issue in using custom compendia for specific item categories, like armor or weapon. I used to check availability only on the index of the official compendia without having a fallback where only custom compendia could be used for that.

I've implemented that in 3.3.0 (which will be released as soon as the pf1 system is 0.8.x ready)!

karpana commented 3 years ago

with this new 3.3.0 change (which I'm now super excited to play with), what's the order of operations in terms of which compendia are used?

For example, if no custom compendia are used, what is scanned? (I uspect it's all the official compendia) But if I add in one or more custome compendia, what is scanned in that case? (custom + official? or just custom?)

Lavaeolous commented 3 years ago

Order of Operations for known equipment types (e.g. weapons, armors, feats) is searching the custom compendia in the order they are entered into the settings (with the left most being searched first) and if nothing can be found there, searching the system compendia.

For unknown types only the custom compendia will be searched.

karpana commented 3 years ago

That's fantastic So I'd only need to bring in the "mismatched named items" (in the absence of a fuzzy search capability), and if it doesn't find it, it will fall back to the system compendia.

Thank you!!

Now I'm looking forward to the 0.8x upgrades... :-)