Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

MPMB to FoundryVTT

Easily move your D&D characters to FoundryVTT · By BlackDragonBE

Different Conversion Error

A topic by RJBPrimal created Apr 11, 2023 Views: 279 Replies: 8
Viewing posts 1 to 7

Hi @blackdragonbe, Getting a new error, as linked below.

Bug description: Index and length must refer to a location within the string. (Parameter 'length')

Application version: 1.1.4

PDF version: v13.1.5+230403

Foundry D&D 5e system version: 2.1.5

XFDF link: https://pastebin.com/vWXvqNzf

MPMB to FoundryVTT Actor Log: https://pastebin.com/LMBeYa7J

Can this be looked at when you can? Cheers.

Hi! Thanks for reporting this bug, I'll take a look and try to resolve the issue as fast as possible.

I found a bug in my subclass parsing code causing this error. I also bumped into some other issues, which I'll address as well. Once I got a working, I'll give you the working Actor JSON for Graven. After that I'll publish a new bugfix release ASAP. Thanks for your patience!

Here's the JSON for Graven: https://pastebin.com/bup18Te

Unfortunately, I haven't been able to fix all issues I've found just yet, so I've had to fix the output by hand. The export from the converter works just fine now, but Foundry doesn't accept the JSON.  There's something strange going on with the way the new dnd5e system in Foundry processes tool items like "Smith's Tools" for example. It expects some peculiar values that aren't used in other places...

At any rate, I'll get to the bottom of it and I'll let you know when I found a permanent solution.

I was able to create a solution for the tool type items. I'll spare you the technical details, but it involved having to have to introduce a dynamic data type for item proficiency that can be true, false, and any number. The fix for tool items will be included in v1.1.5, which I'm planning to release soon.

(1 edit)

Not sure if it's an ID10T error or some such. In importing my json files, it does not seem to import race, house ruled changes or custom wild shape forms. If its a matter of converting the relevant house rules to foundry compatible, could you advise if this is the case?

(1 edit)

Hi! I'm guessing all of this is homebrew content?

  • The race name itself should be imported no matter what, the converter reads the RACE field at the top of the first page 
  • Racial traits are read from the RACIAL TRAITS text of the second page. The format is as follows:
RACE NAME (+X Ability, +X Ability)
TRAIT NAME: TRAIT DESCRIPTION
TRAIT NAME: TRAIT DESCRIPTION

For example:

Bugbear (+2 Strength, +1 Dexterity)
Powerful Build: I count as one size larger when determining my carrying capacity and the weight I can push, drag, or lift.
Long-Limbed: I have an additional 5 feet reach with melee attacks that I make on my turn.
Surprise Attack: If I hit a surprised creature on my first turn in combat, that attack deals an extra 2d6 damage. I can do this only once per combat.

The race name and every trait with its description goes on a new line.

  • For other house rule changes, it highly depends on what exactly. Class features for example need to be added to the CLASS FEATURES text on the second page. Those are in this format:
Druid (Circle of the Moon), level 5:
◆ Druidic (Druid 1, PHB 66)
   I know Druidic; Hidden messages with it can only be understood by who know Druidic
◆ Spellcasting (Druid 1, PHB 66) [3 cantrips known]
   I can cast prepared druid cantrips/spells, using Wisdom as my spellcasting ability
   I can use a druidic focus as a spellcasting focus for my druid spells
   I can cast my prepared druid spells as rituals if they have the ritual tag

Those ◆ symbols are very important to mark where a feature begins. All text on the lines below that are the feature description.

  • The converter doesn't support wild shapes at this time as I'm not sure how to handle them. One way could be creating a separate actor for every wild shape creature, but I haven't looked into it yet due to the increased complexity. For now, your best bet is to create the custom wild shape creatures in Foundry and then dragging the beast onto your character sheet to perform the wild shape.

Hello @BlackDragonBE. Sorry for the late reply, I've been busy with non-D&D things, and have been unable to game since this discussion, due to everyone in my gaming group being busy.

Yeah, that sounds like D&D! No worries, let me know if you encounter any issues when you get the chance to use the converter.

moved this topic to Issues (closed)