A downloadable tool

Download NowName your own price

Fate is a weighted drop system built to scale from small beginner projects to complex production-quality games. With inbuilt presets to get you started and advanced customization to allow you to bend Fate into any shape you want, Fate is a must have for anyone dealing with randomness.

Do not just think of Fate as a "loot drop system". It has been specifically designed to handle a wide variety of situations outside of simply deciding what loot drops from a chest. An alternate example could be deciding which enemies the player will encounter while loading a map. Or deciding what special events will happen over the course of a run. There are many uses for Fate that sit outside of the standard loot drop concept.

Fate is entirely free! If you end up using it, that's sick! All I'd ask in return is a follow on itch and leaving a rating/review (it really helps with the itch algo).

(And if you like this, you might like my other libraries available here: RefresherTowel Games)

Here is a simple example of Fate at work:

var _common = new FateValueEntry("COMMON").SetWeight(94);
var _rare = new FateValueEntry("RARE").SetWeight(6);
loot_table = new FateTable([_common, _rare]);

First, you create the entries you want to add to your table. There are a few different entry types which can have different effects on roll, but for the majority of situations, value entries are fine. Then you create your table and add the entries.

Then later on, when you want to get a drop it's as simple as this:

var _roll = FateRollValues(loot_table, 1);
if (_roll.IsOk()) {
    var _value = _roll.GetFirstDrop();
    show_debug_message("Pulled: " + string(_value));
}

Roll the table and the amount of drops you want, make sure the roll succeeded and then grab the drop from the roll (or drops if you decided to get multiple).

That's the core of Fate, but there's a lot of extra stuff hidden within it to make your life easier:

  • Beginner-friendly surface: Simple wrappers (FateRollValues, FateTrackTable, snapshot helpers) to avoid advanced plumbing early.
  • Core entry controls: Weighted, guaranteed, and unique selection primitives with chainable APIs.
  • Policy engine with conflict handling: Custom policies can hard-force, exclude, or reweight entries, with deterministic tie-breaking via priority and registration order.
  • Built-in gacha rules: EnablePity, EnableRateUp, EnableDuplicateProtection, batch/ten-pull guarantees, and EnableStandardGachaRules.
  • Simulation QA suite: Large-run simulation, assertion checks, presets, and deterministic result_hash regression locking.
  • Nested table rolls: Outcomes can branch recursively through FateTableEntry chains for multi-stage generation.
  • Drop-time instantiation: FateCreatorEntry can create instances or constructor-built structs when selected.
  • Stateful persistence pipeline: Tracked-table snapshot save/load with registry support and weak-ref pruning of dead tables.
  • Advanced capture/restore bundles: Manual multi-table state capture/restore with structured restore counters.
  • Detailed roll telemetry: RollDetailed exposes roll summary, diagnostics, selected events, and nested table summaries.
  • Scoped policy state by context: Pity/rate-up can be partitioned by keys like profile, account, or character.
  • Non-destructive probability tools: Preview, GetEntryProbability, and GetValueProbability for UI and balance tooling.
  • Deterministic RNG support: FateRng with explicit seed/state control for reproducibility.
  • Consistent contract returns: Unified { ok, code, data, kind } result model with helper methods.
  • Strictness modes: SILENT, DEBUG, ERROR for runtime diagnostics strategy.

Fate makes random drops easy, while also giving you a huge amount of diagnostics when it comes to figuring out why weighted drops are acting incorrectly.

Check out the documentation for a deeper look into how Fate works!

And please, don't forget to give me a follow on itch to see more cool tools like this!


Support and feedback

If you run into issues or have ideas for improvements:


Part of the RefresherTowel Games Toolkits

Part of a growing suite of GameMaker tools that are designed to play nicely together. If you like this style of tooling, you might also want:

  • Whisper - make your narrative dynamic and reactive, like Hades or Crusader Kings III.
  • Catalyst - makes modifiable statistics (and general numbers) super easy.
  • Pulse - a signals and events framework (supporting queries that allow you to ask questions instead of just broadcast signals!)
  • Statement - a state machine framework (with a fully visual in-game debugger).
  • Quill - a FREE text box creator that automatically gives you advanced features like a right click context menu, proper text selection, multi-line text boxes, plus more!
  • Fate - a FREE weighted drop system with an easy to use beginner setup, but with a huge amount of advanced features hiding in the weeds.
  • Echo - advanced debug logging (level filtering, tags, optional stack traces, history dumps) that now comes with an advanced, yet easy to use debug UI builder!

Get Pulse, Catalyst, Statement and Echo in the Ignition Kit bundle for a discount! Or buy the Full Suite Pass bundle (get access to all past and future tools) in one go!

Download

Download NowName your own price

Click download now to get access to the following files:

Fate v1.0.0 34 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.