Giter VIP home page Giter VIP logo

dice_syntax_gd's Issues

Example from README returns "Malformed dice string" error

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!

Todo

  • consider proper parsing of inter-dice maths so that arbitrary operations can be performed implemented in 2.1 expression branch
  • godot4 port of 2.1

Range support for drop/keep?

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

Godot 4 maintenance workflow

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

probabilities as parsed string

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"

Clarify probabilities with built in randomness

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

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.