SalieriC / SWIM

A collection of macros for the SWADE system on Foundry with a focus on immersion (i.e. by using sound effects)
GNU General Public License v3.0
10 stars 12 forks source link

Shapechange Macro - Cannot delete property 'wildcard' of #<Object> #143

Closed ennerre25 closed 6 months ago

ennerre25 commented 6 months ago

Coming back after a couple months, I get the following error when using the Shapechange macro in version 3.3.3. Going to try to rollback to see if it makes any difference. Edit: It works normally in version 3.2.5.

commons.js:5305 Uncaught (in promise) TypeError: Cannot delete property 'wildcard' of # at SchemaField._cleanType (commons.js:5305:41) at SchemaField.clean (commons.js:4981:19) at CharacterData.cleanData (commons.js:6949:26) at CharacterData._initializeSource (commons.js:6936:31) at new DataModel (commons.js:6812:21) at new TypeDataModel (commons.js:7452:7) at new CommonActorData (common.ts:18:36) at new CharacterData (character.ts:5:7) at TypeDataField.initialize (commons.js:6607:26) at SwadeActor._initialize (commons.js:6978:29) at SwadeActor._initialize (commons.js:7534:13) at SwadeActor._initialize (foundry.js:13979:13) at SwadeActor.updateSource (commons.js:7177:35) at #postUpdateDocumentCallbacks (foundry.js:13711:11) at #handleUpdateDocuments (foundry.js:13675:73)

SalieriC commented 6 months ago

Thanks for the report. It is pretty likely that 3.3.x broke a lot of the functions in SWIM and it will likely take some time to update everything there is. So unless you are willing to help track down every problem I'd advise you to not update the system until I release a compatible Version of SWIM. Also please use the bug report template next time. Thanks. =)

SalieriC commented 6 months ago

I can't replicate it. I had an issue but that seemed to be unrelated. Please give me more details regarding this and the exact steps to reproduce. For example:

  • Does it happen during combat?
  • Does it wappen with linked, unlinked tokens or both?
  • Does it happen on wild cards, extras or both?
  • What are the exact steps to reproduce?
  • Does it happen on shape changing into a SC actor, reverting back from an SC actor or when changing from one SC into another?
  • Does it happen on a GM account or non-GM account?

Also, please export the actor this happens to as well as the shape change actor you were using.

ennerre25 commented 6 months ago

Trying to answer your questions:

-It happens both during combat and outside of combat. -It happens with linked and unlinked tokens, both for the "caster" and the final form. -It only happens with Wild Cards as the caster, when I try it with an extra as the caster it works correctly. It doesn't matter if the final form is a Wild Card or an Extra. -As the steps to reproduce. I drag a player character to the map/table. From there I also dragged the script from the compendium to my quick bar, I select the actor that I want to change and I use the script (as a GM). I select a creature from the drop down list, all of them show just fine. Doesn't matter which one I choose, what happens next is that the new temporary actor is created, but it is not a Wild Card and it doesn't render onto the map. If I try to drag it into the map/table I get the same error and it doesn't work. That temporary actor is not a Wild Card while it should be. The option in Tweaks to make it a Wild Card is no longer there. -I cannot try to revert it or change from one creature into another because I cannot change into another form in the first place. When I use it from an Extra, all steps works just fine, into a creature, from one creature into another and reverting. -I'm trying it with a GM account but we saw the issue for the first time with the Druid player.

I deactivated all other modules but yours and its requirements and the issue persists.

I'm attaching both the player's actor and one of the creature forms, but I already tested it with new actors both for the "caster" and the final form. fvtt-Actor-wild-cat-oJA6UD87taKuZJ86.json fvtt-Actor-zidane-hNsjxq5u4qhx3vnQ.json

SalieriC commented 6 months ago

Thanks for the details. Unfortunately I'm still unable to reproduce. I just imported both and did a quick test and it works flawlessly. Just a sanity check:

  • Which versions of the dependencies do you have installed?
  • Did you have any errors in the console while SWADE did its migration for the new version?

If neither of those are to blame I am out of ideas. The only thing I could offer in this case is to test it on your end. This would require a GM accounts access to your server though so please think carefully before you allow me to do so as this is a matter of trust. Looking at the error though, I don't really see any reference to my code so I wouldn't eliminate an error with a previous migration. I think in theory it would be possible that something went wrong during a migration which the system corrects when importing a new actor. So you could also check that by importing the actors you've sent me and see if the error persists with those.

ennerre25 commented 6 months ago

Thank you for your time and disposition. I don't remember getting any errors while migrating to the new version. Made a new game and installed SWIM and it's dependencies only, imported the actors as you said and the error persisted. I'm using The Forge for playing, in case that matters.

The module versions I'm using are: SWIM: 2.4.0 SWADE Ultimate Conditions Changer: 2.4.0 Warp Gate: 1.19.2 libWrapper: 1.12.13.0 Settings Extender: 1.2.2

I cloned the server so you can test as much as you want. Sent you a Discord friend request.

SalieriC commented 6 months ago

Closing this in accordance with the creator. We were not able to fully identify the problem; it might be some bad data somewhere.