Added:
- ModCallbacks:
- MC_PRE_UPDATE()
Triggers before the game's main update cycle.
Can be used to prevent the normal update, effectively pausing the game. - MC_PRE_ROOM_COLLISION_PASS()
Triggers right before collision detection. - MC_GET_BOSS_THEMATIC_ITEM(boolean Spawned, CollectibleType SpawnedCollectible, TrinketType SpawnedTrinket)
Triggers after boss room clean. Used to spawn/overwrite result of second collectible or trinket.
Return table with field "Collectible" to spawn collectible, or "Trinket" to spawn trinket.
Alternatively you can returntrueto cancel item spawn altogether. - MC_PRE/POST_RENDER_CHARACTER_SELECT_PORTRAIT(PlayerType, Sprite, Vector Position, Vector DefaultScale, Color DefaultColor)
On PRE, return false to cancel rendering, or a Vector to change the Position.
Modifications made to the Sprite during this callback WILL apply to the natural render.
PlayerType is -1 when "random character" is selected.
Optional param: PlayerType - MC_PRE/POST_RENDER_CHARACTER_SELECT_PAGE(PlayerType, Vector Position, Sprite DefaultSprite, Sprite ModdedSprite, bool HasCustomBackground)
PRE supports returning false to cancel rendering. Modifications made to the Sprites will apply to the natural render.
ModdedSprite can only be non-nil for modded characters. HasCustomBackground indicates if ModdedSprite includes a background paper.
PlayerType is -1 when "random character" is selected.
Optional param: PlayerType - MC_PRE_BOMB_DAMAGE(Vector Position, float Damage, float Radius, bool LineCheck, Entity Source, TearFlags, DamageFlags, bool DamageSource)
Called before Game():BombDamage(), used to damage entities in a radius for explosions, etc.
Return false to cancel, or a table containing changed values for Position, Damage, Radius, TearFlags, and/or DamageFlags.
Optional param is the EntityType of the Source entity, if one exists (the Source can be nil). - MC_PRE_BOMB_TEARFLAG_EFFECTS(Vector Position, float Radius, TearFlags, Entity Source, float RadiusMult)
Called before Game():BombTearflagEffects(), used when TearFlags-based effects are triggered by an explosion.
Return false to cancel, or a table containing changed values for Position, Radius, TearFlags, and/or RadiusMult.
Optional param is the EntityType of the Source entity, if one exists (the Source can be nil). - MC_PRE/POST_BRIMSTONE_SNEEZE(Entity Source, Vector Direction, float DamageScale)
Runs for the Hemoptysis / Tainted Azazel sneeze attack. - MC_CAN_SELECT_CHARACTER(PlayerType, bool IsBeingSelected)
Will only run for characters present in the character select menu that are capable of being selected (IE, not hidden or locked behind an achievement).
Return false to prevent the character from being selectable. This has no visual effects.
IsBeingSelected is true if the player is actually trying to start a run with the character. Returning false in this case will play the error buzzer sound.
Otherwise, this is just a check by some other logic (such as deciding which characters are eligible for random character selection).
Optional param: PlayerType - MC_PRE/POST_HISTORYHUD_RENDER
Return false to cancel rendering. Return a table to skip rendering the icons for specific items.
Example:return { HideCollectibles = { CollectibleType.COLLECTIBLE_SAD_ONION, CollectibleType.COLLECTIBLE_INNER_EYE }, HideTrinkets = { TrinketType.TRINKET_SWALLOWED_PENNY } } - MC_POST_HISTORYHUD_RECOMPUTE
- MC_PRE/POST_GRID_HURT(GridEntity, int Damage, EntityRef Source)
Runs when a Poop or TNT GridEntity takes damage.
On PRE, you can return an integer to modify the damage, or return false to cancel the damage.
Optional param: GridEntityType - MC_POST_TRIGGER_COLLECTIBLE_ADDED(EntityPlayer, CollectibleType, FirstTimePickingUp, IsWispOrInnate)
Runs for real collectibles, wisps AND innate items.
Optional param: CollectibleType - MC_POST_ADD_INNATE_COLLECTIBLE/TRINKET(EntityPlayer, CollectibleType/TrinketType, string GroupKey, int Amount, int Duration)
Optional param: CollectibleType/TrinketType OR GroupKey - MC_POST_REMOVE_INNATE_COLLECTIBLE/TRINKET(EntityPlayer, CollectibleType/TrinketType, string GroupKey, int Amount, bool ExpiredDuration)
Optional param: CollectibleType/TrinketType OR GroupKey
- MC_PRE_UPDATE()
- Isaac:
- RenderToWorld(Vector pos)
- EntityLaser:
- SetInitSound(SoundEffect sound)
- Get/SetNumChainedLasers
This is used by the Monstro's Lung + Technology synergy
- EntityPlayer:
- ShootRedCandle and ShootBlueCandle now returns an EntityEffect for the flame.
- AddBoneOrbital now returns the bone orbital familiar spawned.
- [Get/Set]ImExcitedSpeedupCountdown
- [Get/Set]DonateLuck
- GetErrorTrinketEffect
- [Get/Set]RUAWizardTimer
- GetBloodGushSprite
- CalculateBagOfCraftingOutput
- RemoveInnateCollectible(CollectibleType, int Amount = 1, string GroupKey = "") -> int
- GetInnateCollectibleCount(CollectibleType, string GroupKey = "")
- SetInnateCollectibleCount(TrinketType, int NewCount, string GroupKey = "", bool AddCostume = true)
- GetInnateCollectibleGroup(string GroupKey) -> table
- SetInnateCollectibleGroup(string GroupKey, table, bool AddCostumes = true)
- AddInnateTrinket(TrinketType, int Amount = 1, string GroupKey = "", int Duration = -1, bool AddCostume = true)
- RemoveInnateTrinket(TrinketType, int Amount = 1, string GroupKey = "") -> int
- GetInnateTrinketCount(TrinketType, string GroupKey = "")
- SetInnateTrinketCount(TrinketType, int NewCount, string GroupKey = "", bool AddCostume = true)
- GetInnateTrinketGroup(string GroupKey) -> table
- SetInnateTrinketGroup(string GroupKey, table, bool AddCostumes = true)
- ClearInnateItemGroup(string GroupKey)
- BlockTrinket
- UnblockTrinket
- IsTrinketBlocked
- EntityEffect
- [Get/Set/Add/Clear/Has]TearFlags
Only works for applicable EffectVariants: PLAYER_CREEP_HOLYWATER_TRAIL, BRIMSTONE_BALL, TECH_DOT, and CHAIN_LIGHTNING
- [Get/Set/Add/Clear/Has]TearFlags
- EntityKnife
- SetKnifeDistance
- SetKnifeVelocity
- TearParams
- MassMultiplier
- KnockbackMultiplier
- SpeedMultiplier
- TearDisplacement
- PersistentGameData:
- Unlock: same as TryUnlock but it overrides situations where TryUnlock would be blocked normally (Challenges)
- RoomDescriptor
- GetErrorTrinketEffect
- GetValidNeighborPlacementLocations(RoomShape = RoomShape.ROOMSHAPE_1x1, DoorMask = -1, bool AllowMultipleDoors = true, bool AllowSpecialNeighbors = false)
- GetValidNeighborPlacementLocations(RoomConfigRoom, bool AllowMultipleDoors = true, bool AllowSpecialNeighbors = false)
- RoomConfig:
- LoadStb(StbType, int Mode, string StbFileName)
- RoomConfigSet:
- LoadStb(string StbFileName)
- CharacterMenu
- GetCompletionMarksSprite
- History
- SearchCollectibles(int or table)
- SearchTrinkets(int or table)
- HUD
- GetHistoryHUD
- Sprite:
- Copy()
- GetSpritesheet(int layerId)
- SetSpritesheet(int layerId, Image)
- LayerState:
- GetSpritesheet()
- SetSpritesheet(Image)
- Renderer:
- CreateImage(int width, int height, string name)
- RenderToImage(Image, function)
- LoadShader(string path, table vertexDesc)
- GetShaderByType(ShaderType)
- GetPixelationAmount()
- GetClipPaneNormal()
- GetClipPaneThreshold()
- VertexAttributeFormat enum
- Image:
- GetWidth()
- GetHeight()
- GetPaddedWidth()
- GetPaddedHeight()
- GetName()
- GetTexelRegion(int x, int y, int width, int height)
- Render(SourceQuad, DestinationQuad, KColor, ColorMod)
- RenderWithShader(SourceQuad, DestinationQuad, KColor, Shader, table shaderParams)
- DestinationQuad:
- NewFromBounds(Vector topLeft, Vector bottomRight)
- NewFromRectangle(Vector topLeft, float width, float height)
- Copy()
- Translate(Vector)
- Scale(Vector, Vector anchor)
- Rotate(number, Vector anchor)
- Shear(Vector, Vector anchor)
- ApplyMatrix(table renderMatrix, Vector anchor)
- Flip(bool flipX, bool flipY)
- __tostring
- SourceQuad:
- NewFromBounds(Vector topLeft, Vector bottomRight, bool uv)
- NewFromRectangle(Vector topLeft, float width, float height, bool uv)
- Copy() override
- IsUVSpace()
- ConvertToPixelSpace()
- ConvertToUVSpace()
- __tostring override
- BlendMode:
- New(int rgbSrc, int rgbDest, int alphaSrc, int alphaDest, int equation)
- NewFromType(BlendType type)
- Enums:
- PillEffectSubClass
- CompletionStatus
- ChargeType
- EnemyTargetFlags
- TrinketSlot
- Added EntitySaveStateManager class to support persistent, modded save data for entities.
- Added HistoryHUD and HistoryHUDItem classes
- Backported new enums for GameStateFlag
- Added "isActiveEnemy" attribute for EntityNPCs in entities2.xml (set to "true" or "false")
- Added "innateitems" and "innatetrinkets" attributes for players.xml (comma-separated list of IDs or names)
- Added SplitTearType.SWORD_BEAM
- The "Error" and "Modeling Clay" trinkets now use the sprite of the item they are mimicking when smelted, like how they do in later versions of Repentance+.
- Removed unused class constructors in Renderer.
Modified:
- Isaac:
- StartNewGame
Added optional param "bool isCustomRun".
Added function variant that takes a whole Seeds object instead of a seed integer.
- StartNewGame
- Room:
- SetRedHeartDamage
Added optional param "bool value".
- SetRedHeartDamage
- EntityPlayer:
- SetControllerIndex(int ControllerIndex, boolean IncludePlayerOwned = false)
If IncludePlayerOwned set to true, then sets ControllerIndex for player's subplayer/twinplayer - AddInnateCollectible(CollectibleType, int Amount = 1, string GroupKey = "", int Duration = -1, bool AddCostume = true)
A "GroupKey" represents a distinct set of innate items. Innate item functions that take a GroupKey will only interact with items under that key.
This enables complete separation between different mechanics/mods/effects utilizing innate items, assuming distinct GroupKeys are used.
IMPORTANT: Using a non-empty GroupKey also enables persistence across save & continue and proper gamestate handling overall.
Various additional functions were added to take advantage of the GroupKey system for innate items.
Note: Removing innate items via a negative "Amount" is deprecated and does not support new features. Use RemoveInnateCollectible instead.
- SetControllerIndex(int ControllerIndex, boolean IncludePlayerOwned = false)
- CostumeSpriteDesc:
- Renamed GetHeadColor -> GetDefaultSkinColor
- Renamed GetBodyColor -> GetSkinColor
- ModCallbacks:
- MC_POST_PLAYER_DROP_TRINKET
Added DroppedTrinket param. - MC_(POST_)ENTITY_TAKE_DMG
Added ExtraSource param. This is an additional EntityRef provided in specific situations where the "Source" of the damage may be indirect.
For example, lasers and melee hitboxes provide their parent (ie, the player) instead of themselves as the damage Source. The laser/knife will now be passed as the ExtraSource!
Currently supported: lasers, melee hitbox knives, gello, and brimstone balls.
Note that ExtraSource is nil if not available.
- MC_POST_PLAYER_DROP_TRINKET
- Modded characters no longer earn completion marks where regular characters would not, such as during challenges.
Fixes:
- ModCallbacks:
- Fixed MC_GET_STATUS_EFFECT_TARGET not running for the "shrink" status effect.
- EntityPlayer:
- Fixed SetPoopSpell & RemovePoopSpell not working correctly and messing up the poop mana value.
- EntityPickup
- Fix some crashes related to GetLootList
- CharacterMenu:
- Fixed GetCharacterMenuIDFromPlayerType not returning the correct value for Tainted Isaac
- Fixed modded characters' locked/door sprites rendering on the "continue" widget if they are locked behind an achievement.
- Fixed custom caches not running for golden trinkets.
- Fixed multiple instances where the "Controller Disconnected" popup could trigger when continuing a run, such as modded twins/coplayers, and a vanilla bug with Jacob & Esau as a co-op player.
- Fixed a vanilla bug that caused Blood Baby familiars to render incorrectly when using Dataminer.
- Fixed custom revives on twins (especially the non-main twin, ie Esau) not reliably preventing save deletion or the run ending, alongside other quirks.
- Reviving a coin health character will now leave them with a whole coin heart instead of half of one.
- Fixed some cases where the "Attempt to load a save file with the wrong number of achievements!" error could trigger undesirably when saves are manually replaced.
- Fixed the "Attempt to load an unexpected save file" unintentionally triggering when recovering backup saves.