Skip to content

Update edge case import issues

Leo Jerez requested to merge L0G1C/foundry-import-module:master into master

Open to tackling these in another way if there's a more elegant solution.

I believe a fundamental part of the module is checking attributes of the character against the compendium for an exact match. If it doesn't find it it pushes it into a "not found" collection which gets shown in the pop up.

A few problems I noticed were the following:

  1. For certain Class Features, the character is provided a selection of skills, rather than given an ability that would be found under the Compendium's "class features". But they are checked much the same way in the importer, so it fails to find the options under that class feature because they are the names of skills rather than abilities in that part of the compendium. Commit e43a52fb attempts to fix this by checking every option name against the list of skills and if it matches a skill, simply ignore that option in the import. The skill itself is still imported correctly - being added as a class skill for the case of the "Skill Adept" class feature of the solarian, for example - in the skills import section.
  2. In a similar vein, the Solarian "Lunar Weapon" is added as a class feature, but Hephaistos also creates a weapon inventory item for this, and when importing the inventory, the importer fails to find the Lunar Weapon in the compendium's equipment. Commit 29c38b26 attempts to just ignore this with a hardcoded check for "Lunar Weapon" during the equipment import. I don't know of any other weapons or items that are treated this way by Hephaistos, I suspect that there are more, so this can probably be improved to check against some list? And again, after importing, even with this ignore step, the Lunar Weapon still shows under the character's Inventory Weapons in foundry (I'm assuming because of how the class feature itself is imported correctly).
  3. And Finally I noticed the Damai "Scrappy" species trait was being imported as "Scrappy (Ysoki)" in foundry. And attempted to fix that in c257c666 with an additional check for Scrappy as a species trait for Ysoki and Damai with the similar `${name} (${speciesName})` as the "Skilled" species trait.

Merge request reports