Skip to content

Class "EntityPlayer"⚓︎

This class contains both new functions and modified reimplementations of existing ones.

Class Diagram⚓︎

    classDiagram
    class Entity:::diagramCurrentPage
    class EntityBomb
    class EntityEffect
    class EntityFamiliar
    class EntityKnife
    class EntityLaser
    class EntityNPC
    class EntityPickup
    class EntityPlayer
    class EntityProjectile
    class EntitySlot
    class EntityTear
    Entity <|-- EntityBomb
    Entity <|-- EntityEffect
    Entity <|-- EntityFamiliar
    Entity <|-- EntityKnife
    Entity <|-- EntityLaser
    Entity <|-- EntityNPC
    Entity <|-- EntityPickup
    Entity <|-- EntityPlayer
    Entity <|-- EntityProjectile
    Entity <|-- EntitySlot
    Entity <|-- EntityTear
    link Entity "https://wofsauge.github.io/IsaacDocs/rep/Entity.html" "Go to page for 'Entity' class"
    link EntityBomb "https://wofsauge.github.io/IsaacDocs/rep/EntityBomb.html" "Go to page for 'EntityBomb' class"
    link EntityEffect "https://wofsauge.github.io/IsaacDocs/rep/EntityEffect.html" "Go to page for 'EntityEffect' class"
    link EntityFamiliar "https://wofsauge.github.io/IsaacDocs/rep/EntityFamiliar.html" "Go to page for 'EntityFamiliar' class"
    link EntityKnife "https://wofsauge.github.io/IsaacDocs/rep/EntityKnife.html" "Go to page for 'EntityKnife' class"
    link EntityLaser "EntityLaser.html" "Go to page for 'EntityLaser' class"
    link EntityNPC "EntityNPC.html" "Go to page for 'EntityNPC' class"
    link EntityPickup "EntityPickup.html" "Go to page for 'EntityPickup' class"
    link EntityPlayer "EntityPlayer.html" "Go to page for 'EntityPlayer' class"
    link EntityProjectile "https://wofsauge.github.io/IsaacDocs/rep/EntityProjectile.html" "Go to page for 'EntityProjectile' class"
    link EntitySlot "EntitySlot.html" "Go to page for 'EntitySlot' class"
    link EntityTear "https://wofsauge.github.io/IsaacDocs/rep/EntityTear.html" "Go to page for 'EntityTear' class"

Modified Functions⚓︎

AddCacheFlags ()⚓︎

void AddCacheFlags ( CacheFlag CacheFlag, boolean EvaluateItems = false )⚓︎

Now accepts an optional bool to determine if EntityPlayer:EvaluateItems() should be automatically called after adding cache flags. In most cases, you'll want to do this.


AddCollectibleEffect, ()⚓︎

void AddCollectibleEffect ( CollectibleType ctype, bool applycostume, int cooldown = vanillacd, bool additive = true )⚓︎

Shortcut of TemporaryEffects:AddCollectibleEffect with extra args to handle cooldown. The additive parameter determines if the cooldown should be added to the preexistent cooldown value or if it should be set for that value. You can use negative cooldown values with additive to reduce preexistent cooldown.


AddNullItemEffect, ()⚓︎

void AddNullItemEffect ( int nullItemid, bool applycostume, int cooldown = vanillacd, bool additive = true )⚓︎

Shortcut of TemporaryEffects:AddNullItemEffect with extra args to handle cooldown. The additive parameter determines if the cooldown should be added to the preexistent cooldown value or if it should be set for that value. You can use negative cooldown values with additive to reduce preexistent cooldown.


ClearDeadEyeCharge ()⚓︎

void ClearDeadEyeCharge ( boolean Force = false )⚓︎

Now accepts a Force argument to forcefully reset the charge instead of only rolling for a change to reset.


GetCollectibleNum ()⚓︎

int GetCollectibleNum ( CollectibleType Collectible, boolean OnlyCountTrueItems = false, IgnoreSpoof = false )⚓︎

Now accepts a IgnoreSpoof argument that ignores innate items.


GetMultiShotParams ()⚓︎

MultiShotParams GetMultiShotParams ( WeaponType WeaponType )⚓︎

Now returns a proper MultiShotParams object.


GetMultiShotPositionVelocity ()⚓︎

PosVel GetMultiShotPositionVelocity ( int LoopIndex, WeaponType WeaponType, Vector ShotDirection, float ShotSpeed, MultiShotParams Params )⚓︎

This magically vanished from the API some time after 1.7.8.

Compared to the vanilla function, this implementation has been further augmented to throw an error if LoopIndex is higher than MultiShotParams:GetNumTears().


GetPocketItem ()⚓︎

PocketItem GetPocketItem ( PillCardSlot Slot )⚓︎

Gets the card/pill/rune in the specified pocket slot.

Now returns a proper PocketItem object.


HasCollectible ()⚓︎

boolean HasCollectible ( CollectibleType Collectible, boolean IgnoreModifiers = false, boolean IgnoreSpoof = false )⚓︎

Now accepts a IgnoreSpoof argument that ignores innate items.


Modified Variables⚓︎


BabySkin⚓︎

BabySubType BabySkin⚓︎

Same as default, but now returns a proper integer value instead of userdata.


Functions⚓︎

AddActiveCharge ()⚓︎

int AddActiveCharge ( int Charge, ActiveSlot Slot, boolean FlashHUD = true, boolean Overcharge = false, boolean Force = false )⚓︎

Returns the true amount of charge added, which may have been capped by the targeted item's MaxCharge.

Info

FlashHUD appears to be redundant. Chargebar flashes regardless of using true or false.


AddBoneOrbital ()⚓︎

void AddBoneOrbital ( Vector Position )⚓︎


AddCustomCacheTag ()⚓︎

void AddCustomCacheTag ( string OR {string, string, ...}, bool EvaluateItems = false )⚓︎

Add CustomCacheTag(s) to be evaluated next time EvaluateItems runs (which is right now, if the optional boolean is passed).

See items.xml for more information on custom caches.


AddInnateCollectible ()⚓︎

void AddInnateCollectible ( CollectibleType Collectible, int Amount = 1 )⚓︎

Bug

Currently this function directly modifies the contents of WispCollectiblesList, so if this list was updated on wisp init/delete, or the player exits the run, your added innate items will not be saved.


AddLeprosy ()⚓︎

void AddLeprosy ( )⚓︎

Info

This is currently still capped at a max of three familiars, and would require further modification to change this.


AddLocust ()⚓︎

void AddLocust ( CollectibleType Collectible, Vector Position )⚓︎

Supported Items

There are a few items which spawn unique locusts.

  • Breakfast (default)
  • The Inner Eye
  • Spoon Bender
  • Cricket's Head
  • Number One
  • Blood of the Martyr
  • Halo of Flies
  • The Common Cold
  • Brimstone
  • Ipecac
  • Mutant Spider
  • Fire Mind
  • Scorpio
  • Holy Light
  • Jacob's Ladder
  • 120 Volt

AddSmeltedTrinket ()⚓︎

boolean AddSmeltedTrinket ( TrinketType Trinket, boolean FirstTimePickingUp = true )⚓︎

Adds a smelted trinket directly to the player's inventory.

Returns true if the trinket was successfully added, otherwise false.


AddUrnSouls ()⚓︎

void AddUrnSouls ( int Count = 0 )⚓︎


BlockCollectible ()⚓︎

void BlockCollectible ( CollectibleType Collectible )⚓︎

Blocks the provided CollectibleType. This will make it so the game thinks you don't have the item, even if it's in your inventory.


CanAddCollectibleToInventory ()⚓︎

boolean CanAddCollectibleToInventory ( CollectibleType Collectible )⚓︎


CanCrushRocks ()⚓︎

boolean CanCrushRocks ( )⚓︎

Info

Returns true if the player has one of the following items / effects / transformations.

  • The Nail
  • Leo
  • Thunder Thighs
  • Mega Mush
  • Stompy

CanOverrideActiveItem ()⚓︎

boolean CanOverrideActiveItem ( ActiveSlot Slot )⚓︎


CanUsePill ()⚓︎

boolean CanUsePill ( PillEffect ID )⚓︎

By some conditions, usually health-related, determines whether a player can use a given pill effect.


CheckFamiliarEx ()⚓︎

EntityFamiliar[] CheckFamiliarEx ( int FamiliarVariant Familiar, int TargetCount, RNG rng, ItemConfigItem SourceItemConfigItem = nil, int FamiliarSubType = -1 )⚓︎

A version of CheckFamiliar that returns all familiars spawned by the function as a table.


ClearCollectibleAnim ()⚓︎

void ClearCollectibleAnim ( CollectibleType Collectible)⚓︎


ClearItemAnimCollectible ()⚓︎

void ClearItemAnimCollectible ( CollectibleType ID )⚓︎


ClearItemAnimNullItems ()⚓︎

void ClearItemAnimNullItems ( )⚓︎


ClearQueueItem ()⚓︎

void ClearQueueItem ( )⚓︎


DropCollectible ()⚓︎

void DropCollectible ( CollectibleType Collectible, EntityPickup ExistingPedestal = nil, boolean RemoveFromPlayerForm = false )⚓︎

If ExistingPedestal is set, the collectible it contains will be swapped out for the dropped collectible instead of a new pedestal spawning.


DropCollectibleByHistoryIndex ()⚓︎

EntityPickup DropCollectibleByHistoryIndex ( int Idx, EntityPickup ExistingPedestal = nil )⚓︎

If ExistingPedestal is set, the collectible it contains will be swapped out for the dropped collectible instead of a new pedestal spawning.


EnableWeaponType ()⚓︎

void EnableWeaponType ( WeaponType Weapon, boolean Set )⚓︎


FireBrimstoneBall ()⚓︎

EntityEffect FireBrimstoneBall ( Vector Position, Vector Velocity, Vector Offset = Vector.Zero )⚓︎

Info

If the player has Tech X, this function will fire an EntityLaser as well. The laser will have the Brimstone ball effect as a parent, it's unclear if the effect also links back to the laser.


GetActiveItemDesc ()⚓︎

ActiveItemDesc GetActiveItemDesc ( ActiveSlot Slot = ActiveSlot.SLOT_PRIMARY )⚓︎


GetActiveItemSlot ()⚓︎

ActiveSlot GetActiveItemSlot ( CollectibleType Collectible )⚓︎


GetActiveMaxCharge ()⚓︎

int GetActiveMaxCharge ( ActiveSlot Slot )⚓︎


GetActiveMinUsableCharge ()⚓︎

int GetActiveMinUsableCharge ( ActiveSlot Slot )⚓︎


GetActiveWeaponNumFired ()⚓︎

int GetActiveWeaponNumFired ( )⚓︎


GetBagOfCraftingContent ()⚓︎

BagOfCraftingPickup[] GetBagOfCraftingContent ( )⚓︎


GetBagOfCraftingOutput ()⚓︎

CollectibleType GetBagOfCraftingOutput ( )⚓︎


GetBagOfCraftingSlot ()⚓︎

BagOfCraftingPickup GetBagOfCraftingSlot ( int SlotID )⚓︎

Gets the current content of the bag in the given SlotID.


GetBladderCharge ()⚓︎

int GetBladderCharge ( )⚓︎

Returns the current charge for when the player stops shooting and charges the Kidney Stone item.


GetBloodLustCounter ()⚓︎

int GetBloodLustCounter ( )⚓︎


GetBodyMoveDirection ()⚓︎

Vector GetBodyMoveDirection ( )⚓︎


GetBombPlaceDelay ()⚓︎

int GetBombPlaceDelay ( )⚓︎

Default bomb place delay is 30 frames.


GetCambionConceptionState ()⚓︎

int GetCambionConceptionState ( )⚓︎

Returns how many times the player has taken damage with the Cambion Conception item.


GetCambionPregnancyLevel ()⚓︎

int GetCambionPregnancyLevel ( )⚓︎

Corresponds to the current visible state of Cambion Conception's costume (0-2).


GetCollectiblesList ()⚓︎

table GetCollectiblesList ( )⚓︎

Returns a table with the amount of each collectible the player has, without counting innate items.

Example Code

This code prints how many sad onions the player has.

1
2
3
local collectiblesList = player:GetCollectiblesList()

print(collectiblesList[CollectibleType.COLLECTIBLE_SAD_ONION])

GetConceptionFamiliarFlags ()⚓︎

int GetConceptionFamiliarFlags ( )⚓︎

Returns the bitmask corresponding to which familiars have been spawned by Cambion/Immaculate Conception. The additional familiars provided by this bitmask are spawned during familiar cache evaluation, but only while the player has one of those two items.


GetCostumeLayerMap ()⚓︎

table GetCostumeLayerMap ( )⚓︎

Returns table of player sprite layers data for costumes with the following fields:

Field Type Comment
costumeIndex int Index of active/visible costume for that layer. -1 if no costume is on that layer.
layerID int ID of the sprite's layer corresponding to its anm2 file. -1 if no costume is on that layer.
priority int Costume's priority as listed in costumes2.xml. -1 if no costume is on that layer.
isBodyLayer boolean true if the costume is a body costume. false if not or if no costume is on that layer.
More Layer Map Info

The returned table's index order corresponds to PlayerSpriteLayer. However, due to the differences in the starting index of arrays between Lua and C++, CostumeLayerMap's index needs to be decreased by 1 and it's costumeIndex increased by 1 in order to get accurate information.

Below is a snippet of code that displays all currently occupied costume layers. Prints are sectioned as such: PlayerSpriteLayer - Layer Name - Item Name/NullItemID - Anm2 filepath

Example Code
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
local player = Isaac.GetPlayer()
local map = Isaac.GetPlayer():GetCostumeLayerMap()
print("-------------------------------------------------------------------")
local costumeSpriteDescs = player:GetCostumeSpriteDescs()
for layer, mapData in ipairs(map) do
    if mapData.costumeIndex == -1 then goto continue end
    local costumeSpriteDesc = costumeSpriteDescs[mapData.costumeIndex + 1]
    local sprite = costumeSpriteDesc:GetSprite()
    local itemConfig = costumeSpriteDesc:GetItemConfig()
    local layerName = sprite:GetLayer(mapData.layerID):GetName()
    local costumeName = itemConfig.Name ~= "" and Isaac.GetString("Items", itemConfig.Name) or "NullItemID "..itemConfig.ID
    local spritePath = sprite:GetFilename()
    print(layer - 1, "-", layerName, "-", costumeName, "-", spritePath)
    ::continue::
end
print("-------------------------------------------------------------------")

GetCostumeSpriteDescs ()⚓︎

CostumeSpriteDesc[] GetCostumeSpriteDescs ( )⚓︎

Returns a table of CostumeSpriteDesc.


GetCustomCacheValue ()⚓︎

float GetCustomCacheValue ( string CustomCacheTag )⚓︎

Returns the current cached value for the specified CustomCacheTag. Will return 0 by default if the provided tag has not been evaluated.

See items.xml for more information on custom caches.


GetD8DamageModifier ()⚓︎

int GetD8DamageModifier ( )⚓︎


GetD8FireDelayModifier ()⚓︎

int GetD8FireDelayModifier ( )⚓︎


GetD8RangeModifier ()⚓︎

int GetD8RangeModifier ( )⚓︎


GetD8SpeedModifier ()⚓︎

int GetD8SpeedModifier ( )⚓︎


GetDamageModifier ()⚓︎

int GetDamageModifier ( )⚓︎

For Experimental Treatement, returns -1, 0 or 1 depending on the damage rolled.


GetDeadEyeCharge ()⚓︎

int GetDeadEyeCharge ( )⚓︎


GetDeathAnimName ()⚓︎

string GetDeathAnimName ( )⚓︎

Returns the name of the player's death animation.

Return info

This can return the following strings:

  • Death - The regular death animation name.
  • LostDeath - When playing as the Lost, under the Lost Curse, playing as Forgotten's Soul, or in Tainted Jacob's Ghost form.

GetEdenDamage ()⚓︎

float GetEdenDamage ( )⚓︎

Returns the offset of the player's damage stat for Eden's random stats.


GetEdenFireDelay ()⚓︎

float GetEdenFireDelay ( )⚓︎

Returns the offset of the player's fire delay stat for Eden's random stats.


GetEdenLuck ()⚓︎

float GetEdenLuck ( )⚓︎

Returns the offset of the player's luck stat for Eden's random stats.


GetEdenRange ()⚓︎

float GetEdenRange ( )⚓︎

Returns the offset of the player's range stat for Eden's random stats.


GetEdenShotSpeed ()⚓︎

float GetEdenShotSpeed ( )⚓︎

Returns the offset of the player's shot speed stat for Eden's random stats.


GetEdenSpeed ()⚓︎

float GetEdenSpeed ( )⚓︎

Returns the offset of the player's speed stat for Eden's random stats.


GetEnterPosition ()⚓︎

Vector GetEnterPosition ( )⚓︎


GetEntityConfigPlayer ()⚓︎

EntityConfigPlayer GetEntityConfigPlayer ( )⚓︎


GetEpiphoraCharge ()⚓︎

int GetEpiphoraCharge ( )⚓︎


GetEveSumptoriumCharge ()⚓︎

int GetEveSumptoriumCharge ( )⚓︎

Returns the current charge of Tainted Eve's innate Sumptorium ability.


GetFireDelayModifier ()⚓︎

int GetFireDelayModifier ( )⚓︎

For Experimental Treatement, returns -1, 0 or 1 depending on the fire delay rolled.


GetFlippedForm ()⚓︎

EntityPlayer GetFlippedForm ( )⚓︎

Returns flipped form of the current character. (only used for Tainted Lazarus)

Otherwise, returns nil.


GetFocusEntity ()⚓︎

Entity GetFocusEntity ( )⚓︎

Returns the entity used by Active Camera to determine where the camera should focus. This can be either the Marked target EntityEffect or a weapon's entity. If none of these exist, this returns nil.


GetFootprintColor ()⚓︎

KColor GetFootprintColor ( boolean LeftFootprint )⚓︎


GetGlitchBabySubType ()⚓︎

int GetGlitchBabySubType ( )⚓︎


GetGlyphOfBalanceDrop ()⚓︎

table GetGlyphOfBalanceDrop ( int Variant = -1, int SubType = -1 )⚓︎

Returns a table containing the variant and subtype of the possible Glyph of Balance drop.


GetGnawedLeafTimer ()⚓︎

int GetGnawedLeafTimer ( )⚓︎


GetGreedsGulletHearts ()⚓︎

int GetGreedsGulletHearts ( )⚓︎


GetHallowedGroundCountdown ()⚓︎

int GetHallowedGroundCountdown ( )⚓︎

Returns the grace period countdown of retaining stats from the Hallowed Ground/Star of Bethlehem aura.


GetHeadDirectionLockTime ()⚓︎

int GetHeadDirectionLockTime ( )⚓︎

How long the player's head should be forced to stay in its current direction. -1 (or lower) indicates the direction is not currently locked.


GetHealthType ()⚓︎

HealthType GetHealthType ( )⚓︎


GetHeldEntity ()⚓︎

Entity GetHeldEntity ( )⚓︎

Returns the Entity that the player is holding over their head, such as with throwable red bombs or Suplex! Returns nil if no entity is currently being held.


GetHeldSprite ()⚓︎

Sprite GetHeldSprite ( )⚓︎

Gets the Sprite object used for when the player is doing an animation that involves holding a sprite over their head, such as active item usage.


GetHistory ()⚓︎

History GetHistory ( )⚓︎


GetImmaculateConceptionState ()⚓︎

int GetImmaculateConceptionState ( )⚓︎

Returns how many hearts have been collected with the Immaculate Conception item. Resets to 0 after spawning a familiar/soul heart.


GetKeepersSackBonus ()⚓︎

int GetKeepersSackBonus ( )⚓︎

Gets the number of coins spent while possessing Keeper's Sack.


GetLaserColor ()⚓︎

Color GetLaserColor ( )⚓︎


GetLuckModifier ()⚓︎

int GetLuckModifier ( )⚓︎

For Experimental Treatement, returns -1, 0 or 1 depending on the luck rolled.


GetMaggySwingCooldown ()⚓︎

int GetMaggySwingCooldown ( )⚓︎

Returns the amount of frames left until Tainted Magdalene's swing attack from being damaged can be used again. Returns 0 if the player is not Tainted Magdalene.


GetMarkedTarget ()⚓︎

EntityEffect GetMarkedTarget ( )⚓︎

Returns the entity effect representing the target of the Marked item. If the target is not displayed on the ground, this function returns nil.


GetMaxBladderCharge ()⚓︎

int GetMaxBladderCharge ( )⚓︎

Returns the maximum charge for when the player stops shooting and charges the Kidney Stone item.


GetMaxBombs ()⚓︎

int GetMaxBombs ( )⚓︎

Returns the maximum number of bombs the player can currently hold.


GetMaxCoins ()⚓︎

int GetMaxCoins ( )⚓︎

Returns the maximum number of coins the player can currently hold.


GetMaxKeys ()⚓︎

int GetMaxKeys ( )⚓︎

Returns the maximum number of keys the player can currently hold.


GetMaxPeeBurstCooldown ()⚓︎

int GetMaxPeeBurstCooldown ( )⚓︎

Returns the maximum attack duration of the Kidney Stone item.


GetMaxPocketItems ()⚓︎

int GetMaxPocketItems ( )⚓︎


GetMegaBlastDuration ()⚓︎

int GetMegaBlastDuration ( )⚓︎


GetMetronomeCollectibleID ()⚓︎

int GetMetronomeCollectibleID ( )⚓︎


GetMovingBoxContents ()⚓︎

EntitiesSaveStateVector GetMovingBoxContents ( )⚓︎

Returns the pickups that are stored on the player through the use of the Moving Box collectible.


GetNextUrethraBlockFrame ()⚓︎

int GetNextUrethraBlockFrame ( )⚓︎

Returns the frame at which the player stops shooting and starts charging the Kidney Stone item.


GetPeeBurstCooldown ()⚓︎

int GetPeeBurstCooldown ( )⚓︎

Returns the attack duration of the Kidney Stone item.


GetPlayerFormCounter ()⚓︎

int GetPlayerFormCounter ( PlayerForm PlayerFormID )⚓︎

Returns the amount of collectibles the player has tied to the specified transformation.


GetPlayerIndex ()⚓︎

int GetPlayerIndex ( )⚓︎


GetPonyCharge ()⚓︎

int GetPonyCharge ( )⚓︎

Returns the amount of frames left until the charging effect from the A Pony or White Pony item deactivates.


GetPurityState ()⚓︎

PurityState GetPurityState ( )⚓︎

Returns the state in which the Purity item effect currently is. Returns PurityState.BLUE if the player does not have the Purity collectible.


GetRedStewBonusDuration ()⚓︎

int GetRedStewBonusDuration ( )⚓︎

Returns the frames left until the damage bonus from Red Stew expires.


GetShotSpeedModifier ()⚓︎

int GetShotSpeedModifier ( )⚓︎

For Experimental Treatement, returns -1, 0 or 1 depending on the shot speed rolled.


GetSmeltedTrinkets ()⚓︎

table GetSmeltedTrinkets ( )⚓︎

Returns a table of smelted trinkets and their corresponding amounts. The returned table contains the following fields:

Field Type Comment
trinketAmount int
goldenTrinketAmount int

GetSpecialGridCollision ()⚓︎

int GetSpecialGridCollision ( Vector Position = self.Position )⚓︎


GetSpeedModifier ()⚓︎

int GetSpeedModifier ( )⚓︎

For Experimental Treatement, returns -1, 0 or 1 depending on the speed rolled.


GetSpoofedCollectiblesList ()⚓︎

table[] GetSpoofedCollectiblesList ( )⚓︎

Field Type Comment
CollectibleID CollectibleType
AppendedCount int
IsBlocked boolean

GetTearDisplacement ()⚓︎

int GetTearDisplacement ( )⚓︎

Returns the player's TearDisplacement value, used to check what eye the player is shooting from.

Return info
  • 1 Right eye
  • -1 Left eye

GetTotalActiveCharge ()⚓︎

int GetTotalActiveCharge ( ActiveSlot Slot )⚓︎


GetUrnSouls ()⚓︎

int GetUrnSouls ( )⚓︎


GetVoidedCollectiblesList ()⚓︎

CollectibleType[] GetVoidedCollectiblesList ( )⚓︎

Retuns a table containing the CollectibleTypes of all voided Active items.


GetWeapon ()⚓︎

Weapon GetWeapon ( int Slot )⚓︎

Returns the Weapon object in the corresponding slot, or nil if no Weapon can be found. Slot needs to be between 0 and 4.

Info

Weapon slots and their descriptions:

  • 0 - Backup Weapon such as Notched Axe and Urn of Souls.
  • 1 - Primary Weapon.
  • 2 - Additional Weapon. Few instances of this exist in the vanilla game, but it can be populated by mods.
  • 3 - Additional Weapon.
  • 4 - Additional Weapon.

Always check for nil, even for slot 1 as it can be deleted by mods via Isaac.DestroyWeapon().


GetWeaponModifiers ()⚓︎

int GetWeaponModifiers ( )⚓︎

Returns a bitmask of WeaponModifiers.


GetWildCardItem ()⚓︎

int GetWildCardItem ( )⚓︎

Returns the item that was last used by the player and would be activated again upon using Wild Card.

If the player used an active item, its CollectibleType is returned. If the player used a consumable, its variant is returned. If the player used ? Mark Card, returns 1. If no active item had ever been used by the player before, turns 0.


GetWildCardItemType ()⚓︎

PocketItemType GetWildCardItemType ( )⚓︎

Returns the type of item that was last used by the player and would be activated again upon using Wild Card.

If the player used a consumable (including ? Mark Card), returns ItemType.ITEM_PASSIVE. If no active item had been used by the player before, returns 255.


GetWispCollectiblesList ()⚓︎

table GetWispCollectiblesList ( )⚓︎

Returns a table of CollectibleTypes corresponding to the item wisps the player has.


HasChanceRevive ()⚓︎

boolean HasChanceRevive ( )⚓︎

Returns true if a "?" would be displayed on the player's extra life count (ie, the player has Guppy's Collar, or a modded revive item with the chancerevive string in REPENTOGON's customtags items.xml attribute).


HasGoldenTrinket ()⚓︎

boolean HasGoldenTrinket ( TrinketType Trinket )⚓︎

Returns true if you have a golden variant of the provided TrinketType.


HasInstantDeathCurse ()⚓︎

boolean HasInstantDeathCurse ( )⚓︎

Returns true when the player is in the Lost form triggered by either the white fire in Downpour or Soul of The Lost. (or when in Tainted Jacob's ghost form when being touched by Dark Esau)


HasPoisonImmunity ()⚓︎

boolean HasPoisonImmunity ( )⚓︎


IncrementPlayerFormCounter ()⚓︎

void IncrementPlayerFormCounter ( PlayerForm Form, int Count )⚓︎

Increases or decreases the counter towards one of the player's transformations. Count can be negative to decrement the PlayerForm.


InitPostLevelInitStats ()⚓︎

void InitPostLevelInitStats ( )⚓︎

Call this after spawning characters with "special" tears (Forgotten, Lilith, Azazel etc) with InitTwin, or they won't have their proper tear type.


InitTwin ()⚓︎

EntityPlayer InitTwin ( PlayerType PlayerType )⚓︎

Initializes a new player that is controlled by the player's same controller.

Bug

The twin player will desync from its main twin on save and continue. This softlocks the game in singleplayer, as the game prompts for a controller.

We've received confirmation from _Kilburn that this is hardcoded to be handled on vanilla characters. We will need to add a workaround for this.


IsCollectibleAnimFinished ()⚓︎

boolean IsCollectibleAnimFinished ( CollectibleType Collectible, string Animation )⚓︎

Returns true if the animation associated with the collectible is visible.


IsCollectibleBlocked ()⚓︎

boolean IsCollectibleBlocked ( CollectibleType Collectible )⚓︎

Returns true if the CollectibleType was blocked. Collectibles can only be blocked by use of BlockCollectible.


IsCollectibleCostumeVisible ()⚓︎

boolean IsCollectibleCostumeVisible ( CollectibleType Collectible, int PlayerSpriteLayerID )⚓︎

boolean IsCollectibleCostumeVisible ( CollectibleType Collectible, string PlayerSpriteLayerName )⚓︎

Returns true if the costume associated with the collectible is visible.


IsEntityValidTarget ()⚓︎

boolean IsEntityValidTarget ( Entity Entity )⚓︎


IsFootstepFrame ()⚓︎

boolean IsFootstepFrame ( int Foot = -1 )⚓︎

Info
  • -1 - Returns true every 12 frames.
  • 0 - Returns true every 24 frames.
  • 1 - Always false.

IsHeadless ()⚓︎

boolean IsHeadless ( )⚓︎

Returns true is the player is headless due to collectibles such as Guillotine, The Intruder, Scissors, and Decap Attack.


IsHologram ()⚓︎

boolean IsHologram ( )⚓︎

Returns true if the player is the non-active form of Tainted Lazarus with Birthright.


IsInvisible ()⚓︎

boolean IsInvisible ( )⚓︎

Returns true if the player has the Faded Polaroid / Camo Undies effect active.


IsItemCostumeVisible ()⚓︎

boolean IsItemCostumeVisible ( ItemConfig_Item Item, int PlayerSpriteLayerID )⚓︎

boolean IsItemCostumeVisible ( ItemConfig_Item Item, int PlayerSpriteLayerName )⚓︎


IsLocalPlayer ()⚓︎

boolean IsLocalPlayer ( )⚓︎

For online play. Returns true if you're a local player, false otherwise.


IsNullItemCostumeVisible ()⚓︎

boolean IsNullItemCostumeVisible ( int nullItem, int layerID = 0 )⚓︎

boolean IsNullItemCostumeVisible ( int nullItem, string layerName )⚓︎


IsPacifist ()⚓︎

boolean IsPacifist ( )⚓︎


IsUrethraBlocked ()⚓︎

boolean IsUrethraBlocked ( )⚓︎

Returns true when the player can no longer shoot due to charging the Kidney Stone item.


MorphToCoopGhost ()⚓︎

void MorphToCoopGhost ( )⚓︎

Turns the player into a co-op ghost.


PlayCollectibleAnim ()⚓︎

void PlayCollectibleAnim ( CollectibleType Collectible, boolean CheckBodyLayers, string AnimationName, int Frame = -1 )⚓︎

Plays an animation tied to the provided collectible.


PlayDelayedSFX ()⚓︎

void PlayDelayedSFX ( SoundEffect ID, int SoundDelay = 0, int FrameDelay = 2, float Volume = 1.0 )⚓︎

Plays a sound effect after a delay.


RemoveCollectibleByHistoryIndex ()⚓︎

void RemoveCollectibleByHistoryIndex ( int Index )⚓︎

Removes the collectible from the player associated with the specified history index.


RemovePocketItem ()⚓︎

void RemovePocketItem ( PillCardSlot Slot )⚓︎


RemovePoopSpell ()⚓︎

void RemovePoopSpell ( int Position = 0 )⚓︎

Removes the poop spell from the specified queue position and shifts all spells after it forward to fill the space. A new spell is randomly picked to fill the last position. Poop spells are only used by Tainted ???.


RerollAllCollectibles ()⚓︎

void RerollAllCollectibles ( RNG rng, boolean includeActiveItems )⚓︎

Rerolls all of the player's collectibles.


ResetPlayer ()⚓︎

void ResetPlayer ( )⚓︎

Info

This is used by the Genesis active item.


ReviveCoopGhost ()⚓︎

boolean ReviveCoopGhost ( )⚓︎


SalvageCollectible ()⚓︎

void SalvageCollectible ( EntityPickup Pickup, RNG rng = PickupDropRNG, ItemPoolType Pool = ItemPoolType.POOL_NULL)⚓︎

void SalvageCollectible ( CollectibleType Collectible, Vector position = playerPosition, RNG rng = PlayerDropRNG, ItemPoolType Pool = ItemPoolType.POOL_NULL )⚓︎

Produces a random quantity of various pickups, similar to Tainted Cain's ability.

Info

The provided EntityPickup will be removed by this function. Use the override to avoid this.


SetActiveVarData ()⚓︎

void SetActiveVarData ( int VarData, ActiveSlot Slot )⚓︎


SetBagOfCraftingContent ()⚓︎

void SetBagOfCraftingContent ( BagOfCraftingPickup[] ContentTable )⚓︎

Sets the content of the bag to the content of the table. Table must use valid BagOfCraftingPickup ids. Table can be shorter than 8, in which case the remaining indexes are set to empty.


SetBagOfCraftingOutput ()⚓︎

void SetBagOfCraftingOutput ( CollectibleType Collectible )⚓︎

Sets the output of the player's Bag of Crafting to the specified collectible.


SetBagOfCraftingSlot ()⚓︎

void SetBagOfCraftingSlot ( int SlotID, BagOfCraftingPickup PickupID )⚓︎

Sets the specified slot in the player's Bag of Crafting to the specified pickup.


SetBlackHeart ()⚓︎

void SetBlackHeart ( int BlackHeart )⚓︎


SetBladderCharge ()⚓︎

void SetBladderCharge ( int Charge )⚓︎

Used by the Kidney Stone item.

Bug

The player's head turns pitch black when this function is used without Kidney Stone.


SetBloodLustCounter ()⚓︎

void SetBloodLustCounter ( int Counter )⚓︎


SetBombPlaceDelay ()⚓︎

void SetBombPlaceDelay ( int Delay )⚓︎


SetCambionConceptionState ()⚓︎

void SetCambionConceptionState ( int State )⚓︎

Sets how much damage has been taken for the Cambion Conception item.

Note that the game only spawns a familiar when the player takes damage, if this counter is now at 15, 30, 60 or 90. You cannot trigger a birth directly with this function.


SetCanShoot ()⚓︎

boolean SetCanShoot ( boolean CanShoot )⚓︎

Instantaneously disables (or enables) the player's ability to shoot. The base game primarily uses this for special challenges.


SetConceptionFamiliarFlags ()⚓︎

void SetConceptionFamiliarFlags ( ConceptionFamiliarFlag Flags )⚓︎

Sets the bitmask corresponding to which familiars have been spawned by Cambion/Immaculate Conception. The additional familiars provided by this bitmask are spawned during familiar cache evaluation, but only while the player has one of those two items.


SetControllerIndex ()⚓︎

void SetControllerIndex ( int Idx )⚓︎

Changes the player's controller index.


SetDamageModifier ()⚓︎

void SetDamageModifier ( int Modifier )⚓︎

For Experimental Treatement, set to -1, 0 or 1 to adjust the multiplier applied to the stat.


SetEdenDamage ()⚓︎

void SetEdenDamage ( float Value )⚓︎

Sets the offset of the player's damage stat for Eden's random stats. Has no effect on players that aren't Eden or Tainted Eden.


SetEdenFireDelay ()⚓︎

void SetEdenFireDelay ( float Value )⚓︎

Sets the offset of the player's fire delay stat for Eden's random stats. Has no effect on players that aren't Eden or Tainted Eden.


SetEdenLuck ()⚓︎

void SetEdenLuck ( float Value )⚓︎

Sets the offset of the player's luck stat for Eden's random stats. Has no effect on players that aren't Eden or Tainted Eden.


SetEdenRange ()⚓︎

void SetEdenRange ( float Value )⚓︎

Sets the offset of the player's range stat for Eden's random stats. Has no effect on players that aren't Eden or Tainted Eden.


SetEdenShotSpeed ()⚓︎

void SetEdenShotSpeed ( float Value )⚓︎

Sets the offset of the player's shot speed stat for Eden's random stats. Has no effect on players that aren't Eden or Tainted Eden.


SetEdenSpeed ()⚓︎

void SetEdenSpeed ( float Value )⚓︎

Sets the offset of the player's speed stat for Eden's random stats. Has no effect on players that aren't Eden or Tainted Eden.


SetEveSumptoriumCharge ()⚓︎

void SetEveSumptoriumCharge ( int ChargeNum )⚓︎

Sets the current charge of Tainted Eve's innate Sumptorium ability.


SetFireDelayModifier ()⚓︎

void SetFireDelayModifier ( int Modifier )⚓︎

For Experimental Treatement, set to -1, 0 or 1 to adjust the multiplier applied to the stat.


SetFootprintColor ()⚓︎

void SetFootprintColor ( KColor color, boolean RightFoot = false )⚓︎

Sets the player's footprint color.


SetGnawedLeafTimer ()⚓︎

void SetGnawedLeafTimer ( int Timer )⚓︎


SetHallowedGroundCountdown ()⚓︎

void SetHallowedGroundCountdown ( int Countdown )⚓︎

Sets the grace period countdown of retaining stats from the Hallowed Ground/Star of Bethlehem aura.


SetHeadDirection ()⚓︎

void SetHeadDirection ( Direction Direction, int Time, boolean Force = false )⚓︎

Locks the player's head animation to the specified Direction. Force will override existing head direction locks, such as the one from firing Mom's Knife.


SetHeadDirectionLockTime ()⚓︎

void SetHeadDirectionLockTime ( int Time )⚓︎

How long the player's head should be forced to stay in its current direction.


SetImmaculateConceptionState ()⚓︎

void SetImmaculateConceptionState ( int State )⚓︎

Sets how many hearts have been collected for the Immaculate Conception item.

Note that the game checks to spawn a familiar only when the player picks up a heart, so you cannot trigger that directly with this function.

If you set a value that is greater than 14, the value is automatically capped at 14, meaning that the next heart picked up will spawn a familiar.


SetItemState ()⚓︎

void SetItemState ( CollectibleType Collectible )⚓︎

Changes the player's item state to the specified collectible. This is usually used for collectibles that the player holds above their head before activating (i.e: Bob's Rotten Head, Glass Cannon).


SetKeepersSackBonus ()⚓︎

void SetKeepersSackBonus ( int Bonus )⚓︎

Sets the current coin bonus for the player's Keeper's Sack collectible.


SetLaserColor ()⚓︎

void SetLaserColor ( Color color )⚓︎

Sets the player's laser color.


SetLuckModifier ()⚓︎

void SetLuckModifier ( int Modifier )⚓︎

For Experimental Treatement, set to -1, 0 or 1 to adjust the multiplier applied to the stat.


SetMaggySwingCooldown ()⚓︎

void SetMaggySwingCooldown ( int Cooldown )⚓︎

Sets the cooldown of Tainted Magdalene's swing attack to the specified amount of frames.


SetMaxBladderCharge ()⚓︎

void SetMaxBladderCharge ( int Charge )⚓︎

Sets the maximum charge for when the player stops shooting and charges the Kidney Stone item.


SetMegaBlastDuration ()⚓︎

void SetMegaBlastDuration ( int Duration )⚓︎

Sets the duration of the Mega Blast laser to the specified amount of frames. Setting the duration above zero will activate the effect if it wasn't already active.

Bug

If the Mega Blast laser is active and you call the function again with a lower duration, the laser will persist even after the amount of frames has passed until the player leaves the room.


SetNextUrethraBlockFrame ()⚓︎

void SetNextUrethraBlockFrame ( int Frame )⚓︎

Sets the frame at which the player stops shooting and starts charging the Kidney Stone item.


SetPonyCharge ()⚓︎

void SetPonyCharge ( int Time )⚓︎

Sets the duration of the charge effect from the A Pony and White Pony to the specified amount of frames.


SetPoopSpell ()⚓︎

void SetPoopSpell ( int Slot, PoopSpellType PoopSpellType )⚓︎

Sets the specified slot in the poop list to a type of poop. This is only used by Tainted ???.


SetPurityState ()⚓︎

void SetPurityState ( PurityState State )⚓︎

Set the state in which the Purity item effect currently is.


SetRedStewBonusDuration ()⚓︎

void SetRedStewBonusDuration ( int Duration )⚓︎

Sets the duration of the damage bonus given by the Red Stew collectible to the specified amount of frames. Setting the duration above 0 will activate the effect if it wasn't active already.


SetShotSpeedModifier ()⚓︎

void SetShotSpeedModifier ( int Modifier )⚓︎

For Experimental Treatement, set to -1, 0 or 1 to adjust the multiplier applied to the stat.


SetSpeedModifier ()⚓︎

void SetSpeedModifier ( int Modifier )⚓︎

For Experimental Treatement, set to -1, 0 or 1 to adjust the multiplier applied to the stat.


SetTearPoisonDamage ()⚓︎

void SetTearPoisonDamage ( float Damage )⚓︎


SetTearRangeModifier ()⚓︎

void SetTearRangeModifier ( int Modifier )⚓︎

For Experimental Treatement, set to -1, 0 or 1 to adjust the multiplier applied to the stat.


SetUrethraBlock ()⚓︎

void SetUrethraBlock ( boolean Blocked )⚓︎

Sets whether the tear spam attack from the Kidney Stone collectible is about to activate. If the player does not have the Kidney Stone collectible, the effect is immediately activated.

Bug

Setting the Blocked argument to false seems to do nothing at all.


SetWeapon ()⚓︎

void SetWeapon ( Weapon Weapon, int WeaponSlot )⚓︎

Sets the active Weapon in the assigned WeaponSlot.

Info

Weapon slots and their descriptions:

  • 0 - Backup Weapon such as Notched Axe and Urn of Souls.
  • 1 - Primary Weapon.
  • 2 - Additional Weapon. Few instances of this exist in the vanilla game, but it can be populated by mods.
  • 3 - Additional Weapon.
  • 4 - Additional Weapon.

Always check for nil, even for slot 1 as it can be deleted by mods via Isaac.DestroyWeapon().


ShootBlueCandle ()⚓︎

void ShootBlueCandle ( Vector Direction )⚓︎

Makes the player shoot a blue flame from the Candle collectible.


ShuffleCostumes ()⚓︎

void ShuffleCostumes ( int Seed = Random( ) )⚓︎

Randomizes the current costumes.


SpawnAquariusCreep ()⚓︎

EntityEffect SpawnAquariusCreep ( TearParams TearParams = self.TearParams)⚓︎

Spawns a creep effect that acts like the ones created by Aquarius, including inhereting the player's TearParams. Supports passing a custom TearParams instead.

Info

For reference, this is how the game calculates the TearParams for this normally:

player->GetTearHitParams(&params, WeaponType.WEAPON_TEARS, (*player->GetTearPoisonDamage() * 0.666f) / player->_damage, -(int)(-Isaac::Random(2) != 0) & 2 - 1, nil)


SpawnClot ()⚓︎

void SpawnClot ( Vector pos, boolean AllowPlayerDeath = false )⚓︎

Acts like a use of Sumptorium, removing health and spawning a clot with the type of health removed. If AllowPlayerDeath is set, a clot will spawn even if the health drained will kill the player.


SpawnSaturnusTears ()⚓︎

int SpawnSaturnusTears ( )⚓︎

Spawns a ring of tears that orbit around the player akin to the Saturnus collectible.


SwapForgottenForm ()⚓︎

void SwapForgottenForm ( boolean Force = false, boolean NoEffects = false)⚓︎

If the player is The Forgotten/The Soul, the two will swap forms. Otherwise, this function does nothing.

Force will swap even if the subplayer doesn't have any health, or while a room/stage transition is active. NoEffects will disable the dust effect & fade from white when switching from The Soul to The Forgotten.


SyncConsumableCounts ()⚓︎

void SyncConsumableCounts ( EntityPlayer Player, int CollectibleFlags )⚓︎


Teleport ()⚓︎

void Teleport ( Vector Position, boolean DoEffects = true, boolean TeleportTwinPlayers = false )⚓︎

Teleports the player to a position within the room.

DoEffects controls whether the teleport animation and sound plays. TeleportTwinPlayers controls whether twin players (e.g. Esau, Tainted Lazarus w/ Birthright) are teleported alongside this one.


TriggerRoomClear ()⚓︎

void TriggerRoomClear ( )⚓︎

Triggers effects on the player as if a room was cleared (i.e. Charging actives).


TryAddToBagOfCrafting ()⚓︎

void TryAddToBagOfCrafting ( EntityPickup Pickup )⚓︎

Tries to add the specified pickup to the player's Bag of Crafting.


TryDecreaseGlowingHourglassUses ()⚓︎

void TryDecreaseGlowingHourglassUses ( int Uses, boolean ForceHourglass = false )⚓︎

Attempts to decrease the uses left for the Glowing Hourglass collectible, if the player has it. ForceHourglass instantly removes all the charges and turns Glowing Hourglass into it's regular Hourglass form.

Bug

Uses are only decreased by 1 regardless of how large of a number you tell it to remove.


TryFakeDeath ()⚓︎

boolean TryFakeDeath ( )⚓︎

Spawns a copy of the player at its current position and plays the death animation and sound.


TryForgottenThrow ()⚓︎

boolean TryForgottenThrow ( Vector Direction )⚓︎

If the player is holding Tainted Forgotten, he is thrown towards the specified direction.


TryPreventDeath ()⚓︎

boolean TryPreventDeath ( )⚓︎

Adds a heart container to a character if there are none left to prevent death, depending on its HealthType.

Returns true on success, otherwise false.


TryRemoveSmeltedTrinket ()⚓︎

void TryRemoveSmeltedTrinket ( TrinketType ID )⚓︎

Tries to remove the specified smelted trinket from the player.


UnblockCollectible ()⚓︎

void UnblockCollectible ( CollectibleType Collectible )⚓︎

Unblocks the CollectibleType that was blocked through BlockCollectible.


UpdateIsaacPregnancy ()⚓︎

void UpdateIsaacPregnancy ( boolean UpdateCambion )⚓︎

Set true if you want to update the Cambion Conception costume, otherwise updates the Immaculate Conception costume.


VoidHasCollectible ()⚓︎

boolean VoidHasCollectible ( CollectibleType Collectible )⚓︎

Returns true if the specified collectible has been consumed by the Void collectible.