Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: #100

Open
1 task done
rprejean opened this issue Oct 6, 2023 · 2 comments
Open
1 task done

[Bug]: #100

rprejean opened this issue Oct 6, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@rprejean
Copy link

rprejean commented Oct 6, 2023

Expected Behavior

Export to PDF without error.

Current Behavior

Export to PDF. I have a strange error. Four out of six characters in the world exported without any issue using 5e Extended. The two I'm having problems with produce a mapping error that I am not able to figure out. Console below for one of them.

foundry.js:5099 Foundry VTT | Rendering SettingsConfig
foundry.js:5099 Foundry VTT | Rendering Pdfconfig
pdfsheet.js:337 PDF Sheet
pdfsheet.js:339 Actor Data: Actor5e {name: 'Dorgan', type: 'character', img: 'assets.forge-vtt.com/6312d0acb1ffdc87972ce5cf/Images/PC Images/Dorgan-Token.png';, system: CharacterData, #valid: true, …}
pdfsheet.js:341 PDF fields: {ClassLevel: Array(1), Background: Array(1), PlayerName: Array(1), CharacterName: Array(1), "Race ": Array(1), …}
pdfsheet.js:347 got mapping for PC
pdfsheet.js:361 Raw mapping: /* PDF: media.wizards.com/2016/dnd/downloads/5E_CharacterSheet_Fillable.pdf /[ / Page #1 */ { "pdf": "ClassLevel", "foundry": actor.data.items.filter(i => i.type === 'class').map(i => ${[i.name](http://i.name/)} ${i.system.levels}).join(' / ') }, { "pdf": "Background", "foundry": (actor.data.system.details.background ? actor.data.system.details.background : (actor.data.items.find((item)=>item.type==='background').name ? actor.data.items.find((item)=>item.type==='background').name : "") )}, { "pdf": "PlayerName", "foundry": Object.entries(actor.data.ownership).filter(entry => entry[1] === 3).map(entry => entry[0]).map(id => !game.users.get(id)?.isGM ? game.users.get(id)?.name : null).filter(x => x).join(", ") }, { "pdf": "CharacterName", "foundry": actor.data.name }, { "pdf": "Race", "foundry": actor.data.system.details.race }, { "pdf": "Alignment", "foundry": actor.data.system.details.alignment }, { "pdf": "XP", "foundry": actor.data.system.details.xp.value }, { "pdf": "Inspiration", "foundry": actor.data.system.attributes.inspiration ? "x" : "" }, { "pdf": "STR", "foundry": actor.data.system.abilities.str.value }, { "pdf": "ProfBonus", "foundry": actor.data.system.attributes.prof }, { "pdf": "AC", "foundry": actor.data.system.attributes.ac.value }, { "pdf": "Initiative", "foundry": actor.data.system.attributes.init.total }, { "pdf": "Speed", "foundry": (function() { const mo = actor.system.attributes.movement; const mt = Object.entries(game.dnd5e.config.movementTypes).map(e => e[0]); const ma = Object.entries(mo).filter(e => e[1] && mt.includes(e[0])); if (mo.walk && ma?.length === 1) { return ${ma[0][1]}${mo.units}${mo.hover ? "\n(hover)" : ""}; } else { return ma.map(m => ${m[0].substring(0,2)}:${m[1]}${mo.units}).join('\n').concat(mo.hover ? "\n(hover)" : ""); } })() }, { "pdf": "PersonalityTraits", "foundry": (function(h) { const d = document.createElement("div"); d.innerHTML = h; return d.textContent || d.innerText || ""; })(actor.data.system.details.trait) }, { "pdf": "STRmod", "foundry": actor.data.system.abilities.str.mod }, { "pdf": "ST Strength", "foundry": actor.data.system.abilities.str.save }, { "pdf": "DEX", "foundry": actor.data.system.abilities.dex.value }, { "pdf": "Ideals", "foundry": (function(h) { const d = document.createElement("div"); d.innerHTML = h; return d.textContent || d.innerText || ""; })(actor.data.system.details.ideal) }, { "pdf": "DEXmod", "foundry": actor.data.system.abilities.dex.mod }, { "pdf": "Bonds", "foundry": (function(h) { const d = document.createElement("div"); d.innerHTML = h; return d.textContent || d.innerText || ""; })(actor.data.system.details.bond) }, { "pdf": "CON", "foundry": actor.data.system.abilities.con.value }, { "pdf": "HDTotal", "foundry": actor.data.system.attributes.hd }, { "pdf": "Check Box 12", "foundry": actor.data.system.attributes.death.success }, { "pdf": "Check Box 13", "foundry": actor.data.system.attributes.death.success }, { "pdf": "Check Box 14", "foundry": actor.data.system.attributes.death.success }, { "pdf": "CONmod", "foundry": actor.data.system.abilities.con.mod }, { "pdf": "Check Box 15", "foundry": actor.data.system.attributes.death.failure }, { "pdf": "Check Box 16", "foundry": actor.data.system.attributes.death.failure }, { "pdf": "Check Box 17", "foundry": actor.data.system.attributes.death.failure }, { "pdf": "HD", "foundry": actor.data.system.attributes.hd }, { "pdf": "Flaws", "foundry": (function(h) { const d = document.createElement("div"); d.innerHTML = h; return d.textContent || d.innerText || ""; })(actor.data.system.details.flaw) }, { "pdf": "INT", "foundry": actor.data.system.abilities.int.value }, { "pdf": "ST Dexterity", "foundry": actor.data.system.abilities.dex.save }, { "pdf": "ST Constitution", "foundry": actor.data.system.abilities.con.save }, { "pdf": "ST Intelligence", "foundry": actor.data.system.abilities.int.save }, { "pdf": "ST Wisdom", "foundry": actor.data.system.abilities.wis.save }, { "pdf": "ST Charisma", "foundry": actor.data.system.abilities.cha.save }, { "pd
JSON for this character...

{
"name": "Dorgan",
"type": "character",
"img": "assets.forge-vtt.com/6312d0acb1ffdc87972ce5cf/Images/PC Images/Dorgan-Token.png",
"items": [
{
"_id": "td5rh1urfabgbz8e",
"name": "Druid",
"type": "class",
"img": "assets.forge-vtt.com/bazaar/core/icons/creatures/mammals/elk-moose-marked-green.webp",
"effects": [],
"folder": null,
"sort": 0,
"flags": {
"core": {
"sourceId": "Compendium.dnd5e.classes.ygVYgPbJkaH0tH1N"
}
},
"system": {
"description": {
"value": "

As a druid, you gain the following class features.

\n

Hit Points

\n

Hit Dice: 1d8 per druid level
Hit Points at 1st Level: 8 + your Constitution modifier
Hit Points at Higher Levels: 1d8 (or 5) + your Constitution modifier per druid level after 1st

\n

Proficiencies

\n

Armor: Light armor, medium armor, shields (druids will not wear armor or use shields made of metal)
Weapons: Clubs, daggers, darts, javelins, maces, quarterstaffs, scimitars, sickles, slings, spears
Tools: Herbalism kit
Saving Throws: Intelligence, Wisdom
Skills: Choose two from Arcana, Animal Handling, Insight, Medicine, Nature, Perception, Religion, and Survival

\n

Equipment

\n

You start with the following equipment, in addition to the equipment granted by your background:

\n
    \n
  • (a) a wooden shield or (b) any simple weapon
  • \n
  • (a) a scimitar or (b) any simple melee weapon
  • \n
  • Leather armor, an explorer's pack, and a druidic focus
  • \n
\n

Druid Advancement

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
LevelProficiency BonusFeatures
1st+2@compendium[dnd5e.classfeatures.LzJ5ayHt0OlSVGxi]{Druidic}, @compendium[dnd5e.classfeatures.i6tPm3FNK13Ftc9v]{Spellcasting}
2nd+2@compendium[dnd5e.classfeatures.swK0r5TOIxredxWS]{Wild Shape (Max CR ¼}, @compendium[dnd5e.classfeatures.u6Du2P9s81SWuGbi]{Druid Circle}
3rd+22nd Level Spell Slot
4th+2@compendium[dnd5e.classfeatures.swK0r5TOIxredxWS]{Wild Shape (Max CR ½}, @compendium[dnd5e.classfeatures.s0Cc2zcX0JzIgam5]{Ability Score Improvement}
5th+33rd Level Spell Slot
6th+3Druid Circle feature
7th+34th Level Spell Slot
8th+3@compendium[dnd5e.classfeatures.swK0r5TOIxredxWS]{Wild Shape (Max CR 1}, @compendium[dnd5e.classfeatures.s0Cc2zcX0JzIgam5]{Ability Score Improvement}
9th+45th Level Spell Slot
10th+4Druid Circle feature
11th+46th Level Spell Slot
12th+4@compendium[dnd5e.classfeatures.s0Cc2zcX0JzIgam5]{Ability Score Improvement}
13th+57th Level Spell Slot
14th+5Druid Circle feature
15th+58th Level Spell Slot
16th+5@compendium[dnd5e.classfeatures.s0Cc2zcX0JzIgam5]{Ability Score Improvement}
17th+69th Level Spell Slot
18th+6@compendium[dnd5e.classfeatures.cVDEQo0ow1WJT7Wl]{Timeless Body}, @compendium[dnd5e.classfeatures.xvgPu1O57DgXCM86]{Beast Spells}
19th+6@compendium[dnd5e.classfeatures.s0Cc2zcX0JzIgam5]{Ability Score Improvement}
20th+6@compendium[dnd5e.classfeatures.ip4bvmGoz3qkoqes]{Archdruid}
\n

Sacred Plants and Wood

\n

A druid holds certain plants to be sacred, particularly alder, ash, birch, elder, hazel, holly, juniper, mistletoe, oak, rowan, willow, and yew. Druids often use such plants as part of a spellcasting focus, incorporating lengths of oak or yew or sprigs of mistletoe.

\n

Similarly, a druid uses such woods to make other objects, such as weapons and shields. Yew is associated with death and rebirth, so weapon handles for scimitars or sickles might be fashioned from it. Ash is associated with life and oak with strength. These woods make excellent hafts or whole weapons, such as clubs or quarterstaffs, as well as shields. Alder is associated with air, and it might be used for thrown weapons, such as darts or javelins.

\n

Druids from regions that lack the plants described here have chosen ot

Steps to Reproduce

Followed the procedure and tested every 5e map option. The one that worked on the four other characters is 5e Extended.

Context

No response

Version

0.24.1

Foundry VTT Version

10

Operating System

Windows

Browser / App

Chrome

Game System

DnD5e 2.3.1

Modules Disabled

  • I can confirm that disabling all of my other modules doesn't fix this issue.
@rprejean rprejean added the bug Something isn't working label Oct 6, 2023
@gioppoluca
Copy link
Collaborator

Will you try to add a background to the PC that do not export and tell me if it solves the problem?

@gioppoluca gioppoluca assigned gioppoluca and unassigned arcanistzed Oct 8, 2023
@rprejean
Copy link
Author

rprejean commented Oct 8, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants