oganm/dice_syntax_gd

Todo

Closed this issue · 2 comments

oganm commented
  • 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
oganm commented

https://docs.godotengine.org/en/stable/tutorials/scripting/evaluating_expressions.html#:~:text=Godot%20provides%20an%20Expression%20class,call%20like%20deg2rad(90)%20.

the expression class doesn't seem to have a documented way of getting parsed data. as it is written, it would be easy to implement dice rolling but harder to implement probability calculations

oganm commented

quick and dirty translation to godot4 returns different/wrong results for probabilities

eg try: dice_syntax.dice_probs('4d6d1')

not diagnosed yet
slice for arrays works differently for godot4, end is no longer inclusive. removing the -1s added to address that fixes the issue