RNGenie.Picker
0.1.0-alpha.2
dotnet add package RNGenie.Picker --version 0.1.0-alpha.2
NuGet\Install-Package RNGenie.Picker -Version 0.1.0-alpha.2
<PackageReference Include="RNGenie.Picker" Version="0.1.0-alpha.2" />
<PackageVersion Include="RNGenie.Picker" Version="0.1.0-alpha.2" />
<PackageReference Include="RNGenie.Picker" />
paket add RNGenie.Picker --version 0.1.0-alpha.2
#r "nuget: RNGenie.Picker, 0.1.0-alpha.2"
#:package RNGenie.Picker@0.1.0-alpha.2
#addin nuget:?package=RNGenie.Picker&version=0.1.0-alpha.2&prerelease
#tool nuget:?package=RNGenie.Picker&version=0.1.0-alpha.2&prerelease
🎩 RNGenie.Picker 🎯
Deterministic Uniform & Weighted Picks for Loot Tables and Simulations
RNGenie.Picker provides simple, reproducible selection utilities. Define rarity tables or equal-weight sets and pick items deterministically with a seeded RNG.
✨ Features
- Weighted selection with a fluent API (great for rarity tables).
- Seeded determinism via RNGenie.Core RNG sources.
- Works with any type (
WeightedPicker<T>
). - Minimal allocations, straightforward API.
📄 Documentation
See the Picker Docs for usage and API details.
🚀 Quick Start
Install Core + Picker:
dotnet add package RNGenie.Core
dotnet add package RNGenie.Picker
Basic usage:
using RNGenie.Core.Sources;
using RNGenie.Picker;
// Seedable RNG for reproducibility
var rng = new Pcg32Source(seed: 123);
// Weighted rarity table
var rarity = new WeightedPicker<string>()
.Add("Common", 0.75)
.Add("Rare", 0.20)
.Add("Epic", 0.05)
.One(rng);
Console.WriteLine($"You got a {rarity} item!");
Output:
You got a Rare item!
🧩 Extensibility
- Layer pickers to build tiered loot tables (pick rarity → pick item from that bucket).
- Use the same RNG across systems to keep simulation runs replayable.
- Compose with distributions (e.g. roll counts, cooldowns).
📦 Roadmap
- "Pick many" helpers (with/without replacement).
- Alias-method sampler for large, static tables.
- Policy hooks (e.g. pity timers).
👩💻 Contributing
Pull requests are welcome!
Good first issues:
- Add helper APIs for "pick many"
- Benchmarks for large tables
See CONTRIBUTING.md for guidance. Also, check here for existing picker issue writeups.
📜 License
RNGenie is licensed under the MIT License. This means you're free to use it in open source, commercial, or personal projects.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- RNGenie.Core (>= 0.1.0-alpha.2)
-
net8.0
- RNGenie.Core (>= 0.1.0-alpha.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.1.0-alpha.2 | 39 | 9/13/2025 |
0.1.0-alpha.1 | 143 | 8/31/2025 |