itteerde / fvttconfig

Configuration for our Foundry VTT environments
2 stars 1 forks source link

Feature Item Organization Categories #233

Closed PhDaveMil closed 3 months ago

PhDaveMil commented 5 months ago

While new characters imported via Beyond properly organize features into "class," "race," and "other," older imported character mass organize everything under "other." This must be fixed, but might need to be fixed on my end by rebuilding characters. Please, check if there is an easier way to fix the issue before I spend the time rebuilding characters and then advise me as to the best/easiest fix. We should fix this problem by the time characters are hitting their next level (4 for RotFM), for if I have to rebuild characters, I will do so when I next level the party.

itteerde commented 5 months ago
let guy = game.actors.find(a=>a.name.startsWith("Gorun"));
let gial = game.actors.find(a=>a.name.startsWith("Gial"));
guy.items.filter(i=>i.type==="feat");
gial.items.filter(i=>i.type==="feat");

as expected.

guy.items.filter(i=>i.type==="feat").map(i=>({name:i.name,type:i.system.type.value}));

doesn't seem to be the problem, not more information in the class's features than with gial.

itteerde commented 5 months ago

imported a new Gial

let ar = gial.items.find(i=>i.name="Arcane Recovery");
let ar2 = gial2.items.find(i=>i.name="Arcane Recovery");
foundry.utils.diffObject(ar,ar2);

seemingly the diff does nto do flags (which makes the dnd5e flag usage questionable by itself). The origin is in the flags, just don't understand the format right away -- let alone how to do the fixing heuristics.

itteerde commented 5 months ago
itteerde commented 5 months ago

oh my: https://github.com/foundryvtt/dnd5e/issues/2837 https://discord.com/channels/170995199584108546/971797877359775824/971797912180899901 (B)

itteerde commented 5 months ago

Need to discuss @PhDaveMil

itteerde commented 5 months ago
const x = actor.items.getName("Your Feature's Name");
const y = actor.items.getName("Class/Subclass/Race/Background Name");
await x.setFlag("dnd5e", "advancementOrigin", y.id);

https://discord.com/channels/170995199584108546/670336046164213761/1224852248782442516

itteerde commented 3 months ago

might need to use the ID as GM

const actor = game.actors.get("OjnPpDlwJNVcrNWH"); //id
const x = actor.items.getName("Legacy of Stygia");
const y = actor.items.getName("Levistus Tiefling (Legacy)");
await x.setFlag("dnd5e", "advancementOrigin", y.id);