jopeek / fvtt-loot-sheet-npc-5e

FVTT - Loot Sheet NPC 5E
MIT License
44 stars 86 forks source link

Error when attempting to generate merchant inventory from rollable table #385

Open TogaParty opened 1 year ago

TogaParty commented 1 year ago

Describe the bug Error, no inventory is generated.

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getDocument') [Detected 1 package: lootsheet-simple] at LootSheet5eNPC._merchantInventoryUpdate (lootsheet-simple.js:445:31)

To Reproduce Steps to reproduce the behavior:

  1. Populate a table
  2. Set a merchant to use it
  3. click Update Shot Inventory
  4. See error

Expected behavior

Screenshots .

Desktop (please complete the following information):

Additional context

jopeek commented 1 year ago

Hmm maybe something changed in the latest dnd update. I’ll check it out. This worked about a week or two ago for sure. On Jan 30, 2023 at 7:55 AM -0800, TogaParty @.***>, wrote:

Describe the bug Error, no inventory is generated. Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getDocument') [Detected 1 package: lootsheet-simple] at LootSheet5eNPC._merchantInventoryUpdate (lootsheet-simple.js:445:31) To Reproduce Steps to reproduce the behavior:

  1. Populate a table
  2. Set a merchant to use it
  3. click Update Shot Inventory
  4. See error

Expected behavior Screenshots . Desktop (please complete the following information):

• OS: Win10 • Browser Chrome • Version Latest

Additional context — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

jopeek commented 1 year ago

This seems to work fine to me. Make sure your rollable table is set up properly with Compendium types and dnd5e.items. [image: image.png]

On Mon, Jan 30, 2023 at 7:57 AM Jan Ole Peek @.***> wrote:

Hmm maybe something changed in the latest dnd update. I’ll check it out. This worked about a week or two ago for sure. On Jan 30, 2023 at 7:55 AM -0800, TogaParty @.***>, wrote:

Describe the bug Error, no inventory is generated.

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getDocument') [Detected 1 package: lootsheet-simple] at LootSheet5eNPC._merchantInventoryUpdate (lootsheet-simple.js:445:31)

To Reproduce Steps to reproduce the behavior:

  1. Populate a table
  2. Set a merchant to use it
  3. click Update Shot Inventory
  4. See error

Expected behavior

Screenshots .

Desktop (please complete the following information):

  • OS: Win10
  • Browser Chrome
  • Version Latest

Additional context

— Reply to this email directly, view it on GitHub https://github.com/jopeek/fvtt-loot-sheet-npc-5e/issues/385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJBV6XKK3VBQKW4PWXXEN3WU7P5VANCNFSM6AAAAAAULKI4FY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Jan Ole Peek http://www.janolepeek.com/

AndrewRP8023 commented 1 year ago

It's also not working for me when I try to generate a merchant using a Rolltable. I pulled these errors from the console:

Error: You are accessing the Actor5e#data object which is no longer used. Since V10 the Document class and its contained DataModel are merged into a combined data structure. You should now reference keys which were previously contained within the data object directly. at logCompatibilityWarning (commons.js:1692:19) at Actor5e._logV10CompatibilityWarning (commons.js:6642:14) at get data [as data] (commons.js:6542:24) at LootSheet5eNPC._merchantInventoryUpdate (lootsheet-simple.js:430:37) at HTMLButtonElement. (lootsheet-simple.js:299:29) at HTMLButtonElement.dispatch (jquery.min.js:2:43064) at y.handle (jquery.min.js:2:41048)

Error: You are accessing the TableResult#data object which is no longer used. Since V10 the Document class and its contained DataModel are merged into a combined data structure. You should now reference keys which were previously contained within the data object directly. at logCompatibilityWarning (commons.js:1692:19) at TableResult._logV10CompatibilityWarning (commons.js:6642:14) at get data [as data] (commons.js:6542:24) at LootSheet5eNPC._merchantInventoryUpdate (lootsheet-simple.js:440:33)

Error: Roll#evaluate is becoming asynchronous. In the short term, you may pass async=true or async=false to evaluation options to nominate your preferred behavior. Deprecated since Version 8 Backwards-compatible support will be removed in Version 10 at Object.logCompatibilityWarning (commons.js:1692:19) at Roll.evaluate (foundry.js:9252:21) at Roll.roll (foundry.js:9362:17) at LootSheet5eNPC._merchantInventoryUpdate (lootsheet-simple.js:412:17) at HTMLButtonElement. (lootsheet-simple.js:299:29) at HTMLButtonElement.dispatch (jquery.min.js:2:43064) at y.handle (jquery.min.js:2:41048)

jopeek commented 1 year ago

What version of the lootsheet simple are you on? And what foundry version? On May 1, 2023 at 12:38 AM -0700, AndrewRP8023 @.***>, wrote:

It's also not working for me when I try to generate a merchant using a Rolltable. I pulled these errors from the console: Error: You are accessing the Actor5e#data object which is no longer used. Since V10 the Document class and its contained DataModel are merged into a combined data structure. You should now reference keys which were previously contained within the data object directly. at logCompatibilityWarning (commons.js:1692:19) at Actor5e._logV10CompatibilityWarning (commons.js:6642:14) at get data [as data] (commons.js:6542:24) at LootSheet5eNPC._merchantInventoryUpdate (lootsheet-simple.js:430:37) at HTMLButtonElement. (lootsheet-simple.js:299:29) at HTMLButtonElement.dispatch (jquery.min.js:2:43064) at y.handle (jquery.min.js:2:41048) Error: You are accessing the TableResult#data object which is no longer used. Since V10 the Document class and its contained DataModel are merged into a combined data structure. You should now reference keys which were previously contained within the data object directly. at logCompatibilityWarning (commons.js:1692:19) at TableResult._logV10CompatibilityWarning (commons.js:6642:14) at get data [as data] (commons.js:6542:24) at LootSheet5eNPC._merchantInventoryUpdate (lootsheet-simple.js:440:33) Error: Roll#evaluate is becoming asynchronous. In the short term, you may pass async=true or async=false to evaluation options to nominate your preferred behavior. Deprecated since Version 8 Backwards-compatible support will be removed in Version 10 at Object.logCompatibilityWarning (commons.js:1692:19) at Roll.evaluate (foundry.js:9252:21) at Roll.roll (foundry.js:9362:17) at LootSheet5eNPC._merchantInventoryUpdate (lootsheet-simple.js:412:17) at HTMLButtonElement. (lootsheet-simple.js:299:29) at HTMLButtonElement.dispatch (jquery.min.js:2:43064) at y.handle (jquery.min.js:2:41048) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

AndrewRP8023 commented 1 year ago

I'm using Foundry 10.291, and Lootsheet simple 5.0.6

Paganpilot commented 1 year ago

Identical error for me with the same versions as Andrew. I tested by just using a 'commoner" and converting the sheet to dnd5e.lootsheet5enpc. Then changed the sheet to merchant. Tried a variety of different valid roll tables (that work going directly to them). The strange thing is that the first time I did it this morning, i got one random roll to populate a few items. But not even uninstalling and reinstalling loot sheet simple wouldn't let me go further.