#PbtA - v9 Testing!

1 messages · Page 1 of 1 (latest)

pale nova
#

⚠️ CAUTION! DANGER LIES AHEAD!

Hey everyone! If you'd like to test out the v9 compatible release of PbtA before it's made its way over to the official package listing, this is the place to be!

This release has had very little testing so far, so data loss is possible. Make sure to only install this if you've either A) backed up your world first or B) are only testing this on a new world used only for testing.

Some issues have already been identified. For a list of known issues, visit https://gitlab.com/asacolips-projects/foundry-mods/pbta/-/issues/61

Some key things to test:

  • Anything that you do in the system regularly.
  • Creating characters (including custom actor types)
  • Rolls, macros, conditions, and general sheet interactivity.
  • Changing the sheet configuration (e.g. adding new abilities or fields) and applying those changes to existing actors and tokens.

Manifest URL: https://gitlab.com/asacolips-projects/foundry-mods/pbta/-/raw/v9compat/system.json

Good luck, and thank you for your assistance in testing!

#

@celest edge @weak cipher ^

weak cipher
#

This is really minor, but hit it right away.
Deprecation warning from actor-sheet.js, game.data.version should be game.version

  if (isOwner) {
      /* Item Dragging */
      // Core handlers from foundry.js
      var handler;
      if (!isNewerVersion(game.data.version, "0.7")) {
        handler = ev => this._onDragItemStart(ev);
      }
pale nova
#

That whole section can actually go away; the system now has 9 as it's minimum version. Thanks for catching that 👍

weak cipher
#

Yeah, removing old compatibility code is really satisfying.

#

rolls.js is popping a warning because Roll.evaluate() is going to be async in V10.

 // Handle dice rolls.
    if (!PbtaUtility.isEmpty(roll)) {
      // Test if the roll is a formula.
      let validRoll = false;
      try {
        validRoll = await new Roll(roll.trim(), rollData).evaluate();
      } catch (error) {
        validRoll = false;
      }

You can get rid of the warning by making evaluate() into evaluate({async:false}) for now or test it with evaluate({async:true}) to see if it will need a refactor for V10 in the future.
You can ignore any or all of this, I'm just trying to be thorough. If you'd prefer I just look for breaking changes, I can do that instead...

#

Changes to the TOML update very nicely, that's a great feature I hadn't needed to use before.

pale nova
#

It shouldn't come up super frequently, but I tried to be as descriptive as I could be about what changes were going to be applied when using it. Some of them can be safely applied (adding new fields, or chaning numbers to text for instance), but some of them require clearing out the data of the old fields and rebuilding them. That's probably the feature I spent the most time on before the first alpha due to how critical it was to get right.

weak cipher
#

Yeah, it's nice. I tried a trivial description change as well as a Harm max change with no issues.

#

I assume this was unintentionally left in pbta.js

 async function _pbtaDirectoryTemplates(collection, event) {
  console.log(collection);
#

I seem to recall auto-completion in the Playbook field, but I'm not getting that now. No errors though.

pale nova
#

There should be autocompletion if you have playbook items in your world. I updated the code for that section based on what was in DW, but I don't think I've tested in PbtA again yet. I'll double check the code for that today.

weak cipher
#

Ah, that's it. It's just not pulling from my compendium. In-world playbooks work.

pale nova
#

Gotcha, I'll retest the compendium side of it then. The logic for compendiums is a bit different from what I did in DW since I don't have definite class names in PbtA.

weak cipher
#

Custom Roll Formula on Moves throw errors when trying to roll

#

Doesn't seem to matter what I put into the Roll Formula field

#

Huh, doesn't work under 0.8.9 either, so that's not a new bug I guess.

pale nova
weak cipher
#

Yep, that's exactly what I'm seeing in v8 and v9 both.

pale nova
#

I've also put together a v9 compatibility issue on Gitlab to start tracking this stuff (super helpful already by the way!), so the ✅ reactions mark which ones I've added to the Gitlab issue for later reference.

weak cipher
#

Yeah, I've pretty much run out of things I can think of to try. Seems to be pretty solid to me.

pale nova
#

Given that the roll bug is present in 0.8.9 as well, I'll put together a small release for that one as well so that the 08x folks aren't forced to upgrade before they're ready.

weak cipher
#

For the playbook issue, something is happening when you reduce the duplicates.
playbooks before:

#

playbooks after:

#

This is with no playbook items in world, only compendium playbooks.

pale nova
#

The goal behind that section is that if you have a matching playbook in your world, it should prefer that over the compendium version.

weak cipher
#

IF I create an in-world test playbook, that's the only one left after the reduction.

#

Right, I do the same type of thing in my systems as well.

pale nova
#

Good to know, I should be able to track down what's happening in that case.

weak cipher
#

I'll sort it out, just thinking out loud.

pale nova
#

MRs would also be welcome, but that's more hoops to jump through and such depending on whether or not you already have a fork.

weak cipher
#

I do have a fork, not as familiar with Gitlab though.

pale nova
#

Gotcha, and no worries/pressure on finding a fix either. It's more of just noting places I'll look if you do stumble across it while testing.

weak cipher
#

Found it.

#

When you create your list if in-world items here:

let playbooks = game.items.filter(item => item.type == 'playbook');

you're creating an array of Items.

#

When you add the compendium playbooks here:

 playbooks = playbooks.concat(items.map(i => i.data));

you're adding ItemData to the array.
Then when you reduce on item.data.name, the names are empty and all getting thrown out.

#

It should be:

playbooks = playbooks.concat(items);
#

Yep, works with that change.

pale nova
#

Hmm, I could have sworn it broke hard prior to when I added the map version. 🤔

#

It was previously items in 08x, but there may have been something else contributing to the errors I saw when making that adjustment for v9. I'll add your snippet in and retest it.

weak cipher
#

Note ItemPbta instead of ItemData

#

You could probably go either/or, but the mismatch in array contents is what's causing the problem.

#

From before the change:

#

Running let charPlaybookName = charPlaybook.data.name; on those ItemData array members gets you a null because you're one data level too deep.

pale nova
#

That'll do it for sure. Good sleuthing 🤘

weak cipher
#

Oops, I mean empty string. For some reason, name is correct, but data.name is empty.

#

Some days I like debugging better than writing. Very satisfying. 👍

#

That name/data.name may reflect some deeper bug, actually. That's really odd.

pale nova
#

Could be some holdovers from how I was accessing data in the 07x days. Definitely need to give a more thorough look over that whole section.

pale nova
weak cipher
#

That Document model switch just really broke some systems hard. I would imagine it was worse for complex systems like yours that are trying to allow for so much variability. My hacky messes just have to do one thing.

pale nova
#

It was a pretty involved update for all of my systems, but PbtA was definitely the most involved of them. The one thing that went in my favor though is that DW and PbtA share a lot of code, so once I work out API updates in either of them, it usually significantly simplifies what to look for/correct in the other.

weak cipher
#

Makes sense. Let me know if you come up with anything else you want to test or if you want me to go back over things once you've worked on the issues you've got so far.

magic owl
#

Very Minor as well: "Ask" move types are fixed, but the window does not resize based on its content

#

I made an extreme (and absurd) case, but in Urban Shadows where you have 8 labels, the last one barely fits

pale nova
#

That one should also be an 08x bug. I'll see if I can incorporate that into the final 08x release as well.

magic owl
#

the fix was specifically made for this version though, since Ask move used to be broken for 08x versions for non-character/npc actor type

#

(just in case you forgot 😉 )

pale nova
#

I've noted the bug on the v9 issue in either case so that it doesn't slip by.

pale nova
pale nova
#

Scratch that, forgot the playbook fix.