GithubHelp home page GithubHelp logo

mclemente / fvtt-dice-tray Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 5.0 256 KB

A FoundryVTT module that adds a Dice Tray and a Dice Calculator to the chat tab.

License: MIT License

JavaScript 78.80% Shell 0.07% CSS 9.91% HTML 6.62% Handlebars 4.60%

fvtt-dice-tray's Introduction

Dice Tray

This module adds a dice tray below chat and turns the d20 icon near the chat prompt into a clickable button that opens up a dice calculator, which includes buttons for dice, numbers, and simple math.

Installation

  1. Go to the setup page and choose Add-on Modules.

  2. Click the Install Module button:

  3. a) Search for Dice Tray.

    b) Paste the following on the Manifest Link: https://github.com/mclemente/fvtt-dice-tray/releases/latest/download/module.json

  4. In your world, enable the module on the module settings.

Development & Community Contribution

See the CONTRIBUTING file for information about how you can help this project.

Licensing

This project is licensed under the MIT license.

This project is a fork of Dice Tray, by Asacolips, licensed under the MIT license.

fvtt-dice-tray's People

Contributors

brantai avatar mclemente avatar mt-gitlocalize avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fvtt-dice-tray's Issues

[Request] Apply color to label if no image is selected

First of all, thank you for the updates, the new customization is awesome!

I would love to use colored text labels, but this is currently not possible. Would it be possible to apply the selected color to the text label when no image is selected?

image

Savage Worlds: the WILD button behaves incorrectly when clicking a dice button multiple times.

Steps:

  • Click Wild
    image

  • then d4, once (formula is perfect)
    image

  • then d4 again
    image

the resulting formule shouldn't be /r {2d4x=,1d6x=}kh but /r {1d4x=,1d4x=,1d6x=}kh2 (roll 2 separate d4 skill die along the d6 wild die, then keep and display only the two highest).

For non-wild rolls, there is no way to know whether the player/master, wants to roll separate skill dice or add them up (e.g. for damage). To me, adding non-wild rolls together to be the most common use case, so I would keep the existing behavior (going with 2d4x=). So only the behavior when Wild is selected should change.

Dice Tray Not Showing

I just upgraded to 2.0 and now the tray doesn't appear when the module is active. I previously ran it on Dragonbane and Symbaroum just fine.

Feature Request: Pop-out floating Dice Tray window

A floating window like Token Action HUD for the Dice Tray. It would make rolling faster but also easier to do the drag and drop method of rolling which is my favorite.
The positioning of the chat box is somewhat difficult to reach for right-handed mouse users, so this would open up a nice QoL customization and make Drag n' Drop dice closer to Fantasy Grounds.
Bonus: Locking the window in place like Token Action HUD.

Chat window drag and drop rolling bug

Hi !

When I use the "chat popout" (reducing right side bar and clicking on chat open a "windowed" chat window, like in the pic) to roll dices using the "drag and drop", then it double the number of dice rolled. I tested this whitout any other modules to be sure and the bug is still happening.

image

Dice button creation: Allow more than 2 rows of dices

When I create buttons I can only set row to 0 or 1. I can't do to 2 or 3.

I wanted to prepare buttons to cover most roll usages in my games and I would need about twenty buttons. So ideally 5 rows or so (from 0 to 4) would do the trick.

Another option would be to have some "tabs" so that I would first need to click a "tab button" to display a specific row/rows of custom dice, then pick the right dice/formula.

Dice Tray disappeared

Hi,

I ran the update to dice tray 2.0 (foundry V11, on The Forge, running the Basic Fantasy system) and when I started the game, the tray was gone (chat looks as if it wasn't installed). The module is enabled and the tray is enabled in settings. I downgraded and it came back. If they is anything I can do to help troubleshoot, please let me know!

Dice Tray does not install via FVTT 12 built-in installer

Foundry Version 12 Stable - Build 324
Dice Tray (on Foundry "Shop") Version 1.5.3

When trying to install the module through the app in the catalog, the error below appears and the add-on is not installed:

Uncaught (in promise) Error: An unexpected error occurred when downloading file https://gitlab.com/asacolips-projects/foundry-mods/foundry-vtt-dice-calculator/-/archive/1.5.3/foundry-vtt-dice-calculator-master.zip: Not Acceptable
    at fetchWithTimeout (file:///C:/Program%20Files/Foundry%20Virtual%20Tabletop/resources/app/common/utils/http.mjs:48:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///C:/Program%20Files/Foundry%20Virtual%20Tabletop/resources/app/dist/files/downloader.mjs:1:631

But the manual way still works. (via the manifest link on README.md)

Extra buttons (fortune/misfortune) not rendering in PF2e v5.11+

A change in the global CSS in the PF2e system causes the hidden attribute to have style display: none !important, which jQuery's show() function won't override.

I filed a pretty long bug report there (foundryvtt/pf2e#12869), but IMO it's not really an incorrect approach on their end and would probably take a lot of effort to "fix".

Comparatively I'd suggest that this module could change approach slightly, for example just a one line swap in TemplateDiceMap._createExtraButtons to:

html.find("#dice-tray-math").removeAttr("hidden");

...would be sufficient to make them render again.

Top margin in popout window

I'd like to try to help with the top margin issue you mentioned in the release, but I don't see the "orange numbers" to which you were referring.

2.1.12: Dice Tray Gone

Dice Tray 2.1.12. Foundry version 11. Build 315. Pathfinder 1e 10.4. One module active: Dice Tray.
The tray is not there. Dev console gives no warnings.

Dice creation: ability to set what the number of dice should do to the formula

In the dice tray clicking the same die button once add "1" in front of the formula. Pressing multiple times change that to 2, 3 and so on.

But it won't work with some complex formula.
e.g. my formula is {1d4x=,1d6x=}kh

It will display 1{1d4x=,1d6x=}kh, then 2{1d4x=,1d6x=}kh etc.
To have at least the single press work, I changed my formula to *{1d4x=,1d6x=}kh
so that it rolls 1*{1d4x=,1d6x=}kh

It would be nice if we could choose where this "number of times the button was pressed" would appear in our formula. e.g.
Maybe I could type such a "formula" in dice setup: ##d4x=+##d6x=
and it would replace ## with 1, 2, etc. and end up with 2d4x=+2d6x=
(I'm not sure whether # has any role in Foundry dice formula, you could use any other special character)

It would be even better (especially for Savage Worlds for abilities like Frenzy, Work the Room or firearms) to indicate a part of the formula has to be repeated as many times as the number of times the button was pressed.
Maybe I could type such a "formula" in dice setup: {#d4x=,#1d6x=}kh##
And the part between # would be repeated as many times as needed. e.g. with a three times press, I would roll:
{d4x=,d4x=,d4x=,1d6x=}kh3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.