XaiJu
kakaroto
kakaroto

patreon


Another R20Converter update

Hi everyone,

I'm releasing another small update to R20converter.

Other than a few small bugfixes that went into this since the 0.9 release from last month, (which I had updated in the original post a couple of times), this one has a fix for a more recent bug which was reported to me: the "export actor items" option was broken.

So now, you can export your actor items and it should work, yeay.

The most important thing about this release though (enough to warrant its own post) is a new feature which allows you to specify the game system you want to convert the game into.

It's currently very basic, it of course doesn't convert the character sheets to the non-dnd5e system (I have no plans on doing that) but it will make sure the world is set to the current system so it can be launched right away without having to modify the world.json, and also, the actors will not be broken and unusable. The actors will exist with the proper name, avatar and prototype token, though their sheets will be blank.

The feature I want to eventually add for non-dnd5e users is to try and match the actor names in the compendium of monsters/bestiaries and import the stats from the compendium directly.

I'm having some issues with my Mac machine so I'm unable at this time to build the release for Mac. As soon as I'm able to, I'll upload the file for that, in the meantime, I've attached here the older 0.9.3 release for Mac.

I was recently asked about the macro I use to fix broken actors for non-dnd5e games, which I mentioned in my previous post. That macro was available on my Discord server, in the #r20converter channel as a pinned message. Since it may be of interest to others, and not everyone uses discord, here it is. Note that you do not need to run this with the new version I release today, and this only applies for those with broken actors who manually changed the converted world to use a non-dnd5e system.

const folder = game.folders.entities.find(f => f.name === "Actor Bios");
for (let actor of game.actors.entities) {
  const bio = actor.data.data.details.biography.value;
  if (!bio) continue;
  await JournalEntry.create({name: actor.name, content: bio, folder: folder.id})
const cleanActors = [];
const actors = [];
for (let actor of game.actors.entities) {
  const newData = duplicate(game.system.template.Actor[actor.data.type]);
  const templates = game.system.template.Actor[actor.data.type].templates || [];
  templates.forEach(template => mergeObject(newData, game.system.template.Actor.templates[template]));
   delete newData.templates;   cleanActors.push({_id: actor.id, items: [], "-=data": null});
  actors.push({_id: actor.id, data: newData});
}
await Actor.update(cleanActors);
await Actor.update(actors);
console.log("Finished"); 


Enjoy!

KaKaRoTo

Another R20Converter update

Comments

EDIT: nevermind...I see form the first post its the usual swap out for the correct sheet manually. :) the 2nd script above (last one)...produces this error with pf2e: Uncaught TypeError: Cannot use 'in' operator to search for 'traits' in undefined at PF2ECharacter.prepareDerivedData (main.bundle.js:1) at PF2ECharacter.prepareDerivedData (main.bundle.js:1) at PF2ECharacter.prepareData (foundry.js:30700) at PF2ECharacter._onUpdate (foundry.js:31039) at foundry.js:29629 at Array.map () at Function._handleUpdate (foundry.js:29622) at Function.update (foundry.js:29603) at async :10

Skrinch

I'm handling that very soon. Most likely this week or the next. I'm not sure though why the dnd5e system itself doesn't migrate the speeds correctly when it updates itself.

Youness Alaoui

Is there any word on fixing the movement issue, where converted monsters (5e) don't have their speed converted properly, going by default to 30ft walk?

Ian Wallace


More Creators