Git Product home page Git Product logo

ddb-importer's Introduction

D&D Beyond Importer

Latest Release Download Count Forge Installs Foundry Minimum Compatible Version Foundry Verified Compatible Version

Integrate your dndbeyond.com characters into Foundry Virtual Tabletop.

This module:

  • Import your DDB characters into Foundry, and sync changes back!
  • Import a characters extras such as Wildshapes or beast companions.
  • Import spells and items.
  • Import Monsters and NPCs.
  • Patreon supporters can sync limited character changes back to DDB.

In addition you can:

  • Use the built in dictionary to get a large icon coverage during import.
  • Use supplied SRD items where available.
  • Choose to use matching SRD icons.
  • Attempt to auto-generate effects for items.

Video Tutorial

Watch a video to get started here!.

Examples

Import Things!

Update back to D&DBeyond

Exclude Items from Update

Generate Roll Tables

Encounter Muncher

Compendium Folders Module Support

What's the catch?

Calls to dndbeyond are proxied to provide authentication and to bypass CORS checks.

The proxy calls dndbeyond with your credentials to fetch your data.

To get all your spells and do bulk importing you need to set the Cobalt Cookie setting to the value of your D&DBeyond CobaltSession cookie. See my helper Chrome extension to help.

Do NOT give your cookie to other people, this is like handing out a password to your dndbeyond account.

We do not store your cobalt cookie on the server.

To logout/invalidate these credentials log out of your D&DBeyond Session.

If you wish to host your own proxy, please see ddb-proxy, help is not available for this mode, and not all functionality is available.

Support

Where can you support me? See my Patreon.

You can log bugs here, or mention them in the Discord channel.

Pre-requisites and recommendations

There are NO pre-requisites for DDB Importer.

Below are some recommended modules.

I'd strongly recommend installing:

If you want to add spell effects, and high levels of automation you will need, (this is not recommended if you're using Foundry for the first time):

Several macros that impact tokens rely on:

For super high automation (this is not recommended if you're using Foundry for the first time):

  • Chris's Premades includes a lot of more advanced effects, but has a lot of module dependencies.

For prettiness add:

SRD Import Notes

Some detail will be lost:

  • Any auto configuration of Magic Item spells
  • Any custom damage modifications from things like Fighting Styles and Improved Divine Smite

Some details are updated, if applicable:

  • number of uses
  • quantity of items
  • attuned status
  • equipped status
  • resource tracking
  • spell preparation status
  • proficiency

Configuration

Avatar upload directory

Sets the icon directory where you are storing your avatar image uploads. It's relative to the Foundry /Data directory, please do not add a leading or trailing slash to this path.

Examples:

  • img/uploads references to [Foundry]/Data/img/uploads
  • uploads references to [Foundry]/Data/uploads
  • `` references to [Foundry]/Data - not recommended

FAQ

See FAQ!

Attributions

Some assets in this module are kindly provided by JB2A and are licensed by Attribution-NonCommercial-ShareAlike 4.0 International. You can find them under img/jb2a

Check them out at https://jb2a.com they have a free and patreon supported Foundry modules providing wonderful animations and assets for a variety of situations.

You can learn more about their Foundry modules here

ddb-importer's People

Contributors

amlozano1 avatar bekriebel avatar captain-yoshi avatar chuckfoo avatar daggersoath avatar dependabot[bot] avatar devnagui avatar ivangirderboot avatar j14s avatar jack-roli avatar jacksonbockus avatar kaelad02 avatar kid2407 avatar laquasicinque avatar m42e avatar macdhollister avatar mmacgibbon avatar mrprimate avatar nat212 avatar steven-beasley avatar terrox avatar thegiddylimit avatar varriount avatar xdy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ddb-importer's Issues

Magic Item Spell Import

Reported problem:

The problem is that spells are imported without the compendium information they came from (pack = ""). So magic items fails to retrieve them.

it would be enough to insert pack = "dnd5e.spells"
but also id & img are empty
and the name of the spell it does not coincide with that of the compendium...

CleanShot_2020-11-12_at_08 54 26

Feature request: import ddb customizations

Hi @MrPrimate, and thanks for doing this - Foundry needs a complete and actively maintained content importer, I hope this project can become that.

Are you planning to support ddb spell or weapon customizations? Would be handy for keeping source of truth 100% in ddb

Thanks,

High Memory consumption

Hey,

I recently switched from the old importer to this one and have to say it works like a charm.
There is only one big downside:

The memory consumption when munching spells or items kills the tab it runs in.

Server system:

  • Foundry VTT 0.7.7
  • DnD5e 1.1.1

Client:

  • Firefox 82.0.3
  • Windows 10

The tab goes up to like 10GB RAM consumption and becomes almost nonresponsive.
I have to kill the tab via the task manager most of the time.
Tried it with only the ddb importer and no other addons, didn't make a difference.
I would guess there is a problem with how the data is loaded and how firefox cleans up the tabs

Importer overwrites local modifications

Even with "Import new items only" option enabled, modifications made in Foundry get overwritten. Tested with both spells and weapons, Foundry 0.7.5 and ddb-importer 0.0.6

Thanks,

Suggestion: Add ActiveEffects to imported items.

When importing items it would be possible to add some of the items features to the item as active effects which transfer to the actor on equip.

For example, if a magic item provides you with a new language, an ActiveEffect with the attribute key data.traits.languages.value be added and add that specific language.

The same mechanism could be applied to spell bonuses and DC and any such feature which could easily be translated from DDB to FVTT.

Folder Creation

On your configuration, where you set the path for images, I used the button to create a new folder. It looks like it doesn't set the right permissions on the hosting machine local folder when using that. I went to import a character and got write error messages for adding icons when importing.

I went to my hosting machine, deleted the directory created and recreated it while logged into the machine, and restarted Foundry. After that I did another import and this time it succeeded.

Magic items imported from the DAE-SRD are unequipped during import

When importing a character from DDB, if you have the "Use Dynamic Active Effects Compendium for matching items (requires DAE and SRD modules" option checked, some magic ttems are automatically unequipped, even though they might be set as "equipped" in DDB.

I believe this is happening because of the data inside the DAE-SRD module. Several items have the data.equipped set to false. I'm guessing this overrides what is seen in DDB.

Is there any way for the override to be the other way around? Whatever is written in DDB should override the default data inside DAR-SRD.

Thanks!!!

DAE: Unarmored defence monk/barbarian

  1. Import custom proficiencies
  2. Map unarmored defense to "Unarmored Defense (Monk)" and "Unarmored Defense (Barbarian)" respectively. (Cuz theyre called that in dae srd and i assume you add them by name)

Bundled manifest does not allow updates

The module.zip release artifact which is downloaded on installation includes a module.json where the manifest url is locked with that version instead of being a url pointed at the latest manifest.

The manifest should instead point to https://github.com/mrprimate/ddb-importer/releases/download/latest/module.json.

You have the correct url in your "module.json" release artifact, but it is not correct in the module.zip artifacts.

Here's a rather robust article on the wiki with some more details if you're curious.

Bug: Movement in dnd5e 0.9.9

From the notes:

Movement speed of an actor has been overhauled and migrated from using free-form text fields for "primary movement" and "special movement" to instead tracking numeric values for special types of movement including walk, fly, climb, swim, and burrow. Additionally it is possible to flag whether a creature hovers as part of their "walking" speed. This data is now stored as data.attributes.movement in the 5e data model and replaces the now deprecated data.attributes.speed object.

Character Importer not configuring Proficient attribute correctly.

Foundry: 0.7.7
DnDe5: 1.2.0
ddb-importer: 0.0.12

Recently I've noticed that my character's attack and damage rolls weren't calculating properly. It looks like when importing, the weapons that are added to the characters do not apply the Proficient attribute.

The weapon on the left is after importing from a clean character sheet, the weapon on the right is if I manually add it from the compendium.
Screen Shot 2021-01-04 at 6 39 43 PM

Error parsing Character: TypeError: Cannot read property 'concat' of undefined

FoundryVTT 0.7.9
DDB-Importer 0.2.1
DDB-Importer-Chrome 0.0.2 (cookie configured)

https://character-service.dndbeyond.com/character/v4/character/21972349

Three other characters imported successfully, but this one just will not come over. I can't find anything in specific to where the issue is on the character sheet, and I've tried turning on Debug logging to provide something more, but there is no output in the console, or in any log file I can find for DDB Importer.

Load Tokens from Folder

Allow a match if a token exists in a folder already.

This might say search a folder for an existing token name.

Error parsing Character: Error: Required field BrightSight not present in PrototypeToken

Trying to add one of my players D&D Beyond characters to Foundry with the importer and I got this error.

image

Character: https://ddb.ac/characters/23966661/dSq2g0
I thought it might have had to do with the Players Truesight however I removed the truesight waited about 20 min and still got the same error, so I added it back.
I can add all the other characters in the campaign with no issue but it's just this one player character I am unable to add. I've tried going through the token to find any brightSight setting but I can't find one.

Better error handling of unset data directory

Currently, if you do an import without setting the data directory in settings, you'll get this error in the UI:

image

You'll also get a slightly better error saying a directory doesn't exist I believe, a temporary one at the top of the window.

This seems to cause people confusion; I answered someone's question about it here:

https://www.reddit.com/r/FoundryVTT/comments/k5f88f/dd_beyond_importer_error_type_error_cannot_read/geg5hdv/?context=3

You can also see in a recent YouTube video, the speaker calls this error out with the fix for it https://www.youtube.com/watch?v=9PjPkugkF1o

It would be nice if there was explicit error handling for it, with some clear error message.

Allow own target compendiums for import

Is it possible to make ddb-importer give you an option to use Items/Feats/Spells from my own compendiums as opposed to the DAE-SRD or SRD compendiums? I feel like as I add more and more non-SRD items that use DAE I'd want it to just use the ones I made

Error when importing character: TypeError: Cannot read property 'dndbeyond' of undefined

First of all, thanks for this awesome tool. Importing other characters went flawlessly, but I'm running into this error when importing a warlock (not sure if this is relevant). I'm also seeing a lot of "The specified value "+0" cannot be parsed, or is out of range." in the console.

I get this error after clicking the 'Start Import' button:

image

It imports the attributes and biography just fine, but the spell list remains empty.

This is the character I am trying to import: https://www.dndbeyond.com/characters/1350556

Feature: Diamond Soul Special Trait

From the v0.9.9 dnd5e system release notes:

Added a new special Actor trait for "Diamond Soul" which will allow Monk characters to automatically add proficiency to all saving throws (including Death Saves).

Shield Spell incorrectly imported

When importing a character with a shield in their equipment and using the DAE Import option, the Shield Spell gets imported rather than the shield Item

Paladin's Divine Sense imports wrong value

When importing a paladin character, the number of uses of Divine Sense should be 1+CHA modifier. In the case of my specific character, this should be a total of 4 uses, but it imports as 3 total. I believe it is only factoring in the CHA modifier, which is +3, and not the additional +1. VTTAssets also has this issue if that means anything.

Resource consumption canbe confusing

Issue from discord:

for active abilities with a limited amount of uses, the number of uses left should only be tracked in the item itself through the "Limited Uses" field. Currently there is also a resource tracker in the attributes page, which can get out of sync from the "Limited Uses" in the item itself, which can lead to confusion
for now, I'm deleting the resource attributes manually every time after I import, but it would be nice if I could just completely opt out of it

That doesn’t work for things like channel divinity or sorcery points though where it’s a shared pool between multiple abilities.

then for those the feature should not use Limited Uses, but Resource Consumption
I'm just saying that there should be a single source of truth
for the remaining uses/points

[BUG] Unable to parse option class info

Hey there!

So I've been moving to use this module instead of the original from VTTA to solve the following issue, but it still exists.

When importing this character, I get the following stack trace in my console.

  log @ logger.js:70
  error @ logger.js:94
  parseMatch @ templateStrings.js:84
  (anonymous) @ templateStrings.js:209
  parseTemplateString @ templateStrings.js:205
  getDescription @ actions.js:138
  (anonymous) @ actions.js:393
  getOtherActions @ actions.js:386
  parseActions @ actions.js:414
  parseJson @ character.js:22
  (anonymous) @ import.js:156
  Promise.then (async)    
  (anonymous) @ import.js:149
  getCharacterData @ import.js:135
  (anonymous) @ import.js:493
  dispatch @ jquery.min.js:2
  v.handle @ jquery.min.js:2

In this case, the import does eventually finish, and seems to have all the inventory, spells, etc, however this error still happens the same as in the old module. I have tried using both the URL linked to above, as well as the URL from the character-service and they both have the same error.

Again, it doesn't seem to actually affect anything, but I also haven't looked deep enough to truly figure that out yet.

Looking at the source of where the error happens, looks like it's related to not finding a class/subclass.

 if (result.includes("classlevel")) {
    const cls = utils.findClassByFeatureId(ddb, feature.componentId);
    if (cls) {
      result = result.replace("classlevel", cls.level);
    } else {
      // still not found a cls? could be an option
      const classOption = [ddb.character.options.race, ddb.character.options.class, ddb.character.options.feat]
        .flat()
        .find((option) => option.definition.id === feature.componentId);
      if (!classOption) {
        logger.error("Unable to parse option class info, please log a bug report");
      } else {
        const optionCls = utils.findClassByFeatureId(ddb, classOption.componentId);
        if (optionCls) {
          result = result.replace("classlevel", optionCls.level);
        } else {
          logger.error("Unable to parse option class info, please log a bug report");
        }
      }
    }
  }

This character is using the 'new' subclass for Circle of the Spores from Tasha's, so perhaps it has something to do with that subclass not existing in the data I have in my system.

Again, things do seem to have been imported correctly eventually, but just wanted to bring this to your attention, as the log specifically tells me to file a bug report :)

Dual Wield AC bons not parsed

Bonuses to AC from Dual Wielder feat is not being applied when character has a weapon marked as "dual wield" in the customization properties

Feature: Brutal Critical and Savage Attacks in dnd v0.9.9

From the release notes:

Deprecated the Savage Attacks special trait which was previously (incorrectly) applied for all damage rolls and replace it with a more generic Melee Critical Damage Dice flag which can be flexibly used to add a configurable number of bonus damage dice to critical hits with melee weapons. This will work for both Savage Attacks as well as Brutal Critical or other similar features. For example, a Level 18 Orc Barbarian would set the value of this flag to 4 - rolling 4 additional weapon dice when scoring a critical hit with a melee weapon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.