### Get Camera Instance Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Camera.md Demonstrates how to get the current camera instance from the game's room. ```lua local camera = Game():GetRoom():GetCamera() ``` -------------------------------- ### Start New Game with Parameters Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Isaac.md Starts a new game with a specified character, challenge, difficulty, and seed. Setting IsCustomRun to true disables achievements. ```csharp void StartNewGame ( [PlayerType](https://wofsauge.github.io/IsaacDocs/rep/enums/PlayerType.html) Character, [Challenge](https://wofsauge.github.io/IsaacDocs/rep/enums/Challenge.html) Challenge = ChallengeType.CHALLENGE_NULL, [Difficulty](https://wofsauge.github.io/IsaacDocs/rep/enums/Difficulty.html) Mode = Difficulty.DIFFICULTY_NORMAL, int Seed = Random, boolean IsCustomRun = false ) ``` -------------------------------- ### Get BlendMode Example Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/renderer/BlendMode.md Demonstrates how to retrieve the BlendMode of a layer. This is useful for inspecting or modifying blending properties of visual elements. ```lua local blendMode = Sprite():GetLayer(0):GetBlendMode() ``` -------------------------------- ### Example for MC_PRE_HISTORYHUD_RENDER Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/enums/ModCallbacks.md This example demonstrates how to return a table to specify collectibles and trinkets to hide from the History HUD. Use this to skip rendering specific item sprites. ```lua return { HideCollectibles = { CollectibleType.COLLECTIBLE_SAD_ONION, CollectibleType.COLLECTIBLE_INNER_EYE, }, HideTrinkets = { TrinketType.TRINKET_SWALLOWED_PENNY, }, } ``` -------------------------------- ### Example: Accessing LootListEntry Data Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/LootListEntry.md This example demonstrates how to retrieve a loot list and iterate through its entries to print pickup variant and subtype information. It requires registering a mod and adding a callback for pickup updates. ```lua local mod = RegisterMod("Print Pickups", 1) function mod:OnPickupUpdate(pickup) if pickup.FrameCount ~= 1 then return end local lootList = pickup:GetLootList() local lootListEntries = lootListEntries:GetEntries() for _, lootListEntry in ipairs(lootListEntries) do print("PickupVariant:", lootListEntry:GetVariant(), "Pickup SubType:", lootListEntry:GetSubType()) end end mod:AddCallback(ModCallbacks.MC_POST_PICKUP_UPDATE, mod.OnPickupUpdate) ``` -------------------------------- ### Render to Image Example Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/renderer/Renderer.md This example demonstrates how to create an image surface and then render contents to it using a provided render function. The render function can accept a SurfaceRenderController for advanced operations like clearing the surface and rendering sprites. ```lua local exampleSurface = Renderer.CreateImage(128, 128, "Example Surface") local function UpdateSurfaceContents(renders) Renderer.RenderToImage(exampleSurface, function(controller) controller:Clear() for _, render in ipairs(renders) do local sprite = render[1] local position = render[2] sprite:Render(position) end end) end ``` -------------------------------- ### Example: Modifying and Setting Completion Marks Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Isaac.md Demonstrates how to retrieve, modify, and then set completion marks for a player. This example shows updating the MomsHeart, Satan, and BlueBaby marks. ```lua local marks = Isaac.GetCompletionMarks(0) --getting the current table marks.MomsHeart = 2 --Isaac now will have the hard mark on MHeart marks.Satan = 1 --Isaac will now have the normal mark on Satan marks.BlueBaby = 0 --Removes the BlueBaby Mark if its present Isaac.SetCompletionMarks(marks) --Impacts the changes on the player ``` -------------------------------- ### Get Stage Configuration Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/RoomConfig.md Retrieves the stage configuration for a given StbType. This is a common starting point for room configuration tasks. ```lua local roomConfigStage = RoomConfig.GetStage(StbType.BASEMENT) ``` -------------------------------- ### GetStartingCard Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ChallengeParam.md Retrieves the starting card. ```APIDOC ## GetStartingCard ### Description Retrieves the card the player starts with. ### Method N/A (This is a class method) ### Endpoint N/A ### Parameters None ### Response #### Success Response - **return value** (Card) - The Card enum representing the starting card. ### Response Example ```json "THE_LOVERS" ``` ``` -------------------------------- ### Get Neighboring Rooms and Check for Secret Rooms Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/RoomDescriptor.md This example shows how to retrieve a table of neighboring rooms and iterate through them to determine if any are secret rooms. It uses `pairs` for iteration as recommended. ```lua -- Returns true if the room has a neighboring secret room. local function HasSecretRoomNeighbor(roomDesc) for doorSlot, neighborDesc in pairs(roomDesc:GetNeighboringRooms()) do local roomType = neighborDesc.Data.Type if roomType == RoomType.ROOM_SECRET or roomType == RoomType.ROOM_SUPERSECRET or roomType == RoomType.ROOM_ULTRASECRET then return true end end return false end ``` -------------------------------- ### GetCard Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/EntityConfigPlayer.md Retrieves the starting card for the player character. ```APIDOC ## GetCard ### Description Retrieves the starting card for the player character. Returns 0 if the character does not start with any vanilla card. Does not include starting cards obtained via unlocks or cards added by mods. ### Method N/A (This is a class method, not an HTTP endpoint) ### Parameters None ### Response #### Success Response - **return value** (Card) - The starting card type, or 0 if none. ``` -------------------------------- ### Start New Game with Seeds Object Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Isaac.md Starts a new game using a Seeds object, which includes the current seed and its modifiers. ```csharp void StartNewGame ( [PlayerType](https://wofsauge.github.io/IsaacDocs/rep/enums/PlayerType.html) Character, [Challenge](https://wofsauge.github.io/IsaacDocs/rep/enums/Challenge.html) Challenge, [Difficulty](https://wofsauge.github.io/IsaacDocs/rep/enums/Difficulty.html) Mode, [Seeds](https://wofsauge.github.io/IsaacDocs/rep/Seeds.html) Seeds ) ``` -------------------------------- ### GetStartingPill Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ChallengeParam.md Retrieves the starting pill effect. ```APIDOC ## GetStartingPill ### Description Retrieves the pill effect the player starts with. ### Method N/A (This is a class method) ### Endpoint N/A ### Parameters None ### Response #### Success Response - **return value** (PillEffect) - The PillEffect enum representing the starting pill. ### Response Example ```json "HEALTH_UP" ``` ``` -------------------------------- ### CanStartTrueCoop Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Isaac.md Determines if true co-op can be started. ```APIDOC ## CanStartTrueCoop ### Description Determines if true co-op can be started. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **boolean** - True if true co-op can be started, false otherwise. #### Response Example N/A ``` -------------------------------- ### Get Backdrop Instance Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Backdrop.md Obtain an instance of the Backdrop class. This is typically done by first getting the current room and then calling GetBackdrop() on it. ```lua local backdrop = Game():GetRoom():GetBackdrop() ``` -------------------------------- ### Lua Example for Revive Item Logic Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/xml/items.md Provides Lua code for implementing a collectible-based revive with higher priority than vanilla revives. This example removes the item and grants invincibility upon death. ```lua -- "Real" held collectible-based revive with higher priority than all vanilla revives, like 1UP. mod:AddCallback(ModCallbacks.MC_PRE_TRIGGER_PLAYER_DEATH, function(_, player) if player:HasCollectible(yourItemID, true) then player:RemoveCollectible(yourItemID) player:SetMinDamageCooldown(120) -- Grant iframes to the player. return false -- Causes the player to revive on the spot with half a heart. end end) ``` -------------------------------- ### PushEntry Function Example Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/LootList.md This example demonstrates how to use the PushEntry function to add a custom loot entry to a LootList. It modifies regular chests to contain the Delirium entity. ```lua local mod = RegisterMod("Delirium Unboxing", 1) function mod:onPrePickupGetLootList(pickup, shouldAdvance) if pickup.Variant ~= PickupVariant.PICKUP_CHEST then return end local lootList = LootList() lootList:PushEntry(EntityType.ENTITY_DELIRIUM, 0, 0) return lootList end mod:AddCallback(ModCallbacks.MC_PRE_PICKUP_GET_LOOT_LIST, mod.onPrePickupGetLootList) ``` -------------------------------- ### Get Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/CcpContainer_RoomConfigSet.md Retrieves a RoomConfigRoom from the list at a specified index. ```APIDOC ## Get ### Description Returns a [RoomConfigRoom](https://wofsauge.github.io/IsaacDocs/rep/RoomConfig_Room.html) at the index of the list provided. ### Method [RoomConfigRoom](RoomConfigRoom.md) Get ( int idx ) ### Parameters #### Path Parameters - **idx** (int) - Required - The index of the room to retrieve. ``` -------------------------------- ### Get Animation Frame Start Source: https://github.com/teamrepentogon/repentogon/blob/main/changelog.txt Returns the starting frame index of an animation frame. Used for understanding animation sequences. ```lua GetStartFrame() ``` -------------------------------- ### Create and Display a Generic Prompt Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/GenericPrompt.md This example demonstrates how to create a GenericPrompt, initialize it, set its text, and display it when a specific key (Minus) is pressed. It also shows how to process user input and print the selected option upon closing the prompt. ```lua local myPrompt = GenericPrompt() myPrompt:Initialize() myPrompt:SetText("Some test text") local wasPromptDisplayed = false function mod:myRenderFunction(_) myPrompt:Render() end mod:AddCallback(ModCallbacks.MC_POST_RENDER, mod.myRenderFunction) function mod:myUpdateFunction(_) myPrompt:Update(true) -- true = Process user inputs if wasPromptDisplayed and not myPrompt:IsActive() then -- prompt was closed by user print("User selected option: "..myPrompt:GetSubmittedSelection()) wasPromptDisplayed = false end if Input.IsButtonTriggered(Keyboard.KEY_MINUS, 0) then -- on Pressing minus button will open prompt myPrompt:Show() wasPromptDisplayed = true end end mod:AddCallback(ModCallbacks.MC_POST_UPDATE, mod.myUpdateFunction) ``` -------------------------------- ### AnimationFrame API Source: https://github.com/teamrepentogon/repentogon/blob/main/changelog.txt Provides methods to get the start and end frames of an animation. ```APIDOC ## AnimationFrame API ### Description Provides methods to get the start and end frames of an animation. ### Methods - **GetStartFrame()**: Returns the starting frame of the animation. - **GetEndFrame()**: Returns the ending frame of the animation. ``` -------------------------------- ### StartNewGame Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Isaac.md Initiates a new game from the main menu with specified character, challenge, difficulty, and seed options. ```APIDOC ## StartNewGame ( Character: PlayerType, Challenge: Challenge = ChallengeType.CHALLENGE_NULL, Mode: Difficulty = Difficulty.DIFFICULTY_NORMAL, Seed: int = Random, IsCustomRun: boolean = false ) ## StartNewGame ( Character: PlayerType, Challenge: Challenge, Mode: Difficulty, Seeds: Seeds ) ### Description Starts a new game using the specified arguments. Can be used from the main menu. Setting IsCustomRun to true will disable achievements for the run. Alternatively, an overload accepts a [Seeds](https://wofsauge.github.io/IsaacDocs/rep/Seeds.html) object to use the current seed and all of its modifiers. ### Method N/A (Function Signature) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters **Overload 1:** * **Character** (PlayerType) - The player character to use. * **Challenge** (Challenge, optional) - The challenge to start. Defaults to `ChallengeType.CHALLENGE_NULL`. * **Mode** (Difficulty, optional) - The game difficulty. Defaults to `Difficulty.DIFFICULTY_NORMAL`. * **Seed** (int, optional) - The seed for the game. Defaults to `Random`. * **IsCustomRun** (boolean, optional) - Whether this is a custom run (disables achievements). Defaults to `false`. **Overload 2:** * **Character** (PlayerType) - The player character to use. * **Challenge** (Challenge) - The challenge to start. * **Mode** (Difficulty) - The game difficulty. * **Seeds** (Seeds) - A `Seeds` object containing seed and modifiers. ``` -------------------------------- ### Get Sprite from ChallengeMenu Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/menus/ChallengeMenu.md Retrieve the sprite associated with the ChallengeMenu. This is an example of accessing a global class function. ```lua local sprite = ChallengeMenu.GetSprite() ``` -------------------------------- ### Show Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ImGui.md Opens ImGui. ```APIDOC ## void Show ( ) ### Description Opens ImGui. ### Method void ### Endpoint Show ``` -------------------------------- ### GenericPrompt Constructor and Methods Source: https://github.com/teamrepentogon/repentogon/blob/main/changelog.txt Provides methods to create, initialize, show, update, render, and manage a generic prompt. Includes methods for setting text and getting selections. ```lua GenericPrompt constructor ``` ```lua Initialize(boolean SmallPrompt = false) ``` ```lua Show() ``` ```lua IsActive() ``` ```lua Update(boolean ProcessInput) ``` ```lua Render() ``` ```lua SetText(string Text1 = "", string Text2 = "", string Text3 = "", string Text4 = "", string Text5 = "") ``` ```lua GetSprite() ``` ```lua GetCurrentSelection() - (0 - No, 1 - Yes) ``` ```lua GetSubmittedSelection() - (0 - None, 1 - Yes, 2 - No) ``` -------------------------------- ### GetEndFrame Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/AnimationFrame.md Gets the start frame of the next animation frame, indicating the end of the current frame's display. ```APIDOC ## GetEndFrame () ### Description Gets the start frame of the next animation frame, indicating the end of the current frame's display. ### Method N/A (Method of AnimationFrame class) ### Returns - **int**: The frame number that marks the end of this animation frame's display. ``` -------------------------------- ### Show Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/GenericPrompt.md Initiates the display of the prompt on the screen. ```APIDOC ## Show () ### Description Starts showing the prompt on-screen. ### Method `Show()` ### Endpoint N/A (Method of GenericPrompt object) ### Parameters None ``` -------------------------------- ### Initialize Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/GenericPrompt.md Initializes the GenericPrompt object. Optionally can be set to render a smaller prompt. ```APIDOC ## Initialize () ### Description Initializes the GenericPrompt object. ### Method `Initialize(boolean SmallPrompt = false)` ### Endpoint N/A (Method of GenericPrompt object) ### Parameters - **SmallPrompt** (boolean) - Optional - If true, renders a smaller prompt. Defaults to false. ``` -------------------------------- ### Get DebugRenderer Instance Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/DebugRenderer.md Retrieve a shape from the DebugRenderer using its index. This is a basic example of accessing the DebugRenderer's functionality. ```lua local shapeone = DebugRenderer.Get(1,true) ``` -------------------------------- ### Get Item Overlay Sprite Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ItemOverlay.md Retrieves the sprite associated with the item overlay. This is a common starting point for interacting with overlay elements. ```lua local overlaysprite = ItemOverlay.GetSprite() ``` -------------------------------- ### Get Number of Active Eyes Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/MultiShotParams.md Returns the count of eyes that are simultaneously firing. For example, 'The Wiz' has 2 active eyes. ```lua local numEyes = player:GetNumEyesActive() ``` -------------------------------- ### Get Low Top Left Corner Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/LRoomAreaDesc.md Retrieves the coordinates for the top-left corner of the low section of the L-room. This is useful for defining the starting point of the lower part of the room. ```lua local topLeft = Game():GetRoom():GetLRoomAreaDesc():GetLowTopLeft() ``` -------------------------------- ### Get High Top Left Corner Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/LRoomAreaDesc.md Retrieves the coordinates for the top-left corner of the high section of the L-room. This is useful for defining the starting point of the upper part of the room. ```lua local topLeft = Game():GetRoom():GetLRoomAreaDesc():GetHighTopLeft() ``` -------------------------------- ### Get Collectibles List Example Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/EntityPlayer.md This code prints how many sad onions the player has. It retrieves the player's collectibles list and accesses the count for a specific collectible type. ```lua local collectiblesList = player:GetCollectiblesList() print(collectiblesList[CollectibleType.COLLECTIBLE_SAD_ONION]) ``` -------------------------------- ### AddInputKeyboard Example Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ImGui.md Adds an input for keyboard buttons. The callback receives the Keyboard key ID and the ImGuiKey name. ```lua void AddInputKeyboard ( string ParentId, string ElementId, string ButtonLabel = "", function ChangeCallback = nil, float DefaultVal = 0 ) ``` -------------------------------- ### StartBossIntro Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/RoomTransition.md Initiates the boss intro sequence with specified boss IDs. ```APIDOC ## StartBossIntro ### Description Initiates the boss intro sequence with specified boss IDs. ### Method Call ### Endpoint RoomTransition.StartBossIntro(BossID1, BossID2) ### Parameters #### Path Parameters - **BossID1** (BossType) - Required - The ID of the first boss. - **BossID2** (BossType) - Optional - The ID of the second boss. Defaults to 0. ``` -------------------------------- ### Get Active Status Source: https://github.com/teamrepentogon/repentogon/blob/main/changelog.txt Gets the active status of a character menu. ```lua [Get/Set]ActiveStatus() ``` -------------------------------- ### Create and Manage ImGui Menu and Window Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/examples/ImGuiMenu.md This snippet shows how to register a mod, create a custom menu in the top bar, add a menu item button, and create a window linked to that button. It also demonstrates adding various ImGui elements like progress bars, sliders, text inputs, and buttons. ```lua local mod = RegisterMod("Repentogon ImGui", 1) local sfx = SFXManager() local game = Game() -- We'll use this later. local notificationText = "What do you want to shout..." -- This example mod demonstrates many general applications for ImGui. -- For a very thorough and generic usage example, please see the ImGui Lua Test Menu: -- https://github.com/TeamREPENTOGON/REPENTOGON/blob/main/repentogon/resources/scripts/repentogon_tests/test_imgui.lua -- Create a menu, which is a tab that appears in the top bar after pressing the debug console button. -- The element id should be something unique. There can only be one element per ID. -- This "\u{f0c3}" represents a unicode character. The font used for ImGui is powered by fontawesome.com, so it has many emojis you can use. -- Find an emoji, then click on it and find the Unicode representation at the top right. -- https://fontawesome.com/search?m=free&o=r ImGui.CreateMenu("ExampleMenu", "\u{f0c3} ImGui Example") -- To add a button under the dropdown for the menu, we need to use the generic AddElement function. -- This can be used to add any element, or you can use the dedicated function for the type of element if there is one. ImGui.AddElement("ExampleMenu", "ExampleMenuMainWindowButton", ImGuiElement.MenuItem, "\u{f005} Fun Menu") -- Create Fun Menu. This will hold some buttons and sliders that we will make do fun things. ImGui.CreateWindow("ExampleMenuFunMenu", "\u{f005} Fun Menu") -- Link it to ExampleMenuMainWindowButton, the button we made earlier. -- It'll now open or close when that button is pressed. ImGui.LinkWindowToElement("ExampleMenuFunMenu", "ExampleMenuMainWindowButton") -- The fun menu will have four things: -- A progress bar showing how close we are to missing Boss Rush. -- A that updates some text. -- A text input and button to cause a notification to appear. -- A button that plays a funny sound (SoundEffect.SOUND_DERP). -- First, add a progress bar showing how close we are to missing Boss Rush. -- The code controlling the value of it as at the bottom of this file. ImGui.AddProgressBar( "ExampleMenuFunMenu", "ExampleMenuBossRushProgress", "Boss Rush deadline!", 0 ) -- Add that slider. ImGui.AddSliderInteger( "ExampleMenuFunMenu", "ExampleMenuHpSlider", "Cool slider", -- Slider label. function (newValue) -- Function ran whenever the slider is changed. print(newValue) end, 50, -- Default value 0, -- Minimum value 100, -- Maximum value "Coolness factor: %d%" -- Number label formatting. So, at default, the label will say "Coolness factor: 50" ) -- Add the text input and notification. ImGui.AddInputText( "ExampleMenuFunMenu", "ExampleMenuNotificationInput", "", -- We'll use the hint text to indicate what this does instead of a label. function (newValue) -- Function ran whenever the text input is updated. notificationText = newValue end, "", -- Default value. "What do you want to shout..." -- Hint text; This is the text that will appear when there is no user-inputted text in the box. ) -- By default, ImGui elements are on separate lines. -- Add a "SameLine" element to make the next element appear on the same line. ImGui.AddElement( "ExampleMenuFunMenu", "", -- No element id needed since we're never gonna need to reference this later. We're allowed to add multiple elements to an empty id. ImGuiElement.SameLine ) ImGui.AddButton( "ExampleMenuFunMenu", "ExampleMenuNotificationButton", "\u{f0a1}", -- Since this button will be small, we'll just put an emoji to indicate what it does. function (clickCount) -- Send a notification of type INFO with a lifetime of 5000 (in milliseconds). ImGui.PushNotification(notificationText, ImGuiNotificationType.INFO, 5000) end, true -- It'll be a small button. ) -- Let's also add a help marker to indicator what the button does. -- Help markers look like: (?) and can be hovered over with your mouse to display a box of text. ImGui.SetHelpmarker("ExampleMenuNotificationButton", "Send a notification with the text of your choice using this fashionable button!") ``` -------------------------------- ### MC_PRE_RENDER Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/enums/ModCallbacks.md Gets called right before the Manager::Render() function gets called. ```APIDOC ## MC_PRE_RENDER ### Description Gets called right before the Manager::Render() function gets called. ### Function Args void ### Return Type void ``` -------------------------------- ### AddInputController Example Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ImGui.md Adds an input for Gamepad/controller buttons. The callback receives the ButtonAction ID and the ImGuiKey name. ```lua void AddInputController ( string ParentId, string ElementId, string ButtonLabel = "", function ChangeCallback = nil, float DefaultVal = 0 ) ``` -------------------------------- ### Get Selected Element Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/menus/SaveMenu.md Gets the currently selected element in the save menu. This function returns an integer. ```lua SaveMenu.GetSelectedElement() ``` -------------------------------- ### Instantiate WeightedOutcomePicker Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/WeightedOutcomePicker.md Demonstrates how to create a new instance of the WeightedOutcomePicker class. ```lua local wop = WeightedOutcomePicker() ``` -------------------------------- ### Get RailManager Instance Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/RailManager.md Retrieve an instance of the RailManager class. This is typically done by first getting the current Room and then calling GetRailManager() on it. ```lua local railManager = Game():GetRoom():GetRailManager() ``` -------------------------------- ### Force Loop All Sounds Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/enums/ModCallbacks.md This example demonstrates how to forcibly loop all sounds by modifying the parameters passed to the MC_PRE_SFX_PLAY callback. Ensure you understand the implications before applying this globally. ```lua function mod:myFunction(ID, Volume, FrameDelay, Loop, Pitch, Pan) return {ID, Volume, FrameDelay, true, Pitch, Pan} end mod:AddCallback(ModCallbacks.MC_PRE_SFX_PLAY, mod.myFunction) ``` -------------------------------- ### Sample Revive XML Configurations Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/xml/items.md Examples of how to use the 'revive', 'reviveeffect', 'chancerevive', and 'hiddenrevive' custom tags in XML for passive items, trinkets, and null items. ```xml ``` -------------------------------- ### Get Challenge Parameters Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ChallengeParam.md Retrieve the ChallengeParam object to access game challenge details. This is the primary way to get an instance of ChallengeParam. ```lua local params = Game():GetChallengeParams() ``` -------------------------------- ### MC_POST_BOSS_INTRO_SHOW Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/enums/ModCallbacks.md Called right after the boss intro is initialized. Accepts no return parameters. ```APIDOC ## MC_POST_BOSS_INTRO_SHOW ### Description Called right after the boss intro is initialized. `BossID2` is for Double Trouble. Accepts no return parameters. ### Function Args - BossID1 ([BossType](BossType.md)) - BossID2 ([BossType](BossType.md)) ### Return Type void ``` -------------------------------- ### StartStageTransition Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Game.md Initiates a stage transition. Fixed a crash related to C++ calls, and the Player argument is now optional. ```APIDOC ## StartStageTransition ### Description Initiates a stage transition. Fixed a crash related to C++ calls, and the Player argument is now optional. ### Method N/A (Function Call) ### Parameters #### Path Parameters - **SameStage** (boolean) - Required - Determines if the transition is to the same stage. - **TransitionOverride** (int) - Required - An override for the stage transition. - **Player** (EntityPlayer) - Optional - The player initiating the transition. Defaults to `GetPlayer(0)`. ``` -------------------------------- ### Get ProceduralItem Instance Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ProceduralItem.md Obtain an instance of the ProceduralItem class using the ProceduralItemManager.GetProceduralItem() function. This is the primary way to get a ProceduralItem object for further use. ```lua local pItem = ProceduralItemManager.GetProceduralItem(0) ``` -------------------------------- ### Get Next Challenge Room Wave Configurations Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Ambush.md Retrieve a table containing RoomConfigRoom objects for all subsequent challenge room waves. ```lua [RoomConfigRoom](RoomConfigRoom.md)[] GetNextWaves ( ) ``` -------------------------------- ### Get an Effect from a Procedural Item Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ProceduralEffect.md Demonstrates how to obtain a ProceduralEffect instance from a ProceduralItem using its manager. This is the primary way to get an effect object. ```lua local pItemEffect = ProceduralItemManager.GetProceduralItem(0):GetEffect(0) ``` -------------------------------- ### MC_PLAYER_INIT_PRE_LEVEL_INIT_STATS Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/enums/ModCallbacks.md Callback that runs just before the game initializes a player's starting health, coins, and costume. This callback also runs on run continues. ```APIDOC ## MC_PLAYER_INIT_PRE_LEVEL_INIT_STATS ### Description This callback runs earlier than `MC_POST_PLAYER_INIT`, right before the game initializes the starting health/coins/costume/etc of a player. Note that this callback still runs on run continues, in which case some of the aforementioned initializations will later be overridden by the player's saved state (such as health). ### Method Not specified (Callback) ### Parameters #### Function Args - **Player** ([EntityPlayer](../EntityPlayer.md)) #### Optional Args - **PlayerType** ([PlayerType](https://wofsauge.github.io/IsaacDocs/rep/enums/PlayerType.html)) ### Return Type void ``` -------------------------------- ### Get Random Wisp Type Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/EntityFamiliar.md A static function to get a random wisp collectible type. Must be called via EntityFamiliar.GetRandomWisp(RNG). ```lua function GetRandomWisp ( RNG ) ``` -------------------------------- ### Get Entity Configuration Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/EntityConfig.md Retrieves the configuration for a specific entity type. Optional variant and subtype can be provided to get a specific version of the entity. ```lua local gaperConfig = EntityConfig.GetEntity(EntityType.ENTITY_GAPER) ``` -------------------------------- ### GetCompletionMarks Example Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Isaac.md Retrieves and checks completion marks for a character. This example demonstrates accessing specific marks like MomsHeart, Lamb, and Delirium. ```lua local marks = Isaac.GetCompletionMarks(0) if (marks.MomsHeart > 0) then print("got mom") end if (marks.Lamb >= 2) then print("GOATED ON H4RD") end if (Isaac.GetCompletionMarks(0).Delirium > 0) then --doing it the lazy way, fitting deliriums theme print("Got Deli") end ``` -------------------------------- ### TrySpawnLadder Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/GridEntityRock.md Attempts to spawn a ladder. This function takes no arguments. ```APIDOC ## TrySpawnLadder ### Description Attempts to spawn a ladder. ### Signature void TrySpawnLadder() ### Parameters None. ``` -------------------------------- ### Get LRoomTileDesc Instance Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/LRoomTileDesc.md Demonstrates how to obtain an instance of the LRoomTileDesc class using the Room:GetLRoomTileDesc() function. This is the primary method to get an object of this type. ```lua local TileDesc = Game():GetRoom():GetLRoomTileDesc() ``` -------------------------------- ### Render Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/GenericPrompt.md Renders the prompt on the screen. This should be called within appropriate rendering callbacks. ```APIDOC ## Render () ### Description Renders the prompt on-screen. Place this in any of the non-entity-specific RENDER callbacks. ### Method `Render()` ### Endpoint N/A (Method of GenericPrompt object) ### Parameters None ``` -------------------------------- ### Example XML for Custom Backdrops Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/xml/backdrops.md This XML snippet demonstrates how to define a custom backdrop using the backdrops.xml file. It includes attributes for graphics, variants, and various visual elements like floors, props, and doors. The 'name' attribute is crucial for referencing the backdrop programmatically. ```xml ``` -------------------------------- ### StartChallenge Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Ambush.md Triggers the challenge room or boss rush. ```APIDOC ## StartChallenge () ### Description Triggers the challenge room or boss rush. ### Method POST (or equivalent SDK call) ### Endpoint Ambush.StartChallenge() ### Bug Calling this function outside of the boss rush room or a challenge room will do nothing except permanently close the doors, resulting in a softlock. ``` -------------------------------- ### SetInitSound() Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/EntityLaser.md Sets the initial sound effect for the laser. ```APIDOC ## SetInitSound() ### Description Set after a laser is spawned but before it updates (for example, [MC_POST_LASER_INIT](https://wofsauge.github.io/IsaacDocs/rep/enums/ModCallbacks.html#mc_post_laser_init)) to change the sound it makes. Can be set to `SoundEffect.SOUND_NULL` to make no sound play. ### Parameters - **Sound** ([SoundEffect](https://wofsauge.github.io/IsaacDocs/rep/enums/SoundEffect.html)): The sound effect to play. ``` -------------------------------- ### Get L-Room Tile Description Source: https://github.com/teamrepentogon/repentogon/blob/main/changelog.txt Returns a usable LRoomTileDesc class describing the corners of an L-room shape in grid coordinates. Includes methods for getting random tiles. ```lua GetLRoomTileDesc() ``` -------------------------------- ### CreateWindow Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ImGui.md Creates a window object. Visibility must be managed using `LinkWindowToElement()` or `SetVisible()`. ```APIDOC ## void CreateWindow ( string ElementId, string Title = "" ) ### Description Creates a window object. You need to use `LinkWindowToElement()` or `SetVisible()` to toggle the visibility of the window. ### Parameters #### Path Parameters - **ElementId** (string) - The ID for the window. - **Title** (string) - Optional. The title of the window. Defaults to an empty string. ### Method void ``` -------------------------------- ### TryInitOptionCycle Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/EntityPickup.md Initializes an option cycle for a collectible pedestal, allowing it to cycle through a specified number of collectibles. ```APIDOC ## TryInitOptionCycle ### Description Causes the collectible pedestal to start cycling through the specified amount of collectibles, including its own collectible type. ### Method boolean ### Parameters #### Path Parameters - **NumCycle** (int) - Required - The number of collectibles to cycle through. ``` -------------------------------- ### InitTwin Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/EntityPlayer.md Initializes a secondary player controlled by the same input, similar to the mechanics of Jacob & Esau. ```APIDOC ## InitTwin ### Description Initializes a "twin" player that is controlled by the player's same controller, similarly to Jacob & Esau. ### Method N/A (Function call) ### Endpoint N/A ### Parameters #### Path Parameters - **PlayerType** (PlayerType) - Required - The type of player to initialize as the twin. ### Response #### Success Response - **EntityPlayer**: The initialized twin player entity. ``` -------------------------------- ### Get Player Entity Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/HistoryHUD.md Gets the EntityPlayer object for a given player index (0 or 1). Player index 1 is used for dual-player entities like Jacob & Esau. ```lua GetPlayer ( int PlayerIndex ) ``` -------------------------------- ### SetWindowSize Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ImGui.md Deprecated. Now does the same as [SetSize()](#setsize). ```APIDOC ## void SetWindowSize ( string WindowId, float width, float Height ) ### Description Deprecated. Now does the same as [SetSize()](#setsize). ### Method void ### Endpoint SetWindowSize ### Parameters #### Path Parameters - **WindowId** (string) - Required - The ID of the window to resize. - **width** (float) - Required - The desired width of the window in pixels. - **Height** (float) - Required - The desired height of the window in pixels. ``` -------------------------------- ### XML Example for Custom Tags Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/xml/items.md This shows how to add custom tags to an item in XML. Capitalization is ignored. ```xml customtags="yourcustomtag nometronome" ``` -------------------------------- ### AddRadioButtons Example Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ImGui.md Adds radio buttons with a callback that receives the selected index. Options and default selection can be configured. ```lua ImGui.AddRadioButtons("catInput", "radioButtons", function(index) print(index) end, { "Radio 1", "Radio 2", "Radio 3" }, 1) ``` -------------------------------- ### Get RoomConfigSet Instance Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/CcpContainer_RoomConfigSet.md Obtain an instance of RoomConfigSet using RoomConfig.GetStage and GetRoomSet. This is the entry point for managing room configurations. ```lua local roomConfigSet = RoomConfig.GetStage(StbType.BASEMENT):GetRoomSet(0) ``` -------------------------------- ### GetGiantBookIdByName Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Isaac.md Gets a GiantBook ID by its name. ```APIDOC ## GetGiantBookIdByName ### Description Gets a GiantBook ID by its name. For vanilla giantbooks, the png filename from the gfx xml attribute is used as the giantbook name. ### Method N/A (This appears to be a function call within a script environment, not an HTTP endpoint) ### Endpoint N/A ### Parameters #### Path Parameters - **Name** (string) - Required - The name of the GiantBook. ### Response #### Success Response - **int**: The GiantBook ID. ### Response Example ```json 5 ``` ``` -------------------------------- ### GetEntitySubTypeByName Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Isaac.md Gets the entity SubType by its name. ```APIDOC ## GetEntitySubTypeByName ### Description Gets the entity SubType by its name. ### Method N/A (This appears to be a function call within a script environment, not an HTTP endpoint) ### Endpoint N/A ### Parameters #### Path Parameters - **Name** (string) - Required - The name of the entity. ### Response #### Success Response - **int**: The entity SubType. ### Response Example ```json 10 ``` ``` -------------------------------- ### MC_PRE_LEVEL_INIT Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/enums/ModCallbacks.md This callback is invoked before the level is initialized. It does not accept any arguments and does not return any values. ```APIDOC ## MC_PRE_LEVEL_INIT ### Description This callback is invoked before the level is initialized. It does not accept any arguments and does not return any values. ### Function Args void ### Return Type void ``` -------------------------------- ### GenericPrompt Methods Source: https://github.com/teamrepentogon/repentogon/blob/main/changelog.txt Provides methods for creating and managing generic prompts. ```APIDOC ## GenericPrompt Methods ### Description Provides methods for creating and managing generic prompts. ### Methods * **GenericPrompt constructor** Initializes a new instance of the GenericPrompt class. * **Initialize(boolean SmallPrompt = false)** Initializes the prompt, optionally as a smaller version. * **Show()** Displays the prompt to the user. * **IsActive()** Checks if the prompt is currently active. * **Update(boolean ProcessInput)** Updates the prompt's state, optionally processing user input. * **Render()** Renders the prompt on the screen. * **SetText(string Text1 = "", string Text2 = "", string Text3 = "", string Text4 = "", string Text5 = "")** Sets the text content for up to five lines of the prompt. * **GetSprite()** Retrieves the sprite associated with the prompt. * **GetCurrentSelection()** - (0 - No, 1 - Yes) Gets the user's current selection on the prompt. * **GetSubmittedSelection()** - (0 - None, 1 - Yes, 2 - No) Gets the user's final submitted selection on the prompt. ``` -------------------------------- ### GetCutsceneIdByName Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Isaac.md Gets the Cutscene ID by its name. ```APIDOC ## GetCutsceneIdByName ### Description Gets the Cutscene ID by its name. ### Method N/A (This appears to be a function call within a script environment, not an HTTP endpoint) ### Endpoint N/A ### Parameters #### Path Parameters - **Name** (string) - Required - The name of the cutscene. ### Response #### Success Response - **table**: A table containing the Cutscene ID. ### Response Example ```json { "id": 101 } ``` ``` -------------------------------- ### GetName Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/EntityConfigPlayer.md Gets the name of the player character. ```APIDOC ## GetName ( ) ### Description Returns the name of the player character. ### Method GET (assumed) ### Endpoint /EntityConfigPlayer/GetName ### Response #### Success Response (200) - **Name** (string) - The name of the player character. ``` -------------------------------- ### Example Usage of Beam Class Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/renderer/Beam.md Demonstrates how to initialize and use the Beam class to render a chain effect between two points. It sets up a sprite, defines a layer, creates a Beam instance, and adds points to it during player rendering. ```lua local spritesheetHeight = 64 local sprite = Sprite() sprite:Load("gfx/1000.193_anima chain.anm2", true) sprite:Play("Idle", false) local layer = sprite:GetLayer("chain") local chain = Beam(sprite, "chain", false, false) mod:AddCallback(ModCallbacks.MC_PRE_PLAYER_RENDER, function(_, player) local origin = Isaac.WorldToScreen(Game():GetRoom():GetCenterPos()) local target = Isaac.WorldToScreen(player.Position) local coord = target:Distance(origin) chain:Add(origin,0) chain:Add(target,coord) chain:Render() end) ``` -------------------------------- ### StartStageTransition Function Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Game.md Fixed the crash that sometimes occurred due to an incorrect call on the C++ side. `Player` is now optional and defaults to `GetPlayer(0)`. ```lua void StartStageTransition ( boolean SameStage, int TransitionOverride, [EntityPlayer](EntityPlayer.md) Player = nil ) ``` -------------------------------- ### Load Rooms from .stb File Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/CcpContainer_RoomConfigSet.md Loads rooms from a specified .stb file into the RoomConfigSet. The file path should be relative to the content folder. Multiple mods' files can match and be loaded. ```lua local loadedRooms = roomConfigSet:LoadStb("my_rooms.stb") ``` -------------------------------- ### Capsule.GetPosition Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Capsule.md Retrieves the starting position of the capsule. ```APIDOC ## GetPosition ### Vector GetPosition ( ) #### Description Returns the starting position of the capsule (can be set with `position`). ``` -------------------------------- ### MC_PLAYER_INIT_POST_LEVEL_INIT_STATS Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/enums/ModCallbacks.md Callback that runs after a player's initial items, pills, and cards are added, typically after their first initialization or certain resets. ```APIDOC ## MC_PLAYER_INIT_POST_LEVEL_INIT_STATS ### Description This callback runs after a player's starting items/pills/cards/etc are added, usually following their first initialization in the run, or after certain "resets" such as Genesis. This callback does not run again on run continues, so it is a good place to initialize similar sorts of "starting items". ### Method Not specified (Callback) ### Parameters #### Function Args - **Player** ([EntityPlayer](../EntityPlayer.md)) #### Optional Args - **PlayerType** ([PlayerType](https://wofsauge.github.io/IsaacDocs/rep/enums/PlayerType.html)) ### Return Type void ``` -------------------------------- ### GetMetronomeCollectibleID Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/EntityPlayer.md Gets the CollectibleType ID for the Metronome item. ```APIDOC ## GetMetronomeCollectibleID () ### Description Gets the CollectibleType ID for the Metronome item. ### Method GET (or equivalent for SDK) ### Endpoint /player/metronomeCollectibleID ### Response #### Success Response (200) - **collectibleID** ([CollectibleType](https://wofsauge.github.io/IsaacDocs/rep/enums/CollectibleType.html)) - The CollectibleType ID of the Metronome. ``` -------------------------------- ### Image Name Source: https://github.com/teamrepentogon/repentogon/blob/main/changelog.txt Gets the name identifier of an Image. ```Lua GetName() ``` -------------------------------- ### Place New Room at Door Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/Level.md Example of an active item that attempts to create a new 1x1 room at every available doorslot in the current room. It checks if doorslots are allowed and if the new room configuration meets door requirements. ```lua mod:AddCallback(ModCallbacks.MC_USE_ITEM, function(_, id, rng, player, flags, slot) local level = game:GetLevel() local room = game:GetRoom() local roomDesc = level:GetCurrentRoomDesc() local success = false for doorSlot=0, 7 do -- Bitmask check to identify if the current room would even allow a door to be placed here. local doorSlotAllowed = roomDesc.Data.Doors & (1 << doorSlot) ~= 0 if doorSlotAllowed and not room:GetDoor(doorSlot) then local seed = rng:Next() local requiredDoors = 15 -- Bitmask value that requires the new 1x1 room to have all 4 doorslots available, just so we're sure it fits. local roomConfig = RoomConfig.GetRandomRoom(seed, true, Isaac.GetCurrentStageConfigId(), RoomType.ROOM_DEFAULT, RoomShape.ROOMSHAPE_1x1, nil, nil, nil, nil, requiredDoors) if roomConfig then local newRoom = level:TryPlaceRoomAtDoor(roomConfig, roomDesc, doorSlot, seed, true, false) if newRoom then success = true end end end end if success then return {ShowAnim=true} else return {Discharge=false} end end, MY_ACTIVE_ITEM_ID) ``` -------------------------------- ### Instantiate ColorParams Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/ColorParams.md Example of creating a new ColorParams object with specific color, priority, and duration values. This is useful for defining custom visual effect parameters. ```lua local fiveSecondRedColor = ColorParams(Color(1,0,0,1),255,150,false,false) ``` -------------------------------- ### Image Height Source: https://github.com/teamrepentogon/repentogon/blob/main/changelog.txt Gets the height of an Image in pixels. ```Lua GetHeight() ``` -------------------------------- ### Image Width Source: https://github.com/teamrepentogon/repentogon/blob/main/changelog.txt Gets the width of an Image in pixels. ```Lua GetWidth() ``` -------------------------------- ### MC_POST_ROOM_TRANSITION_RENDER Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/enums/ModCallbacks.md Called during room transition rendering. ```APIDOC ## MC_POST_ROOM_TRANSITION_RENDER ### Function Args - void ### Optional Args - TransitionMode (int) ### Return Type void ``` -------------------------------- ### GetSpreadAngle Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/MultiShotParams.md Gets the spread angle for a given WeaponType. ```APIDOC ## GetSpreadAngle ### Description Get the spread angle for the given WeaponType. ### Method GET ### Endpoint `/GetSpreadAngle` ### Parameters #### Query Parameters - **WeaponType** (WeaponType) - Required - The type of weapon for which to get the spread angle. ``` -------------------------------- ### GetIndex Source: https://github.com/teamrepentogon/repentogon/blob/main/docs/docs/PlayerHUD.md Gets the index of the player's HUD. ```APIDOC ## GetIndex ### Description Gets the index of the player's HUD. ### Method int GetIndex ( ) ### Returns The index of the player's HUD. ```