improved-initiative
improved-initiative copied to clipboard
When importing an encounter from another service, lookup creatures in user's own libraries
Encounter#ImportEncounter() will only attempt to look up creatures by making an HTTP request to the /statblocks/ endpoint, which just had OGL creatures. The request is made by inferring a creature ID from its name, which won't necessarily be the right approach for looking up the right creature in local and account sync libraries.
Looking at this a little bit, it looks like this may no longer be an issue? If I'm reading it right, it looks like you've created abbreviations for MM or PHB creatures, and library.ts adds IDs to creatures that are composed of Source (or source abbreviation) + Name, which should reduce collisions.
If it's still an open issue, can you say a little more about what needs to happen?
I've updated the title to be a bit more in line with what I meant. This is a feature addition to search the user's localAsync and Account Sync libraries for named statblocks when importing, and use those to fill in the blanks when available.