Enum "ModCallbacks"⚓︎
This is a list of all new callbacks added by REPENTOGON.
Modified Old Callbacks⚓︎
MC_USE_PILL⚓︎
MC_USE_PILL now passes PillColor as an argument. Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
10 | MC_USE_PILL | (PillEffect Effect, EntityPlayer Player, UseFlags Flags, PillColor Color) | PillEffect | void |
MC_POST_PICKUP_SELECTION⚓︎
MC_POST_PICKUP_COLLISION now passes the Requested Variant and Requested SubType, as well as RNG.
Requested Variant and Requested SubType represents the variant and subtype set when spawning the entity.
A third optional Continue
parameter has been added to the return table.
If set to true
the callback will instead replace the Variant
and SubType
parameter with the specified values and continue running.
These changes aim to make the callback a viable option for handling pickup pools.
Usage
Internally the game always attempts to randomize the spawned pickup's variant and subtype, even when re-entering an already visited room, however there are checks in place to make sure that randomization only occurs if either of these values are initially set to 0.
Therefore, any callback should always check if RequestedVariant == 0 or RequestedSubType == 0
before attempting any modification.
That is unless the desired effect is something akin to the APRIL FOOLS's "All nickels are sticky nickels" effect, which is applied regardless of the afore mentioned restriction.
Requested Variant == 0
When Requested Variant is equal to 0 the game will randomize both the Variant and SubType of the pickup. In this case the value of Requested SubType is used as a variant blacklist.
This blacklist are listed in the NullPickupSubType enum.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
37 | MC_POST_PICKUP_SELECTION | (EntityPickup Pickup, PickupVariant Variant, int SubType, PickupVariant RequestedVariant, int RequestedSubType, RNG RNG ) |
- | table |
MC_PRE_PLAYER_COLLISION⚓︎
Now optionally accepts returning a table, with any combination of the following fields:
- Collide: Set to true to force the entities to physically collide (push each other away), unless the "Collider" ignores the collision. Set to false to ignore the physical collision without necessarily skipping on-collision effects.
- SkipCollisionEffects: Set to true to skip the on-collision code of this entity, such as dealing collision damage. Does not affect the physical collision. Won't skip the on-collision code of the "Collider".
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
33 | MC_PRE_PLAYER_COLLISION | (EntityPlayer Player, Entity Collider, boolean Low) | PlayerVariant | boolean or table |
MC_PRE_TEAR_COLLISION⚓︎
Now optionally accepts returning a table, with any combination of the following fields:
- Collide: Set to true to force the entities to physically collide (push each other away), unless the "Collider" ignores the collision. Set to false to ignore the physical collision without necessarily skipping on-collision effects.
- SkipCollisionEffects: Set to true to skip the on-collision code of this entity, such as dealing collision damage. Does not affect the physical collision. Won't skip the on-collision code of the "Collider".
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
42 | MC_PRE_TEAR_COLLISION | (EntityTear Tear, Entity Collider, boolean Low) | TearVariant | boolean or table |
MC_PRE_FAMILIAR_COLLISION⚓︎
Now optionally accepts returning a table, with any combination of the following fields:
- Collide: Set to true to force the entities to physically collide (push each other away), unless the "Collider" ignores the collision. Set to false to ignore the physical collision without necessarily skipping on-collision effects.
- SkipCollisionEffects: Set to true to skip the on-collision code of this entity, such as dealing collision damage. Does not affect the physical collision. Won't skip the on-collision code of the "Collider".
For example, you can return { Collide=true }
to make a familiar to collide physically with something (like an enemy, which they don't normally do) without skipping on-collision code (like you would by returning false
).
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
26 | MC_PRE_FAMILIAR_COLLISION | (EntityFamiliar Familiar, Entity Collider, boolean Low) | FamiliarVariant | boolean or table |
MC_PRE_BOMB_COLLISION⚓︎
Now optionally accepts returning a table, with any combination of the following fields:
- Collide: Set to true to force the entities to physically collide (push each other away), unless the "Collider" ignores the collision. Set to false to ignore the physical collision without necessarily skipping on-collision effects.
- SkipCollisionEffects: Set to true to skip the on-collision code of this entity, such as dealing collision damage. Does not affect the physical collision. Won't skip the on-collision code of the "Collider".
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
60 | MC_PRE_BOMB_COLLISION | (EntityBomb Bomb, Entity Collider, boolean Low) | BombVariant | boolean or table |
MC_PRE_PICKUP_COLLISION⚓︎
Now optionally accepts returning a table, with any combination of the following fields:
- Collide: Set to true to force the entities to physically collide (push each other away), unless the "Collider" ignores the collision. Set to false to ignore the physical collision without necessarily skipping on-collision effects.
- SkipCollisionEffects: Set to true to skip the on-collision code of this entity, such as dealing collision damage. Does not affect the physical collision. Won't skip the on-collision code of the "Collider".
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
38 | MC_PRE_PICKUP_COLLISION | (EntityPickup Pickup, Entity Collider, boolean Low) | PickupVariant | boolean or table |
MC_PRE_KNIFE_COLLISION⚓︎
Now optionally accepts returning a table, with any combination of the following fields:
- Collide: Set to true to force the entities to physically collide (push each other away), unless the "Collider" ignores the collision. Set to false to ignore the physical collision without necessarily skipping on-collision effects.
- SkipCollisionEffects: Set to true to skip the on-collision code of this entity, such as dealing collision damage. Does not affect the physical collision. Won't skip the on-collision code of the "Collider".
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
53 | MC_PRE_KNIFE_COLLISION | (EntityKnife Knife, Entity Collider, boolean Low) | KnifeSubType | boolean or table |
MC_PRE_PROJECTILE_COLLISION⚓︎
Now optionally accepts returning a table, with any combination of the following fields:
- Collide: Set to true to force the entities to physically collide (push each other away), unless the "Collider" ignores the collision. Set to false to ignore the physical collision without necessarily skipping on-collision effects.
- SkipCollisionEffects: Set to true to skip the on-collision code of this entity, such as dealing collision damage. Does not affect the physical collision. Won't skip the on-collision code of the "Collider".
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
46 | MC_PRE_PROJECTILE_COLLISION | (EntityProjectile Projectile, Entity Collider, boolean Low) | ProjectileVariant | boolean or table |
MC_PRE_NPC_COLLISION⚓︎
Now optionally accepts returning a table, with any combination of the following fields:
- Collide: Set to true to force the entities to physically collide (push each other away), unless the "Collider" ignores the collision. Set to false to ignore the physical collision without necessarily skipping on-collision effects.
- SkipCollisionEffects: Set to true to skip the on-collision code of this entity, such as dealing collision damage. Does not affect the physical collision. Won't skip the on-collision code of the "Collider".
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
30 | MC_PRE_NPC_COLLISION | (EntityNPC NPC, Entity Collider, boolean Low) | EntityType | boolean or table |
MC_ENTITY_TAKE_DMG⚓︎
Now optionally accepts returning a table, with any combination of the following fields, to override the corresponding argument:
- Damage
- DamageFlags
- DamageCountdown
Modified values are passed along to the remaining callbacks. Returning false to cancel the damage still skips the remaining callbacks.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
11 | MC_ENTITY_TAKE_DMG | (Entity Entity, float Damage, DamageFlags DamageFlags, EntityRef Source, int DamageCountdown) | EntityType | boolean or table |
New Callbacks⚓︎
MC_PRE_ADD_COLLECTIBLE⚓︎
Accepts a table of parameters: {Type, Charge, FirstTime, Slot, VarData}
Alternatively accepts a CollectibleType to change the type without changing any other parameters or a boolean to cancel the addition altogether (false) or force it to happen skipping the following callbacks (true).
Example Code
This code will transform every collectible into Money = Power once the player picks it up.
1 2 3 4 |
|
This code will force active items to be uncharged on pickup.
1 2 3 4 |
|
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1004 | MC_PRE_ADD_COLLECTIBLE | (CollectibleType Type, int Charge, boolean FirstTime, int Slot, int VarData, EntityPlayer Player) |
CollectibleType | table or CollectibleType |
MC_POST_ADD_COLLECTIBLE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1005 | MC_POST_ADD_COLLECTIBLE | (CollectibleType Type, int Charge, boolean FirstTime, int Slot, int VarData, EntityPlayer Player) |
CollectibleType | void |
MC_POST_BACKDROP_PRE_RENDER_WALLS⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1109 | MC_POST_BACKDROP_PRE_RENDER_WALLS | void | - | void |
MC_PRE_BACKDROP_CHANGE⚓︎
Accepts an integer
to change BackdropType.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1141 | MC_PRE_BACKDROP_CHANGE | (BackdropType Type) | - | (BackdropType Type) |
MC_PRE_BACKDROP_RENDER_FLOOR⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1107 | MC_PRE_BACKDROP_RENDER_FLOOR | (ColorModifier ColorModifier) | - | void |
MC_PRE_BACKDROP_RENDER_WALLS⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1106 | MC_PRE_BACKDROP_RENDER_WALLS | (ColorModifier ColorModifier) | - | void |
MC_PRE_BACKDROP_RENDER_WATER⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1108 | MC_PRE_BACKDROP_RENDER_WATER | void | - | void |
MC_POST_BOMB_COLLISION⚓︎
Runs after the on-collision code of this entity, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1237 | MC_POST_BOMB_COLLISION | (EntityBomb Bomb, Entity Collider, boolean Low) |
BombVariant | void |
MC_PRE_BOMB_RENDER⚓︎
Accepts a Vector to modify render offset
Alternatively accepts false
to cancel rendering
Shadows
Canceling this callback will not stop rendering of entity shadows. This is being investigated, but in the meantime call SetShadowSize(0) on the entity in MC_POST_UPDATE.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1088 | MC_PRE_BOMB_RENDER | (EntityBomb Bomb, Vector Offset) |
BombVariant | Vector or boolean |
MC_PRE_CHALLENGE_DONE⚓︎
Called before a challenge is marked as completed.
Returning false
will prevent further execution of the challenge completion-tracking function.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1471 | MC_PRE_CHALLENGE_DONE | (Challenge, EntityPlayer EntityPlayer) |
Challenge | boolean |
MC_POST_CHALLENGE_DONE⚓︎
Called after a challenge is marked as completed.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1472 | MC_POST_CHALLENGE_DONE | (Challenge) | Challenge | void |
MC_PRE_CHANGE_ROOM⚓︎
Accepts a table of parameters: {TargetRoomIdx, Dimension}
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1061 | MC_PRE_CHANGE_ROOM | (int TargetRoomIdx, int Dimension) |
- | table |
MC_POST_ACHIEVEMENT_UNLOCK⚓︎
Called after an achievement is unlocked.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1476 | MC_POST_ACHIEVEMENT_UNLOCK | (Achievement AchievementID) | Achievement | void |
MC_PRE_COMPLETION_EVENT⚓︎
Can return a new CompletionType or false
to cancel the completion event. Canceling it will prevent all marks and completion event related stuff to trigger for all players.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1049 | MC_PRE_COMPLETION_EVENT | (CompletionType Completion) | - | CompletionType, boolean |
MC_POST_COMPLETION_EVENT⚓︎
Called when a completion event is recorded, such as when defeating an end boss or unlocking a tainted character.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1052 | MC_POST_COMPLETION_EVENT | (CompletionType Completion) | - | void |
MC_PRE_COMPLETION_MARKS_RENDER⚓︎
Can return false
to prevent the completion marks from rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1216 | MC_PRE_COMPLETION_MARKS_RENDER | (Sprite CompletionMarksSprite, Vector RenderPos, Vector RenderScale, int PlayerType) |
- | void |
MC_POST_COMPLETION_MARKS_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1217 | MC_POST_COMPLETION_MARKS_RENDER | (Sprite CompletionMarksSprite, Vector RenderPos, Vector RenderScale, int PlayerType) |
- | void |
MC_COMPLETION_MARK_GET⚓︎
Can return false
to cancel the completion mark.
Called when the player gets a completion mark, getting as a parameter the code for the mark in question and the playertype.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1047 | MC_COMPLETION_MARK_GET | (CompletionType Completion, int PlayerType) |
PlayerType | void or false |
MC_POST_COMPLETION_MARK_GET⚓︎
Called after the player gets a completion mark, getting as a parameter the code for the mark in question and the playertype.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1048 | MC_POST_COMPLETION_MARK_GET | (CompletionType Completion, int PlayerType) |
PlayerType | void |
MC_CONSOLE_AUTOCOMPLETE⚓︎
This is called whenever a function with the CUSTOM AutocompleteType enum is being entered into the console. Called every time the console input changes.
Accepts a table. The table can hold both string values, which will just add the string as a parameter in autocomplete for the command, and a table of two strings which will add the first string as the parameter, and second as a description. Description can be used in autocomplete as well, however pressing TAB will properly autocomplete using the ID, not description (Think the giveitem
command, as an example- c1
would be The Sad Onion's "parameter" and The Sad Onion
would be the "description", and both work. Pressing TAB will turn the command into give c1
.)
REPENTOGON handles only showing options relevant for the given input- simply return a table of options, and REPENTOGON will take care of the rest.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1120 | MC_CONSOLE_AUTOCOMPLETE | (string Command, string Params) |
string Command | table |
MC_PRE_DEVIL_APPLY_ITEMS⚓︎
This callback is run when the game starts to tally up traditional items for devil deal calculation. This is called before the stage penalty.
Most items that affect devil deal chance perform their changes here.
Accepts a float
to modify the chance in this step of the calculation.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1130 | MC_PRE_DEVIL_APPLY_ITEMS | (float Chance) | - | float |
MC_PRE_DEVIL_APPLY_SPECIAL_ITEMS⚓︎
Next, the game applies "special" items which bypass the stage penalty like Goat Head and Eucharist.
Accepts a float
to modify the chance in this step of the calculation.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1132 | MC_PRE_DEVIL_APPLY_SPECIAL_ITEMS | (float Chance) | - | float |
MC_PRE_DEVIL_APPLY_STAGE_PENALTY⚓︎
Next, the game calculates stage penalty. If a deal spawned anywhere on the previous two floors, the game decays the resulting chance by either 50% or 25% depending on how many deals have been taken.
Important to note that even though the game displays a value of ~66% or ~33% for the 50% and 25% values, respectively, this is because devil chance is not clamped to a value between 0 and 1, and "100%" without items generally means a value of ~133%.
Accepts a boolean
. Return false
to bypass the stage penalty.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1131 | MC_PRE_DEVIL_APPLY_STAGE_PENALTY | void | - | boolean |
MC_POST_DEVIL_CALCULATE⚓︎
This will override all previous calculation values, ultimately dictating the devil chance.
Accepts a float
to modify the chance.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1133 | MC_POST_DEVIL_CALCULATE | (float Chance) | - | float |
MC_PRE_EFFECT_RENDER⚓︎
Accepts a Vector to modify render offset
Alternatively accepts false
to cancel rendering
Shadows
Canceling this callback will not stop rendering of entity shadows. This is being investigated, but in the meantime call SetShadowSize(0) on the entity in MC_POST_UPDATE.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1087 | MC_PRE_EFFECT_RENDER | (EntityEffect Effect, Vector Offset) |
EffectVariant | Vector or boolean |
MC_POST_ENTITY_TAKE_DMG⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1006 | MC_POST_ENTITY_TAKE_DMG | (Entity Entity, float Damage, DamageFlags DamageFlags, EntityRef Source, int DamageCountdown) |
EntityType | void |
MC_PRE_ENTITY_THROW⚓︎
Accepts a Vector which will modify the velocity of the thrown entity.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1040 | MC_PRE_ENTITY_THROW | (EntityPlayer ThrowingPlayer, Entity HeldEntity, Vector Velocity) |
- | Vector |
MC_POST_ENTITY_THROW⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1041 | MC_POST_ENTITY_THROW | (EntityPlayer ThrowingPlayer, Entity ThrownEntity, Vector Velocity) |
- | void |
MC_POST_FAMILIAR_COLLISION⚓︎
Runs after the on-collision code of this entity, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1235 | MC_POST_FAMILIAR_COLLISION | (EntityFamiliar Familiar, Entity Collider, boolean Low) |
FamiliarVariant | void |
MC_POST_FAMILIAR_FIRE_BRIMSTONE⚓︎
Called when a familiar fires a brimstone laser.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1261 | MC_POST_FAMILIAR_FIRE_BRIMSTONE | (EntityLaser Laser) | FamiliarVariant | void |
MC_POST_FAMILIAR_FIRE_PROJECTILE⚓︎
Called when a familiar fires a tear.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1252 | MC_POST_FAMILIAR_FIRE_PROJECTILE | (EntityTear Tear) | FamiliarVariant | void |
MC_POST_FAMILIAR_FIRE_TECH_LASER⚓︎
Called when a familiar fires a Tech laser.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1262 | MC_POST_FAMILIAR_FIRE_TECH_LASER | (EntityLaser Laser) | FamiliarVariant | void |
MC_PRE_FAMILIAR_RENDER⚓︎
Accepts a Vector to modify render offset
Alternatively accepts false
to cancel rendering
Shadows
Canceling this callback will not stop rendering of entity shadows. This is being investigated, but in the meantime call SetShadowSize(0) on the entity in MC_POST_UPDATE.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1080 | MC_PRE_FAMILIAR_RENDER | (EntityFamiliar Familiar, Vector Offset) |
FamiliarVariant | Vector or boolean |
MC_POST_FIRE_BOMB⚓︎
Called when the player fires a Dr. Fetus bomb.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1253 | MC_POST_FIRE_BOMB | (EntityBomb Bomb) | - | void |
MC_POST_FIRE_BONE_CLUB⚓︎
Called when the player fired The Forgotten's bone club.
This is only called when the club is initially spawned, not when swung or charged and shot.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1254 | MC_POST_FIRE_BONE_CLUB | (EntityKnife Knife) | - | void |
MC_POST_FIRE_BRIMSTONE_BALL⚓︎
Called when the player fires a brimstone ball.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1256 | MC_POST_FIRE_BRIMSTONE_BALL | (EntityEffect Effect) | - | void |
MC_POST_FIRE_BRIMSTONE⚓︎
Called when the player fires a brimstone laser.
This is also called for delayed brimstone.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1255 | MC_POST_FIRE_BRIMSTONE | (EntityLaser Laser) | - | void |
MC_POST_FIRE_KNIFE⚓︎
Called when the player fires the knife from Mom's Knife.
This is only called when the club is initially spawned, not when charged and shot.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1257 | MC_POST_FIRE_KNIFE | (EntityKnife Knife) | - | void |
MC_POST_FIRE_SWORD⚓︎
Called when the player swings the sword from Spirit Sword.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1258 | MC_POST_FIRE_SWORD | (EntityKnife Knife) | - | void |
MC_POST_FIRE_TECH_LASER⚓︎
Called when the player fires a Tech laser.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1259 | MC_POST_FIRE_TECH_LASER | (EntityLaser Laser) | - | void |
MC_POST_FIRE_TECH_X_LASER⚓︎
Called when the player fires a Tech X laser.
Returning any value will have no effect on later callback executions.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1260 | MC_POST_FIRE_TECH_X_LASER | (EntityLaser Laser) | - | void |
MC_GET_FOLLOWER_PRIORITY⚓︎
Accepts FollowerPriority to give familiar priority. Can accept any int.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1063 | MC_GET_FOLLOWER_PRIORITY | (EntityFamiliar Familiar) | FamiliarVariant | FollowerPriority or int |
MC_PRE_GET_LIGHTING_ALPHA⚓︎
Accepts a float
to modify the lighting alpha. Generally this is between 0 and 1 but you can technically go higher than this.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1150 | MC_PRE_GET_LIGHTING_ALPHA | (float OriginalAlpha) | - | float |
MC_GET_SHOP_ITEM_PRICE⚓︎
Called after the price for a shop item was calculated. Return an integer or PickupPrice to change the price of the item.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1066 | MC_GET_SHOP_ITEM_PRICE | (int PickupVariant, int PickupSubType, int ShopItemID, int Price) |
int | PickupVariant |
MC_PRE_GRID_ENTITY_DECORATION_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1444 | MC_PRE_GRID_ENTITY_DECORATION_RENDER | (GridEntityDecoration Decoration, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_DECORATION_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1445 | MC_POST_GRID_ENTITY_DECORATION_RENDER | (GridEntityDecoration Decoration) | GridEntityType | void |
MC_PRE_GRID_ENTITY_DECORATION_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1400 | MC_PRE_GRID_ENTITY_DECORATION_UPDATE | (GridEntityDecoration Decoration) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_DECORATION_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1401 | MC_POST_GRID_ENTITY_DECORATION_UPDATE | (GridEntityDecoration Decoration) | GridEntityType | void |
MC_PRE_GRID_ENTITY_DOOR_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1446 | MC_PRE_GRID_ENTITY_DOOR_RENDER | (GridEntityDoor Door, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_DOOR_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1447 | MC_POST_GRID_ENTITY_DOOR_RENDER | (GridEntityDoor Door) | GridEntityType | void |
MC_PRE_GRID_ENTITY_DOOR_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1402 | MC_PRE_GRID_ENTITY_DOOR_UPDATE | (GridEntityDoor Door) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_DOOR_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1403 | MC_POST_GRID_ENTITY_DOOR_UPDATE | (GridEntityDoor Door) | GridEntityType | void |
MC_PRE_GRID_ENTITY_FIRE_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
Warning
Fire grid entities are largely unused, and in most cases you'll want to target the EntityNPC fireplaces.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1448 | MC_PRE_GRID_ENTITY_FIRE_RENDER | (GridEntityFire Fire, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_FIRE_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1449 | MC_POST_GRID_ENTITY_FIRE_RENDER | (GridEntityFire Fire) | GridEntityType | void |
MC_PRE_GRID_ENTITY_FIRE_UPDATE⚓︎
Accepts false
to cancel the update.
Warning
Fire grid entities are largely unused, and in most cases you'll want to target the EntityNPC fireplaces.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1404 | MC_PRE_GRID_ENTITY_FIRE_UPDATE | (GridEntityFire Fire) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_FIRE_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1405 | MC_POST_GRID_ENTITY_FIRE_UPDATE | (GridEntityFire Fire) | GridEntityType | void |
MC_PRE_GRID_ENTITY_GRAVITY_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1406 | MC_PRE_GRID_ENTITY_GRAVITY_UPDATE | (GridEntityGravity Gravity) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_GRAVITY_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1407 | MC_POST_GRID_ENTITY_GRAVITY_UPDATE | (GridEntityGravity Gravity) | GridEntityType | void |
MC_PRE_GRID_ENTITY_LOCK_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1450 | MC_PRE_GRID_ENTITY_LOCK_RENDER | (GridEntityLock Lock, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_LOCK_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1451 | MC_POST_GRID_ENTITY_LOCK_RENDER | (GridEntityLock Lock) | GridEntityType | void |
MC_PRE_GRID_ENTITY_LOCK_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1408 | MC_PRE_GRID_ENTITY_LOCK_UPDATE | (GridEntityLock Lock) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_LOCK_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1409 | MC_POST_GRID_ENTITY_LOCK_UPDATE | (GridEntityLock Lock) | GridEntityType | void |
MC_PRE_GRID_ENTITY_PIT_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1454 | MC_PRE_GRID_ENTITY_PIT_RENDER | (GridEntityPit Pit, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_PIT_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1455 | MC_POST_GRID_ENTITY_PIT_RENDER | (GridEntityPit Pit) | GridEntityType | void |
MC_PRE_GRID_ENTITY_PIT_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1410 | MC_PRE_GRID_ENTITY_PIT_UPDATE | (GridEntityPit Pit) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_PIT_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1411 | MC_POST_GRID_ENTITY_PIT_UPDATE | (GridEntityPit Pit) | GridEntityType | void |
MC_PRE_GRID_ENTITY_POOP_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
Warning
This callback does not include the EntityNPC poops used by Tainted ???.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1456 | MC_PRE_GRID_ENTITY_POOP_RENDER | (GridEntityPoop Poop, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_POOP_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1457 | MC_POST_GRID_ENTITY_POOP_RENDER | (GridEntityPoop Poop) | GridEntityType | void |
MC_PRE_GRID_ENTITY_POOP_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1412 | MC_PRE_GRID_ENTITY_POOP_UPDATE | (GridEntityPoop Poop) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_POOP_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1413 | MC_POST_GRID_ENTITY_POOP_UPDATE | (GridEntityPoop Poop) | GridEntityType | void |
MC_PRE_GRID_ENTITY_PRESSUREPLATE_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1460 | MC_PRE_GRID_ENTITY_PRESSUREPLATE_RENDER | (GridEntityPressurePlate PressurePlate, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_PRESSUREPLATE_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1461 | MC_POST_GRID_ENTITY_PRESSUREPLATE_RENDER | (GridEntityPressurePlate PressurePlate) | GridEntityType | void |
MC_PRE_GRID_ENTITY_PRESSUREPLATE_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1414 | MC_PRE_GRID_ENTITY_PRESSUREPLATE_UPDATE | (GridEntityPressurePlate PressurePlate) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_PRESSUREPLATE_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1415 | MC_POST_GRID_ENTITY_PRESSUREPLATE_UPDATE | (GridEntityPressurePlate PressurePlate) | GridEntityType | void |
MC_PRE_GRID_ENTITY_ROCK_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1458 | MC_PRE_GRID_ENTITY_ROCK_RENDER | (GridEntityRock Rock, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_ROCK_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1459 | MC_POST_GRID_ENTITY_ROCK_RENDER | (GridEntityRock Rock) | GridEntityType | void |
MC_PRE_GRID_ENTITY_ROCK_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1416 | MC_PRE_GRID_ENTITY_ROCK_UPDATE | (GridEntityRock Rock) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_ROCK_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1417 | MC_POST_GRID_ENTITY_ROCK_UPDATE | (GridEntityRock Rock) | GridEntityType | void |
MC_PRE_GRID_ENTITY_SPAWN⚓︎
This is called when a GridEntity is spawned outside of Room initialization.
Accepts false
to cancel spawning the grid, a table of {Type, Variant, Vardata, SpawnSeed}
to modify it, or a GridEntityDesc to override it entirely.
Warning
Desc
will in most cases be nil
. The exceptions to this are the poops spawned by Mole npcs, grids spawned by TurnGold, or lua-made spawns called with the new SpawnGridEntity(int GridIndex, GridEntityDesc Descriptor)
override.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1100 | MC_PRE_GRID_ENTITY_SPAWN | (GridEntityType Type, int Variant, int VarData, int GridIdx, int SpawnSeed, GridEntityDesc Desc) |
GridEntityType Type | boolean, table, or GridEntityDesc |
MC_POST_GRID_ENTITY_SPAWN⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1101 | MC_POST_GRID_ENTITY_SPAWN | (GridEntity Grid) | GridEntityType Type | void |
MC_PRE_GRID_ENTITY_SPIKES_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1432 | MC_PRE_GRID_ENTITY_SPIKES_RENDER | (GridEntitySpikes Grid, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_SPIKES_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1433 | MC_POST_GRID_ENTITY_SPIKES_RENDER | (GridEntitySpikes Grid) | GridEntityType | void |
MC_PRE_GRID_ENTITY_SPIKES_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1418 | MC_PRE_GRID_ENTITY_SPIKES_UPDATE | (GridEntitySpikes Spikes) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_SPIKES_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1419 | MC_POST_GRID_ENTITY_SPIKES_UPDATE | (GridEntitySpikes Spikes) | GridEntityType | void |
MC_PRE_GRID_ENTITY_STAIRCASE_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1440 | MC_PRE_GRID_ENTITY_STAIRCASE_RENDER | (GridEntityStairs Staircase, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_STAIRCASE_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1441 | MC_POST_GRID_ENTITY_STAIRCASE_RENDER | (GridEntityStairs Staircase) | GridEntityType | void |
MC_PRE_GRID_ENTITY_STAIRCASE_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1420 | MC_PRE_GRID_ENTITY_STAIRCASE_UPDATE | (GridEntityStairs Staircase) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_STAIRCASE_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1421 | MC_POST_GRID_ENTITY_STAIRCASE_UPDATE | (GridEntityStairs Staircase) | GridEntityType | void |
MC_PRE_GRID_ENTITY_STATUE_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1422 | MC_PRE_GRID_ENTITY_STATUE_UPDATE | (GridEntityStatue Statue) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_STATUE_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1423 | MC_POST_GRID_ENTITY_STATUE_UPDATE | (GridEntityStatue Statue) | GridEntityType | void |
MC_PRE_GRID_ENTITY_TELEPORTER_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1452 | MC_PRE_GRID_ENTITY_TELEPORTER_RENDER | (GridEntityTeleporter Teleporter, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_TELEPORTER_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1453 | MC_POST_GRID_ENTITY_TELEPORTER_RENDER | (GridEntityTeleporter Teleporter) | GridEntityType | void |
MC_PRE_GRID_ENTITY_TELEPORTER_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1424 | MC_PRE_GRID_ENTITY_TELEPORTER_UPDATE | (GridEntityTeleporter Teleporter) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_TELEPORTER_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1425 | MC_POST_GRID_ENTITY_TELEPORTER_UPDATE | (GridEntityTeleporter Teleporter) | GridEntityType | void |
MC_PRE_GRID_ENTITY_TNT_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1436 | MC_PRE_GRID_ENTITY_TNT_RENDER | (GridEntityTNT TNT, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_TNT_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1437 | MC_POST_GRID_ENTITY_TNT_RENDER | (GridEntityTNT TNT) | GridEntityType | void |
MC_PRE_GRID_ENTITY_TNT_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1430 | MC_PRE_GRID_ENTITY_TNT_UPDATE | (GridEntityTNT TNT) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_TNT_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1431 | MC_POST_GRID_ENTITY_TNT_UPDATE | (GridEntityTNT TNT) | GridEntityType | void |
MC_PRE_GRID_ENTITY_TRAPDOOR_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1438 | MC_PRE_GRID_ENTITY_TRAPDOOR_RENDER | (GridEntityTrapDoor TrapDoor, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_TRAPDOOR_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1439 | MC_POST_GRID_ENTITY_TRAPDOOR_RENDER | (GridEntityTrapDoor TrapDoor) | GridEntityType | void |
MC_PRE_GRID_ENTITY_TRAPDOOR_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1426 | MC_PRE_GRID_ENTITY_TRAPDOOR_UPDATE | (GridEntityTrapDoor TrapDoor) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_TRAPDOOR_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1427 | MC_POST_GRID_ENTITY_TRAPDOOR_UPDATE | (GridEntityTrapDoor TrapDoor) | GridEntityType | void |
MC_PRE_GRID_ENTITY_WALL_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1462 | MC_PRE_GRID_ENTITY_WALL_RENDER | (GridEntityWall Wall, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_WALL_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1463 | MC_POST_GRID_ENTITY_WALL_RENDER | (GridEntityWall Wall) | GridEntityType | void |
MC_PRE_GRID_ENTITY_WEB_RENDER⚓︎
Accepts a Vector to modify render offset or false
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1434 | MC_PRE_GRID_ENTITY_WEB_RENDER | (GridEntityWeb Web, Vector Offset) |
GridEntityType | Vector or boolean |
MC_POST_GRID_ENTITY_WEB_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1435 | MC_POST_GRID_ENTITY_WEB_RENDER | (GridEntityWeb Web) | GridEntityType | void |
MC_PRE_GRID_ENTITY_WEB_UPDATE⚓︎
Accepts false
to cancel the update.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1428 | MC_PRE_GRID_ENTITY_WEB_UPDATE | (GridEntityWeb Web) | GridEntityType | boolean |
MC_POST_GRID_ENTITY_WEB_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1429 | MC_POST_GRID_ENTITY_WEB_UPDATE | (GridEntityWeb Web) | GridEntityType | void |
MC_GRID_HURT_DAMAGE⚓︎
Return false if entity or player should ignore damage from it.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1012 | MC_GRID_HURT_DAMAGE | (GridEntity GridEntity, Entity Entity, int DamageAmount, DamageFlags DamageFlags, float Unknown boolean Unknown) |
GridEntityType | boolean |
MC_POST_GRID_HURT_DAMAGE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1013 | MC_POST_GRID_HURT_DAMAGE | (GridEntity GridEntity, Entity Entity, int DamageAmount, DamageFlags DamageFlags, float Unknown boolean Unknown) |
GridEntityType | void |
MC_POST_GRID_ROCK_DESTROY⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1011 | MC_POST_GRID_ROCK_DESTROY | (GridEntityRock Rock, GridEntityType Type, boolean Immediate) |
GridEntityType | void |
MC_HUD_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1022 | MC_HUD_RENDER | void | - | void |
MC_POST_HUD_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1024 | MC_POST_HUD_RENDER | void | - | void |
MC_HUD_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1020 | MC_HUD_UPDATE | void | - | void |
MC_POST_HUD_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1021 | MC_POST_HUD_UPDATE | void | - | void |
MC_IS_PERSISTENT_ROOM_ENTITY⚓︎
Returning true
allows entity to respawn.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1263 | MC_IS_PERSISTENT_ROOM_ENTITY | (EntityType Type, int Variant) |
- | boolean |
MC_PRE_ITEM_OVERLAY_SHOW⚓︎
Accepts an integer to change Giantbook
Alternatively accepts true
to cancel item overlay show
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1076 | MC_PRE_ITEM_OVERLAY_SHOW | (Giantbook GiantbookID, int Delay, EntityPlayer Player) |
Giantbook | Giantbook or boolean |
MC_POST_ITEM_OVERLAY_SHOW⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1134 | MC_POST_ITEM_OVERLAY_SHOW | (Giantbook GiantbookID, int Delay, EntityPlayer Player) |
Giantbook | void |
MC_POST_ITEM_OVERLAY_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1075 | MC_POST_ITEM_OVERLAY_UPDATE | void | Giantbook | void |
MC_POST_KNIFE_COLLISION⚓︎
Runs after the on-collision code of this entity, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1243 | MC_POST_KNIFE_COLLISION | (EntityKnife Knife, Entity Collider, boolean Low) |
KnifeSubType | void |
MC_PRE_KNIFE_RENDER⚓︎
Accepts a Vector to modify render offset
Alternatively accepts false
to cancel rendering
Shadows
Canceling this callback will not stop rendering of entity shadows. This is being investigated, but in the meantime call SetShadowSize(0) on the entity in MC_POST_UPDATE.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1086 | MC_PRE_KNIFE_RENDER | (EntityKnife Knife, Vector Offset) |
KnifeVariant | Vector or boolean |
MC_PRE_LASER_COLLISION⚓︎
Runs right before a laser hits an entity. Return true to ignore the collision.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1248 | MC_PRE_LASER_COLLISION | (EntityLaser Laser, Entity Collider) |
LaserVariant | boolean |
MC_POST_LASER_COLLISION⚓︎
Runs after a laser hits an entity.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1249 | MC_POST_LASER_COLLISION | (EntityLaser Laser, Entity Collider) |
LaserVariant | void |
MC_PRE_LEVEL_INIT⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1060 | MC_PRE_LEVEL_INIT | void | - | void |
MC_POST_LEVEL_LAYOUT_GENERATED⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1099 | MC_POST_LEVEL_LAYOUT_GENERATED | (LevelGenerator LevelGenerator) | - | void |
MC_PRE_LEVEL_PLACE_ROOM⚓︎
Return a room config to replace the room that will be placed
Warning
The new room shape must be the same, and the new available door slots must be compatible with the original room doors.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1137 | MC_PRE_LEVEL_PLACE_ROOM | (LevelGeneratorRoom Slot, RoomConfigRoom RoomConfig, int Seed) |
- | RoomConfigRoom Config |
MC_PRE_LEVEL_SELECT⚓︎
This callback is fired when the game selects which level (also known as stage) to load, usually when the player enters a trapdoor. The callback accepts two parameters:
- Level: the level selected by the game, as defined in the LevelStage enumeration.
- Type: the type of the level selected by the game, as defined in the StageType enumeration.
This callback can return either nothing or a table.
- Nothing: let the game continue with the level stage / stage type pair it selected;
- Table: must contain two fields (anonymous). The first field is the desired level stage, second field is the desired stage type.
If you return a table, Repentogon will check that the values fall in the allowed ranges for the level stage and the stage type.
Value ranges
Remember that the range of level types is not the same between normal / hard on one side and greed / greedier on the other.
Also remember that since Repentance the stage type value 3 is deprecated.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1104 | MC_PRE_LEVEL_SELECT | (LevelStage Level, StageType Type) |
- | void |
MC_MAIN_MENU_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1023 | MC_MAIN_MENU_RENDER | void | - | void |
MC_PRE_MEGA_SATAN_ENDING⚓︎
Called right before Mega Satan forcibly ends the game.
- Accepts
true
to suppress the ending, guaranteeing a portal to the Void while retaining the completion mark for this character. false
ornil
will have no effect. I might look into makingfalse
guarantee an ending?
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1201 | MC_PRE_MEGA_SATAN_ENDING | void | - | boolean |
MC_MENU_INPUT_ACTION⚓︎
Same as MC_INPUT_ACTION, but only works in the main menu.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1464 | MC_MENU_INPUT_ACTION | (Entity, InputHook, ButtonAction) |
InputHook | boolean or float |
MC_POST_MODS_LOADED⚓︎
Called after all Lua scripts have been loaded. Ideal for running code that is expected to run after all mods are initialized, but without the need for load order idiocy!
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1210 | MC_POST_MODS_LOADED | void | - | void |
MC_PRE_MUSIC_LAYER_TOGGLE⚓︎
Accepts a music layer ID (enum pending) to change the layer, or a boolean to change the state of the layer: true
to keep it running, false
to stop it.
CurrentState
returns true
if the layer is going to be enabled, and false
if it is going to be disabled.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1035 | MC_PRE_MUSIC_LAYER_TOGGLE | (int ID, boolean CurrentState) |
int | int or boolean |
MC_PRE_MUSIC_PLAY_JINGLE⚓︎
Accepts a Music to change the track
Alternatively accepts false
to cancel the track
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1094 | MC_PRE_MUSIC_PLAY_JINGLE | (Music MusicID) | Music | Music or boolean |
MC_PRE_MUSIC_PLAY⚓︎
Accepts a table of parameters: {ID, Volume OR FadeRate}
Alternatively accepts a Music to change the track without changing volume or fade rate
Alternatively accepts false
to cancel the track
Volume vs. FadeRate
This callback is called for both MusicManager::Play and MusicManager::Crossfade! IsFade
is provided to distinguish the two.
Example Code
This code will replace all music track with the flooded caves theme (for better or for worse).
1 2 3 4 |
|
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1034 | MC_PRE_MUSIC_PLAY | (int ID, float Volume OR float FadeRate, boolean IsFade) |
Music | table or Music or boolean |
MC_PRE_M_MORPH_ACTIVE⚓︎
This callback triggers when an active gets rerolled by 'M (trinket id 138) and allows for overriding its behavior.
- Accepts a CollectibleType to override the rerolled item id or
false
to prevent the active from rerolling entirely.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1190 | MC_PRE_M_MORPH_ACTIVE | (EntityPlayer Player, CollectibleType Collectible) |
- | CollectibleType |
MC_PRE_NEW_ROOM⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1200 | MC_PRE_NEW_ROOM | (Room Room, RoomDescriptor Descriptor) |
- | void |
MC_POST_NIGHTMARE_SCENE_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1102 | MC_POST_NIGHTMARE_SCENE_RENDER | void | - | void |
MC_POST_NIGHTMARE_SCENE_SHOW⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1103 | MC_POST_NIGHTMARE_SCENE_SHOW | (boolean Unknown) | - | void |
MC_POST_NPC_COLLISION⚓︎
Runs after the on-collision code of this entity, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1247 | MC_POST_NPC_COLLISION | (EntityNPC NPC, Entity Collider, boolean Low) |
EntityType | void |
MC_PRE_NPC_MORPH⚓︎
Accepts a table of parameters: {EntityType, Variant, SubType, Championid}
or just {EntityType, Variant, SubType}
.
Returning false
cancels the morph.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1212 | MC_PRE_NPC_MORPH | (EntityNPC NPC, int EntityType, int Variant, int SubType, int Championid) |
- | table or boolean |
MC_POST_NPC_MORPH⚓︎
Runs after the Morph already happened.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1214 | MC_POST_NPC_MORPH | (EntityNPC NPC, int PreviousType, int PreviousVariant, int PreviousSubType) |
- | void |
MC_NPC_PICK_TARGET⚓︎
Called whenever an EntityNPC selects its target, such as when EntityNPC:GetPlayerTarget() is called.
Return an entity to make the NPC target that entity instead.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1222 | MC_NPC_PICK_TARGET | (EntityNPC NPC, Entity CurrentTarget) |
EntityType | Entity |
MC_POST_NPC_DARK_RED_CHAMPION_REGEN⚓︎
Runs right after a dark red champion regenerates out of the goo form.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1223 | MC_POST_NPC_DARK_RED_CHAMPION_REGEN | (EntityNPC NPC) | EntityType | void |
MC_EVALUATE_CUSTOM_CACHE⚓︎
Called when a custom cache is evaluated (see items.xml). Return a number to modify the value. Modified values are passed onto the next callback.
The initial value is always 0. The most recent result can be obtained at any time using player:GetCustomCacheValue("mycustomcache")
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1224 | MC_EVALUATE_CUSTOM_CACHE | (EntityPlayer Player, CustomCacheTag string, float Value) | string CustomCacheTag | void |
MC_EVALUATE_FAMILIAR_MULTIPLIER⚓︎
Called when a familiar's cached multiplier needs to be re-evaluated. Return a number to modify the multiplier. Modified values are passed to the next callback.
Effects such as BFFs or Hive Mind have already been applied at this point.
Note that the result of this callback is cached, so the callback only runs when needed. It will be triggered if an item with the familiarmultiplier
"customcache" is added/removed (see items.xml) or if familiar:InvalidateCachedMultiplier()
is called.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1225 | MC_EVALUATE_FAMILIAR_MULTIPLIER | (EntityFamiliar Familiar, float Mult, EntityPlayer Player) | FamiliarVariant | void |
MC_PRE_NPC_RENDER⚓︎
Accepts a Vector to modify render offset
Alternatively accepts false
to cancel rendering
Shadows
Canceling this callback will not stop rendering of entity shadows. This is being investigated, but in the meantime call SetShadowSize(0) on the entity in MC_POST_UPDATE.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1081 | MC_PRE_NPC_RENDER | (EntityNPC NPC, Vector Offset) |
EntityType | Vector or boolean |
MC_PRE_NPC_SPLIT⚓︎
Called when the game is about to decide whether or not an EntityNPC can be split, ie the Meat Cleaver effect.
Return true
to prevent the split, false
to allow it even if blacklisted, or nil
to continue default behavior.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1191 | MC_PRE_NPC_SPLIT | (EntityNPC NPC, boolean IsBlacklisted) |
EntityType | boolean |
MC_PRE_OPENGL_RENDER⚓︎
Gets called right before the Manager::Render() function gets called.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1136 | MC_PRE_OPENGL_RENDER | (VertexBuffer, int shaderId, RenderContext) |
- | ? |
MC_PRE_PAUSE_SCREEN_RENDER⚓︎
Can return false
to prevent the pause screen from rendering. Doing so will also prevent the screen from darkening.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1218 | MC_PRE_PAUSE_SCREEN_RENDER | (Sprite PauseBody, Sprite PauseStats) |
- | boolean |
MC_POST_PAUSE_SCREEN_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1219 | MC_POST_PAUSE_SCREEN_RENDER | (Sprite PauseBody, Sprite PauseStats) |
- | void |
MC_POST_PICKUP_COLLISION⚓︎
Runs after the on-collision code of this entity, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1239 | MC_POST_PICKUP_COLLISION | (EntityPickup Pickup, Entity Collider, boolean Low) |
PickupVariant | void |
MC_PRE_PICKUP_COMPOSTED⚓︎
This callback is called when a pickup is consumed with the compost active.
Accepts false
to cancel the pickup getting consumed.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1267 | MC_PRE_PICKUP_VOIDED | (EntityPickup Pickup) | PickupVariant | boolean |
MC_PICKUP_GET_COIN_VALUE⚓︎
Accepts int
CoinValue to modify the amount of coins a coin can give you on pickup.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1250 | MC_PICKUP_GET_COIN_VALUE | (EntityPickup Pickup) | CoinSubType | int CoinValue |
MC_PRE_PICKUP_MORPH⚓︎
Accepts a table of parameters: {EntityType, Variant, SubType, KeepPrice, KeepSeed, IgnoreModifiers}
or just {EntityType, Variant, SubType}
.
Returning false
cancels the morph.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1213 | MC_PRE_PICKUP_MORPH | (EntityPickup Pickup, int EntityType, int Variant, int SubType, boolean KeepPrice, boolean KeepSeed, boolean IgnoreModifiers) |
- | table or boolean |
MC_POST_PICKUP_MORPH⚓︎
Runs after the morph already happened.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1215 | MC_POST_PICKUP_MORPH | (EntityPickup Pickup, int PreviousType, int PreviousVariant, int SubType, boolean KeptPrice, boolean KeptSeed, boolean IgnoredModifiers) |
- | void |
MC_PRE_PICKUP_RENDER⚓︎
Accepts a Vector to modify render offset
Alternatively accepts false
to cancel rendering
Shadows
Canceling this callback will not stop rendering of entity shadows. This is being investigated, but in the meantime call SetShadowSize(0) on the entity in MC_POST_UPDATE.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1083 | MC_PRE_PICKUP_RENDER | (EntityPickup Pickup, Vector Offset) |
PickupVariant | Vector or boolean |
MC_POST_PICKUP_SHOP_PURCHASE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1062 | MC_POST_PICKUP_SHOP_PURCHASE | (EntityPickup Pickup, EntityPlayer Player, int MoneySpent) |
PickupVariant | void |
MC_PRE_PICKUP_VOIDED_ABYSS⚓︎
This callback is called when a pickup is consumed with the abyss active.
Accepts false
to cancel the pickup getting consumed.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1266 | MC_PRE_PICKUP_VOIDED_ABYSS | (EntityPickup Pickup) | PickupVariant | boolean |
MC_PRE_PICKUP_VOIDED⚓︎
This callback is called when a pickup is consumed with the void active or black rune. The IsBlackRune
parameter indicates the source.
If black rune is used, the callback gets fired both for pedestal items and for small pickups that turn into flies.
Accepts false
to cancel the pickup getting consumed.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1265 | MC_PRE_PICKUP_VOIDED | (EntityPickup Pickup, boolean IsBlackRune) |
PickupVariant | boolean |
MC_PRE_PLANETARIUM_APPLY_ITEMS⚓︎
After checking the amount of treasure rooms entered, the game applies flat item chances. This is where Crystal Ball, Magic 8 Ball and Sausage's chances get added, as well as Telescope Lens's additional 15% chance.
If you're looking to add an item like Telescope Lens which modifies the base chance, have a look at MC_PRE_PLANETARIUM_APPLY_TELESCOPE_LENS instead.
Accepts a float
to modify the chance in this step of the calculation.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1113 | MC_PRE_PLANETARIUM_APPLY_ITEMS | (float Chance) | - | float |
MC_PRE_PLANETARIUM_APPLY_PLANETARIUM_PENALTY⚓︎
After ensuring the stage is valid, the game then checks if a planetarium has been entered before. If so, the chance will be locked at 1% (10% with Telescope Lens).
If you're looking to add an item like Telescope Lens which modifies the base chance, have a look at MC_PRE_PLANETARIUM_APPLY_TELESCOPE_LENS instead.
Accepts a boolean
. Return false
to bypass the planetarium enter penalty.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1111 | MC_PRE_PLANETARIUM_APPLY_PLANETARIUM_PENALTY | void | - | boolean |
MC_PRE_PLANETARIUM_APPLY_STAGE_PENALTY⚓︎
This callback is run at the start of planetarium calculation. Before running calculation, the game first checks if the current floor is valid to spawn a planetarium. If the current floor is invalid, all further calculation (and thus, all further callbacks) will be canceled.
By default, planetariums cannot spawn past Depths II (Womb II with Telescope Lens).
This callback can be used, for example, to add custom planetarium spawn rules on custom floors, or to add new items like Telescope Lens which can augment the rules.
Accepts a boolean
. Return false
to bypass the planetarium stage penalty.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1110 | MC_PRE_PLANETARIUM_APPLY_STAGE_PENALTY | void | - | boolean |
MC_PRE_PLANETARIUM_APPLY_TELESCOPE_LENS⚓︎
Finally, after checking all of the above, Telescope Lens adds an additional 9% chance to the base chance, bringing the base generation chance to 10%.
Accepts a float
to modify the chance in this step of the calculation.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1114 | MC_PRE_PLANETARIUM_APPLY_TELESCOPE_LENS | (float Chance) | - | float |
MC_PRE_PLANETARIUM_APPLY_TREASURE_PENALTY⚓︎
After ensuring planetariums haven't been entered before, the game then checks how many treasure rooms have been entered. If the amount of treasure rooms entered is greater than or equal to the current stage number, the chance will be locked at 1% (10% with Telescope Lens).
If you're looking to add an item like Telescope Lens which modifies the base chance, have a look at MC_PRE_PLANETARIUM_APPLY_TELESCOPE_LENS instead.
Accepts a boolean
. Return false
to bypass the planetarium treasure room penalty entirely, meaning the game will act as if no treasure rooms have been entered.
Alternatively accepts an int
to modify how many treasure rooms the game will believe has been entered.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1112 | MC_PRE_PLANETARIUM_APPLY_TREASURE_PENALTY | (int TreasureRoomsVisited) | - | boolean or int |
MC_POST_PLANETARIUM_CALCULATE⚓︎
This will override all previous calculation values, ultimately dictating the planetarium chance.
Accepts a float
to modify the chance.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1115 | MC_POST_PLANETARIUM_CALCULATE | (float Chance) | - | float |
MC_PRE_PLAYERHUD_RENDER_ACTIVE_ITEM⚓︎
Accepts true
to cancel rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1119 | MC_PRE_PLAYERHUD_RENDER_ACTIVE_ITEM | (EntityPlayer Player, ActiveSlot Slot, Vector Offset, float Alpha, float Scale, Vector ChargeBarOffset) |
- | boolean |
MC_POST_PLAYERHUD_RENDER_ACTIVE_ITEM⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1079 | MC_POST_PLAYERHUD_RENDER_ACTIVE_ITEM | (EntityPlayer Player, ActiveSlot Slot, Vector Offset, float Alpha, float Scale, Vector ChargeBarOffset) |
- | void |
MC_PRE_PLAYERHUD_RENDER_HEARTS⚓︎
Return true
to cancel hearts HUD rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1118 | MC_PRE_PLAYERHUD_RENDER_HEARTS | (Vector Offset(?), Sprite HeartsSprite, Vector Position, float Unknown, EntityPlayer Player) |
- | boolean |
MC_POST_PLAYERHUD_RENDER_HEARTS⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1091 | MC_POST_PLAYERHUD_RENDER_HEARTS | (Vector Offset(?), Sprite HeartsSprite, Vector Position, float Unknown, EntityPlayer Player) |
- | void |
MC_PRE_PLAYERHUD_TRINKET_RENDER⚓︎
Accepts returning a table, with any combination of the following fields:
- Position - Alters trinket position.
- Scale - Alters trinket scale.
- CropOffset - Alters the crop on the sprite on its spritesheet. Allows alternate sprites for the same trinket rendered this way, such as Monkey Paw.
Alternative accepts true
, which cancels trinket rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1264 | MC_PRE_PLAYERHUD_TRINKET_RENDER | (int Slot, Vector Position, float Scale, EntityPlayer Player, Vector CropOffset) |
int Slot | table or boolean |
MC_PRE_PLAYER_APPLY_INNATE_COLLECTIBLE_NUM⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1092 | MC_PRE_PLAYER_APPLY_INNATE_COLLECTIBLE_NUM | (int ModCount, EntityPlayer Player, CollectibleType Type, boolean OnlyCountTrueItems) |
- | int |
MC_POST_PLAYER_COLLISION⚓︎
Runs after the on-collision code of this entity, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1231 | MC_POST_PLAYER_COLLISION | (EntityPlayer Player, Entity Collider, boolean Low) |
PlayerVariant | void |
MC_PLAYER_GET_ACTIVE_MAX_CHARGE⚓︎
Accepts an integer to change chargebar for the active item.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1072 | MC_PLAYER_GET_ACTIVE_MAX_CHARGE | (CollectibleType Collectible, EntityPlayer Player, int VarData, int CurrentMaxCharge) |
CollectibleType | int |
MC_PLAYER_GET_ACTIVE_MIN_USABLE_CHARGE⚓︎
Accepts an integer to change the minimum charge to use the active item. If the item currently has the minimum amount of charge, it'll also show the white outline.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1073 | MC_PLAYER_GET_ACTIVE_MIN_USABLE_CHARGE | (ActiveSlot Slot, EntityPlayer Player, int CurrentMinUsableCharge) | CollectibleType | int |
MC_PLAYER_GET_HEALTH_TYPE⚓︎
Accepts an HealthType to change health type for the character.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1067 | MC_PLAYER_GET_HEALTH_TYPE | (EntityPlayer Player) | PlayerType | HealthType |
MC_PLAYER_GET_HEART_LIMIT⚓︎
Accepts an override integer
for heart limit.
-
You can set the limit to any arbitrary amount but the game can only render up to 4 lines of hearts in the HUD. However, even if they're not visible, the hearts still work properly.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1074 | MC_PLAYER_GET_HEART_LIMIT | (EntityPlayer Player, int HeartLimit, boolean IsKeeper) |
PlayerType | int |
MC_POST_PLAYER_GET_MULTI_SHOT_PARAMS⚓︎
Return a MultiShotParams object to change the properties of the players shooting behavior in regards to the MultiShotParams object properties.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1251 | MC_POST_PLAYER_GET_MULTI_SHOT_PARAMS | (EntityPlayer Player) | PlayerType | MultiShotParams |
MC_PLAYER_INIT_POST_LEVEL_INIT_STATS⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1042 | MC_PLAYER_INIT_POST_LEVEL_INIT_STATS | (EntityPlayer Player) | PlayerType | void |
MC_PLAYER_INIT_PRE_LEVEL_INIT_STATS⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1127 | MC_PLAYER_INIT_PRE_LEVEL_INIT_STATS | (EntityPlayer Player) | PlayerType | void |
MC_POST_FORCE_ADD_PILL_EFFECT⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1129 | MC_POST_FORCE_ADD_PILL_EFFECT | PillEffect, PillColor | - | void |
MC_POST_PLAYER_NEW_LEVEL⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1078 | MC_POST_PLAYER_NEW_LEVEL | (EntityPlayer Player) | PlayerType | void |
MC_POST_PLAYER_NEW_ROOM_TEMP_EFFECTS⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1077 | MC_POST_PLAYER_NEW_ROOM_TEMP_EFFECTS | (EntityPlayer Player) | PlayerType | void |
MC_PRE_PLAYER_RENDER⚓︎
Accepts a Vector to modify render offset
Alternatively accepts false
to cancel rendering
Shadows
Canceling this callback will not stop rendering of entity shadows. This is being investigated, but in the meantime call SetShadowSize(0) on the entity in MC_POST_UPDATE.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1082 | MC_PRE_PLAYER_RENDER | (EntityPlayer Player, Vector Offset) |
PlayerVariant | Vector or boolean |
MC_PRE_PLAYER_TAKE_DMG⚓︎
Runs earlier than MC_ENTITY_TAKE_DMG, and even if the player is considered invincible or has Holy Mantles.
Only accepts returning false to cancel the damage. Good for giving the player invincibility that takes precedence over other damage negation effects, such as Holy Mantle.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1008 | MC_PRE_PLAYER_TAKE_DMG | (EntityPlayer Player, float Damage, DamageFlags DamageFlags, EntityRef Source, int DamageCountdown) |
PlayerVariant | boolean |
MC_PRE_PLAYER_ADD_HEARTS⚓︎
Runs before Add(...)Hearts functions, allows returning a value to change the given amount of health. Functions that include an argument (e.g. ignoreKeeper for AddMaxHearts) provide the value using OptionalArg.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1009 | MC_PRE_PLAYER_ADD_HEARTS | (EntityPlayer Player, int Amount, AddHealthType AddHealthType, boolean OptionalArg) |
AddHealthType | int |
MC_POST_PLAYER_ADD_HEARTS⚓︎
Runs after Add(...)Hearts functions and MC_PRE_PLAYER_ADD_HEARTS callback. Functions that include an argument (e.g. ignoreKeeper for AddMaxHearts) provide the value using OptionalArg.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1010 | MC_POST_PLAYER_ADD_HEARTS | (EntityPlayer Player, int Amount, AddHealthType AddHealthType, boolean OptionalArg) |
AddHealthType | void |
MC_PRE_PLAYER_TRIGGER_ROOM_CLEAR⚓︎
Accepts false
to cancel trigger effects.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1069 | MC_PRE_PLAYER_TRIGGER_ROOM_CLEAR | (EntityPlayer Player) | PlayerVariant | boolean |
MC_PRE_PLAYER_USE_BOMB⚓︎
Return false
to stop the player from using a bomb.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1020 | MC_PRE_PLAYER_USE_BOMB | (EntityPlayer Player) | PlayerVariant | boolean |
MC_POST_PLAYER_USE_BOMB⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1021 | MC_POST_PLAYER_USE_BOMB | (EntityPlayer Player, EntityBomb Bomb) |
PlayerVariant | void |
MC_POST_PROJECTILE_COLLISION⚓︎
Runs after the on-collision code of this entity, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1245 | MC_POST_PROJECTILE_COLLISION | (EntityProjectile Projectile, Entity Collider, boolean Low) |
ProjectileVariant | void |
MC_PRE_PROJECTILE_RENDER⚓︎
Accepts a Vector to modify render offset
Alternatively accepts false
to cancel rendering
Shadows
Canceling this callback will not stop rendering of entity shadows. This is being investigated, but in the meantime call SetShadowSize(0) on the entity in MC_POST_UPDATE.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1085 | MC_PRE_PROJECTILE_RENDER | (EntityProjectile Projectile, Vector Offset) |
ProjectileVariant | Vector or boolean |
MC_PRE_RENDER_CUSTOM_CHARACTER_MENU⚓︎
Accepts no return parameters.
Execution informations
This callback only triggers when a custom character is selected, it doesn't trigger on regular characters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1333 | MC_PRE_RENDER_CUSTOM_CHARACTER_MENU | (PlayerType PlayerType, Vector RenderPos, Sprite DefaultSprite) |
PlayerType | void |
MC_PRE_RENDER_ENTITY_LIGHTING⚓︎
Accepts an override Vector for Offset.
Alternatively accepts false
to stop the rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1152 | MC_PRE_RENDER_ENTITY_LIGHTING | (Entity Entity, Vector Offset) |
EntityType | Vector or boolean |
MC_PRE_RENDER_GRID_LIGHTING⚓︎
Accepts an override Vector for Offset.
Alternatively accepts false
to stop the rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1151 | MC_PRE_RENDER_GRID_LIGHTING | (GridEntity GridEntity, Vector Offset) |
GridEntityType | Vector or boolean |
MC_PRE_RENDER_PLAYER_BODY⚓︎
Accepts an override vector
for RenderPos.
Alternatively accepts a false
to stop the rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1039 | MC_PRE_RENDER_PLAYER_BODY | (EntityPlayer player, Vector RenderPos) |
PlayerType | Vector or boolean |
MC_PRE_RENDER_PLAYER_HEAD⚓︎
Accepts an override Vector for RenderPos.
Alternatively accepts a false
to stop the rendering.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1038 | MC_PRE_RENDER_PLAYER_HEAD | (EntityPlayer player, Vector RenderPos) |
PlayerType | Vector or boolean |
MC_PRE_RENDER⚓︎
Gets called right before the Manager::Render() function gets called.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1135 | MC_PRE_RENDER | void | - | void |
MC_PRE_REPLACE_SPRITESHEET⚓︎
Accepts a table of parameters: {int LayerID, string PNGFilename}
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1116 | MC_PRE_REPLACE_SPRITESHEET | (int LayerID, string PNGFilename) |
string ANM2Filename | table |
MC_POST_REPLACE_SPRITESHEET⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1117 | MC_POST_REPLACE_SPRITESHEET | (int LayerID, string PNGFilename) |
string ANM2Filename | void |
MC_PRE_RESTOCK_SHOP⚓︎
Accepts false
to cancel the restock, blocking shop rerolls from restock machines or restocks from Restock altogether.
Partial
This callback is called for both Room::ShopRestockFull and Room::ShopRestockPartial! Partial
is provided to distinguish the two.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1070 | MC_PRE_RESTOCK_SHOP | (boolean Partial) | - | void |
MC_POST_RESTOCK_SHOP⚓︎
Accepts no return parameters.
Partial
This callback is called for both Room::ShopRestockFull and Room::ShopRestockPartial! Partial
is provided to distinguish the two.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1071 | MC_POST_RESTOCK_SHOP | (boolean Partial) | - | void |
MC_PRE_ROOM_EXIT⚓︎
Accepts no return parameters.
NewLevel
NewLevel returns true
when entering a new level or when exiting a run.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1043 | MC_PRE_ROOM_EXIT | (EntityPlayer Player, boolean NewLevel) |
- | void |
MC_PRE_ROOM_GRID_ENTITY_SPAWN⚓︎
This is called during Room initiization when GridEntities from the layout are being spawned.
Accepts false
to cancel spawning the grid or a table of {Type, Variant, Vardata, SpawnSeed}
to modify it.
Warning
This does not fire for random decorations spawned by the game! Use MC_PRE_GRID_ENTITY_SPAWN
for these.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1192 | MC_PRE_ROOM_GRID_ENTITY_SPAWN | (GridEntityType Type, int Variant, int VarData, int GridIdx, int SpawnSeed) |
GridEntityType Type | boolean or table |
MC_PRE_ROOM_TRIGGER_CLEAR⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1068 | MC_PRE_ROOM_TRIGGER_CLEAR | (boolean PlaySound) | - | void |
MC_POST_SAVESLOT_LOAD⚓︎
This is called wheenver a saveslot is loaded by the game.
This is the callback you should use to handle savedata loads, ideally, from normal Mod::LoadData to Repentogon Marks/Achievement checks, since it's the callback that triggers when those are loaded.
The first parameter is the slot you should care about, the 2nd parameter (isslotselected) indicates if the slot that is being loaded has actually been selected from the save menu screen (you can limit your save handling to when this is true if you want to get fancy), and the 3rd parameter(rawslot) is the actual saveslot the game uses (not the one the api uses since it can be 0!).
Warning
This callback is called many times before a run is started, either from changing saveslots naturally or because the game doesnt give a damn, so code accounting for that, clearing previous data when necessary. The 3rd param is actually only useful to check for the 0 slot state, which is the one the game defaults to before the actual slot is loaded by the player. When on this state, the moddata and the gamedata WONT BE IN SYNC (moddata is slot 1, while vanilla game data is 3)
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1470 | MC_POST_SAVESLOT_LOAD | (int saveslot, boolean isslotselected, int rawslot) |
void | - |
MC_PRE_SFX_PLAY⚓︎
Accepts a table of parameters: {ID, Volume, FrameDelay, Loop, Pitch, Pan}
Alternatively accepts false
to cancel the sound.
Example Code
This code will forcibly loop every sound (for better or worse).
1 2 3 4 |
|
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1030 | MC_PRE_SFX_PLAY | (int ID, float Volume, int FrameDelay, boolean Loop, float Pitch, float Pan) |
SoundEffect | table or boolean |
MC_POST_SFX_PLAY⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1031 | MC_POST_SFX_PLAY | (int ID, float Volume, int FrameDelay, boolean Loop, float Pitch, float Pan) |
SoundEffect | void |
MC_PRE_SLOT_COLLISION⚓︎
Just like the collision callbacks in the vanilla API, the Low value is true if the entity collided with the collider first, and false if the opposite is true.
Return true
to ignore collision, false
to collide but not execute internal code.
Also accepts returning a table, with any combination of the following fields:
- Collide: Set to true to force the entities to physically collide (push each other away), unless the "Collider" ignores the collision. Set to false to ignore the physical collision without necessarily skipping on-collision effects.
- SkipCollisionEffects: Set to true to skip the on-collision code of this entity. Does not affect the physical collision. Won't skip the on-collision code of the "Collider".
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1240 | MC_PRE_SLOT_COLLISION | (EntitySlot, Entity Collider, boolean Low) |
SlotVariant | boolean |
MC_POST_SLOT_COLLISION⚓︎
Runs after the on-collision code of this entity, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1241 | MC_POST_SLOT_COLLISION | (EntitySlot, Entity Collider, boolean Low) |
SlotVariant | void |
MC_PRE_SLOT_CREATE_EXPLOSION_DROPS⚓︎
Return false
to stop explosions from dropping the standard consumables. This is useful, for example, to allow custom slots to drop their own loot on explosion.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1123 | MC_PRE_SLOT_CREATE_EXPLOSION_DROPS | (EntitySlot) | SlotVariant | boolean |
MC_POST_SLOT_CREATE_EXPLOSION_DROPS⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1124 | MC_POST_SLOT_CREATE_EXPLOSION_DROPS | (EntitySlot) | SlotVariant | void |
MC_POST_SLOT_INIT⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1121 | MC_POST_SLOT_INIT | (EntitySlot) | SlotVariant | void |
MC_PRE_SLOT_RENDER⚓︎
Accepts a Vector to modify render offset
Alternatively accepts false
to cancel rendering
Shadows
Canceling this callback will not stop rendering of entity shadows. This is being investigated, but in the meantime call SetShadowSize(0) on the entity in MC_POST_UPDATE.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1089 | MC_PRE_SLOT_RENDER | (EntitySlot Slot, Vector Offset) |
SlotVariant | Vector or boolean |
MC_POST_SLOT_RENDER⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1090 | MC_POST_SLOT_RENDER | (EntitySlot Slot, Vector Offset) |
SlotVariant | void |
MC_PRE_SLOT_SET_PRIZE_COLLECTIBLE⚓︎
Used by Shell Game, Hell Game, and Crane Game.
Accepts a CollectibleType to override what the game will pay out with.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1125 | MC_PRE_SLOT_SET_PRIZE_COLLECTIBLE | (EntitySlot, CollectibleType Type) |
SlotVariant | CollectibleType |
MC_POST_SLOT_SET_PRIZE_COLLECTIBLE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1126 | MC_POST_SLOT_SET_PRIZE_COLLECTIBLE | (EntitySlot, CollectibleType Type) |
SlotVariant | void |
MC_PRE_SLOT_UPDATE⚓︎
Called before this entity is updated.
Return true
if the internal AI should be ignored, false
or nil
/nothing otherwise.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1169 | MC_PRE_SLOT_UPDATE | (EntitySlot Slot) | SlotVariant | boolean |
MC_POST_SLOT_UPDATE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1122 | MC_POST_SLOT_UPDATE | (EntitySlot) | SlotVariant | void |
MC_POST_TEAR_COLLISION⚓︎
Runs after the on-collision code of this entity, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1233 | MC_POST_TEAR_COLLISION | (EntityTear Tear, Entity Collider, boolean Low) |
TearVariant | void |
MC_PRE_TEAR_RENDER⚓︎
Accepts a Vector to modify render offset
Alternatively accepts false
to cancel rendering
Shadows
Canceling this callback will not stop rendering of entity shadows. This is being investigated, but in the meantime call SetShadowSize(0) on the entity in MC_POST_UPDATE.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1084 | MC_PRE_TEAR_RENDER | (EntityTear Tear, Vector Offset) |
TearVariant | Vector or boolean |
MC_POST_TRIGGER_COLLECTIBLE_REMOVED⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1095 | MC_POST_TRIGGER_COLLECTIBLE_REMOVED | (EntityPlayer Player, CollectibleType Type) |
CollectibleType | void |
MC_PRE_TRIGGER_PLAYER_DEATH⚓︎
Fires right before the game over screen, but BEFORE the game checks for vanilla revive effects like 1UP.
Return false
or call player:Revive()
to cancel the death, reviving the player in-place with half a heart. This will also prevent later callbacks from running.
Warning
Returning false or calling player:Revive()
may remove the current run's ability to save. This occurs because the game immediately deletes the save file during the death animation if there's no pending revives, and this callback doesn't fire fast enough to register a revive on death as it occurs right before the game over screen.
In order to prevent this, only attempt to revive the player if they have an item or effect with REPENTOGON's "revive" customtag, which allows the item/effect to count as an extra life on the HUD and prevents the game from deleting the run save upon player death. See the page on items.xml for more information and some example XML/code.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1050 | MC_PRE_TRIGGER_PLAYER_DEATH | (EntityPlayer Player) | - | boolean |
MC_TRIGGER_PLAYER_DEATH_POST_CHECK_REVIVES⚓︎
Fires right before the game over screen, but AFTER the game checks for vanilla revive effects like 1UP.
Return false
or call player:Revive()
to cancel the death, reviving the player in-place with half a heart. This will also prevent later callbacks from running.
Warning
Returning false or calling player:Revive()
may remove the current run's ability to save. This occurs because the game immediately deletes the save file during the death animation if there's no pending revives, and this callback doesn't fire fast enough to register a revive on death as it occurs right before the game over screen.
In order to prevent this, only attempt to revive the player if they have an item or effect with REPENTOGON's "revive" customtag, which allows the item/effect to count as an extra life on the HUD and prevents the game from deleting the run save upon player death. See the page on items.xml for more information and some example XML/code.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1051 | MC_TRIGGER_PLAYER_DEATH_POST_CHECK_REVIVES | (EntityPlayer Player) | - | boolean |
MC_PRE_PLAYER_REVIVE⚓︎
Called before the player revives.
Return false
to cancel it."
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1481 | MC_PRE_PLAYER_REVIVE | (EntityPlayer Player) | PlayerType | boolean |
MC_POST_PLAYER_REVIVE⚓︎
Called after the player revives, assuming it wasn't cancelled.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1482 | MC_POST_PLAYER_REVIVE | (EntityPlayer Player) | PlayerType | void |
MC_POST_TRIGGER_TRINKET_ADDED⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1096 | MC_POST_TRIGGER_TRINKET_ADDED | (EntityPlayer Player, TrinketType Type, boolean FirstTimePickingUp) |
TrinketType | void |
MC_POST_TRIGGER_TRINKET_REMOVED⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1097 | MC_POST_TRIGGER_TRINKET_REMOVED | (EntityPlayer Player, TrinketType Type) |
TrinketType | void |
MC_POST_TRIGGER_WEAPON_FIRED⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1098 | MC_POST_TRIGGER_WEAPON_FIRED | (Vector FireDirection, int FireAmount, Entity Owner, Weapon Weapon) |
WeaponType | void |
MC_PRE_USE_CARD⚓︎
Accepts true
to cancel card use.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1064 | MC_PRE_USE_CARD | (Card ID, EntityPlayer Player, int UseFlag) |
- | boolean |
MC_PRE_USE_PILL⚓︎
Accepts true
to cancel pill use.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1065 | MC_PRE_USE_PILL | (PillEffect ID, PillColor PillColor, EntityPlayer Player, int UseFlag) |
- | boolean |
MC_POST_WEAPON_FIRE⚓︎
Accepts no return parameters.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1105 | MC_POST_WEAPON_FIRE | (Weapon Weapon, Vector FireDirection, boolean IsShooting, boolean IsInterpolated) |
WeaponType | void |
MC_PRE_PICKUP_GET_LOOT_LIST⚓︎
Called before the pickup determines its loot content. Accepts a LootList to change loot content.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1333 | MC_PRE_PICKUP_GET_LOOT_LIST | (EntityPickup Pickup, boolean ShouldAdvance) |
- | LootList |
MC_PRE_PICKUP_UPDATE_GHOST_PICKUPS⚓︎
Called before a ghost pickup of the loot content is applied to the pickup. Return true
to apply pickup ghost to your pickup entity, false
to cancel it.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1334 | MC_PRE_PICKUP_UPDATE_GHOST_PICKUPS | (EntityPickup Pickup) | PickupVariant | boolean |
MC_POST_PLAYER_TRIGGER_EFFECT_REMOVED⚓︎
Called after the player's ItemConfigItem
TemporaryEffect is removed.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1268 | MC_POST_PLAYER_TRIGGER_EFFECT_REMOVED | (EntityPlayer Player, [ItemConfigItem][../ItemConfig_Item.md]) |
- | void |
MC_POST_ROOM_TRIGGER_EFFECT_REMOVED⚓︎
Called after the room's TemporaryEffects is removed.
Room has its own TemporaryEffects that are accessed through Room::GetEffects()
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1269 | MC_POST_ROOM_TRIGGER_EFFECT_REMOVED | ([ItemConfigItem][../ItemConfig_Item.md]) | - | void |
MC_PRE_PLAYER_GRID_COLLISION⚓︎
Called before this entity collides with a GridEntity or other solid grid tile.
Return true
to ignore collision.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1171 | MC_PRE_PLAYER_GRID_COLLISION | (EntityPlayer Player, int GridIndex, GridEntity GridEntity) | PlayerVariant | boolean |
MC_PLAYER_GRID_COLLISION⚓︎
Called when this entity collides with the grid, assuming it wasn't skipped.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1172 | MC_PLAYER_GRID_COLLISION | (EntityPlayer Player, int GridIndex, GridEntity GridEntity) | PlayerVariant | boolean |
MC_PRE_TEAR_GRID_COLLISION⚓︎
Called before this entity collides with a GridEntity or other solid grid tile.
Return true
to ignore collision.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1173 | MC_PRE_TEAR_GRID_COLLISION | (EntityTear Tear, int GridIndex, GridEntity GridEntity) | TearVariant | boolean |
MC_TEAR_GRID_COLLISION⚓︎
Called when this entity collides with the grid, assuming it wasn't skipped.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1174 | MC_TEAR_GRID_COLLISION | (EntityTear Tear, int GridIndex, GridEntity GridEntity) | TearVariant | boolean |
MC_PRE_FAMILIAR_GRID_COLLISION⚓︎
Called before this entity collides with a GridEntity or other solid grid tile.
Return true
to ignore collision.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1175 | MC_PRE_FAMILIAR_GRID_COLLISION | (EntityFamiliar Familiar, int GridIndex, GridEntity GridEntity) | FamiliarVariant | boolean |
MC_FAMILIAR_GRID_COLLISION⚓︎
Called when this entity collides with the grid, assuming it wasn't skipped.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1176 | MC_FAMILIAR_GRID_COLLISION | (EntityFamiliar Familiar, int GridIndex, GridEntity GridEntity) | FamiliarVariant | boolean |
MC_PRE_BOMB_GRID_COLLISION⚓︎
Called before this entity collides with a GridEntity or other solid grid tile.
Return true
to ignore collision.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1177 | MC_PRE_BOMB_GRID_COLLISION | (EntityBomb Bomb, int GridIndex, GridEntity GridEntity) | BombVariant | boolean |
MC_BOMB_GRID_COLLISION⚓︎
Called when this entity collides with the grid, assuming it wasn't skipped.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1178 | MC_BOMB_GRID_COLLISION | (EntityBomb Bomb, int GridIndex, GridEntity GridEntity) | BombVariant | boolean |
MC_PRE_PICKUP_GRID_COLLISION⚓︎
Called before this entity collides with a GridEntity or other solid grid tile.
Return true
to ignore collision.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1179 | MC_PRE_PICKUP_GRID_COLLISION | (EntityPickup Pickup, int GridIndex, GridEntity GridEntity) | PickupVariant | boolean |
MC_PICKUP_GRID_COLLISION⚓︎
Called when this entity collides with the grid, assuming it wasn't skipped.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1180 | MC_PICKUP_GRID_COLLISION | (EntityPickup Pickup, int GridIndex, GridEntity GridEntity) | PickupVariant | boolean |
MC_PRE_PROJECTILE_GRID_COLLISION⚓︎
Called before this entity collides with a GridEntity or other solid grid tile.
Return true
to ignore collision.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1181 | MC_PRE_PROJECTILE_GRID_COLLISION | (EntityProjectile Projectile, int GridIndex, GridEntity GridEntity) | ProjectileVariant | boolean |
MC_PROJECTILE_GRID_COLLISION⚓︎
Called when this entity collides with the grid, assuming it wasn't skipped.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1182 | MC_PROJECTILE_GRID_COLLISION | (EntityProjectile Projectile, int GridIndex, GridEntity GridEntity) | ProjectileVariant | boolean |
MC_PRE_NPC_GRID_COLLISION⚓︎
Called before this entity collides with a GridEntity or other solid grid tile.
Return true
to ignore collision.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1183 | MC_PRE_NPC_GRID_COLLISION | (EntityNPC NPC, int GridIndex, GridEntity GridEntity) | EntityType | boolean |
MC_NPC_GRID_COLLISION⚓︎
Called when this entity collides with the grid, assuming it wasn't skipped.
Warning
GridEntity
can be nil, as entities may collide with "empty" grid indexes if the GridPath value is >= 1000.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1184 | MC_NPC_GRID_COLLISION | (EntityNPC NPC, int GridIndex, GridEntity GridEntity) | EntityType | boolean |
MC_POST_PROJECTILE_DEATH⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1032 | MC_POST_PROJECTILE_DEATH | (EntityProjectile Projectile) | ProjectileVariant | void |
MC_POST_TEAR_DEATH⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1032 | MC_POST_TEAR_DEATH | (EntityTear Tear) | TearVariant | void |
MC_POST_BOSS_INTRO_SHOW⚓︎
Accepts no return parameters.
Called right after the boss intro is initialized. BossID2
is for Double Trouble.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1270 | MC_POST_BOSS_INTRO_SHOW | (BossType BossID1, BossType BossID2) | - | void |
MC_POST_ROOM_TRANSITION_UPDATE⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1271 | MC_POST_ROOM_TRANSITION_UPDATE | void | int TransitionMode | void |
MC_POST_ROOM_TRANSITION_RENDER⚓︎
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1272 | MC_POST_ROOM_TRANSITION_RENDER | void | int TransitionMode | void |
MC_PRE_PLAYER_ADD_COSTUME⚓︎
Called before the costume is added to the player. Return ItemConfigItem to replace the costume or true
to cancel adding it entirely.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1281 | MC_PRE_PLAYER_ADD_COSTUME | (ItemConfigItem ItemConfig, EntityPlayer Player, boolean ItemStateOnly) | - | ItemConfigItem ItemConfig or boolean |
MC_PRE_PLAYER_REMOVE_COSTUME⚓︎
Called before the costume is added to the player. Return true
to cancel the removal.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1282 | MC_PRE_PLAYER_ADD_COSTUME | (ItemConfigItem ItemConfig, EntityPlayer Player, boolean ItemStateOnly) | - | boolean |
MC_POST_PLAYER_ADD_COSTUME⚓︎
Called after the costume is added to the player, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1283 | MC_POST_PLAYER_ADD_COSTUME | (ItemConfigItem ItemConfig, EntityPlayer Player, boolean ItemStateOnly) | - | void |
MC_POST_PLAYER_REMOVE_COSTUME⚓︎
Called after the costume is added to the player, assuming it wasn't skipped.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1284 | MC_POST_PLAYER_ADD_COSTUME | (ItemConfigItem ItemConfig, EntityPlayer Player, boolean ItemStateOnly) | - | void |
MC_PRE_PLAYER_UPDATE⚓︎
Called before this entity is updated.
Return true
if the internal AI should be ignored, false
or nil
/nothing otherwise.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1160 | MC_PRE_PLAYER_UPDATE | (EntityPlayer Player) | PlayerVariant | boolean |
MC_PRE_TEAR_UPDATE⚓︎
Called before this entity is updated.
Return true
if the internal AI should be ignored, false
or nil
/nothing otherwise.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1161 | MC_PRE_TEAR_UPDATE | (EntityTear Tear) | TearVariant | boolean |
MC_PRE_FAMILIAR_UPDATE⚓︎
Called before this entity is updated.
Return true
if the internal AI should be ignored, false
or nil
/nothing otherwise.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1162 | MC_PRE_FAMILIAR_UPDATE | (EntityFamiliar Familiar) | FamiliarVariant | boolean |
MC_PRE_BOMB_UPDATE⚓︎
Called before this entity is updated.
Return true
if the internal AI should be ignored, false
or nil
/nothing otherwise.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1163 | MC_PRE_BOMB_UPDATE | (EntityBomb Bomb) | BombVariant | boolean |
MC_PRE_PICKUP_UPDATE⚓︎
Called before this entity is updated.
Return true
if the internal AI should be ignored, false
or nil
/nothing otherwise.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1164 | MC_PRE_PICKUP_UPDATE | (EntityPickup Pickup) | PickupVariant | boolean |
MC_PRE_KNIFE_UPDATE⚓︎
Called before this entity is updated.
Return true
if the internal AI should be ignored, false
or nil
/nothing otherwise.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1165 | MC_PRE_KNIFE_UPDATE | (EntityKnife Knife) | KnifeSubType | boolean |
MC_PRE_PROJECTILE_UPDATE⚓︎
Called before this entity is updated.
Return true
if the internal AI should be ignored, false
or nil
/nothing otherwise.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1166 | MC_PRE_PROJECTILE_UPDATE | (EntityProjectile Projectile) | ProjectileVariant | boolean |
MC_PRE_LASER_UPDATE⚓︎
Called before this entity is updated.
Return true
if the internal AI should be ignored, false
or nil
/nothing otherwise.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1167 | MC_PRE_LASER_UPDATE | (EntityLaser Laser) | LaserVariant | boolean |
MC_PRE_EFFECT_UPDATE⚓︎
Called before this entity is updated.
Return true
if the internal AI should be ignored, false
or nil
/nothing otherwise.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1168 | MC_PRE_EFFECT_UPDATE | (EntityEffect Effect) | EffectVariant | boolean |
MC_PRE_FORTUNE_DISPLAY⚓︎
Called before a fortune is displayed.
Return false
to cancel showing the fortune.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1483 | MC_PRE_FORTUNE_DISPLAY | void | - | boolean |
MC_PRE_ITEM_TEXT_DISPLAY⚓︎
Called before an item text is displayed.
IsSticky
is true
is if the item text stays on screen for an indefinite amount of time, namely when holding down the map key. IsCurseDisplay
is true
if the text is for displaying a curse.
Return false
to cancel showing the item text.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1484 | MC_PRE_ITEM_TEXT_DISPLAY | (string Title, string Subtitle, boolean IsSticky, boolean IsCurseDisplay) | - | boolean |
MC_PRE_GET_RANDOM_ROOM_INDEX⚓︎
Called when the game wishes to get a random available room index on the floor.
Return an integer to override the target room index.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1290 | MC_PRE_FORTUNE_DISPLAY | (int RoomIndex, bool IAmErrorRoom, int Seed) | - | int |
MC_PRE_GLOWING_HOURGLASS_SAVE⚓︎
Called after the Glowing Hourglass state is saved.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1302 | MC_PRE_GLOWING_HOURGLASS_SAVE | (int Slot) | - | void |
MC_POST_GLOWING_HOURGLASS_SAVE⚓︎
Called after the Glowing Hourglass state is saved.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1300 | MC_POST_GLOWING_HOURGLASS_SAVE | (int Slot) | - | void |
MC_PRE_GLOWING_HOURGLASS_LOAD⚓︎
Called after the Glowing Hourglass state is loaded.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1303 | MC_PRE_GLOWING_HOURGLASS_LOAD | (int Slot) | - | void |
MC_POST_GLOWING_HOURGLASS_LOAD⚓︎
Called after the Glowing Hourglass state is loaded.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1301 | MC_POST_GLOWING_HOURGLASS_LOAD | (int Slot) | - | void |
MC_PRE_PLAYER_ADD_CARD⚓︎
Called before a card gets added to the player's inventory.
Return Card to change the card being added or false
to cancel adding it entirely.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1350 | MC_PRE_PLAYER_ADD_CARD | (EntityPlayer Player, Card CardID, PillCardSlot Slot) | Card | boolean or int |
MC_POST_PLAYER_ADD_CARD⚓︎
Called after a card gets added to the player's inventory.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1351 | MC_POST_PLAYER_ADD_CARD | (EntityPlayer Player, Card CardID, PillCardSlot Slot) | Card | void |
MC_PRE_PLAYER_ADD_PILL⚓︎
Called before a pill gets added to the player's inventory.
Return PillColor to change the pill being added or false
to cancel adding it entirely.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1352 | MC_PRE_PLAYER_ADD_PILL | (EntityPlayer Player, PillColor PillColor, PillCardSlot Slot) | PillColor | boolean or int |
MC_POST_PLAYER_ADD_PILL⚓︎
Called after a pill gets added to the player's inventory.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1353 | MC_POST_PLAYER_ADD_PILL | (EntityPlayer Player, PillColor PillColor, PillCardSlot Slot) | PillColor | void |
MC_POST_PLAYER_REMOVE_CARD⚓︎
Called after a card gets removed from the player's inventory by any means (dropped, direct removal, use, etc).
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1354 | MC_POST_PLAYER_REMOVE_CARD | (EntityPlayer Player, Card CardID, PillCardSlot Slot) | Card | void |
MC_POST_PLAYER_REMOVE_PILL⚓︎
Called after a pill gets removed from the player's inventory by any means (dropped, direct removal, use, etc).
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1355 | MC_POST_PLAYER_REMOVE_PILL | (EntityPlayer Player, PillColor CardID, PillCardSlot Slot) | PillColor | void |
MC_PRE_PLAYER_COLLECT_CARD⚓︎
Called before a player picks up a card off the ground.
Return false
to prevent the card from being picked up.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1356 | MC_PRE_PLAYER_COLLECT_CARD | (EntityPlayer Player, EntityPickup Pickup) | Card | boolean |
MC_POST_PLAYER_COLLECT_CARD⚓︎
Called after a player picks up a card off the ground.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1357 | MC_POST_PLAYER_COLLECT_CARD | (EntityPlayer Player, EntityPickup Pickup) | Card | void |
MC_PRE_PLAYER_COLLECT_PILL⚓︎
Called before a player picks up a pill off the ground.
Return false
to prevent the pill from being picked up.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1358 | MC_PRE_PLAYER_COLLECT_PILL | (EntityPlayer Player, EntityPickup Pickup) | PillColor | boolean |
MC_POST_PLAYER_COLLECT_PILL⚓︎
Called after a player picks up a pill off the ground.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1359 | MC_POST_PLAYER_COLLECT_PILL | (EntityPlayer Player, EntityPickup Pickup) | PillColor | void |
MC_POST_PLAYER_DROP_CARD⚓︎
Called after a player drops a card onto the ground from their inventory.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1360 | MC_POST_PLAYER_DROP_CARD | (EntityPlayer Player, EntityPickup Pickup, PillCardSlot Slot) | Card | void |
MC_POST_PLAYER_DROP_PILL⚓︎
Called after a player drops a pill onto the ground from their inventory.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1361 | MC_POST_PLAYER_DROP_PILL | (EntityPlayer Player, EntityPickup Pickup, PillCardSlot Slot) | PillColor | void |
MC_PRE_PLAYER_GIVE_BIRTH_CAMBION⚓︎
Called before Cambion Conception spawns a familiar after the player takes damage.
Return false
to prevent the familiar from being added.
Note that if you cancel this, the game will not attempt to spawn another familiar until the next requisite amount of damage, and canceling the spawning here still counts towards Cambion Conception's usual limit of 4 familiar spawns.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1474 | MC_PRE_PLAYER_GIVE_BIRTH_CAMBION | (EntityPlayer Player, ConceptionFamiliarFlag) | ConceptionFamiliarFlag | boolean |
MC_PRE_PLAYER_GIVE_BIRTH_IMMACULATE⚓︎
Called before Immaculate Conception spawns a familiar after the player takes damage.
Return false
to prevent the familiar from being added.
Note that if you cancel this, the game will not attempt to spawn another familiar until another 15 hearts are collected. Unlike Cambion Conception, Immaculate Conception will not stop attempting to spawn familiars until all available vanilla familiars have been granted.
ID | Name | Function Args | Optional Args | Return Type |
---|---|---|---|---|
1475 | MC_PRE_PLAYER_GIVE_BIRTH_IMMACULATE | (EntityPlayer Player, ConceptionFamiliarFlag) | ConceptionFamiliarFlag | boolean |