Skip to content

Class "ItemPool"⚓︎


CanSpawnCollectible ()⚓︎

boolean CanSpawnCollectible ( CollectibleType Collectible, boolean ignoreLocked )⚓︎


If IgnoreLocked is set to true, this function will return true for items that could appear but are locked behind achievements.

It will still return false if the item was removed from the item pool or if it can't appear because other effects (Tainted Lost offensive items mechanic or NO! trinket effect).

GetBibleUpgrades ()⚓︎

int GetBibleUpgrades ( ItemPoolType PoolType )⚓︎

Returns number of Bible collectibles added to a pool.

GetCardEx ()⚓︎

Card GetCardEx ( int Seed, int SpecialChance, int RuneChance, int SuitChance, boolean AllowNonCards )⚓︎

More sophisticated version of ItemPool:GetCard() that allows to define individual chances.

GetCollectibleFromList ()⚓︎

CollectibleType GetCollectibleFromList ( CollectibleType[] ItemList, int Seed = Random(), CollectibleType DefaultItem = CollectibleType.COLLECTIBLE_BREAKFAST, boolean AddToBlacklist = true, boolean ExcludeLockedItems = false )⚓︎

GetCollectiblesFromPool ()⚓︎

table GetCollectiblesFromPool ( ItemPoolType PoolType )⚓︎

Returns a table of collectibles registered in the specified pool. The table contains the following fields

Field Type Comment
decreaseBy float
initialWeight float
itemID CollectibleType
removeOn float
weight float

GetNumAvailableTrinkets ()⚓︎

int GetNumAvailableTrinkets ( )⚓︎

Returns the amount of trinkets available in the item pool.

GetPillColor ()⚓︎

PillColor GetPillColor ( PillEffect ID )⚓︎

Returns a PillColor matching the specificed PillEffect, returns -1 if the Effect is not in the rotation.

Currently not applied by pill modifications, such as PHD/False PHD.

GetRemovedCollectibles ()⚓︎

table GetRemovedCollectibles ( )⚓︎

Returns a table of collectibles removed from all pools.

Example Code

This code checks if the sad onion has been removed.

local removedCollectibles = itemPool:GetRemovedCollectibles()

if removedCollectibles[CollectibleType.COLLECTIBLE_SAD_ONION] then
  print("Sad onion removed!")

GetRoomBlacklistedCollectibles ()⚓︎

table GetRoomBlacklistedCollectibles ( )⚓︎

Returns a table of collectibles blacklisted in the current room.

Example Code

This code checks if the sad onion has been removed.

local blacklistedCollectibles = itemPool:GetRoomBlacklistedCollectibles()

if blacklistedCollectibles[CollectibleType.COLLECTIBLE_SAD_ONION] then
  print("Sad onion blacklisted!")

HasCollectible ()⚓︎

boolean HasCollectible ( CollectibleType Collectible )⚓︎

Returns true if collectible is available in item pools, false otherwise.

HasTrinket ()⚓︎

boolean HasTrinket ( TrinketType Trinket )⚓︎

Returns true if trinket is currently available in trinket pool, false otherwise.

UnidentifyPill ()⚓︎

void UnidentifyPill ( PillColor Pill )⚓︎

Will reset a pill back to unidentified (???) state.