sack-ExponentialItemsReloaded icon

ExponentialItemsReloaded

Items stack exponentially. 1 → 2 → 4 → 8 → chaos.

By sack
Last updated 3 months ago
Total downloads 56
Total rating 0 
Categories Mods
Dependency string sack-ExponentialItemsReloaded-1.2.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

bbepis-BepInExPack-5.4.2100 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.2100
RiskofThunder-R2API_Core-5.0.0 icon
RiskofThunder-R2API_Core

Core R2API module

Preferred version: 5.0.0
RiskofThunder-R2API_ContentManagement-1.0.0 icon
RiskofThunder-R2API_ContentManagement

API for adding content to the game

Preferred version: 1.0.0
RiskofThunder-R2API_Language-1.0.0 icon
RiskofThunder-R2API_Language

API for modifying the language localisation of the game

Preferred version: 1.0.0

README

Exponential Items Reloaded

What it does

Configurable exponential item grants on authoritative inventory pickups:
effectiveGrant = Clamp(vanillaCount * LinearPickupMultiplier * ExponentialBase ^ stacksBeforePickup, spareRoomUnderCap).
Blacklist / whitelist entries only change how the count is evaluated — loot tables, printers, chests, director cards, etc. never change.

Classic pacing with defaults: pickups grow like 1 → 2 → 4 → 8 → ….

Artifact

Registers Artifact of Exponents. When RequireArtifact is enabled (default), the math only engages while this artifact is on for the run (server-checked).

Set RequireArtifact = false to mirror always-on cheat-style profiles.

Build (source in this repo)

References BepInEx core and R2API from your Thunderstore profile’s BepInEx\plugins siblings (nested R2API.Core.dll paths). References RoR2 itself from Ro2ManagedDir=…\Risk of Rain 2_Data\Managed.

Thunderstore zip (one command)

From PowerShell inside this repo:

.\BuildAndZipThunderstore.ps1 -Ro2InstallDir "YOUR_STEAM_PATH\Risk of Rain 2"

You get CryptidLabs-ExponentialItemsReloaded-<version>.zip with manifest.json, README.md, optional icon.png, and plugins\ExponentialItemsReloaded.dll — suitable for uploading at Thunderstore – create package.

Or build manually:

dotnet build -c Release /p:Ro2ManagedDir="…\Risk of Rain 2_Data\Managed"

Key files:

File Responsibility
Configuration/ModConfig.cs BepInEx ConfigEntry layout (Thunderstore-visible sections/order).
Configuration/KeyValueListParser.cs / ConfigParser.cs Reusable parsers for delimited identifiers and Key=Value rows.
Services/ItemConfigRegistry.cs Resolves textual identifiers against ItemCatalog, caches Dictionary<ItemDef,int>.
Services/ExponentialGrantEvaluator.cs Multiplayer-safe grant math after blacklist / caps / artifact gates.
Hooks/InventoryGrantPatches.cs Harmony prefix on Inventory.GiveItem(ItemDef,int) (single patch to avoid double-applying).
Content/ExponentArtifact.cs ContentAddition.AddArtifactDef + LanguageAPI strings.

Config tips

  • Prefer ItemDef.name values (e.g. PaulsGoatHoof, BoostSyringe, Feather) — not English pick-up text.
  • Unknown names log warnings and are skipped.
  • Toggle 9_Debug.VerboseLogging for successful registrations, filter hits, and final grant traces.
  • Edits apply live (BepInEx SettingChanged rebuilds cached dictionaries when the catalog is ready).

Credits

Original idea by Horse5333
Updated for modern RoR2 by mr.cleann__