Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: initiative formulas not working #196

Closed
2 of 7 tasks
dfaggioli opened this issue Jul 8, 2023 · 0 comments · Fixed by #209
Closed
2 of 7 tasks

[Bug]: initiative formulas not working #196

dfaggioli opened this issue Jul 8, 2023 · 0 comments · Fixed by #209
Assignees
Labels
Type: Bug A problem with existing functionality.

Comments

@dfaggioli
Copy link
Contributor

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

Initiative formula in the form of %mod1%d10 + %mod2% should work, i.e., if we have modifier: [2, 1], I'd expect an initiative roll to be 2d10+1 (as documented here: https://plugins.javalent.com/Initiative+Tracker/Intermediate+Topics/Custom+Formulas )

Current behaviour

What instead happens is that the initiative value stays 0, and I see this in the console log:

plugin:obsidian-dice-roller:475 Uncaught Error: Non parseable dice string passed to DiceRoll.
    at new M2 (plugin:obsidian-dice-roller:475:625)
    at w2.parseLexemes (plugin:obsidian-dice-roller:482:2219)
    at w2.rollSync (plugin:obsidian-dice-roller:480:1425)
    at InitiativeTracker.getInitiativeValue (plugin:initiative-tracker:55118:31)
    at eval (plugin:initiative-tracker:13744:38)
    at update2 (plugin:initiative-tracker:10327:9)
    at updateAndSave (plugin:initiative-tracker:13414:5)
    at Object.roll (plugin:initiative-tracker:13740:23)
    at eval (plugin:initiative-tracker:15917:80)
    at e.handleEvent (app.js:1:925701)

Reproduction

With Statblock, DiceRoller and initiative-tracker installed:

  • define an "Initiative Formula" (in initiative-tracker's settings) that includes %mod1% and %mod2%, such as %mod1%d10+%mod2
  • in the statblock of a creature, put modifier: [2, 1]
  • make the plugin roll initiative (e.g., adding the creature to an encounter and clicking "Reroll Initiative"
  • whatch the console and see the errors appearing

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

1.3.5

Plugin Version

Dice Roller: 9.0.0, Initiative Tracker: 11.2.0

Confirmation

  • I have disabled all other plugins and the issue still persists.

Possible solution

No response

@dfaggioli dfaggioli added the bug label Jul 8, 2023
@sigrunixia sigrunixia added Type: Bug A problem with existing functionality. and removed pinned labels Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug A problem with existing functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants