Closed drowzero0 closed 3 years ago
addition: rolling the old actor where BT is still BODY drops an error: rolling in the new actor does not create any error. same goes for the wrongly as BODY marked skills which should run on EMP as a result the old actors cant roll those affected skills from the sheet since no correct stat gets counted in: (Top is new actor, below old one)
Ah okay! That is a weird bug. Let me hand you a fix that should be a little better and should sort both issues for your old actors:
let updateData = {};
["HumanPerception","Interview","Leadership","Perform","PersuasionFastTalk","Seduction","Social"].forEach(skillName => updateData[`data.skills.${skillName}.stat`] = "emp");
["StrengthFeat","Swimming", "Endurance"].forEach(skillName => updateData[`data.skills.${skillName}.stat`] = "bt");
let actor = game.actors.getName("Boris");
actor.update(updateData);
I only have custom migration for actors' skills specifically, but I don't think that got properly triggered.
your Quickfix re-rendered the Actorsheet for Boris and now it gets shown correctly and is rollable again. do i have to run this for every single character or is it possible to run this for all actor sheets at once? thanks.
your Quickfix re-rendered the Actorsheet for Boris and now it gets shown correctly and is rollable again. do i have to run this for every single character or is it possible to run this for all actor sheets at once? thanks.
You likely won't need to roll quickfixes for every update anymore even if automatic migration doesn't work (I'm not sure if it does, at the moment): I've made the system-specific migration logic accessible in the most recent commit - just call game.cyberpunk.migrateWorld()
in the console.
That being said, I don't think it takes into account the emp skills being changed to body like in this bug, because it's a bug I haven't gotten to reproduce on my end yet. If you want to do that quickfix for every actor in one go, here's an updated snippet:
let updateData = {};
["HumanPerception","Interview","Leadership","Perform","PersuasionFastTalk","Seduction","Social"].forEach(skillName => updateData[`data.skills.${skillName}.stat`] = "emp");
["StrengthFeat","Swimming", "Endurance"].forEach(skillName => updateData[`data.skills.${skillName}.stat`] = "bt");
game.actors.forEach(actor => actor.update(updateData));
Thanks, thats it for this case.
Awesome. I'll close this then and have an overarching issue for if automatic migration doesn't work in general: https://github.com/OctarineSourcerer/cyberpunk2020-foundry/issues/47
as mentioned before, after changing from dev 1.0.2 to dev 1.0.3 i got a message that every token and actor got updated: no errors got shown, a login was possibel the world was startable.
in the charactersheet i noticed some strange STAT.skill dependencies as shown in the screen below. i made the screenshot AFTER running the console fix: let actor = game.actors.get("actor_name"); actor.skills.skillName.stat = "attr"; left side the existing actor, right side the newly created Actor after updating to 1.0.3 i marked the diffrences, also those which were expected like BODY to BT