Closed MarkPearce closed 5 months ago
Hey, no pointing at me!
Can you show what you tried and how it failed?
Haha that’s what you get for helping newbs! ;) It was also a good summary of the issue. Yea I’ll upload some failures. (And code that works in other systems)
On Sat 23. Mar 2024 at 23:36, Drental @.***> wrote:
Hey, no pointing at me!
Can you show what you tried and how it failed?
— Reply to this email directly, view it on GitHub https://github.com/foundryvtt/pf2e/issues/14282#issuecomment-2016620603, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVHG6QA7CB3IGUPIDZINMLYZX7VPAVCNFSM6AAAAABFE7LODSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGYZDANRQGM . You are receiving this because you authored the thread.Message ID: @.***>
Screen shot of the current state in not-pathfinder2e. Scum and Villainy in this case.
Here is the repo if anyone wants to take a look. https://github.com/MarkPearce/ore-companies I have some conditional logic there to check for pathfinder and try workarounds.
A few folks on the discord channel been suggesting ways to fix it.
I've tried:
error with extending ActorPF2e (currently in code) by getting the prototype of an existing actor. (thanks to Idle for the help!)
foundry.js:753 TypeError: Failed data preparation for Actor.TxTCzNXRxDgK7KNO. Cannot set properties of undefined (setting 'flanking') at CompanyActor.prepareBaseData (pf2e.mjs:1649:53368) at CompanyActor.prepareData (foundry.js:14209:12) at CompanyActor.prepareData (pf2e.mjs:1649:52446) at CompanyActor._safePrepareData (foundry.js:14187:14) at Game.initializeDocuments (foundry.js:8796:18) at Game.setupGame (foundry.js:8706:10) at async Game._initializeGameView (foundry.js:9990:5)
This looks like a flag for pf2eactors that determine if they are part of flanking system or not, not needed for module sub types.
error when trying to extend Actor
disabling prepdata methods.
foundry.js:753 TypeError: Failed to render Sidebar tab actors. Cannot read properties of undefined (reading 'level')
Anyone more clever than I have suggested workaround?
Personally I kinda want to wait till v12 before taking a look at this, given its very under the hood and those receive upheavel between major versions. Its very likely we'll have to do something to support it.
If anything breaks, please feel free to report so that this behavior can be finetuned.
v11 introduced a way for modules to create their own document sub types. https://foundryvtt.com/article/module-sub-types/
https://discord.com/channels/880968862240239708/880969304365994034/1220904695854399488 (drentalBot) "The pf2e system doesn't use one actor class, but one class per actor type and has a Proxy setup to actually get those classes for NP,ActorPf2e, FamilairActorPf2e, etc. So when you add a new type of actor you also have to supply a new actor class and register it in CONFIG.PF2E.Actor.documentClasses[type]"
but that proves to be problematic.
I've only tried it with Actors, but if there are other documentTypes that behave the same could be more prevalent.