jsinme / fvtt-bcdice Goto Github PK
View Code? Open in Web Editor NEWA FoundryVTT module to query BCDice servers for dice rolls
License: MIT License
A FoundryVTT module to query BCDice servers for dice rolls
License: MIT License
Currently, when a user pastes the API server in the settings they need to add a /v2 to access the current API version such as https://bcdice.onlinesession.app/v2
. However, V1 and V2 are completely different from each other and V1 is deprecated on BCDice V3.0+. As such it is fine to assume the current latest version of the API will only be V2 and you can automatically add a /v2
at the end of the currently pasted API server in the settings.
This is done so a normal user only needs to paste the server URL, without thinking about API versions. (Might need a note that V1 API servers are not to be used)
Add a setting to allow each user to set whether or not the Roller should remain visible after each roll.
Follow up of #3
Dice so nice uses the size and result of a dice to simulate a 3D roll (it does not to the rolling on its own IIRC)
If you are able to get the size and result of BCdice command output, you could plug it in this module to simulate the roll.
Based on teal dice, below is the repo.
https://gitlab.com/riccisi/foundryvtt-dice-so-nice
This module is the most used module across FVTT due to the visual impact it gives to rolls.
Things to consider:
The game list might slightly change depending on the selected server. Foundry should restart if the API server changes so that the module can re-load the game list from the current server.
Allow the GM to set what system should be selected by default for all players. Should this be the system selected each time they open the roller, or just the first time it's opened after the setting is set/changed?
On any BCDice system roll, if somebody adds an S
in front of the command such as s3d6
then the API message receives a secret
flag set to true. In this instance, make foundry output the messages as self rolls (only visile to the roller).
BCDice-API host is not only https://bcdice.trpg.net
. So I request that GM can set other BCDice-API host.
BCDice-API does not serve official host. All BCDice-API hosts are served by volunteers and there are many private BCDice-API host.
The following error is shown when loading a world with BCDice
Seems to have something to do with load order. This happens with and without modules, so it might depend on when foundry checks for this. To reproduce this I almost always have to load a world in, then refresh the world, after that it will constantly happen.
This leads to the following error when trying to call BCDice
The list of systems is quite huge and one game world would only ever use one system.
Please make it so the GM can set a system as default and also allow users to remember the last selected system.
Currently, if I type something such as "1d100 This is my Skill Roll", the strings get discarded and only the command goes through. Please make it so the chat card includes both the original command and the command result. This is so that others can see if there is extra text appended to the command for ease of understanding the roll intent and also understand if the user used a special command (for example, Cthulhu's CC command which rolls a d100)
With the following steps, the current FVTT instance ends up reloading:
Add settings to allow each user to set custom key bindings for launching the Roller
The current dropdown turns out to be a bit weird to use with Japanese keyboards as the inputs do not directly allow you to search that.
I would want to suggest making some sort of dropdown but with autocomplete search? Or just a search bar really, whichever is easier to implement
As the title says, currently when searching for a system and navigating through the matches with the arrow keys, pressing enter also causes whatever command already exists to fire off.
Reproduction steps:
However, only the display is bugged, internally it is recognizing the last selected system.
Since a user only does this once, this bug should mostly be seen during the assessment of #7 as it is very minor
Related to #4
In order to show who did the roll please format the message as following:
Player name:
Command output
BCDice (Game System Name):
Command Result
The purpose is twofold, show who did the roll, and distinguish between a command that would have the same name but different output depending on the selected system.
FVTT's chat messages are quite instant, it is often hard to spot whether something was rolled. I would like to propose either of the following to fix that:
as the title says, if you select any other tool other than the basic controls (i.e. template, tiles etc.) then BCDice icon vanishes.
CTRL+Shift+B still works though
The default BCDice syntax from the "BCDice" system in fact applies to all systems, with the rest of the systems being derivatives of it. As such any command that would work on BCDice system would work on all other systems.
It would be beneficial to add a link to https://docs.bcdice.org/ at the top of every guide pop-up so that a user can learn the general commands as well as the system-specific ones.
Using BCDice as system, try inputting 2d6+1>=5
Result: (2D6) > 5[2,3] > 5
Expected result: (2D6+1>=5) > 5[2,3]+1 > 6 > 成功
In the following code, commands are being sent to the API as-is and are not accounting for character escaping.
https://github.com/jsinme/fvtt-bcdice/blob/0.2.2-beta/scripts/bcdice.js#L86
Frequently used characters in BCDice: <>=!@#$ etc.
URLSearchParam could help you in fixing this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.