📚
Library of Isaac
  • Library of Isaac
  • Get Started
  • F.A.Q.
  • Custom Enums
    • AmbushType
    • AngelVariant
    • BabyLongLegsVariant
    • BabyVariant
    • BeastVariant
    • BegottenVariant
    • BigBonyVariant
    • BigHornVariant
    • BloodClotSubType
    • BloodExplosionSubType
    • BloodPuppyVariant
    • BlueFlySubType
    • BoilVariant
    • BonyVariant
    • BoomFlyVariant
    • BossID
    • CallbackOptionalArgType
    • CallbackReturnMode
    • CanaryVariant
    • Charger2Variant
    • ChargerSubType
    • ChargerVariant
    • ChimeraVariant
    • ChubVariant
    • ClottyVariant
    • ClutchVariant
    • ConjoinedFattyVariant
    • ConstantStoneShooterSubType
    • ConstantStoneShooterVariant
    • ConversionHeartSubType
    • CopyableIsaacAPIClassType
    • CrawlSpaceVariant
    • CrazyLongLegsVariant
    • CultistVariant
    • CustomCallback
    • CustomReviveType
    • DaddyLongLegsVariant
    • DannyVariant
    • DarkEsauVariant
    • DeathsHeadVariant
    • DeathVariant
    • DebugMode
    • DiceFloorSubType
    • Dimension
    • DingleVariant
    • DipFamiliarSubType
    • DipVariant
    • DogmaVariant
    • DopleVariant
    • DukeVariant
    • DumpVariant
    • EnvyVariant
    • EvisVariant
    • ExorcistVariant
    • EyeVariant
    • FacelessVariant
    • FallenVariant
    • FattyVariant
    • FireplaceVariant
    • FistulaVariant
    • FlyBombVariant
    • Gaper2Variant
    • GaperVariant
    • GeminiVariant
    • GenericPropVariant
    • GibSubType
    • GlobinVariant
    • GluttonyVariant
    • GoatVariant
    • GreedVariant
    • GridEntityXMLType
    • GrimaceVariant
    • GrubVariant
    • GurgleVariant
    • GurglingVariant
    • GusherVariant
    • GutsVariant
    • GuttedFattyVariant
    • GyroVariant
    • HauntVariant
    • HealthType
    • HeartVariant
    • HeavenLightDoorSubType
    • HiveVariant
    • HomunculusVariant
    • HopperVariant
    • HostVariant
    • InventoryType
    • IsaacVariant
    • ItemConfigTag
    • KnifeVariant
    • KnightVariant
    • LambVariant
    • LarryJrVariant
    • LeaperVariant
    • LeechVariant
    • LeperVariant
    • LittleHornVariant
    • LockState
    • LokiVariant
    • LustVariant
    • MamaGurdyVariant
    • MaskVariant
    • MawVariant
    • MegaSatanVariant
    • MembrainVariant
    • MoleVariant
    • MomsHeartVariant
    • MomVariant
    • Monstro2Variant
    • MotherSubType
    • MotherVariant
    • MoveableTNTVariant
    • MrMawVariant
    • MrMineVariant
    • MulliganVariant
    • NeedleVariant
    • NerveEndingVariant
    • ParaBiteVariant
    • PeeperFattyVariant
    • PeepVariant
    • PickupNullSubType
    • PillEffectType
    • PinVariant
    • PitfallVariant
    • PitState
    • PitVariant
    • PokyVariant
    • PoltyVariant
    • PolycephalusVariant
    • PoofSubType
    • PoopEntityVariant
    • PoopGridEntityVariant
    • PoopState
    • PooterVariant
    • PortalVariant
    • PressurePlateVariant
    • PreyVariant
    • PrideVariant
    • ProjectilesMode
    • PurgatorySubType
    • RageCreepVariant
    • RaglichVariant
    • RaglingVariant
    • RagManVariant
    • RagMegaVariant
    • RevenantVariant
    • RockSpiderVariant
    • RockState
    • RockVariant
    • RotgutVariant
    • RoundWormVariant
    • SatanVariant
    • ScourgeVariant
    • SerializationBrand
    • SerializationType
    • ShockwaveSoundMode
    • ShopKeeperVariant
    • SingeVariant
    • SirenVariant
    • SkinnyVariant
    • SlothVariant
    • SlotVariant
    • SpiderWebState
    • SpittyVariant
    • SquirtVariant
    • StageID
    • StatueVariant
    • StoneyVariant
    • SubHorfVariant
    • SuckerVariant
    • SwingerVariant
    • TallLadderSubType
    • TNTState
    • TrapdoorVariant
    • TumorVariant
    • UltraCoinVariant
    • UltraGreedVariant
    • VariablePersistenceMode
    • VisageVariant
    • VisFattyVariant
    • VisVariant
    • WalkingBoilVariant
    • WallCreepVariant
    • WarVariant
    • WhipperVariant
    • WidowVariant
    • WrathVariant
  • CustomCallback
  • Modules
    • Ambush
    • Benchmark
    • BitSet128
    • Bombs
    • Bosses
    • Charge
    • Collectibles
    • Color
    • CustomItemPools
    • Debug
    • Dimensions
    • Direction
    • Doors
    • Effects
    • Entities
    • EntitySpecific
    • Familiars
    • GridEntities
    • GridIndexes
    • GridSpecific
    • Input
    • IsaacAPIClass
    • ItemPool
    • JSON
    • Log
    • Pause
    • Pickups
    • PickupSpecific
    • Pills
    • Players
    • Random
    • RNG
    • Rooms
    • RoomSpecific
    • Run
    • SaveManager
    • Serialize
    • ShockWaves
    • Sprites
    • Stage
    • Trinkets
    • UI
    • Utils
      • DeepCopy
      • Easings
      • Flags
      • Functions
      • Math
      • String
      • Tables
    • Vector
Powered by GitBook
On this page
  • Overview
  • Functions
  • CheckFamiliar()
  • CheckFamiliarFromCollectibles()
  • GetPlayerFamiliars()
  • GetSirenHelper()
  • IsFamiliarStolenBySiren()
  1. Modules

Familiars

PreviousEntitySpecificNextGridEntities

Last updated 2 years ago

Overview

Return Value
Function

void

void

boolean

Functions

CheckFamiliar()

void CheckFamiliar(player,collectibleType, integer targetCount, familiarVariant, integer? familiarSubtype)

Helper function to add and remove familiars based on a target amount that you specify. This is a convenience wrapper around the EntityPlayer.CheckFamiliar method. Use this helper function instead so that you do not have to retrieve the ItemConfigItem and so that you do not specify an incorrect RNG object. (The vanilla method is bugged in that it does not increment the RNG object; see the documentation of the method for more details.) This function is meant to be called in the EVALUATE_CACHE callback (when the cache flag is equal to CacheFlag.FAMILIARS). Note that this function is only meant to be used in special circumstances where the familiar count is completely custom and does not correspond to the amount of collectibles. For the general case, use the checkFamiliarFromCollectibles helper function instead. Note that this will spawn familiars with a completely random InitSeed. When calculating random events for this familiar, you should use a data structure that maps familiar InitSeed to RNG objects that are initialized based on the seed from EntityPlayer.GetCollectibleRNG(collectibleType).

CheckFamiliarFromCollectibles()

void CheckFamiliarFromCollectibles(player,collectibleType, familiarVariant, integer? familiarSubtype)

Helper function to add and remove familiars based on the amount of associated collectibles that a player has. Use this helper function instead of invoking the EntityPlayer.CheckFamiliar method directly so that the target count is handled automatically. This function is meant to be called in the EVALUATE_CACHE callback (when the cache flag is equal to CacheFlag.FAMILIARS). Use this function when the amount of familiars should be equal to the amount of associated collectibles that the player has (plus any extras from having used Box of Friends or Monster Manual). If you instead need to have a custom amount of familiars, use the checkFamiliars function instead. Note that this will spawn familiars with a completely random InitSeed. When calculating random events for this familiar, you should use a data structure that maps familiar InitSeed to RNG objects that are initialized based on the seed from EntityPlayer.GetCollectibleRNG(collectibleType).

GetPlayerFamiliars()

Helper function to get all familiars that belong to a given player.

GetSirenHelper()

Helper function to get the corresponding "Siren Helper" entity for a stolen familiar. When The Siren boss "steals" your familiars, a hidden "Siren Helper" entity is spawned to control each familiar stolen. (Checking for the presence of this entity seems to be the only way to detect when the Siren steals a familiar.)

IsFamiliarStolenBySiren()

Helper function to check if the given familiar is being controlled by The Siren boss.

( player, collectibleType, integer targetCount, familiarVariant, integer? familiarSubtype)

( player, collectibleType, familiarVariant, integer? familiarSubtype)

[]

( player)

?

( familiar)

( familiar)

[] GetPlayerFamiliars( player)

? GetSirenHelper( familiar)

boolean IsFamiliarStolenBySiren( familiar)

EntityPlayer
CollectibleType
FamiliarVariant
EntityPlayer
CollectibleType
FamiliarVariant
EntityFamiliar
EntityPlayer
Entity
EntityFamiliar
EntityFamiliar
EntityFamiliar
Entity
EntityPlayer
CollectibleType
FamiliarVariant
CheckFamiliar
EntityPlayer
CollectibleType
FamiliarVariant
CheckFamiliarFromCollectibles
EntityPlayer
GetPlayerFamiliars
EntityFamiliar
GetSirenHelper
EntityFamiliar
IsFamiliarStolenBySiren