Coder Social home page Coder Social logo

3d-dice-roller-unity's Introduction

About

This is two projects...

3D Dice roller for Unity

The goal is to be able to call for a dice roll, have it happen in whatever visually interesting way, and get back a result. It will dynamically load a new additive scene which renders it's own camera on top of the rest. It does not have to work this way, and can be easily modified. The dice can stand alone. Adding a grabbable from some VR interaction toolkit, for example, wouldn't be much work.

Dice Notation Parser

Written as pure C# - nothing about it requires unity. The parser could be ripped out (see the 'rollCodeParser' folder) and used elsewhere. It supports common "xdy+m" syntax, and can chain multiple comma or space separated rolls into a sequence of root expressions (the rolls, the modifiers).

Licenses

ses Low Poly 3D Dice by Facehunter2003, released under CC0 (public domain) license.

3d-dice-roller-unity's People

Contributors

hunterdyar avatar

Watchers

 avatar

3d-dice-roller-unity's Issues

Drop/Keep

xdydz - roll x y-sided dice and drop the z lowest.

xdykz - roll z y-sided dice and keep the z highest.

Single rolls get a "Dropped" bool status from this, so we can see them in the results.

Parse ! for exploding dice

Exploding is an exploding enum flag on the dice roll.

Enum options are None, HighestExplode, LowestExplode.

Use { } brackets for grouping rolls.

Basically, trying to match roll20 notation.

Pasted from https://wiki.roll20.net/Dice_Reference:

Sometimes you may want to perform a series of rolls, and then compare each roll to a common check (like a success roll). Roll20 provides a "grouped rolls" functionality for this purpose. For example, you can roll two different pools of dice, then keep the highest dice roll across any of the pools:

/roll {4d6+3d8}kh1

If you separate the rolls inside the group with a comma, then we'll sum each individual dice expression in the group before applying any modifiers. For example, if we change the above example to use a comma, instead of keeping the highest single roll, it will instead keep the highest group total:

/roll {4d6,3d8}kh1

This is needed in games based on the Savage Worlds system, where important characters roll a "wild die" in parallel with their main die and choose the highest roll.

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.