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)
ingame_effect_add_group true
    1
    ingame_effect_add_item true
      2
      ingame_effect_add_mover true
        1
        ingame_effect_add_navpoint true
          1
          ingame_effect_add_npc true
            2
            ingame_effect_add_player true
              1
              ingame_effect_add_trigger true
                19
                ingame_effect_add_vehicle true
                  1
                  ingame_effect_remove_group true
                    1
                    ingame_effect_remove_item true
                      1
                      ingame_effect_remove_mover true
                        1
                        ingame_effect_remove_navpoint true
                          1
                          ingame_effect_remove_npc true
                            3
                            ingame_effect_remove_player true
                              1
                              ingame_effect_remove_trigger true
                                15
                                ingame_effect_remove_vehicle true
                                  1
                                  input_controls_restore_defaults_PC true
                                    1
                                    input_pad_controls_restore_defaults_PC true
                                      1
                                      interface_effect_begin true
                                        10
                                        interface_effect_end true
                                          7
                                          inventory_switch_to_next_slot true
                                            1
                                            inv_has_item true
                                              7
                                              inv_item_add true 1 81
                                              inv_item_add_ammo true
                                                12
                                                inv_item_add_do true
                                                  2
                                                  inv_item_equip true
                                                    81
                                                    inv_item_get_all true 1
                                                      inv_item_get_all_ammo_do true
                                                        1
                                                        inv_item_get_all_do true
                                                          1
                                                          inv_item_get_equipped_item true
                                                            8
                                                            inv_item_in_slot true
                                                              4
                                                              inv_item_is_equipped true
                                                                10
                                                                • bh03.lua, line 475: until ( inv_item_is_equipped( SAW_NAME, LOCAL_PLAYER ) and
                                                                • bh03.lua, line 476: ( coop_is_active() == false or inv_item_is_equipped( SAW_NAME, REMOTE_PLAYER ) ) )
                                                                • bh03.lua, line 1872: if not inv_item_is_equipped(WEAPON_GEIGER_COUNTER, Geiger_player) then
                                                                • bh03.lua, line 1886: if inv_item_is_equipped(WEAPON_GEIGER_COUNTER, Geiger_player) then
                                                                • bh03.lua, line 1924: if inv_item_is_equipped(WEAPON_GEIGER_COUNTER, Geiger_player) then
                                                                • bh06.lua, line 628: if (not inv_item_is_equipped("pyroBox", LOCAL_PLAYER)) and character_is_in_vehicle(LOCAL_PLAYER, VEH_PARCEL_TRUCK) then
                                                                • ss03.lua, line 565: until ( inv_item_is_equipped( SAW_NAME, LOCAL_PLAYER ) )
                                                                • ss03.lua, line 569: until ( inv_item_is_equipped( SAW_NAME, REMOTE_PLAYER ) )
                                                                • tss01.lua, line 1413: if (not inv_item_is_equipped(item_in_slot, CHARACTER_CARLOS)) then
                                                                • tss01.lua, line 4419: if (not inv_item_is_equipped("AR200_ss03", player)) and character_is_in_vehicle(player, HIGH_SEAS_VEHICLE) then
                                                                inv_item_is_firearm_equipped true
                                                                  2
                                                                  inv_item_remove true
                                                                    3
                                                                    inv_item_remove_all true
                                                                      50
                                                                      inv_item_remove_in_slot true
                                                                        8
                                                                        inv_weapon_add_temporary true
                                                                          43
                                                                          inv_weapon_disable_all_but_this_slot true
                                                                            5
                                                                            inv_weapon_disable_slot true
                                                                              7
                                                                              inv_weapon_enable_or_disable_all_slots true
                                                                                15
                                                                                inv_weapon_remove_temporary true
                                                                                  35
                                                                                  is_connected_to_network true
                                                                                    7
                                                                                    is_connected_to_service true
                                                                                      4
                                                                                      is_coop_start_screen true
                                                                                        5
                                                                                        is_demo_execution true
                                                                                          1
                                                                                          is_hood_owner true 1
                                                                                            is_hood_owner_do true
                                                                                              2
                                                                                              is_local_player_in_vehicle true
                                                                                                1
                                                                                                • vint_lib.lua, line 495: if pause_menu_is_using_southpaw_control_scheme() == true and is_local_player_in_vehicle() == false then
                                                                                                is_mp_storage_blank true
                                                                                                  1
                                                                                                  is_mp_tutorial_playing true
                                                                                                    2
                                                                                                    is_player_tag true 1 2
                                                                                                    is_sake_ready true
                                                                                                      1
                                                                                                      is_signed_in true
                                                                                                        3
                                                                                                        item_drop true
                                                                                                          4
                                                                                                          item_hide true
                                                                                                            3
                                                                                                            item_reset true
                                                                                                              1
                                                                                                              item_show true
                                                                                                                3
                                                                                                                item_throw true 1 1
                                                                                                                item_wield true 1 2