Skip to content
Media 0 for listing Ultimate Dice Mechanic

Description

Ultimate Dice Mechanic


This asset is for those looking for more than just a dice model, or a dice-throwing system. The ultimate dice mechanic includes procedural dice generation, dice rolling/throwing, reading dice values, and auto rethrow. All while being the easiest to customize!


IMPORTANT [Read to Get Started]: UltimateDiceMechanic/README.md at main · rohithateappple/UltimateDiceMechanic (github.com)


Documentation: https://drive.google.com/file/d/1Lq5H3exkEd90Y1o6m4JelzUB4V7ydQvY/view?usp=sharing


Trailer: Ultimate Dice Mechanic | Unreal Marketplace (youtube.com)


Why procedural dice?

Traditionally a dice game only has 6 values to play around with (numbers 1 - 6). Each face of the die is guaranteed to have unique values (i.e., no two faces have the same value). Thus, there's only ever a need for one dice model. But what if your game has more than just 6 values and on top of that what if the face values aren't unique? Well, now you'll need to model many variations to account for all those unique combinations.

Having the traditional 6 values per face, you'll need to manually create this many 3D models: 6^6/24 = 1944.

As the number of values increases, the number of possibilities also increases. That's where the procedural system comes into play. You just need to map all available values to their respective materials and the system puts together a dice with 6 random values. The result? Eventually, you'll have covered every possible die variation!


Regular Dice

Not all devs require procedural dice. And for that reason, this mechanic also comes with a regular die. Changing values is the same as the procedural, this time there's no need for materials as the user already has a model. Simply change values corresponding to each collider in the data table.


Spawning and Throwing

The BP_DiceManager handles the spawning and throwing of dice. Press 'SpaceBar' to spawn and throw at the same time. By default, the spawn mode is set to spawn in the area.


Shooting Dice from Actor

The BP_DiceManager can also shoot dice from a specified actor. It shoots the dice in the forward direction with an offset to its world location. This avoids clipping artifacts.


Shooting Dice from Player

Want to shoot the dice like a gun? You can do that! Simply tick the 'Shoot from Player' checkbox, and now you can attack your enemies with... dice?


Customizing the Die

There are two different methods to customize your die:

  1. Procedural Customization.
  2. Regular Customization.


For Procedural Customization you'll need the following:

  • Materials that correspond to each value in your game.
  • *Optional: A custom frame mesh.
  • *Optional: A custom face mesh.

*Custom frame and face are only required when opting for the custom body procedural die.

You can then use the pre-provided procedural data tables to assign each material to its value. Once assigned, use that data table as the procedural source in the BP_DiceManager.


For Regular Customization you'll need the following:

  • *Optional: A custom die mesh.

*Custom mesh is only required when opting to change the default die mesh.

You can then use the pre-provided regular data tables to assign each collider to its value. Once assigned, use that data table as the regular source in the BP_DiceManager.

Included formats

  • logo of Unreal Engine format