Saints Row 2 Function Reference

Global functions

These functions are assumed to be globally available to all scripts (they aren't defined in the available Lua files, or are defined in files that are known to be always loaded).

This list is assumed incomplete; additional functions could exist in the exe but not be used in the game scripts, and there's no definitive list of Lua files that are always loaded.

Function name Global Defined in Examples from patch (click blue number to expand)
ui_audio_post_event true 1 163
ui_hud_display_commit_state true
    3
    ui_hud_display_create_state true
      3
      ui_hud_display_remove_state true
        6
        ui_hud_display_set_element true
          5
          • hud.lua, line 1196: ui_hud_display_set_element(Hud_inventory_hud_state_h, HUD_ALL_ELEM, HUD_FADE_HIDDEN)
          • hud.lua, line 1197: ui_hud_display_set_element(Hud_inventory_hud_state_h, HUD_ELEM_RADIO_STATION, HUD_FADE_VISIBLE)
          • hud.lua, line 2516: ui_hud_display_set_element(hud_state_h, HUD_ALL_ELEM, HUD_FADE_NO_CHANGE)
          • hud.lua, line 2517: ui_hud_display_set_element(hud_state_h, HUD_ELEM_WEAPONS, HUD_FADE_HIDDEN)
          • vint_lib.lua, line 49: ui_hud_display_set_element(MY_HUD_STATE, HUD_ELEM_RADIAL, HUD_FADE_HIDDEN)
          ui_hud_get_weapon_upgrade_info true
            1
            • vdo_weapon_radial.lua, line 306: local upgrade_name_crc, current_level, max_level, attribute_id, is_ultimate, upgrade_idx, fully_upgraded = ui_hud_get_weapon_upgrade_info(slot_num, i)
            ui_hud_is_weapon_fully_upgraded true
              1
              ui_hud_set_current_challenge true
                11
                ui_play_pain_audio true 1
                  unlockable_lock true
                    1
                    unlockable_unlock true
                      2
                      unpack true
                        2
                        update_x true
                          1
                          update_y true
                            1