Automatic stat tracking not working w/ Ready Set Roll (or possibly dnd5e) #45

Open
opened 2025-09-03 14:41:34 +00:00 by GibbsHelmholtz · 1 comment
GibbsHelmholtz commented 2025-09-03 14:41:34 +00:00 (Migrated from github.com)

Affected Versions

1.0.3

Game System

dnd5e

Bug Description

Versions:
dnd5e: 5.1.4
Foundry: 13.348

Unfortunately I cant get this to work for me. The main reason might be that I use "Ready set roll" - which messes with how rolls are displayed (it updates existing chat messages, so I guess it never gets picked up by the hook).

If I disable that (and all other modules as well) I get the following error:

foundry.mjs:23839  Error: Error thrown in hooked function '' for hook 'preCreateChatMessage'. d.dice is not iterable
    at Hooks.onError (foundry.mjs:23838:24)
    at #call (foundry.mjs:23820:36)
    at Hooks.call (foundry.mjs:23799:40)
    at #preCreateDocumentArray (foundry.mjs:58585:46)
    at async ClientDatabaseBackend._createDocuments (foundry.mjs:58539:5)
    at async ChatMessage5e.createDocuments (foundry.mjs:12486:21)
    at async ChatMessage5e.create (foundry.mjs:12632:21)
    at async D20Roll.buildPost (basic-roll.mjs:222:65)
    at async AttackActivity.rollAttack (attack.mjs:182:5)
Caused by: TypeError: d.dice is not iterable
    at Object.fn (preCreateChatMessage.mjs:14:26)
    at #call (foundry.mjs:23816:20)
    at Hooks.call (foundry.mjs:23799:40)
    at #preCreateDocumentArray (foundry.mjs:58585:46)
    at async ClientDatabaseBackend._createDocuments (foundry.mjs:58539:5)
    at async ChatMessage5e.createDocuments (foundry.mjs:12486:21)
    at async ChatMessage5e.create (foundry.mjs:12632:21)
    at async D20Roll.buildPost (basic-roll.mjs:222:65)
    at async AttackActivity.rollAttack (attack.mjs:182:5)

The reason is that "dice" seems to be the string of a JSON (?) - I have no idea why.

So my question is basically: are there plans to get this to work with the "Ready set roll" module? :)

Thanks

Affected Environments

  • Desktop App
  • Chrome
  • Firefox

Support Data

Foundry Virtual Tabletop: Version 13 Stable, 13.348
Game System: dnd5e, 5.1.4
Active Modules: 1

Performance Mode: High
Screen Dimensions: 5120 × 1440
Viewport Dimensions: 1262 × 1325

OS: Unknown
Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 Edg/139.0.0.0
GPU: ANGLE (NVIDIA, NVIDIA GeForce RTX 3080 Ti (0x00002208) Direct3D11 vs_5_0 ps_5_0, D3D11)
Max Texture Size: 16384

Scene: 3840 x 1920 | Grid Size: 100 | Padding Percentage: 0
Walls: 0 | Ambient Lights: 5 | Ambient Sounds: 0 | Tiles: 1 | Tokens: 2
Largest Texture: 3840 × 1920

Actors: 3 | Items: 0 | Journal Entries: 0 | Rollable Tables: 0 |
Playlists: 0 | Compendium Packs: 22 | Chat Messages: 41

World Scripts: None

### Affected Versions 1.0.3 ### Game System dnd5e ### Bug Description Versions: dnd5e: 5.1.4 Foundry: 13.348 Unfortunately I cant get this to work for me. The main reason might be that I use "Ready set roll" - which messes with how rolls are displayed (it updates existing chat messages, so I guess it never gets picked up by the hook). If I disable that (and all other modules as well) I get the following error: ``` foundry.mjs:23839 Error: Error thrown in hooked function '' for hook 'preCreateChatMessage'. d.dice is not iterable at Hooks.onError (foundry.mjs:23838:24) at #call (foundry.mjs:23820:36) at Hooks.call (foundry.mjs:23799:40) at #preCreateDocumentArray (foundry.mjs:58585:46) at async ClientDatabaseBackend._createDocuments (foundry.mjs:58539:5) at async ChatMessage5e.createDocuments (foundry.mjs:12486:21) at async ChatMessage5e.create (foundry.mjs:12632:21) at async D20Roll.buildPost (basic-roll.mjs:222:65) at async AttackActivity.rollAttack (attack.mjs:182:5) Caused by: TypeError: d.dice is not iterable at Object.fn (preCreateChatMessage.mjs:14:26) at #call (foundry.mjs:23816:20) at Hooks.call (foundry.mjs:23799:40) at #preCreateDocumentArray (foundry.mjs:58585:46) at async ClientDatabaseBackend._createDocuments (foundry.mjs:58539:5) at async ChatMessage5e.createDocuments (foundry.mjs:12486:21) at async ChatMessage5e.create (foundry.mjs:12632:21) at async D20Roll.buildPost (basic-roll.mjs:222:65) at async AttackActivity.rollAttack (attack.mjs:182:5) ``` The reason is that "dice" seems to be the string of a JSON (?) - I have no idea why. So my question is basically: are there plans to get this to work with the "Ready set roll" module? :) Thanks ### Affected Environments - [ ] Desktop App - [x] Chrome - [ ] Firefox ### Support Data Foundry Virtual Tabletop: Version 13 Stable, 13.348 Game System: dnd5e, 5.1.4 Active Modules: 1 Performance Mode: High Screen Dimensions: 5120 × 1440 Viewport Dimensions: 1262 × 1325 OS: Unknown Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 Edg/139.0.0.0 GPU: ANGLE (NVIDIA, NVIDIA GeForce RTX 3080 Ti (0x00002208) Direct3D11 vs_5_0 ps_5_0, D3D11) Max Texture Size: 16384 Scene: 3840 x 1920 | Grid Size: 100 | Padding Percentage: 0 Walls: 0 | Ambient Lights: 5 | Ambient Sounds: 0 | Tiles: 1 | Tokens: 2 Largest Texture: 3840 × 1920 Actors: 3 | Items: 0 | Journal Entries: 0 | Rollable Tables: 0 | Playlists: 0 | Compendium Packs: 22 | Chat Messages: 41 World Scripts: None
Eldritch-Oliver commented 2025-09-03 15:18:17 +00:00 (Migrated from github.com)

Thanks for the report and error details! I'll take a look at getting Foundry-Stat-Tracker to work with Ready Set Roll. The reason it isn't compatible at the moment is I wanted to start with the most barebones version of auto-tracking and then add more as it's discovered to not work, so this is exactly the sort of information I've been on the watch for!

Thanks for the report and error details! I'll take a look at getting Foundry-Stat-Tracker to work with Ready Set Roll. The reason it isn't compatible at the moment is I wanted to start with the most barebones version of auto-tracking and then add more as it's discovered to not work, so this is exactly the sort of information I've been on the watch for!
Oliver added the
Kind
Bug
System/dnd5e
labels 2025-11-11 06:26:44 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Foundry/stat-tracker#45
No description provided.