arnonram / swade-npc-importer

Savage Worlds Stat-block importer for FoundryVTT
7 stars 8 forks source link

SWADE Stat Block Importer

(formerly SWADE NPC Importer)

A Savage Worlds Adventure Edition stat block importer for Foundry VTT

If you like what you see and find it uself, you can buy me a beer

ko-fi


:exclamation: Please Note

  1. If you are running Foundry as self-hosted, and with the HTTP protocol, then the Importer will not be able to read the data from the clipboard (this is security realted stuff). It will usually be represented by the following error in the browser console: Cannot read property 'readText' of undefined.

    To solve this either:

    • Set your hosted Foundry to work with HTTPS, or
    • Set the Insecure origins treated as secure flag in your browser (or equivalent) appropriatly (see here for an explanation)
  2. Firefox does not support the clipboard.readText() API, and I found no way around this.

:smiley: The Solution: The Actor Importer dialog has a text-box into which you may paste the statblock. This will by-pass both of these problems.


Just a heads up about statsblocks

The SWADE Stat Block Importer works with the official statblock as seen in any Pinnacle products (SWADE Core, Deadlands, etc..) and defined in the Pinnacle Style Guide

The Importer basically searches for patterns in the text, so that means paying attention to commas, colons, etc...

How to use it...

  1. Go to Settings and look around:

    • Under Select Item Compendiums mark any Compendium you wish NPC Importer to use (not selecting anyting will cycle through all compendiums and use the first relevant entry)
    • Set up any other default values you might want
  2. Copy the desired statblock (ctr/cmd + c, into the clipboard)

  3. Click on the NPC Importer button at the buttom of the Actors Directory

    NPC Importer Button

  4. Choose desired options & Click Import!

    NPC Importer Dialogue

  5. In case an Actor with the same name already exists, then you have some options NPC Importer Dialogue

Some configurations

On first use (or, you know, whenever), it is recommended to look at the default settings

NPC Importer Settings

It is highly recommended to choose the Package and/or Item Compendiums you wish NPC Importer to use while importing

Compendiums Selector

Some Prototype Token options may be set by default

Compendiums Selector


How it does it and what's supported

  1. The statblock is prased by searching for all supported attributes/traits/items/etc..
    • Any Additional Stats (Actors) which were added through the SWADE System Settings are: searched for, added, and enabled
    • Traits/Item means: skills, Edges, Hindrances, Special Abilities, Gear, Powers, etc..
  2. Every trait/item is searched for throughout all Item Compendiums in the selected Package (See NPC Importer Settings)
  3. If the triat/item is found in a Compendium then it is copied and updated to the Actor; If not found, then a new one will be created for the Actor only (no new compendium entry is created)

What's supported:


Supported Languages

Support is for both the UI and parsing of statblock

Please Note: I work mainly with English sources, and I do try to test with the supported languages, but, due to the few non-English stat-blocks I have and due to translation quirks, there will be more issus with the non-English. My Apologies for that :)

Adding More Languages: If you wish to add support for more languages, please don't hesitate to create a pull request or open an issue with the file attached.