oganm / dice_syntax_gd Goto Github PK
View Code? Open in Web Editor NEWDice roller and probability calculator with a simple syntax for godot
Home Page: https://oganm.github.io/many_dice/
License: MIT License
Dice roller and probability calculator with a simple syntax for godot
Home Page: https://oganm.github.io/many_dice/
License: MIT License
Hi! Thank you for this awesome module!
Unfortunately, I'm unable to run expressions that count successes, as I get a Malformed dice string: Unprocessed token
error.
Here's what I'm trying to run (third example in the README.md):
print(dice_syntax.roll("4d6s>5", rng))
and here's the console output:
{ "result": 0, "rolls": [{ "error": true, "msg": ["Malformed dice string: Unprocessed tokens"], "dice": [], "drop": [], "result": 0 }], "error": true, "msg": ["Malformed dice string: Unprocessed tokens"] }
Am I missing something or doing something wrong? Thank you for your help!
A bit weird because a number after d,k already indicates the number of dice to drop, but can imagine dropping specific results being possibly useful
I currently make my changes on godot 3. Then use meld to compare the latest godot 3 version to the previous godot 4 one to selectively make the relevant changes
Is it possible to account for possibilities in the dice syntax ? Like I want to have a one percent chance to roll 4d6 instead of 4d3, "4d3|1%4d6"
built in godot functions like randi
, randi_range
can be technically used within the dice syntax. However dice_syntax
functions dice_probs
, parsed_dice_probs
, expected_value
and standard_deviation
calculate probabilities by getting results for every possible dice without taking any non-dice randomness into account. If built in godot functions are used to introduce additional randomness dice_syntax
probability calculations will be wrong
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.