Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Rolling on LootTable which uses nested LootTables intermittently fails with error #169

Open
PlasticMohawk opened this issue Jan 7, 2022 · 0 comments

Comments

@PlasticMohawk
Copy link

This is in Foundry v9. I also have LootSheetNpc5E installed despite the compatibility warning. However, the issue seems to exist even with that other module disabled.

I have a Better RollTable set up as a Loot Table. This table uses other, nested Loot Tables.

Intermittently, rolling on this table using the following macro fails, with the error below.

Macro:

const table = game.tables.getName("Treasure Hoard - CR 0-4");
game.betterTables.generateChatLoot(table);

Chrome console error:

loot-creator.js:130 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'data')
[Detected 1 package: better-rolltables]
    at LootCreator.buildItemData (modules/better-rolltables/scripts/loot/loot-creator.js:130)
    at async LootChatCard.findOrCreateItems (modules/better-rolltables/scripts/loot/loot-chat-card.js:39)
    at async LootChatCard.prepareCharCart (modules/better-rolltables/scripts/loot/loot-chat-card.js:111)
    at async LootChatCard.createChatCard (modules/better-rolltables/scripts/loot/loot-chat-card.js:151)
    at async BetterTables.generateChatLoot (modules/better-rolltables/scripts/better-tables.js:94)

When this happens, no ChatMessage containing loot enters chat. (When there is a successful table roll/ChatMessage creation, I'm not able to interact with the items in the ChatMessage. There are no console errors when I, for example, click on one of the items.

Screen Shot 2022-01-07 at 12 56 20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant