Pykess-CardChoiceSpawnUniqueCardPatch icon

CardChoiceSpawnUniqueCardPatch

Patches erroneous logic in the base game CardChoice method SpawnUniqueCard

Last updated a day ago
Total downloads 27011
Total rating 2 
Categories Utilities
Dependency string Pykess-CardChoiceSpawnUniqueCardPatch-0.1.5
Dependants 12 other mods depend on this mod

This mod requires the following mods to function

BepInEx-BepInExPack_ROUNDS-5.4.1100 icon
BepInEx-BepInExPack_ROUNDS

BepInEx pack for ROUNDS. Preconfigured and ready to use.

Preferred version: 5.4.1100
willis81808-UnboundLib-2.7.1 icon
willis81808-UnboundLib

This is a helpful utility for ROUNDS modders aimed at simplifying common tasks.

Preferred version: 2.7.1
Pykess-ModdingUtils-0.1.7 icon
Pykess-ModdingUtils

Utilities aimed at making modding easier and more accessible

Preferred version: 0.1.7

README

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") };

Available versions

Please note that the install buttons only work if you have compatible client software installed, such as the Thunderstore Mod Manager. Otherwise use the zip download links instead.

Upload date Version number Downloads Download link  
2021-9-20 0.1.5 819 Version 0.1.5 Install
2021-9-1 0.1.4 6298 Version 0.1.4 Install
2021-9-1 0.1.3 184 Version 0.1.3 Install
2021-8-24 0.1.2 2726 Version 0.1.2 Install
2021-8-11 0.1.1 4652 Version 0.1.1 Install
2021-7-15 0.1.0 8753 Version 0.1.0 Install
2021-6-29 0.0.0 3579 Version 0.0.0 Install