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

3D Dice not Rolling #54

Closed
AnlashokNa opened this issue Jul 18, 2024 · 2 comments
Closed

3D Dice not Rolling #54

AnlashokNa opened this issue Jul 18, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@AnlashokNa
Copy link

In Foundry v12, when rolling a skill from the character sheet, 3D dice from Dice So Nice! do not roll. There is no dice rolling noise; the result is sent straight to chat.

@bithir
Copy link

bithir commented Jul 18, 2024

Code to fix, the question is if the changes should be made backwards compatible with v11.

Change the data for ChatMessage.create from:

    let chatOptions = {
        user: game.user.id,
        speaker: ChatMessage.getSpeaker({ actor: actor, token: actor.img }),
        type: CONST.CHAT_MESSAGE_TYPES.ROLL,
        roll: r,
        content: chatHTML
    }

to

    let chatOptions = {
        user: game.user.id,
        speaker: ChatMessage.getSpeaker({ actor: actor, token: actor.img }),
        rolls: [r],
        content: chatHTML
    }

I think that should solve it. Note: if you want to make the code backwards compatible with v11, you need to keep your elements.

Let me know if you want me to do the changes and create a PR.

@DrOgres DrOgres self-assigned this Jul 19, 2024
@DrOgres DrOgres added the bug Something isn't working label Jul 19, 2024
DrOgres added a commit that referenced this issue Jul 21, 2024
@DrOgres
Copy link
Owner

DrOgres commented Jul 21, 2024

fixed in 3.0.1 thanks @bithir for the assist!

@DrOgres DrOgres closed this as completed Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants