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

TROLL syntax suport #1

Open
walston opened this issue Feb 19, 2023 · 2 comments
Open

TROLL syntax suport #1

walston opened this issue Feb 19, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@walston
Copy link
Owner

walston commented Feb 19, 2023

TROLL a dice programming language

TROLL is a "language for specifying dice-roll mechanisms" {@see http://hjemmesider.diku.dk/~torbenm/Troll/}.

Leveraging the syntax, or a subset of it, would allow the dice roller to conditionally handle D&D Critical Hits or Kids on Bikes' Explosions

While you can download TROLL as a command-line binary, you need to have Moscow ML installed (:-1:) & run it in a terminal. Besides, we want to eventually VISUALIZE the dice rolls, we only want to borrow the syntax feature-set, and run the program in browser.

Challenges

The language design for TROLL to produce an executable and a dice-rolling web-app's needs differ.

  • Using a TROLL binary, you pass in a dice-roll mechanic and it will roll it for you.
  • Using the web-app, we would want to SHOW the dice-roll, and if needed pass the result back (to handle conditions/loops).
  • TROLL doesn't have syntax for Damage Type annotations
  • TROLL doesn't have annotations for dice-color/-id.
@walston walston added the enhancement New feature or request label Feb 19, 2023
@walston walston self-assigned this Feb 19, 2023
@walston
Copy link
Owner Author

walston commented Feb 19, 2023

I'm looking into how to write your own programming language parser. I'll just post links here that seem like they might be helpful.

@walston
Copy link
Owner Author

walston commented Mar 3, 2023

Peggy seems to satisfy the parsing needs, the hard part is just porting the syntax manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant