diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py
index 2c459efcd..1b5081fd7 100644
--- a/autogen/convert_functions.py
+++ b/autogen/convert_functions.py
@@ -96,7 +96,7 @@ override_allowed_functions = {
"src/game/level_update.h": [ "level_trigger_warp", "get_painting_warp_node", "initiate_painting_warp", "warp_special", "lvl_set_current_level", "level_control_timer_running", "fade_into_special_warp", "get_instant_warp" ],
"src/game/area.h": [ "get_mario_spawn_type", "area_get_warp_node", "area_get_any_warp_node", "play_transition" ],
"src/engine/level_script.h": [ "area_create_warp_node" ],
- "src/game/ingame_menu.h": [ "set_min_dialog_width", "set_dialog_override_pos", "reset_dialog_override_pos", "set_dialog_override_color", "reset_dialog_override_color", "set_menu_mode", "create_dialog_box", "create_dialog_box_with_var", "create_dialog_inverted_box", "create_dialog_box_with_response", "reset_dialog_render_state", "set_dialog_box_state", ],
+ "src/game/ingame_menu.h": [ "set_min_dialog_width", "set_dialog_override_pos", "reset_dialog_override_pos", "set_dialog_override_color", "reset_dialog_override_color", "set_menu_mode", "create_dialog_box", "create_dialog_box_with_var", "create_dialog_inverted_box", "create_dialog_box_with_response", "reset_dialog_render_state", "set_dialog_box_state", "handle_special_dialog_text" ],
"src/audio/seqplayer.h": [ "sequence_player_set_tempo", "sequence_player_set_tempo_acc", "sequence_player_set_transposition", "sequence_player_get_tempo", "sequence_player_get_tempo_acc", "sequence_player_get_transposition", "sequence_player_get_volume", "sequence_player_get_fade_volume", "sequence_player_get_mute_volume_scale" ],
"src/pc/network/sync_object.h": [ "sync_object_is_initialized", "sync_object_is_owned_locally", "sync_object_get_object" ],
}
diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua
index a3661d451..f834ce176 100644
--- a/autogen/lua_definitions/functions.lua
+++ b/autogen/lua_definitions/functions.lua
@@ -4444,6 +4444,12 @@ function set_menu_mode(mode)
-- ...
end
+--- @param dialogID integer
+--- The internal function used by SM64 which plays a tune whenever boss, KtQ, etc dialog is read.
+function handle_special_dialog_text(dialogID)
+ -- ...
+end
+
--- @param width integer
--- Dialog box customization: Sets the minimum width for a dialog box
function set_min_dialog_width(width)
diff --git a/docs/lua/functions-3.md b/docs/lua/functions-3.md
index d8c234a94..c09511ba8 100644
--- a/docs/lua/functions-3.md
+++ b/docs/lua/functions-3.md
@@ -4931,6 +4931,29 @@ Sets the in-game menu state. 0-1 is the courses box with the castle secret stars
+## [handle_special_dialog_text](#handle_special_dialog_text)
+
+### Description
+The internal function used by SM64 which plays a tune whenever boss, KtQ, etc dialog is read.
+
+### Lua Example
+`handle_special_dialog_text(dialogID)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| dialogID | `integer` |
+
+### Returns
+- None
+
+### C Prototype
+`void handle_special_dialog_text(s32 dialogID);`
+
+[:arrow_up_small:](#)
+
+
+
## [set_min_dialog_width](#set_min_dialog_width)
### Description
diff --git a/docs/lua/functions.md b/docs/lua/functions.md
index 9429e0b7c..3619cadfd 100644
--- a/docs/lua/functions.md
+++ b/docs/lua/functions.md
@@ -869,6 +869,7 @@
- [create_dialog_box_with_response](functions-3.md#create_dialog_box_with_response)
- [reset_dialog_render_state](functions-3.md#reset_dialog_render_state)
- [set_menu_mode](functions-3.md#set_menu_mode)
+ - [handle_special_dialog_text](functions-3.md#handle_special_dialog_text)
- [set_min_dialog_width](functions-3.md#set_min_dialog_width)
- [set_dialog_override_pos](functions-3.md#set_dialog_override_pos)
- [reset_dialog_override_pos](functions-3.md#reset_dialog_override_pos)
diff --git a/src/game/ingame_menu.h b/src/game/ingame_menu.h
index b2328048b..2b54bd609 100644
--- a/src/game/ingame_menu.h
+++ b/src/game/ingame_menu.h
@@ -182,6 +182,8 @@ void do_cutscene_handler(void);
void render_hud_cannon_reticle(void);
void reset_red_coins_collected(void);
s16 render_menus_and_dialogs(void);
+/* |description|The internal function used by SM64 which plays a tune whenever boss, KtQ, etc dialog is read.|descriptionEnd| */
+void handle_special_dialog_text(s32 dialogID);
void create_dl_scale_matrix(s8 pushOp, f32 x, f32 y, f32 z);
/* |description|Dialog box customization: Sets the minimum width for a dialog box|descriptionEnd| */
void set_min_dialog_width(s16 width);
diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c
index a4e719cbb..21c58097a 100644
--- a/src/pc/lua/smlua_functions_autogen.c
+++ b/src/pc/lua/smlua_functions_autogen.c
@@ -14146,6 +14146,23 @@ int smlua_func_set_menu_mode(lua_State* L) {
return 1;
}
+int smlua_func_handle_special_dialog_text(lua_State* L) {
+ if (L == NULL) { return 0; }
+
+ int top = lua_gettop(L);
+ if (top != 1) {
+ LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "handle_special_dialog_text", 1, top);
+ return 0;
+ }
+
+ s32 dialogID = smlua_to_integer(L, 1);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "handle_special_dialog_text"); return 0; }
+
+ handle_special_dialog_text(dialogID);
+
+ return 1;
+}
+
int smlua_func_set_min_dialog_width(lua_State* L) {
if (L == NULL) { return 0; }
@@ -37574,6 +37591,7 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "create_dialog_box_with_response", smlua_func_create_dialog_box_with_response);
smlua_bind_function(L, "reset_dialog_render_state", smlua_func_reset_dialog_render_state);
smlua_bind_function(L, "set_menu_mode", smlua_func_set_menu_mode);
+ smlua_bind_function(L, "handle_special_dialog_text", smlua_func_handle_special_dialog_text);
smlua_bind_function(L, "set_min_dialog_width", smlua_func_set_min_dialog_width);
smlua_bind_function(L, "set_dialog_override_pos", smlua_func_set_dialog_override_pos);
smlua_bind_function(L, "reset_dialog_override_pos", smlua_func_reset_dialog_override_pos);