Open dbo-po opened 11 months ago
Can confirm, same issue here, only the ataendler mapping exports correctly.
I can provide the json of one of sheets that fails to export if it can help.
0.24.9
11.315
DnD5e 2.4.1
I can provide the json of one of sheets that fails to export if it can help.
Here it is: fvtt-Actor-jebeddo-dei-mari-Ixby2TiGJNDB3KBu.json
Like I said in other posts, the workaround is simple, delete any extra language. If you only leave "common" it works. I don't know anything how to fix the issue on the code.. otherwise I would have done myself; I found out about the workaround after a little testing weeks ago!
The problem is the languages is not a straight map but an object, so line " a = @ system.traits.languages.value.map(x => game.dnd5e.config.languages[x]).first();" wont work. It shold be rewritten ro recoursive search for getting obj[x] if it is string or dive deeper for f(obj[x].children).
UPD. Managed to get it work for 'dnd5eV11extended'.
replaced
a = @ system.traits.languages.value.map(x => game.dnd5e.config.languages[x]).first();
by
function findValRecursively(m, x)
{
for(let k in m)
{
if(k == x)
return m[k];
if(m[k] instanceof Object){
let res = findValRecursively(m[k].children, x);
if (res)
return res;
}
}
}
a = @ system.traits.languages.value.map(x => findValRecursively(game.dnd5e.config.languages,x)).first();
Not sure if it is a good way but it works for me
Expected Behavior
I select the mapping, click on expert, select in mapping mentioned PDF => get filled PDF
Current Behavior
If i try to export my DnD Character, the most of the mappings bring the error The only DnD Mapping which works is the mapping for "charakterbogen_ataendler_v2.8.1.pdf".
Log:
Steps to Reproduce
1) go to settings 2) set Mapping to a DnD Sheept except the ataendler 3) save 4) download PDF which is mentioned in the mapping 5) open DnD player Char 6) Export to PDF 7) select downloaded pdf 8) -> Error
Context
No response
Version
0.24.9
Foundry VTT Version
11.315
Operating System
Windows 10
Browser / App
Firefox
Game System
DnD 5e
Modules Disabled