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)
package_chunk_loaded true
    3
    package_chunk_tracking_add true
      2
      package_chunk_tracking_eta true
        1
        package_chunk_tracking_start true
          2
          package_chunk_tracking_update true
            1
            parking_spot_disable_all true
              16
              party_add_do true
                3
                party_allow_max_followers true
                  2
                  party_dismiss_all true
                    1
                    party_dismiss_do true
                      1
                      party_set_dismissable true
                        5
                        path_name_is_path true
                          2
                          pause_map_add_bookmark true
                            2
                            pause_map_crib_exit true
                              1
                              pause_map_drag_map true
                                1
                                pause_map_dump true 1 33
                                pause_map_is_stag_mode true
                                  1
                                  pause_map_is_tutorial_mode true
                                    5
                                    pause_map_restore true 1 29
                                    pause_map_set_gps true
                                      2
                                      pause_map_stag_takeover_do_reward true
                                        1
                                        pause_map_tutorial_mode true
                                          4
                                          pause_map_zoom true
                                            2
                                            pause_menu_accept_options true
                                              17
                                              pause_menu_cant_retry_because_host_in_creation true
                                                1
                                                pause_menu_change_control_scheme true
                                                  1
                                                  pause_menu_common_top_finished_loading true
                                                    1
                                                    pause_menu_control_scheme_init true
                                                      6
                                                      pause_menu_has_seen_display_cal_screen true
                                                        2
                                                        pause_menu_is_using_southpaw_control_scheme true
                                                          1
                                                          • vint_lib.lua, line 1145: if pause_menu_is_using_southpaw_control_scheme() == true and game_is_local_player_in_vehicle() == false then
                                                          pause_menu_is_using_vehicle_southpaw_control_scheme true
                                                            1
                                                            • vint_lib.lua, line 1155: elseif pause_menu_is_using_vehicle_southpaw_control_scheme() == true and game_is_local_player_in_vehicle() == true then
                                                            pause_menu_point_of_no_return true
                                                              1
                                                              pause_menu_quit_game_internal true
                                                                5
                                                                pause_menu_restore_defaults true
                                                                  7
                                                                  pause_menu_update_option true
                                                                    6
                                                                    pcr_add_default_clothing true
                                                                      1
                                                                      pcr_apply_morph_value true
                                                                        11
                                                                        pcr_apply_preset true
                                                                          2
                                                                          pcr_apply_regional_preset true
                                                                            1
                                                                            • store_character.lua, line 668: pcr_apply_regional_preset("figure", Store_character_current_preset_gender .. "_" .. Store_character_current_preset_figure)
                                                                            pcr_change_composite true
                                                                              7
                                                                              pcr_change_eye_color true
                                                                                3
                                                                                pcr_change_hair true
                                                                                  7
                                                                                  pcr_change_skin_color true
                                                                                    3
                                                                                    pcr_cleanup_player_voice true
                                                                                      1
                                                                                      pcr_creation_complete true
                                                                                        1
                                                                                        pcr_get_composite_info true
                                                                                          3
                                                                                          pcr_get_hair_info true
                                                                                            2
                                                                                            • store_character.lua, line 1365: Store_character_hair_values.style, Store_character_hair_values.primary = pcr_get_hair_info(0)
                                                                                            • store_tattoo.lua, line 768: Store_character_hair_values[i].style, Store_character_hair_values[i].primary, Store_character_hair_values[i].secondary = pcr_get_hair_info(i)
                                                                                            pcr_get_morph_value true
                                                                                              8
                                                                                              pcr_get_player_preset true
                                                                                                6
                                                                                                pcr_get_triangle_cursor_pos true
                                                                                                  1
                                                                                                  pcr_get_voice true
                                                                                                    1
                                                                                                    pcr_get_voice_pitch true
                                                                                                      2
                                                                                                      pcr_hair_randomize_all true
                                                                                                        1
                                                                                                        pcr_is_plastic_surgeon true
                                                                                                          15
                                                                                                          pcr_lips_randomize true
                                                                                                            1
                                                                                                            pcr_mark_changed true
                                                                                                              12
                                                                                                              pcr_preview_anim true
                                                                                                                2
                                                                                                                pcr_purchase_tattoo true
                                                                                                                  1
                                                                                                                  pcr_randomize_eye_colors true
                                                                                                                    1
                                                                                                                    pcr_report_anims true
                                                                                                                      1
                                                                                                                      pcr_report_avail_morphs true
                                                                                                                        2
                                                                                                                        pcr_report_composite_colors true
                                                                                                                          2
                                                                                                                          pcr_report_composite_items true
                                                                                                                            4
                                                                                                                            pcr_report_eye_colors true
                                                                                                                              1
                                                                                                                              pcr_report_hair_colors true
                                                                                                                                1
                                                                                                                                pcr_report_hair_items true
                                                                                                                                  1
                                                                                                                                  pcr_report_skin_colors true
                                                                                                                                    1
                                                                                                                                    pcr_restore_clothing true
                                                                                                                                      2
                                                                                                                                      pcr_set_anim true
                                                                                                                                        3
                                                                                                                                        pcr_set_random_composite true
                                                                                                                                          4
                                                                                                                                          pcr_set_triangle_cursor_pos true
                                                                                                                                            4
                                                                                                                                            pcr_set_voice true
                                                                                                                                              2
                                                                                                                                              pcr_set_voice_pitch true
                                                                                                                                                2
                                                                                                                                                pcr_strip_clothing true
                                                                                                                                                  2
                                                                                                                                                  pcu_bra_required true
                                                                                                                                                    1
                                                                                                                                                    pcu_can_create_outfit true
                                                                                                                                                      1
                                                                                                                                                      pcu_category_nav_clear_slot true
                                                                                                                                                        1
                                                                                                                                                        pcu_clear_item_new true
                                                                                                                                                          1
                                                                                                                                                          pcu_clear_obscured_slots true
                                                                                                                                                            1
                                                                                                                                                            pcu_clear_preview_slot true
                                                                                                                                                              4
                                                                                                                                                              pcu_create_outfit true
                                                                                                                                                                1
                                                                                                                                                                pcu_delete_outfit true
                                                                                                                                                                  1
                                                                                                                                                                  pcu_discard_slot true
                                                                                                                                                                    2
                                                                                                                                                                    pcu_get_areas true
                                                                                                                                                                      2
                                                                                                                                                                      pcu_get_categories_in_area true
                                                                                                                                                                        2
                                                                                                                                                                        pcu_get_items_in_category true
                                                                                                                                                                          1
                                                                                                                                                                          pcu_get_item_defaults true
                                                                                                                                                                            1
                                                                                                                                                                            pcu_get_num_items_category true
                                                                                                                                                                              1
                                                                                                                                                                              pcu_get_num_items_owned true
                                                                                                                                                                                1
                                                                                                                                                                                pcu_get_owned_item_info true
                                                                                                                                                                                  1
                                                                                                                                                                                  pcu_get_slot_info true
                                                                                                                                                                                    3
                                                                                                                                                                                    pcu_get_variants true
                                                                                                                                                                                      1
                                                                                                                                                                                      pcu_get_wear_options true
                                                                                                                                                                                        1
                                                                                                                                                                                        pcu_is_bra_category true
                                                                                                                                                                                          1
                                                                                                                                                                                          pcu_is_current_item_worn true
                                                                                                                                                                                            1
                                                                                                                                                                                            • store_clothing.lua, line 1244: if pcu_is_current_item_worn(Store_clothing_item_info.slot_index, Store_clothing_item_info.wardrobe_instance) then
                                                                                                                                                                                            pcu_is_item_needed_for_outfit true
                                                                                                                                                                                              1
                                                                                                                                                                                              pcu_is_streaming_done true
                                                                                                                                                                                                11
                                                                                                                                                                                                pcu_is_underwear_category true
                                                                                                                                                                                                  1
                                                                                                                                                                                                  pcu_purchase_outfit true
                                                                                                                                                                                                    1
                                                                                                                                                                                                    pcu_purchase_slot true
                                                                                                                                                                                                      1
                                                                                                                                                                                                      pcu_remove_clothing true
                                                                                                                                                                                                        1
                                                                                                                                                                                                        pcu_report_item_colors true
                                                                                                                                                                                                          2
                                                                                                                                                                                                          pcu_report_outfits true
                                                                                                                                                                                                            1
                                                                                                                                                                                                            pcu_set_active_category true
                                                                                                                                                                                                              4
                                                                                                                                                                                                              pcu_set_slots_empty true
                                                                                                                                                                                                                1
                                                                                                                                                                                                                pcu_wear_current_clothing true
                                                                                                                                                                                                                  2
                                                                                                                                                                                                                  pcu_wear_outfit true
                                                                                                                                                                                                                    1
                                                                                                                                                                                                                    pcu_wear_store_outfit true
                                                                                                                                                                                                                      1
                                                                                                                                                                                                                      persona_override_character_start_do true
                                                                                                                                                                                                                        2
                                                                                                                                                                                                                        • game_lib.lua, line 2997: persona_override_character_start_do(character, persona_situation, trigger_prefix .. audio, count)
                                                                                                                                                                                                                        • game_lib.lua, line 3001: persona_override_character_start_do(character, situation, trigger_prefix .. audio, count)
                                                                                                                                                                                                                        persona_override_character_stop_do true
                                                                                                                                                                                                                          2
                                                                                                                                                                                                                          persona_override_persona_start true
                                                                                                                                                                                                                            6
                                                                                                                                                                                                                            • game_lib.lua, line 3040: -- persona_override_persona_start("AM_Gang1", "threat - alert (group attack)", "AMGNG1_EX01_ATTACK")
                                                                                                                                                                                                                            • game_lib.lua, line 3041: -- persona_override_persona_start("AM_Gang1", "threat - alert (solo attack)", "AFGNG1_EX01_ATTACK")
                                                                                                                                                                                                                            • game_lib.lua, line 3042: -- persona_override_persona_start("AM_Gang2", "threat - alert (group attack)", "AMGNG2_EX01_ATTACK")
                                                                                                                                                                                                                            • game_lib.lua, line 3043: -- persona_override_persona_start("AM_Gang2", "threat - alert (solo attack)", "AFGNG2_EX01_ATTACK")
                                                                                                                                                                                                                            • game_lib.lua, line 3054: persona_override_persona_start(persona, situation, tag_prefix .. "_" .. tag_suffix)
                                                                                                                                                                                                                            • game_lib.lua, line 4587: persona_override_persona_start(interrogate_data.target, interrogate_data.persona)
                                                                                                                                                                                                                            persona_override_persona_start_do true
                                                                                                                                                                                                                              2
                                                                                                                                                                                                                              persona_override_persona_stop true
                                                                                                                                                                                                                                2
                                                                                                                                                                                                                                persona_override_persona_stop_do true
                                                                                                                                                                                                                                  2
                                                                                                                                                                                                                                  players_naked true
                                                                                                                                                                                                                                    1
                                                                                                                                                                                                                                    player_allow_weapon_melee true
                                                                                                                                                                                                                                      8
                                                                                                                                                                                                                                      player_controls_disable true
                                                                                                                                                                                                                                        16
                                                                                                                                                                                                                                        player_controls_enable true
                                                                                                                                                                                                                                          21
                                                                                                                                                                                                                                          player_customization_is_finalized true
                                                                                                                                                                                                                                            3
                                                                                                                                                                                                                                            player_flight_unlock true
                                                                                                                                                                                                                                              9
                                                                                                                                                                                                                                              player_force_vehicle_seat true
                                                                                                                                                                                                                                                2
                                                                                                                                                                                                                                                player_get_custom_voice true
                                                                                                                                                                                                                                                  1
                                                                                                                                                                                                                                                  player_get_num_flaps true
                                                                                                                                                                                                                                                    7
                                                                                                                                                                                                                                                    player_human_shield_lock true
                                                                                                                                                                                                                                                      2
                                                                                                                                                                                                                                                      player_is_default_character true
                                                                                                                                                                                                                                                        1
                                                                                                                                                                                                                                                        player_is_gliding true
                                                                                                                                                                                                                                                          2
                                                                                                                                                                                                                                                          • mflighttutorial.lua, line 2589: elseif (player_is_gliding(LOCAL_PLAYER)) and (player_get_num_flaps(LOCAL_PLAYER, iCurrentFlapsLocal) > 0) then --and player_is_flying(player)) then
                                                                                                                                                                                                                                                          • mflighttutorial.lua, line 2638: elseif ((player_is_gliding(REMOTE_PLAYER)) and (player_get_num_flaps(REMOTE_PLAYER, iCurrentFlapsRemote) > 0)) then
                                                                                                                                                                                                                                                          player_is_jumping true
                                                                                                                                                                                                                                                            2
                                                                                                                                                                                                                                                            player_is_standing true
                                                                                                                                                                                                                                                              15
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 1427: if local_player_hit_last_trigger == false and object_is_in_trigger( mFlightTutorial_trigger.end_trigger.name, LOCAL_PLAYER ) and player_is_standing( LOCAL_PLAYER ) then
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 1433: if remote_player_hit_last_trigger == false and object_is_in_trigger( mFlightTutorial_trigger.end_trigger.name, REMOTE_PLAYER ) and player_is_standing( REMOTE_PLAYER ) then
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 1442: while not ( object_is_in_trigger( mFlightTutorial_trigger.end_trigger.name, LOCAL_PLAYER ) and player_is_standing( LOCAL_PLAYER ) ) do
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2510: --local is_player_standing = player_is_standing( player )
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2565: if (player_is_standing(player)) then
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2615: if (player_is_standing(player)) then
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2732: while not( object_is_in_trigger( mFlightTutorial_trigger.jump_trigger_01.name, player ) and player_is_standing( player ) ) do
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2755: while not( object_is_in_trigger( mFlightTutorial_trigger.walljump_trigger_01.name, player ) and player_is_standing( player ) ) do
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2780: while not( object_is_in_trigger( mFlightTutorial_trigger.runningjump_trigger_01.name, player ) and player_is_standing( player ) ) do
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2846: while not( object_is_in_trigger( mFlightTutorial_trigger.glide_trigger_01.name, player ) and player_is_standing( player ) )do
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2894: while not ( object_is_in_trigger( mFlightTutorial_trigger.dive_trigger_01.name, player ) and player_is_standing( player ) ) do
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2939: while not ( object_is_in_trigger( mFlightTutorial_trigger.flap_trigger_01.name, player ) and player_is_standing( player ) and (Remote_CollectedOrb_B == true)) do
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2943: while not ( object_is_in_trigger( mFlightTutorial_trigger.flap_trigger_01.name, player ) and player_is_standing( player ) and (Local_CollectedOrb_A == true)) do
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 2988: while not( object_is_in_trigger( mFlightTutorial_trigger.climb_trigger_01.name, player ) and player_is_standing( player ) )do
                                                                                                                                                                                                                                                              • mflighttutorial.lua, line 3050: while not( object_is_in_trigger( mFlightTutorial_trigger.turn_trigger_01.name, player ) and player_is_standing( player ) ) do
                                                                                                                                                                                                                                                              player_lock_super_power true
                                                                                                                                                                                                                                                                16
                                                                                                                                                                                                                                                                player_movement_disable true
                                                                                                                                                                                                                                                                  3
                                                                                                                                                                                                                                                                  player_movement_enable true
                                                                                                                                                                                                                                                                    6
                                                                                                                                                                                                                                                                    player_names_get_all true
                                                                                                                                                                                                                                                                      6
                                                                                                                                                                                                                                                                      player_pos_correct true
                                                                                                                                                                                                                                                                        1
                                                                                                                                                                                                                                                                        player_release_human_shield true
                                                                                                                                                                                                                                                                          2
                                                                                                                                                                                                                                                                          player_super_attacks_enable true
                                                                                                                                                                                                                                                                            41
                                                                                                                                                                                                                                                                            player_super_movement_enable true
                                                                                                                                                                                                                                                                              14
                                                                                                                                                                                                                                                                              player_super_power_can_summon true
                                                                                                                                                                                                                                                                                2
                                                                                                                                                                                                                                                                                player_super_power_clear_summons true
                                                                                                                                                                                                                                                                                  10
                                                                                                                                                                                                                                                                                  player_super_power_control_summon_through_script true
                                                                                                                                                                                                                                                                                    6
                                                                                                                                                                                                                                                                                    player_super_power_get_next_unlocked_element true
                                                                                                                                                                                                                                                                                      1
                                                                                                                                                                                                                                                                                      • hud.lua, line 1055: local element = player_super_power_get_next_unlocked_element(Hud_weapon_radial.slots[slot].element)
                                                                                                                                                                                                                                                                                      player_super_power_is_summon_reticle_in_trigger true
                                                                                                                                                                                                                                                                                        2
                                                                                                                                                                                                                                                                                        player_super_power_lock_to_tutorial_element true
                                                                                                                                                                                                                                                                                          8
                                                                                                                                                                                                                                                                                          player_super_power_select true
                                                                                                                                                                                                                                                                                            14
                                                                                                                                                                                                                                                                                            player_super_power_set_regen_scalar_buff true
                                                                                                                                                                                                                                                                                              8
                                                                                                                                                                                                                                                                                              player_super_power_set_temp_charge true
                                                                                                                                                                                                                                                                                                3
                                                                                                                                                                                                                                                                                                player_super_power_set_temp_strength true
                                                                                                                                                                                                                                                                                                  3
                                                                                                                                                                                                                                                                                                  player_super_power_set_wall_jump_and_sprint_disabled true
                                                                                                                                                                                                                                                                                                    4
                                                                                                                                                                                                                                                                                                    player_swap_character true
                                                                                                                                                                                                                                                                                                      2
                                                                                                                                                                                                                                                                                                      player_take_human_shield_do true
                                                                                                                                                                                                                                                                                                        1
                                                                                                                                                                                                                                                                                                        player_unlock_super_power true
                                                                                                                                                                                                                                                                                                          30
                                                                                                                                                                                                                                                                                                          player_warp_to_shore_disable true
                                                                                                                                                                                                                                                                                                            11
                                                                                                                                                                                                                                                                                                            player_warp_to_shore_enable true
                                                                                                                                                                                                                                                                                                              19
                                                                                                                                                                                                                                                                                                              player_wings_force_open true
                                                                                                                                                                                                                                                                                                                8
                                                                                                                                                                                                                                                                                                                playlist_play_track true
                                                                                                                                                                                                                                                                                                                  1
                                                                                                                                                                                                                                                                                                                  playlist_stop_track true
                                                                                                                                                                                                                                                                                                                    1
                                                                                                                                                                                                                                                                                                                    pop_screen true
                                                                                                                                                                                                                                                                                                                      122
                                                                                                                                                                                                                                                                                                                      pow true
                                                                                                                                                                                                                                                                                                                        1
                                                                                                                                                                                                                                                                                                                        Process_enemy_set true
                                                                                                                                                                                                                                                                                                                          1
                                                                                                                                                                                                                                                                                                                          push_screen true
                                                                                                                                                                                                                                                                                                                            42