reyzor1991 / foundry-vtt-pf2e-reaction

Module for the foundry vtt pf2e system
Apache License 2.0
4 stars 4 forks source link

v0.3.1 with pf2e 6.0.3 and foundry v12.327 recall knowledge still non-functional #38

Open azrazalea opened 5 months ago

azrazalea commented 5 months ago

Describe the bug The recall knowledge buttons are not added correctly to NPC Sheets, nor are the default ones removed.

To Reproduce

Expected behavior The recall knowledge buttons to be added to NPC sheets and, if applicable, the default ones to be removed.

Screenshots 2024-06-18 01_52_25-Foundry Virtual Tabletop 2024-06-18 01_53_26-Foundry Virtual Tabletop 2024-06-18 01_53_38-Foundry Virtual Tabletop 2024-06-18 01_56_05-Foundry Virtual Tabletop

reyzor1991 commented 5 months ago

Please check console, maybe some error exists. Because as I see options like hide default and add lore no work

Peach774 commented 2 months ago

This seems to be happening with the newest version of the system 6.4.0, and mine worked previously

reyzor1991 commented 2 months ago

Settings is on ? Any errors in console?

Peach774 commented 2 months ago

Settings is on ? Any errors in console?

Setting is on - no console errors.

Peach774 commented 2 months ago

Okay further testing shows this is a problem specifically with pf2e bestiary tracker. I'm gonna see if it can be fixed on their end first.

Peach774 commented 2 months ago

Okay further further testing - I think its a weird conflict with how each thing is looking at what. It seems like PF2e Reaction Checker is looking at actors, not the compendium version of an NPC, but bestiary tracker is looking at the compendium. So for example, your recall knowledge edits show up on the actor sheet of a monster, but not the compendium sheet, which probably shouldnt be the case (they should be the same imo), but bestiary tracking is looking at the compendium thing which confuses me. image

reyzor1991 commented 2 months ago

This module read info of actor. Actor is editable and could have difference with compendium

WBHarry commented 2 months ago

(PF2E Bestiary Tracking dev) Heya,

It's not really an error on either module. I am simply rendering the base actor's sheet, not the sheet of a token's synthetic actor. So the rendering logic of this module isn't performed, as expected.

if (game.user?.isGM && isNPC(sheet.actor) && sheet.token && Settings.recallKnowledge) { // sheet.token = null in this case
reyzor1991 commented 2 months ago

sheet.token - null, only if you open actor sheet from compendium

this module works with "real" actor, but I could delete this check and also show same for compendium

WBHarry commented 2 months ago

What I'm doing on my end is that I have the actor's UUID, fetching the actor and then rendering the sheet. 1) I'm fetching an actor from within the world: game.actors.find(actor => actor.uuid === <savedUUID>). 2) Render actor.sheet.render(true). In this situation, sheet.token = null

Removing that check should allow it to work in the bestiary if that's a possibility for you. If you want to specificly avoid actors in compendiums you could use a check on actor.pack and avoid those 🙃