### Install AppImageLauncher on Steam Deck Source: https://sgg-modding.github.io/Hades2ModWiki/docs/installing-mods/steam-deck Run these two commands in Konsole to make the AppImageLauncher file executable and then install it. Ensure the filename matches the downloaded version. ```bash chmod +x appimagelauncher-lite-3.0.0-beta-2-gha287-x86_64.AppImage ./appimagelauncher-lite-3.0.0-beta-2-gha287-x86_64.AppImage install ``` -------------------------------- ### FMOD GUID.txt export example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/creating-mods/audio/adding-sounds-music Example of the GUID.txt file exported from FMOD Studio. Contains bank and event GUIDs; only event GUIDs are needed for playing sounds in-game. ```text {f0979c2d-d4d0-418e-b172-86c36619ccc3} bank:/ModsNikkelMUnlockHadesMusic {57fbe830-4207-4601-8ca1-cd69eebfa742} event:/Mods/NikkelMUnlockHadesMusic/DeathAndI {b0533fd9-9980-4fc6-b0a7-23813f2cda1c} event:/Mods/NikkelMUnlockHadesMusic/FieldOfSouls {1d2d987b-853b-4a65-aa2d-a3e8c7e0e99b} event:/Mods/NikkelMUnlockHadesMusic/FinalExpense ... ``` -------------------------------- ### SetupExShields usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/PowersLogic/SetupExShields Shows the correct function call syntax for SetupExShields, which takes hero and args arguments and returns nil. ```lua SetupExShields(hero, args) ``` -------------------------------- ### StartNewRunPresentation(runDoor, args) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/HubPresentation/StartNewRunPresentation Starts the presentation for a new run. Takes a run door and arguments, returns none. ```APIDOC ## StartNewRunPresentation(runDoor, args) ### Description Starts the presentation for a new run. ### Function Signature StartNewRunPresentation(runDoor, args) ### Parameters - **runDoor** - The run door object. - **args** - Additional arguments. ### Returns `none` ``` -------------------------------- ### Lerp(start, finish, fraction) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/UtilityLogic/Lerp Documentation for the Lerp function in UtilityLogic.lua. ```APIDOC ## Lerp(start, finish, fraction) ### Description Interpolates between two values based on a fraction. ### Method Function ### Signature `Lerp(start, finish, fraction)` ### Parameters - **start** (any) - Required - The starting value. - **finish** (any) - Required - The ending value. - **fraction** (any) - Required - The interpolation fraction. ### Returns - **any** - The interpolated result. ``` -------------------------------- ### AllAIAttack function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/EnemyAILogic/AllAIAttack The only code example on the page shows an example call to AllAIAttack with the placeholder parameters usee and args. ```lua AllAIAttack(usee, args) ``` -------------------------------- ### SelectLootSpawnPoint usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/SelectLootSpawnPoint Shows the function call syntax with its two parameters: currentRoom and args. ```lua SelectLootSpawnPoint(currentRoom, args) ``` -------------------------------- ### StartSurfacePenaltyPresentation() Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/EventPresentation_Late/StartSurfacePenaltyPresentation Call this function to start the surface penalty presentation. It takes no parameters and returns none. ```lua StartSurfacePenaltyPresentation() ``` -------------------------------- ### StartRoomPreLoadBinks function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/StartRoomPreLoadBinks Call this function to preload binks for the starting room. The only parameter is `args`, and the function returns `none`. ```lua StartRoomPreLoadBinks(args) ``` -------------------------------- ### rom.paths.Ship() example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/rom.paths Returns the GameFolder/Ship folder path as a string. ```lua string = rom.paths.Ship() ``` -------------------------------- ### rom.paths.plugins() example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/rom.paths Returns the plugins folder path as a string. This folder contains .lua, README, and manifest.json files. ```lua string = rom.paths.plugins() ``` -------------------------------- ### HeroData structure example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/data-structures/HeroData Shows a partial HeroData structure with interesting values. The structure is copied to CurrentRun when starting a new run. Includes fields like MaxHealth, MaxMana, ManaData, MaxGodsPerRun, and BoonData with RarityChances. ```lua -- this is NOT the entire structure, just some interesting values! { ... MaxHealth = 30, MaxHealthMultiplier = 1, MaxMana = 50, ... ManaData = { MinManaTickRate = 0.05, ManaRegenCooldown = 1.0 }, ... MaxGodsPerRun = 4, BoonData = { ... RarityChances = { Rare = 0.10, Epic = 0.05, Duo = 0.12, Legendary = 0.10, }, ReplaceChance = 0.1 } ... } ``` -------------------------------- ### Create and manage a window with ImGui.Begin window Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/ImGui No description ```language -- ImGui.ShowDemoWindow() -- ImGui.Begin(...) -- Parameters: text (name), bool (open) [O], ImGuiWindowFlags (flags) [O] -- Returns A: bool (shouldDraw) -- Returns B & C: bool (open), bool (shouldDraw) -- Overloads shouldDraw = ImGui.Begin("Name") shouldDraw = ImGui.Begin("Name", ImGuiWindowFlags.NoMove) open, shouldDraw = ImGui.Begin("Name", open) open, shouldDraw = ImGui.Begin("Name", open, ImGuiWindowFlags.NoMove) -- ImGui.End() ImGui.End() ``` -------------------------------- ### rom.paths.Content() example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/rom.paths Returns the GameFolder/Content folder path as a string. ```lua string = rom.paths.Content() ``` -------------------------------- ### SetupInspectPoint usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/SetupInspectPoint Shows the function call with the inspectPointData parameter. The function returns none. ```lua SetupInspectPoint(inspectPointData) ``` -------------------------------- ### rom.data.reload_game_data example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/rom.data Reloads the game data. No parameters or return values are documented. ```lua rom.data.reload_game_data() ``` -------------------------------- ### Get usertype pointer with rom.memory.get_usertype_pointer Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/rom.memory Retrieves the memory address of a Lua usertype instance. The function accepts a usertype object and returns its address as a Lua number. Use this when you need the raw pointer for a usertype, for example to pass to other memory functions. ```lua number = rom.memory.get_usertype_pointer(usertype_object) ``` -------------------------------- ### SetupDefaultDoor(source, args) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/SetupDefaultDoor Sets up a default door in the room. Takes source and args parameters and returns none. ```APIDOC ## SetupDefaultDoor(source, args) ### Description Sets up a default door in the room. This function is part of the RoomLogic scripting functions. ### Function Signature `SetupDefaultDoor(source, args)` ### Parameters - `source` (any) - Required - The source object for the door setup. - `args` (any) - Required - Additional arguments for the door setup. ### Returns `none` ``` -------------------------------- ### CatFamiliarRecruit usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/FamiliarPresentation/CatFamiliarRecruit Shows the function call syntax with parameters usee and args. The function returns none. ```lua CatFamiliarRecruit(usee, args) ``` -------------------------------- ### SetupButton Usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/TestPerf/SetupButton Basic invocation of the SetupButton function. ```lua SetupButton() ``` -------------------------------- ### Play sound event by GUID with PlaySound Source: https://sgg-modding.github.io/Hades2ModWiki/docs/creating-mods/audio/adding-sounds-music Plays a sound event from a loaded custom soundbank by passing its GUID (wrapped in curly braces) to PlaySound(). The GUID must be enclosed in {} for the game to recognize it as a GUID; event names are not supported for custom soundbanks. ```lua local trackName = "{57fbe830-4207-4601-8ca1-cd69eebfa742}" PlaySound({ Name = trackName }) ``` -------------------------------- ### ImGui Combo Box Widgets Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/ImGui Examples for creating combo boxes using BeginCombo/EndCombo or the simplified Combo function. ```lua -- ImGui.BeginCombo(...) -- Parameters: text (label), text (previewValue), ImGuiComboFlags (flags) [O] -- Returns: bool (shouldDraw) -- Overloads shouldDraw = ImGui.BeginCombo("My Combo", "Preview") shouldDraw = ImGui.BeginCombo("My Combo", "Preview", ImGuiComboFlags.PopupAlignLeft) -- ImGui.EndCombo() ImGui.EndCombo() -- ImGui.Combo(...) -- Parameters A: text (label), int (current_item), table (items), int (items_count), int (popup_max_height_in_items) [O] -- Parameters B: text (label), int (current_item), text (items_separated_by_zeros), int (popup_max_height_in_items) [O] -- Returns: int (current_item), bool (clicked) -- Overloads current_item, clicked = ImGui.Combo("Label", current_item, { "Option 1 ", "Option 2" }, 2) current_item, clicked = ImGui.Combo("Label", current_item, { "Option 1 ", "Option 2" }, 2, 5) current_item, clicked = ImGui.Combo("Label", current_item, "Option1\0Option2\0") current_item, clicked = ImGui.Combo("Label", current_item, "Option1\0Option2\0", 5) ``` -------------------------------- ### memory.dynamic_hook example: hook and inspect arguments Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/definitions/rom.memory Example usage for memory.dynamic_hook. Hooks a function with the given signature and uses resolve_pointer_to_type to inspect skill and argument values. The example is commented out in the source. ```lua memory.dynamic_hook("test", "RValue*", {"CInstance*","CInstance*","RValue*","int","RValue**"}, ptr, function (ret_val, skill, player, result, arg_num, args_ptr) log.info(rom.memory.resolve_pointer_to_type(memory.get_usertype_pointer(skill), "YYObjectBase*").skill_id) log.info(rom.memory.resolve_pointer_to_type(args_ptr:deref():get_address(), "RValue*").value) log.info(rom.memory.resolve_pointer_to_type(args_ptr:add(8):deref():get_address(), "RValue*").value) end) ``` -------------------------------- ### SetupMap Usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/SetupMap Basic invocation of the SetupMap function. ```lua SetupMap() ``` -------------------------------- ### GetTalentRarity usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/SpellLogic/GetTalentRarity Shows the function call syntax with the column argument. ```lua GetTalentRarity(column) ``` -------------------------------- ### SetupExShields(hero, args) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/PowersLogic/SetupExShields Calls the SetupExShields function with the provided hero and arguments. Returns nil. ```APIDOC ## SetupExShields(hero, args) ### Description Calls the SetupExShields function with the provided hero and arguments. Returns nil. ### Function Signature `SetupExShields(hero, args)` ### Parameters - **hero** (any) - Required - The hero object. - **args** (any) - Required - Additional arguments. ### Returns - **nil** - Always returns nil. ``` -------------------------------- ### StartSpecialRepeatThread Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/PowersLogic/StartSpecialRepeatThread Starts a special repeat thread with the given starting position, angle, and arguments. ```APIDOC ## StartSpecialRepeatThread ### Description Starts a special repeat thread in the game's scripting system, using the provided starting position, angle, and arguments. ### Method Function call ### Endpoint StartSpecialRepeatThread(startX, startY, angle, functionArgs, triggerArgs) ### Parameters - **startX** (number) - Required - The starting X coordinate. - **startY** (number) - Required - The starting Y coordinate. - **angle** (number) - Required - The angle for the thread. - **functionArgs** (table) - Required - Arguments to pass to the function. - **triggerArgs** (table) - Required - Arguments for the trigger. ### Returns `none` ``` -------------------------------- ### Get wrapped value from rom.value_wrapper Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/classes/rom.value_wrapper Retrieves the current value contained by the wrapper using the get() method. ```lua any = rom.value_wrapper:get() ``` -------------------------------- ### SetupRunData Usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RunData/SetupRunData Basic syntax for calling the SetupRunData function. ```lua SetupRunData(args) ``` -------------------------------- ### CloseSpellScreenPresentation usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomPresentation/CloseSpellScreenPresentation Example usage of the function CloseSpellScreenPresentation, called with screen and button parameters. The function returns none. ```lua CloseSpellScreenPresentation(screen, button) ``` -------------------------------- ### Usage of FamiliarShopScreenCloseStartPresentation Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/FamiliarShopPresentation/FamiliarShopScreenCloseStartPresentation Call this function with the screen object to start the closing presentation. ```lua FamiliarShopScreenCloseStartPresentation(screen) ``` -------------------------------- ### rom.memory.dynamic_call example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/rom.memory Demonstrates rom.memory.dynamic_call by scanning a signature for memcpy_s, allocating source and destination buffers, and calling the dynamically created function. The function is called via a global name returned by dynamic_call, and memory.pointer objects must be converted with get_address() before passing. The example prints the destination qword before and after the call to show the copy effect. ```lua -- the sig in this example leads to an implementation of memcpy_s local ptr = memory.scan_pattern("48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 49 8B D9 49 8B F0 48 8B FA") if ptr:is_valid() then local dest_size = 8 local dest_ptr = memory.allocate(dest_size) dest_ptr:set_qword(0) local src_size = 8 local src_ptr = memory.allocate(src_size) src_ptr:set_qword(123) -- Check the implementation of the asmjit::TypeId get_type_id function if you are unsure what to use for return type / parameters types local func_to_call_test_global_name = rom.memory.dynamic_call("int", {"void*", "uint64_t", "void*", "uint64_t"}, ptr) -- print zero. log.info(dest_ptr:get_qword()) -- note: don't pass memory.pointer objects directly when you call the function, but use get_address() instead. local call_res_test = _G[func_to_call_test_global_name](dest_ptr:get_address(), dest_size, src_ptr:get_address(), src_size) -- print 123. log.info(dest_ptr:get_qword()) end ``` -------------------------------- ### SetupFlashbackPlayerUnitMel(source, args) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/FlashbackPresentation/SetupFlashbackPlayerUnitMel Sets up the player unit for a flashback presentation involving Melinoƫ. ```APIDOC ## SetupFlashbackPlayerUnitMel(source, args) ### Description Sets up the player unit for a flashback presentation involving Melinoƫ. ### Parameters - **source** (any) - Required - The source of the flashback presentation. - **args** (table) - Required - Arguments for the flashback presentation. ### Returns - **none** - This function does not return a value. ``` -------------------------------- ### MoonDustStartPresentation() usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/BiomeStatePresentation/MoonDustStartPresentation Call this function to start the moon dust presentation. It takes no parameters and returns none. ```lua MoonDustStartPresentation() ``` -------------------------------- ### ImGui.BeginTooltip Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/ImGui Begins a tooltip. ```APIDOC ## ImGui.BeginTooltip() ### Description Begins a tooltip. ### Method Function ### Endpoint ImGui.BeginTooltip() ### Parameters None ### Returns None ### Request Example ```lua ImGui.BeginTooltip() ``` ``` -------------------------------- ### Get setting value with rom.config.config_entry:get() Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/classes/rom.config.config_entry Retrieves the current value of the setting. The return type can be boolean, number, or string. ```lua boolean|number|string = rom.config.config_entry:get() ``` -------------------------------- ### TorchChargedFiredFunction Call Example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/WeaponLogic/TorchChargedFiredFunction Example call syntax for TorchChargedFiredFunction, showing the four parameters: unit, weaponData, functionArgs, and triggerArgs. Returns none. ```lua TorchChargedFiredFunction(unit, weaponData, functionArgs, triggerArgs) ``` -------------------------------- ### SetupDefaultDoor Usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/SetupDefaultDoor The basic syntax for calling the SetupDefaultDoor function. ```lua SetupDefaultDoor(source, args) ``` -------------------------------- ### RewardStoreAddPriority usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RewardLogic/RewardStoreAddPriority Usage example demonstrating how to call the RewardStoreAddPriority function with arguments args and trait. ```lua RewardStoreAddPriority(args, trait) ``` -------------------------------- ### ImGui.Begin(...) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/ImGui Begins a new ImGui window. Returns whether the window should be drawn, and optionally the open state. ```APIDOC ## ImGui.Begin(...) ### Description Begins a new ImGui window. Returns whether the window should be drawn, and optionally the open state. ### Method Begin ### Parameters - **text** (string) - Required - The name of the window. - **bool** (boolean) - Optional - The open state of the window. - **ImGuiWindowFlags** (enum) - Optional - Window flags. ### Returns - **bool** (shouldDraw) - Whether the window should be drawn. - **bool** (open) - The open state of the window (when the open parameter is provided). ### Overloads ```lua shouldDraw = ImGui.Begin("Name") shouldDraw = ImGui.Begin("Name", ImGuiWindowFlags.NoMove) open, shouldDraw = ImGui.Begin("Name", open) open, shouldDraw = ImGui.Begin("Name", open, ImGuiWindowFlags.NoMove) ``` ``` -------------------------------- ### Load all voicebanks with wildcard syntax Source: https://sgg-modding.github.io/Hades2ModWiki/docs/creating-mods/audio/adding-voicelines Loads all voiceover files that start with the given prefix using a wildcard. The wildcard can be placed at the start or end of the string. ```lua game.LoadVoicebanks( { "Megaera*" } ) ``` -------------------------------- ### ChaosBassStart function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/AudioPresentation/ChaosBassStart Call this function to start the Chaos bass audio presentation. It takes no parameters and returns none. ```lua ChaosBassStart() ``` -------------------------------- ### TraitUIUpdateText usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/HUDLogic/TraitUIUpdateText Calls the TraitUIUpdateText function with the trait argument. This is the only code example provided and shows the exact syntax used in the game's scripting. ```lua TraitUIUpdateText(trait) ``` -------------------------------- ### TOML string for encoding examples Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/toml Example TOML string used for encoding demonstrations. It includes an inline table, an array with mixed types, and date/time values. ```lua local tomlStr = [[ inlineTable = { a = 1275892, b = "Hello, World!", c = true, d = 124.2548 } [e] f = [ 1, 2, 3, "4", 5.1420000000000003 ] g = 1979-05-27 h = 07:32:00 i = 1979-05-27T07:32:00-07:00 --]] ``` -------------------------------- ### StartUpStore() usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/StoreLogic/StartUpStore Calls the StartUpStore function with no arguments. The function returns none. ```lua StartUpStore() ``` -------------------------------- ### FlashLightBar usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/UtilityLogic/FlashLightBar Shows the function call syntax with four arguments: playerIndex, color, duration, and frequency. The function returns none. ```lua FlashLightBar(playerIndex, color, duration, frequency) ``` -------------------------------- ### ImGui.ShowDemoWindow() Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/ImGui Displays the ImGui demo window for demonstration purposes. ```APIDOC ## ImGui.ShowDemoWindow() ### Description Displays the ImGui demo window for demonstration purposes. ### Method ShowDemoWindow ### Parameters None ### Returns None ### Example ```lua ImGui.ShowDemoWindow() ``` ``` -------------------------------- ### SetupHeroLight() Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/SetupHeroLight Sets up the hero light in the room logic. This function takes no parameters and returns none. ```APIDOC ## SetupHeroLight() ### Description Sets up the hero light in the room logic. ### Method Function ### Signature `SetupHeroLight()` ### Parameters None ### Returns `none` ``` -------------------------------- ### Install deppth2 with pip Source: https://sgg-modding.github.io/Hades2ModWiki/docs/creating-mods/first-mod-guide/portrait-replacement Install the deppth2 tool, which is used to unpack and pack .pkg files for Hades and Hades II. Run this command in your terminal before using deppth2. ```bash pip install deppth2 ``` -------------------------------- ### Create a config file with config.config_file:new Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/classes/rom.config.config_file Creates a new config file at the specified path. The file is created immediately if it doesn't exist and save_on_init is true. The path should use a .cfg extension for the mod manager to display it nicely. ```lua myInstance = config.config_file:new(config_path, save_on_init) ``` -------------------------------- ### OnEnemyDamagedAction trigger example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/creating-mods/Weapon_Aspect/AspectObject Example of a trigger function that activates when an enemy is damaged. It specifies which weapons can trigger it, the function to call (mod.ComboPresentation), whether each target triggers separately, and arguments passed as functionArgs. ```lua OnEnemyDamagedAction = { ValidWeapons = WeaponSets.HeroPrimaryWeapons, --Which attacks are allowed to trigger this funcion. FunctionName = _PLUGIN.guid .. "." .. "ComboPresentation", -- the name of the function to be used following the trigger (mod.ComboPresentation) FirstHitOnly = false, --If the attack strikes several targets would each target seperatly activates the function Args = { --the arguements that pass into the function as functionArgs test ='' }, }, ``` -------------------------------- ### StartShopping function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/StoreLogic/StartShopping Call this function to start a shopping event for the given unit after a specified delay. The unit parameter is the unit that will shop, and delay is the time in seconds before the shopping starts. The function returns none. ```lua StartShopping(unit, delay) ``` -------------------------------- ### rom.gui.toggle() usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/rom.gui Opens or closes the GUI. The example shows a simple call to toggle the GUI state. ```lua rom.gui.toggle() ``` -------------------------------- ### Lua example: memory.scan_pattern and dynamic_hook_mid usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/definitions/rom.memory Example usage of memory.scan_pattern to find a pattern and then set up a mid-function hook with parameter captures and a custom jump location. The callback can modify arguments and return a new address to jump to. ```lua local ptr = memory.scan_pattern("some ida sig") gm.dynamic_hook_mid("test_hook", {"rax", "rcx", "[rcx+rdx*4+11]"}, {"int", "RValue*", "int"}, 0, ptr, function(args) log.info("trigger", args[1]:get(), args[2].value, args[3]:set(1)) return ptr:add(246) end) ``` -------------------------------- ### SetupFlashbackMusic function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/FlashbackPresentation/SetupFlashbackMusic Call this function to set up flashback music. It takes two parameters, `source` and `args`, and returns `none`. ```lua SetupFlashbackMusic(source, args) ``` -------------------------------- ### FrogFamiliarRecruit usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/FamiliarPresentation/FrogFamiliarRecruit Shows the function call syntax with parameters usee and args. The function returns none. ```lua FrogFamiliarRecruit(usee, args) ``` -------------------------------- ### StartHitShield function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/PowersLogic/StartHitShield Call this function to start a hit shield for the given hero and arguments. It returns none. ```lua StartHitShield(hero, args) ``` -------------------------------- ### Lua example: memory.scan_pattern and dynamic_hook usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/definitions/rom.memory Example usage of memory.scan_pattern to find a pattern and then set up a dynamic hook with pre and post callbacks. The pre callback can modify arguments and return value, and returning false skips the original function call. ```lua local ptr = memory.scan_pattern("some ida sig") -- Check the implementation of the asmjit::TypeId get_type_id function if you are unsure what to use for return type / parameters types rom.memory.dynamic_hook("test_hook", "float", {"const char*"}, ptr, {function(ret_val, str) --str:set("replaced str") ret_val:set(69.69) log.info("pre callback from lua", ret_val:get(), str:get()) -- false for skipping the original function call return false end, function(ret_val, str) log.info("post callback from lua 1", ret_val:get(), str:get()) ret_val:set(79.69) log.info("post callback from lua 2", ret_val:get(), str:get()) end}) ``` -------------------------------- ### InitializeMetaUpgradeState function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/MetaUpgradeLogic/InitializeMetaUpgradeState Call this function to initialize the meta upgrade state. It takes no parameters and returns none. ```lua InitializeMetaUpgradeState() ``` -------------------------------- ### SetupClockworkGoalReward function signature Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RewardLogic/SetupClockworkGoalReward The function signature for SetupClockworkGoalReward, which takes reward data, room information, and setup arguments. ```lua SetupClockworkGoalReward(rewardData, currentRoom, room, previouslyChosenRewards, args, setupFunctionArgs) ``` -------------------------------- ### SetupHeroObject Usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/SetupHeroObject The basic syntax for calling the SetupHeroObject function. ```lua SetupHeroObject(room, applyLuaUpgrades) ``` -------------------------------- ### BloodMoonBiomeStartPresentation function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/BiomeStatePresentation/BloodMoonBiomeStartPresentation Example of calling BloodMoonBiomeStartPresentation with no arguments. ```lua BloodMoonBiomeStartPresentation() ``` -------------------------------- ### BeginSurvivalEncounter() Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/BeginSurvivalEncounter Starts a survival encounter in the current room. This function takes no parameters and returns no value. ```APIDOC ## BeginSurvivalEncounter ### Description Starts a survival encounter in the current room. ### Method Function call ### Endpoint BeginSurvivalEncounter() ### Parameters None ### Returns `none` ``` -------------------------------- ### Create .bik_atlas with hadesbikatlas create Source: https://sgg-modding.github.io/Hades2ModWiki/docs/creating-mods/animations-video/bink Run this command to generate a .bik_atlas file for a bink video. The tool is named HadesBikAtlas. The example uses a renamed bink file 'HadesBiomesDiaBackAsphodel.bik'. ```bash hadesbikatlas create -f "path/to/bink/HadesBiomesDiaBackAsphodel.bik" ``` -------------------------------- ### Example usage of rom.tolk.on_button_hover Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/definitions/rom.tolk Shows how to register a callback for button hover events. The callback receives a table of strings, silences the screen reader, and outputs each line. ```lua rom.tolk.on_button_hover(function(lines) tolk.silence() for i = 1, #lines do tolk.output(lines[i]) end end) ``` -------------------------------- ### SetupFlashback02 function signature Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/FlashbackPresentation/SetupFlashback02 The function takes two parameters, source and args, and returns none. ```lua SetupFlashback02(source, args) ``` -------------------------------- ### rom.paths.config() example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/rom.paths Returns the config folder path as a string. Used for data that must persist between sessions and can be manipulated by the user. ```lua string = rom.paths.config() ``` -------------------------------- ### SetupClearCastUI() Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/PowersLogic/SetupClearCastUI Calls the SetupClearCastUI function with no parameters. It returns none. ```APIDOC ## SetupClearCastUI() ### Description Calls the SetupClearCastUI function with no parameters. It returns none. ### Function Signature `SetupClearCastUI()` ### Parameters None ### Returns `none` ``` -------------------------------- ### ImGui.EndChildFrame Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/ImGui Ends a child frame previously started with BeginChildFrame. ```APIDOC ## ImGui.EndChildFrame ### Description Ends a child frame previously started with BeginChildFrame. ### Method Function call ### Endpoint ImGui.EndChildFrame() ### Parameters None ### Returns None ### Request Example ```lua ImGui.EndChildFrame() ``` ### Response No return value. ``` -------------------------------- ### Load a mod package with rom.game.LoadPackages Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/definitions/rom.game Loads a mod package by combining the mod's data folder path with its GUID. The path must point to a .pkg file without the extension, and the .pkg and .pkg_manifest filenames must contain the owning mod's GUID. ```lua local package_path = rom.path.combine(_PLUGIN.plugins_data_mod_folder_path, _PLUGIN.guid) -- Example package_path: "C:/Program Files (x86)/Steam/steamapps/common/Hades II/Ship/ReturnOfModding/plugins_data/AuthorName-ModName/AuthorName-ModName" rom.game.LoadPackages{Name = package_path} ``` -------------------------------- ### FamiliarSetup function usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/FamiliarLogic/FamiliarSetup The basic syntax for calling the FamiliarSetup function. ```lua FamiliarSetup(source, args) ``` -------------------------------- ### Usage: StartFinalBossChronosMusic() Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomPresentation_Late/StartFinalBossChronosMusic Call this function to start the Chronos boss music. It takes no parameters and returns none. ```lua StartFinalBossChronosMusic() ``` -------------------------------- ### SetupBoss function usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/EncounterLogic/SetupBoss Initializes a boss encounter using the specified enemy object. ```lua SetupBoss(enemy) ``` -------------------------------- ### GameStateInit function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RunLogic/GameStateInit Call this function to initialize the game state at the start of a run. It takes no parameters and returns nil. ```lua GameStateInit() ``` -------------------------------- ### SetupHadesCast function signature Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/PowersLogic/SetupHadesCast Shows the exact function signature for SetupHadesCast as it appears in the documentation. It takes two parameters, unit and args, and returns none. ```lua SetupHadesCast(unit, args) ``` -------------------------------- ### GetStackLevel Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/Main/GetStackLevel Returns the stack level based on the provided starting level. ```APIDOC ## GetStackLevel ### Description Returns the stack level based on the provided starting level. ### Method Function ### Signature GetStackLevel(startingLevel) ### Parameters - **startingLevel** (any) - Required - The starting level used to determine the stack level. ### Returns - **any** - The stack level value. ``` -------------------------------- ### ImGui.EndListBox Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/ImGui Ends a custom list box region started with BeginListBox. ```APIDOC ## ImGui.EndListBox ### Description Ends a custom list box region started with BeginListBox. ### Method Function call ### Signature `ImGui.EndListBox()` ### Parameters None ### Returns None ### Example ```lua ImGui.EndListBox() ``` ``` -------------------------------- ### SetupPerfectCritUI() call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/PowersLogic/SetupPerfectCritUI Call the SetupPerfectCritUI function with no arguments. It returns none. ```lua SetupPerfectCritUI() ``` -------------------------------- ### OnInvisStartPresentation(unit) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/CombatPresentation/OnInvisStartPresentation This function starts the invisibility presentation for a specified unit. ```APIDOC ## OnInvisStartPresentation(unit) ### Description This function is called to start the invisibility presentation for a given unit. ### Method Function ### Endpoint OnInvisStartPresentation(unit) ### Parameters - **unit** (any) - Required - The unit for which the invisibility presentation is started. ### Returns - **none** - This function does not return any value. ``` -------------------------------- ### UpgradeChoiceScreenOpenStartPresentation Usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/UIPresentation/UpgradeChoiceScreenOpenStartPresentation The function signature for initiating the upgrade choice screen presentation. ```lua UpgradeChoiceScreenOpenStartPresentation(screen, lootData) ``` -------------------------------- ### TechTestEscapeDoorClosed usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/HubPresentation/TechTestEscapeDoorClosed Shows the function call syntax for TechTestEscapeDoorClosed with parameters usee and args. The function returns none. ```lua TechTestEscapeDoorClosed(usee, args) ``` -------------------------------- ### Insert LoadSkellyPackage call into NPC_Skelly_01 SetupEvents Source: https://sgg-modding.github.io/Hades2ModWiki/docs/creating-mods/first-mod-guide/portrait-replacement Adds a new SetupEvents entry to NPC_Skelly_01's table so the package loads when the NPC spawns. The event format must match the existing SetupEvents definitions. Note that NPC_Skelly_01 is merged into the global EnemyData table, so modify that table. ```lua local loadSkellyPackageCall = { FunctionName = _PLUGIN.guid .. ".LoadSkellyPackage" } table.insert(game.EnemyData.NPC_Skelly_01.SetupEvents, loadSkellyPackageCall) ``` -------------------------------- ### memory.dynamic_call example: scan pattern and call memcpy_s Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/definitions/rom.memory Example usage for memory.dynamic_call. Scans a pattern for memcpy_s, allocates source and destination buffers, then dynamically calls the function with the specified return type and parameter types. Note that memory.pointer objects must be converted with get_address() before passing them to the generated function. ```lua local ptr = memory.scan_pattern("48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 49 8B D9 49 8B F0 48 8B FA") if ptr:is_valid() then local dest_size = 8 local dest_ptr = memory.allocate(dest_size) dest_ptr:set_qword(0) local src_size = 8 local src_ptr = memory.allocate(src_size) src_ptr:set_qword(123) -- Check the implementation of the asmjit::TypeId get_type_id function if you are unsure what to use for return type / parameters types local func_to_call_test_global_name = rom.memory.dynamic_call("int", {"void*", "uint64_t", "void*", "uint64_t"}, ptr) -- print zero. log.info(dest_ptr:get_qword()) -- note: don't pass memory.pointer objects directly when you call the function, but use get_address() instead. local call_res_test = _G[func_to_call_test_global_name](dest_ptr:get_address(), dest_size, src_ptr:get_address(), src_size) -- print 123. log.info(dest_ptr:get_qword()) end ``` -------------------------------- ### ExorcismStartPresentation function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/HarvestPresentation/ExorcismStartPresentation Call this function to start the exorcism presentation. It takes three parameters: source, args, and user. The function returns none. ```lua ExorcismStartPresentation(source, args, user) ``` -------------------------------- ### ImGui Drag Widgets Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/ImGui Examples for creating drag widgets for float and integer values, including multi-component variants. ```lua -- ImGui.DragFloat(...) -- Parameters: text (label), float (value), float (value_speed) [O], float (value_min) [O], float (value_max) [O], text (format) [O], ImGuiSliderFlags (flags) [O] -- Returns: float (value), bool (used) -- Overloads value, used = ImGui.DragFloat("Label", value) value, used = ImGui.DragFloat("Label", value, 0.01) value, used = ImGui.DragFloat("Label", value, 0.01, -10) value, used = ImGui.DragFloat("Label", value, 0.01, -10, 10) value, used = ImGui.DragFloat("Label", value, 0.01, -10, 10, "%.1f") value, used = ImGui.DragFloat("Label", value, 0.01, -10, 10, "%.1f", ImGuiSliderFlags.Logarithmic) -- ImGui.DragFloat2(...) -- Parameters: text (label), table (values), float (value_speed) [O], float (value_min) [O], float (value_max) [O], text (format) [O], ImGuiSliderFlags (flags) [O] -- Returns: table (values), bool (used) -- Overloads values, used = ImGui.DragFloat2("Label", values) values, used = ImGui.DragFloat2("Label", values, 0.01) values, used = ImGui.DragFloat2("Label", values, 0.01, -10) values, used = ImGui.DragFloat2("Label", values, 0.01, -10, 10) values, used = ImGui.DragFloat2("Label", values, 0.01, -10, 10, "%.1f") values, used = ImGui.DragFloat2("Label", values, 0.01, -10, 10, "%.1f", ImGuiSliderFlags.Logarithmic) -- ImGui.DragFloat3(...) -- Parameters: text (label), table (values), float (value_speed) [O], float (value_min) [O], float (value_max) [O], text (format) [O], ImGuiSliderFlags (flags) [O] -- Returns: table (values), bool (used) -- Overloads values, used = ImGui.DragFloat3("Label", values) values, used = ImGui.DragFloat3("Label", values, 0.01) values, used = ImGui.DragFloat3("Label", values, 0.01, -10) values, used = ImGui.DragFloat3("Label", values, 0.01, -10, 10) values, used = ImGui.DragFloat3("Label", values, 0.01, -10, 10, "%.1f") values, used = ImGui.DragFloat3("Label", values, 0.01, -10, 10, "%.1f", ImGuiSliderFlags.Logarithmic) -- ImGui.DragFloat4(...) -- Parameters: text (label), table (values), float (value_speed) [O], float (value_min) [O], float (value_max) [O], text (format) [O], ImGuiSliderFlags (flags) [O] -- Returns: table (values), bool (used) -- Overloads values, used = ImGui.DragFloat4("Label", values) values, used = ImGui.DragFloat4("Label", values, 0.01) values, used = ImGui.DragFloat4("Label", values, 0.01, -10) values, used = ImGui.DragFloat4("Label", values, 0.01, -10, 10) values, used = ImGui.DragFloat4("Label", values, 0.01, -10, 10, "%.1f") values, used = ImGui.DragFloat4("Label", values, 0.01, -10, 10, "%.1f", ImGuiSliderFlags.Logarithmic) -- ImGui.DragInt(...) -- Parameters: text (label), int (value), float (value_speed) [O], int (value_min) [O], int (value_max) [O], text (format) [O], ImGuiSliderFlags (flags) [O] -- Returns: int (value), bool (used) -- Overloads value, used = ImGui.DragInt("Label", value) value, used = ImGui.DragInt("Label", value, 0.01) value, used = ImGui.DragInt("Label", value, 0.01, -10) value, used = ImGui.DragInt("Label", value, 0.01, -10, 10) value, used = ImGui.DragInt("Label", value, 0.01, -10, 10, "%d") value, used = ImGui.DragInt("Label", value, 0.01, -10, 10, "%d", ImGuiSliderFlags.Logarithmic) -- ImGui.DragInt2(...) -- Parameters: text (label), table (values), float (value_speed) [O], int (value_min) [O], int (value_max) [O], text (format) [O], ImGuiSliderFlags (flags) [O] -- Returns: table (values), bool (used) -- Overloads values, used = ImGui.DragInt2("Label", values) values, used = ImGui.DragInt2("Label", values, 0.01) values, used = ImGui.DragInt2("Label", values, 0.01, -10) ``` -------------------------------- ### SetupDynamicLitter(litter, args) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/DeathLoopLogic/SetupDynamicLitter Calls the SetupDynamicLitter function with the given litter and args. Returns none. ```APIDOC ## SetupDynamicLitter(litter, args) ### Description Calls the SetupDynamicLitter function with the given litter and args. ### Parameters - **litter** - The litter parameter. - **args** - The args parameter. ### Returns `none` ``` -------------------------------- ### CheckSetupFunction usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RunLogic/CheckSetupFunction Call this function to check the setup of a function in RunLogic.lua. It takes an object and a function name as parameters and returns none. ```lua CheckSetupFunction(object, functionName) ``` -------------------------------- ### test() usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/Main/test Call this function without arguments. It returns `any` or `nil`. ```lua test() ``` -------------------------------- ### GameStateInit() Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RunLogic/GameStateInit Initializes the game state. This function takes no parameters and returns nil. ```APIDOC ## GameStateInit() ### Description Initializes the game state. This function takes no parameters and returns nil. ### Function Signature `GameStateInit()` ### Parameters None ### Returns `nil` ``` -------------------------------- ### WeaponShopScreenCloseStartPresentation Usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/WeaponShopPresentation/WeaponShopScreenCloseStartPresentation Call this function with the screen object to start the closing presentation. ```lua WeaponShopScreenCloseStartPresentation(screen) ``` -------------------------------- ### StartDevotionTest Usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/EncounterLogic/StartDevotionTest The basic syntax for calling the StartDevotionTest function. ```lua StartDevotionTest(currentEncounter, args) ``` -------------------------------- ### BeginHeraclesEncounter Usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/BeginHeraclesEncounter Call this function with an encounter parameter to start the Heracles encounter. ```lua BeginHeraclesEncounter(encounter) ``` -------------------------------- ### new(config_path, save_on_init) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/classes/rom.config.config_file Creates a new config file at the specified path. The file is created as needed, and if save_on_init is true, the file/directory is created immediately. ```APIDOC ## new(config_path, save_on_init) ### Description Create a new config file at the specified config path. ### Parameters - **config_path** (string) - Required - Full path to a file that contains settings. The file will be created as needed. It's recommended to use `.cfg` as the file extension. The mod manager will pick it up and make it show nicely inside the mod manager UI. - **save_on_init** (boolean) - Required - If the config file/directory doesn't exist, create it immediately. ### Example Usage ``` myInstance = config.config_file:new(config_path, save_on_init) ``` ``` -------------------------------- ### SetupCauldronCookActivePresentation function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/GhostAdminPresentation/SetupCauldronCookActivePresentation Call this function to set up the cauldron cooking active presentation. It takes two parameters, source and args, and returns none. ```lua SetupCauldronCookActivePresentation(source, args) ``` -------------------------------- ### StartTimeSlowPresentation(duration) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/EventPresentation/StartTimeSlowPresentation Starts a time slow presentation effect for the specified duration. ```APIDOC ## StartTimeSlowPresentation(duration) ### Description Starts a time slow presentation effect for the specified duration. ### Method Function call ### Endpoint StartTimeSlowPresentation(duration) ### Parameters - **duration** (number) - Required - The duration of the time slow effect. ### Returns - **nil** - This function returns nil. ``` -------------------------------- ### SetupPreActivatedEnemies(source) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/SetupPreActivatedEnemies Sets up pre-activated enemies in a room using the provided source. ```APIDOC ## SetupPreActivatedEnemies(source) ### Description Sets up pre-activated enemies in a room. ### Parameters - **source** (any) - Required - The source of the pre-activated enemies. ### Returns - **none** - This function does not return a value. ``` -------------------------------- ### StartClearCastPresentation(duration) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/EventPresentation/StartClearCastPresentation Starts the clear cast presentation event with the specified duration. ```APIDOC ## StartClearCastPresentation(duration) ### Description Starts the clear cast presentation event with the specified duration. ### Method Function call ### Endpoint StartClearCastPresentation(duration) ### Parameters - **duration** (type not specified) - Required - The duration of the presentation. ### Returns - **none** - No return value. ### Request Example ```lua StartClearCastPresentation(duration) ``` ### Response #### Success Response No response body. #### Response Example ``` (no response) ``` ``` -------------------------------- ### ImGui.TableGetSortSpecs Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/ImGui Gets the latest sort specs for the table, returning NULL if not sorting. ```lua ImGui.TableGetSortSpecs() ``` -------------------------------- ### SetupAI function signature Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/SetupAI The function signature for initializing enemy AI in RoomLogic.lua. ```lua SetupAI(enemy, args) ``` -------------------------------- ### StartFinalBossChronosIntroMusic() Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomPresentation_Late/StartFinalBossChronosIntroMusic Call this function in RoomPresentation_Late.lua to start the intro music for the final boss Chronos. It takes no parameters and returns none. ```lua StartFinalBossChronosIntroMusic() ``` -------------------------------- ### get() Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/classes/rom.config.config_entry Retrieves the current value of the setting. Returns a boolean, number, or string. ```APIDOC ## get() ### Description Retrieves the current value of the setting. ### Returns - `boolean|number|string`: Value of this setting ### Example Usage ``` boolean|number|string = rom.config.config_entry:get() ``` ``` -------------------------------- ### SetupRoomArt function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/RoomLogic/SetupRoomArt Calls SetupRoomArt with currentRun and currentRoom arguments. The function returns none. ```lua SetupRoomArt(currentRun, currentRoom) ``` -------------------------------- ### PetFamiliarFrog usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/FamiliarPresentation/PetFamiliarFrog Shows the function signature for PetFamiliarFrog, which accepts two parameters: usee and args. The function returns none. ```lua PetFamiliarFrog(usee, args) ``` -------------------------------- ### NarrativeInit() function call Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/NarrativeLogic/NarrativeInit Call this function to initialize narrative logic in the game. It takes no parameters and returns none. ```lua NarrativeInit() ``` -------------------------------- ### FinishTargetMarker usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/EnemyAILogic/FinishTargetMarker Calls FinishTargetMarker with an enemy parameter. The function returns none. ```lua FinishTargetMarker(enemy) ``` -------------------------------- ### TOML string for JSON conversion Source: https://sgg-modding.github.io/Hades2ModWiki/docs/h2m-docs/tables/toml TOML string used in the JSON conversion example. ```lua local tomlStr = [[ a = 1275892 b = 'Hello, World!' c = true d = 124.2548 [e] f = [ 1, 2, 3, '4', 5.142 ] g = 1979-05-27 h = 07:32:00 i = 1979-05-27T07:32:00-07:00 ]] ``` -------------------------------- ### PeriodicMark usage example Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/PowersLogic/PeriodicMark Shows the function call syntax with two parameters: hero and args. The function is expected to be called in a Lua script. ```Lua PeriodicMark(hero, args) ``` -------------------------------- ### ScreenResetCursorToStartLocation(screen) Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/UILogic/ScreenResetCursorToStartLocation Resets the cursor to the start location for the specified screen in the UI logic. ```APIDOC ## ScreenResetCursorToStartLocation(screen) ### Description Resets the cursor to the start location for the specified screen in the UI logic. ### Parameters - **screen** - The screen for which to reset the cursor. ### Returns - **none** - This function does not return a value. ``` -------------------------------- ### StartLavaPresentation Usage Source: https://sgg-modding.github.io/Hades2ModWiki/docs/in-game-definitions/globals/scripting-functions/CombatPresentation/StartLavaPresentation Call this function to initiate the lava presentation sequence. ```lua StartLavaPresentation() ```