A list of Lua classes in the modding API of The Binding of Isaac: Afterbirth †. See also Enumerations
Config[ | ]
CppContainer[ | ]
PlayerTypes[ | ]
Color[ | ]
Entity[ | ]
Entity:AddSlowing( EntityRef Source, Integer Duration, float SlowValue, Color SlowColor ) | |
Description | |
---|---|
Adds Slow Status Effect to Entity. | |
Arguments | Returns |
EntityRef Source The Entity that the code is referencing to.
Integer DurationFor how long the Status Effect is active in frames.
float SlowValueThe amount of slowing.
Color SlowColorWhat Color the effect will be.
|
None. |
Examples | |
None. |
Entity:AddPoison( EntityRef Source, Integer Duration, float Damage ) | |
Description | |
---|---|
Adds a Poison Effect to Entity. As of 17th January 2017 this function ignores the Duration and Damage arguments. It does damage based on player damage during a fixed amount of time. | |
Arguments | Returns |
EntityRef Source The Entity that the code is referencing to.
Integer DurationFor how long the Status Effect is active in frames.
float DamageHow much poison damage it gives.
|
None. |
Examples | |
None. |
Entity:AddMidasFreeze( EntityRef Source, Integer Duration ) | |
Description | |
---|---|
Adds Midas's Freeze Effect to Entity. | |
Arguments | Returns |
EntityRef Source The Entity that the code is referencing to.
Integer DurationFor how long the Status Effect is active in frames.
|
None. |
Examples | |
None. |
Entity:AddFreeze( EntityRef Source, Integer Duration ) | |
Description | |
---|---|
Adds a Freeze Effect to Entity. | |
Arguments | Returns |
EntityRef Source The Entity that the code is referencing to.
Integer DurationFor how long the Status Effect is active in frames.
|
None. |
Examples | |
None. |
Entity:AddShrink( EntityRef Source, Integer Duration ) | |
Description | |
---|---|
Shrinks the Entity. | |
Arguments | Returns |
EntityRef Source The Entity that the code is referencing to.
Integer DurationFor how long the Status Effect is active in frames.
|
None. |
Examples | |
None. |
Entity:AddHealth( float HitPoints ) | |
Description | |
---|---|
Adds Health to the Entity. | |
Arguments | Returns |
float HitPoints The Amount of HP added to the Entity.
|
None. |
Examples | |
None. |
Entity:AddFear( EntityRef Source, Integer Duration ) | |
Description | |
---|---|
Adds a Fear Effect to Entity. | |
Arguments | Returns |
EntityRef Source The Entity that the code is referencing to.
Integer DurationFor how long the Status Effect is active in frames.
|
None. |
Examples | |
None. |
Entity:AddConfusion( EntityRef Source, Integer Duration Boolean IgnoreBosses ) | |
Description | |
---|---|
Confuses the Entity. | |
Arguments | Returns |
EntityRef Source The Entity that the code is referencing to.
Integer DurationFor how long the Status Effect is active in frames.
boolean IgnoreBossesIf the effect should be working on bosses or not.
|
None. |
Examples | |
None. |
Entity:AddCharmed( Integer Duration ) | |
Description | |
---|---|
Adds a Charm Effect to Entity. | |
Arguments | Returns |
Integer Duration For how long the Status Effect is active in frames.
|
None. |
Examples | |
None. |
Entity:AddBurn( EntityRef Source, Integer Duration float Damage ) | |
Description | |
---|---|
Adds a Burn Effect to Entity. As of 17th January 2017 this function ignores the Duration and Damage arguments. It does damage based on player damage during a fixed amount of time. | |
Arguments | Returns |
EntityRef Source The Entity that the code is referencing to.
Integer DurationFor how long the Status Effect is active in frames.
float DamageHow much burn damage it gives.
|
None. |
Examples | |
None. |
Entity:AddBurn( Integer Flags ) | |
Description | |
---|---|
Adds flags to the Entity. | |
Arguments | Returns |
Integer Flags The flag that you wanna add to the entity (Example: FLAG_SPAWN_BLACK_HP).
|
None. |
Examples | |
None. |
EntityBomb[ | ]
EntityBomb::SetExplosionCountdown( integer Countdown ) | |
Description | |
---|---|
Sets the amount of time before the bomb explodes. | |
Arguments | Returns |
integer Countdown The amount of time before the bomb explodes.
|
None. |
Examples | |
None. |
EntityEffect[ | ]
EntityEffect::FollowParent( entity Parent ) | |
Description | |
---|---|
Has a familiar or other entity follow a specified parent. | |
Arguments | Returns |
entity Parent Defines which entity to follow.
|
None. |
Examples | |
None. |
boolean EntityEffect:IsPlayerCreep( int variant ) | |
Description | |
---|---|
Returns whether a piece of creep is from the player or an entity. | |
Arguments | Returns |
float HitPoints The Amount of HP added to the Entity.
|
Boolean isPlayerCreep Determines whether the creep is the player's (true) or not (false).
|
Examples | |
None. |
EntityEffect::SetDamageSource( EntityType DamageSource ) | |
Description | |
---|---|
Determines what kind of damage was taken. Useful for making items that deal certain special kinds of damage (Fire Mind, Scorpio). | |
Arguments | Returns |
EntityType DamageSource Determines the type of damage dealt.
|
None. |
Examples | |
None. |
EntityEffect::SetRadii( float min, float max ) | |
Description | |
---|---|
Used to determine the minimum and maximum radius of shockwaves (shockwaves are the circular knockback most commonly applied by farts). | |
Arguments | Returns |
float min Defines the minimum knockback.
float maxDefines the maximum knockback.
|
None. |
Examples | |
None. |
EntityEffect::SetTimeout( integer Timeout ) | |
Description | |
---|---|
Currently unknown. | |
Arguments | Returns |
integer Timeout Currently unknown.
|
None. |
Examples | |
None. |
EntityFamiliar[ | ]
EntityKnife[ | ]
EntityLaser[ | ]
EntityNPC[ | ]
EntityPickup[ | ]
EntityPlayer[ | ]
Player:AddBlackHearts( integer BlackHearts ) | |
Description | |
---|---|
Adds black hearts to Isaac | |
Arguments | Returns |
Integer BlackHearts Number of Black Hearts to add.
|
None. |
Examples | |
Example 1 Adds 2 Black Hearts to Isaac.
player = Isaac.GetPlayer( 0 ) player:AddBlackHearts( 2 ) |
Entity: or Player:AddBlueFlies( integer Amount, Vector Position, Entity Target ) | |
Description | |
---|---|
Spawns blue flies in a specified position, targeting a specified enemy. | |
Arguments | Returns |
Integer Amount Number of Blue Flies to add.
Vector PositionCoordinates where Blue Flies should spawn.
Entity TargetEntity the Blue Flies should target.
|
None. |
Examples | |
Example 1 Spawns 5 Blue Flies whenever Isaac attacks an enemy
local exampleMod = RegisterMod( "AddBlueFlies Example", 1 ) function exampleMod:update( target, amount, source, dealer ) local player = Isaac.GetPlayer( 0 ) if source == 0 and target:IsActiveEnemy() then player = player:AddBlueFlies( 5, player.Position, target ) end end exampleMod:AddCallback( ModCallbacks.MC_ENTITY_TAKE_DMG, exampleMod.update ); |
Entity: or Player:AddBlueSpider( Vector Position ) | |
Description | |
---|---|
Spawns a blue spider in a specified position. | |
Arguments | Returns |
Vector Position Coordinates where Blue Spider should spawn.
|
None. |
Examples | |
Example 1 Spawns a Blue Spider at Isaac's position
player = Isaac.GetPlayer( 0 ) player = player:AddBlueSpider( player.Position ) |
Player:AddMaxHearts( Integer MaxHearts, Boolean IgnoreKeeper ) | |
Description | |
---|---|
Adds heart containers to Isaac. | |
Arguments | Returns |
Integer MaxHearts The amount of Heart Containers you want to add.
Boolean IgnoreKeeperIf usable by the Keeper.
|
None. |
Examples | |
None. |
Player:GetHearts() | |
Description | |
---|---|
Gets the number of red half-hearts the player has. | |
Arguments | Returns |
None. | Integer Hearts Number of red hearts Isaac has. Note that each half heart counts as one.
|
Examples | |
None. |
Player:GetSoulHearts() | |
Description | |
---|---|
Gets the number of combined soul and black half-hearts. | |
Arguments | Returns |
None. | Integer SoulHearts Number of soul hearts and black hearts Isaac has. Note that each half heart counts as one.
|
Examples | |
None. |
Player:GetBlackHearts() | |
Description | |
---|---|
Gets which of the soul half-hearts is really a black half-heart. | |
Arguments | Returns |
None. | Integer BlackHearts A bit mask of the black half-hearts among the soul half-hearts. The lowest bit (1) represents the first soul half-heart, and the highest bit represents the highest soul half-heart.
|
Examples | |
None. |
Player:GetName() | |
Description | |
---|---|
Gets the name of the player. | |
Arguments | Returns |
None. | String Name A string that represents the name of the character you are playing as.
|
Examples | |
Example 1 Prints out the name of the character in the debug console.
player = Isaac.GetPlayer( 0 ) Isaac.DebugString( player:GetName() ) |
Player:AddNullCostume( Config::NullItemID NullId ) | |
Description | |
---|---|
Adds a costume to the player. | |
Arguments | Returns |
integer CostumeID The id of the costume to add.
|
None. |
Examples | |
Example 1 Adds a custom made costume to the player upon picking up the item.
local costume = {} local custom_costume = Isaac.GetCostumeIdByPath( "gfx/characters/costume.anm2" ) function afterlife:playerFrameUpdate( _player ) if game:GetFrameCount() == 1 then setCostume( custom_costume, false ) end if not hasCostume( markOfCain_costume ) and _player:HasCollectible( markOfCain_item ) then _player:AddNullCostume( custom_costume ) setCostume( custom_costume, true ) end end function hasCostume( _costume ) if costume[_costume] ~= nil then return costume[_costume] else return false end end function setCostume( _costume, _value ) costume[_costume] = _value end afterlife:AddCallback( ModCallbacks.MC_POST_PEFFECT_UPDATE, afterlife.playerFrameUpdate ) |
EntityPtr[ | ]
EntityRef[ | ]
Game[ | ]
GridEntity[ | ]
GridEntityDesc[ | ]
GridEntityDoor[ | ]
Level[ | ]
PathFinder[ | ]
ProjectileParams[ | ]
RNG[ | ]
RNG::GetSeed() | |
Description | |
---|---|
Gets and returns the seed to be used in the run. | |
Arguments | Returns |
None. | double Seed An 8-digit number that generates the run.
|
Examples | |
None. |
RNG::Next() | |
Description | |
---|---|
Unkown. | |
Arguments | Returns |
None. | None. |
Examples | |
None. |
RNG::RandomFloat() | |
Description | |
---|---|
Makes and returns a random float value. | |
Arguments | Returns |
None. | float Float The random float value.
|
Examples | |
None. |
RNG::RandomInt( integer Max ) | |
Description | |
---|---|
Makes and returns a random Integer value. | |
Arguments | Returns |
integer Max The maximum integer it will generate.
|
int Int The random integer value.
|
Examples | |
None. |
Room[ | ]
Sprite[ | ]
TearParams[ | ]
TemporaryEffect[ | ]
TemporaryEffects[ | ]
TemporaryEffects::AddCollectibleEffect( CollectibleType CollectibleType, boolean AddCostume ) | |
Description | |
---|---|
Adds an effect from picking up a collectible. | |
Arguments | Returns |
CollectibleType CollectibleType Checks the kind of collectible you are picking up.
boolean AddCostumeChecks whether Isaac's sprite needs to update with a new costume.
|
None. |
Examples | |
None. |
TemporaryEffects::AddNullEffect( Config::NullItemID NullId, boolean AddCostume ) | |
Description | |
---|---|
Unclear. Possibly deals with items that do nothing but add a costume effect? | |
Arguments | Returns |
Config::NullItemID NullId Calls a NullId from the Config class.
boolean AddCostumeChecks whether Isaac's sprite needs to update with a new costume.
|
None. |
Examples | |
None. |
TemporaryEffects::AddTrinketEffect( TrinketType TrinketType, boolean AddCostume ) | |
Description | |
---|---|
Adds an effect from picking up a trinket. | |
Arguments | Returns |
TrinketType TrinketType Checks what trinket is being picked up.
boolean AddCostumeChecks whether Isaac's sprite needs to update with a new costume.
|
None. |
Examples | |
None. |
TemporaryEffects::ClearEffects() | |
Description | |
---|---|
Clears effects on a character. Likely used for Dice rooms and the D4. | |
Arguments | Returns |
None. | None. |
Examples | |
None. |
Vector[ | ]
Modding | |
---|---|
Rebirth & Afterbirth & Afterbirth † | |
References | Modding Tutorials • XML Modding • Lua Reference • Modding of Isaac Lua Reference |
Tools | Debug Console • Launch Options • Modding Tools • Basement Renovator |
Releases | Modding of Isaac • Steam Workshop • NexusMods |
Community | Modding of Isaac Subreddit • Modding of Isaac Discord Server |
The Binding of Isaac: Rebirth |
---|