CardChoiceSpawnUniqueCardPatch

v0.1.10·Updated 2023-11-26

Patches erroneous logic in the base game CardChoice method SpawnUniqueCard

About this mod Author’s original text

CardChoiceSpawnUniqueCardPatch

This is a utility mod which patches the erroneous CardChoice.SpawnUniqueCard method in the base game code.

Previously, the game would not properly check if the allowMultiple or blacklistedcategories fields of a card should have prevented it from being offered. Moreover, if it had done this, it would have been possible to crash the game since the method was called recursively with no garunteed exit.

This mod also adds the ability for custom cards (made with Unbound) to use CardCategories, even across mods. Simply use:

using using CardChoiceSpawnUniqueCardPatch.CustomCategories;...

cardInfo.categories = new CardCategory { CustomCardCategories.instance.CardCategory("MySpecialCategory") };

then, if another card in another mod wants to be exclusive or incompatible with the example card above, it should simply use:

using using CardChoiceSpawnUniqueCardPatch.CustomCategories;...

cardInfo.blacklistedCategories = new CardCategory { CustomCardCategories.instance.CardCategory("MySpecialCategory") };

Patch Notes

  • 1.6: performance improvements

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack_ROUNDSwillis81808-UnboundLibPykess-ModdingUtils

File & checksum

Filename
CardChoiceSpawnUniqueCardPatch-0.1.10.zip
File size
73.5 KiB
SHA-256
311392c9665de8748d1ff8e61d6dd5663ece94292e33184f6e44ce8b3f838820
Stored at
2026-10-06 19:12