Saints Row: The Third 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)
dataitem_to_debug true 1 3
  • hud.lua, line 1280: --dataitem_to_debug(di_h, "wpn_bmp_name", "rdy_ammo", "rsv_ammo", "grenade_bmp_name", "grenade_ammo", "wpn_rdy", "dual_wield", "no_ammo", "inf_ammo", "cont_fire", "no_mag", "sniper_visible", "wpn_name", "wpn_category", "reticule_highlight", "wpn_spread", "wpn_slot", "grenade_slot", "show_reticule", "overheat_pct", "is_overheated")
  • pause_map.lua, line 903: --dataitem_to_debug(di_h, "icon_bmp_name", "text_line_1", "text_line_2", "text_line_3", "text_line_4", "is_highlighted", "is_gps_target", "taxi_available")
  • vint_lib.lua, line 389: -- Example: dataitem_to_debug(di_h, "icon_bmp_name", "coord_x", "coord_y")
debris_flow_add_avoid_object true
    4
    • m02.lua, line 2859: debris_flow_add_avoid_object(debris_flow_table.handle, M02_groups.homies_skydive_01.shaundi)
    • m18.lua, line 2306: debris_flow_add_avoid_object(M18_runtime.wreckage_debris_flow_handle, M18_groups.skydiving_tank.tank_group.tank)
    • m18.lua, line 2796: debris_flow_add_avoid_object(M18_runtime.debris_flow_handle, M18_groups.skydiving_tank.tank_group.tank)
    • m18.lua, line 2797: debris_flow_add_avoid_object(M18_runtime.debris_flow_handle_02, M18_groups.skydiving_tank.tank_group.tank)
    debris_flow_add_object true
      6
      • m02.lua, line 2839: debris_flow_add_object(debris_flow_table.handle, vehicle.name, vehicle_min_speed, vehicle_max_speed, vehicle_max_ang_vel, true, true)
      • m02.lua, line 2851: debris_flow_add_object(debris_flow_table.handle, box, box_min_speed, box_max_speed, box_max_ang_vel, true, true)
      • m02.lua, line 2855: debris_flow_add_object(debris_flow_table.handle, pallet, box_min_speed, box_max_speed, box_max_ang_vel, true, true)
      • m18.lua, line 2289: debris_flow_add_object(M18_runtime.debris_flow_handle, mover, 10.0, 15.0, 5.0, true, true)
      • m18.lua, line 2295: debris_flow_add_object(M18_runtime.debris_flow_handle_02, mover, 10.0, 15.0, 5.0, true, true)
      • m18.lua, line 2301: debris_flow_add_object(M18_runtime.wreckage_debris_flow_handle, debris, 30.0, 50.0, 5.0, true, true)
      debris_flow_create true
        4
        debris_flow_destroy true
          4
          debris_flow_recycle_object true
            3
            debris_flow_set_active true
              18
              • m02.lua, line 2129: debris_flow_set_active(M02_debris_flows[1].handle, M02_navpoints.debris_emitter_pos_01, 0.0, 25.0, 250.0, LOCAL_PLAYER, 1.0, true)
              • m02.lua, line 2130: debris_flow_set_active(M02_debris_flows[2].handle, M02_navpoints.debris_emitter_pos_01, 0.0, 20.0, 250.0, LOCAL_PLAYER, 1.0, true)
              • m02.lua, line 2221: debris_flow_set_active(M02_debris_flows[1].handle, M02_navpoints.debris_emitter_pos_02, 20.0, 40.0, 375.0, LOCAL_PLAYER, 2.0, true, true)
              • m02.lua, line 2222: debris_flow_set_active(M02_debris_flows[2].handle, M02_navpoints.debris_emitter_pos_02, 20.0, 40.0, 375.0, LOCAL_PLAYER, 2.0, true, true)
              • m02.lua, line 2223: debris_flow_set_active(M02_debris_flows[3].handle, M02_navpoints.debris_emitter_pos_02, 20.0, 40.0, 375.0, LOCAL_PLAYER, 2.0, true, true)
              • m02.lua, line 2620: debris_flow_set_active(M02_debris_flows[1].handle, M02_navpoints.debris_emitter_pos_01, 0.0, 25.0, 250.0, LOCAL_PLAYER, 1.0, true)
              • m02.lua, line 2621: debris_flow_set_active(M02_debris_flows[2].handle, M02_navpoints.debris_emitter_pos_01, 0.0, 20.0, 250.0, LOCAL_PLAYER, 1.0, true)
              • m02.lua, line 2709: debris_flow_set_active(M02_debris_flows[1].handle, M02_navpoints.debris_emitter_pos_02, 20.0, 40.0, 300.0, LOCAL_PLAYER, 2.0, true, true)
              • m02.lua, line 2710: debris_flow_set_active(M02_debris_flows[2].handle, M02_navpoints.debris_emitter_pos_02, 20.0, 40.0, 300.0, LOCAL_PLAYER, 2.0, true, true)
              • m02.lua, line 2711: debris_flow_set_active(M02_debris_flows[3].handle, M02_navpoints.debris_emitter_pos_02, 20.0, 40.0, 300.0, LOCAL_PLAYER, 2.0, true, true)
              • m02.lua, line 2773: debris_flow_set_active(M02_debris_flows[1].handle, M02_navpoints.debris_emitter_pos_01, 10.0, 25.0, 400.0, LOCAL_PLAYER, 1.0, false, true)
              • m02.lua, line 2873: debris_flow_set_active(M02_debris_flows[3].handle, M02_navpoints.debris_emitter_pos_01, 0.0, 15.0, 250.0, LOCAL_PLAYER, 1.0, true)
              • m18.lua, line 2291: debris_flow_set_active(M18_runtime.debris_flow_handle, M18_navpoints.debris_emitter_pos_01, 15.0, 60.0, 350.0, LOCAL_PLAYER)
              • m18.lua, line 2297: debris_flow_set_active(M18_runtime.debris_flow_handle_02, M18_navpoints.debris_emitter_pos_01, 15.0, 60.0, 350.0, LOCAL_PLAYER)
              • m18.lua, line 2376: debris_flow_set_active(M18_runtime.debris_flow_handle, M18_navpoints.debris_emitter_pos_01, 15.0, 60.0, 200.0, LOCAL_PLAYER, speed_mult, false)
              • m18.lua, line 2798: debris_flow_set_active(M18_runtime.debris_flow_handle, M18_navpoints.debris_emitter_pos_03, 0.0, 40.0, 300.0, LOCAL_PLAYER, 1.0)
              • m18.lua, line 2799: debris_flow_set_active(M18_runtime.debris_flow_handle_02, M18_navpoints.debris_emitter_pos_03, 0.0, 40.0, 300.0, LOCAL_PLAYER, 1.0)
              • m18.lua, line 2807: debris_flow_set_active(M18_runtime.wreckage_debris_flow_handle, M18_navpoints.debris_emitter_pos_03, 10.0, 25.0, 300.0, LOCAL_PLAYER, 1.0, true)
              debris_flow_set_inactive true
                2
                debug_conversation true 1
                  debug_print true 1 257
                  default_on_back true
                    1
                    default_on_nav true
                      3
                      default_on_sub_menu_fill true
                        1
                        delay true 1 1137
                        dialog_box_create_internal true
                          1
                          • dialog.lua, line 394: local handle = dialog_box_create_internal(header, body, callback, priority, is_confirmation, is_spinner, options[0], options[1], options[2], options[3], default, is_close_on_death, is_close_on_damage, is_close_on_mission_end, back_option)
                          dialog_box_disconnect true
                            6
                            dialog_box_force_close true
                              3
                              dialog_box_force_close_all true
                                1
                                dialog_box_set_current_option true
                                  1
                                  dialog_box_set_result true
                                    2
                                    dialog_characters_ready true 1 1
                                    dialog_close_finished true
                                      1
                                      dialog_open_pause_display true
                                        3
                                        dialog_option_accept_kbd_input true
                                          1
                                          dialog_option_end_kbd_input true
                                            1
                                            dialog_pause_unpause true
                                              1
                                              difficulty_get_level true
                                                12
                                                disable_specific_notoriety_group true
                                                  42
                                                  • m22.lua, line 1262: disable_specific_notoriety_group("stag", 2, "G_STAG_CopCar", false)
                                                  • m22.lua, line 1263: disable_specific_notoriety_group("stag", 3, "G_STAG_CopCar", false)
                                                  • m22.lua, line 1264: disable_specific_notoriety_group("stag", 4, "G_STAG_CopCar", false)
                                                  • m22.lua, line 1265: disable_specific_notoriety_group("stag", 5, "G_STAG_CopCar", false)
                                                  • m22.lua, line 1266: disable_specific_notoriety_group("stag", 2, "G_STAG_BikeCop", false)
                                                  • m22.lua, line 1267: disable_specific_notoriety_group("stag", 3, "G_STAG_BikeCop", false)
                                                  • m22.lua, line 3281: disable_specific_notoriety_group("luchadores", 4, "G_Luchadore_Brute_M", false)
                                                  • m22.lua, line 3282: disable_specific_notoriety_group("luchadores", 4, "G_Luchadore_Brute_F", false)
                                                  • m22.lua, line 3283: disable_specific_notoriety_group("luchadores", 4, "G_Luchadore_Brute_G", false)
                                                  • m22.lua, line 3284: disable_specific_notoriety_group("luchadores", 5, "G_Luchadore_Brute_M", false)
                                                  • m22.lua, line 3285: disable_specific_notoriety_group("luchadores", 5, "G_Luchadore_Brute_F", false)
                                                  • m22.lua, line 3286: disable_specific_notoriety_group("luchadores", 5, "G_Luchadore_Brute_G", false)
                                                  • m22.lua, line 3289: disable_specific_notoriety_group("luchadores", 4, "G_Luchadore_Brute_M", true)
                                                  • m22.lua, line 3290: disable_specific_notoriety_group("luchadores", 4, "G_Luchadore_Brute_F", true)
                                                  • m22.lua, line 3291: disable_specific_notoriety_group("luchadores", 4, "G_Luchadore_Brute_G", true)
                                                  • m22.lua, line 3292: disable_specific_notoriety_group("luchadores", 5, "G_Luchadore_Brute_M", true)
                                                  • m22.lua, line 3293: disable_specific_notoriety_group("luchadores", 5, "G_Luchadore_Brute_F", true)
                                                  • m22.lua, line 3294: disable_specific_notoriety_group("luchadores", 5, "G_Luchadore_Brute_G", true)
                                                  • m22.lua, line 3366: disable_specific_notoriety_group("stag", 2, "G_STAG_CopCar", true)
                                                  • m22.lua, line 3367: disable_specific_notoriety_group("stag", 3, "G_STAG_CopCar", true)
                                                  • m22.lua, line 3368: disable_specific_notoriety_group("stag", 4, "G_STAG_CopCar", true)
                                                  • m22.lua, line 3369: disable_specific_notoriety_group("stag", 5, "G_STAG_CopCar", true)
                                                  • m22.lua, line 3370: disable_specific_notoriety_group("stag", 2, "G_STAG_BikeCop", true)
                                                  • m22.lua, line 3371: disable_specific_notoriety_group("stag", 3, "G_STAG_BikeCop", true)
                                                  • sh03.lua, line 881: disable_specific_notoriety_group( "deckers", 3, "G_Decker_SUV_1S", true )
                                                  • sh03.lua, line 882: disable_specific_notoriety_group( "deckers", 3, "G_Decker_Car_1S", true )
                                                  • sh03.lua, line 883: disable_specific_notoriety_group( "deckers", 4, "G_Decker_Car_1S", true )
                                                  • sh03.lua, line 884: disable_specific_notoriety_group( "deckers", 4, "G_Decker_Car_2S", true )
                                                  • sh03.lua, line 885: disable_specific_notoriety_group( "deckers", 4, "G_Decker_Brute_F", true )
                                                  • sh03.lua, line 886: disable_specific_notoriety_group( "deckers", 5, "G_Decker_Brute_M", true )
                                                  • sh03.lua, line 887: disable_specific_notoriety_group( "deckers", 5, "G_Decker_Brute_G", true )
                                                  • sh03.lua, line 888: disable_specific_notoriety_group( "deckers", 5, "G_Decker_Car_2S", true )
                                                  • sh03.lua, line 889: disable_specific_notoriety_group( "deckers", 5, "G_Decker_SUV_2S", true )
                                                  • sh03.lua, line 1922: disable_specific_notoriety_group( "deckers", level, "G_Decker_SUV_1S", true )
                                                  • sh03.lua, line 1923: disable_specific_notoriety_group( "deckers", level, "G_Decker_Car_1S", true )
                                                  • sh03.lua, line 1926: disable_specific_notoriety_group( "deckers", level, "G_Decker_Car_1S", true )
                                                  • sh03.lua, line 1927: disable_specific_notoriety_group( "deckers", level, "G_Decker_Car_2S", true )
                                                  • sh03.lua, line 1928: disable_specific_notoriety_group( "deckers", level, "G_Decker_Brute_F", true )
                                                  • sh03.lua, line 1931: disable_specific_notoriety_group( "deckers", level, "G_Decker_Brute_M", true )
                                                  • sh03.lua, line 1932: disable_specific_notoriety_group( "deckers", level, "G_Decker_Brute_G", true )
                                                  • sh03.lua, line 1933: --disable_specific_notoriety_group( "deckers", level, "G_Decker_Car_2S", true )
                                                  • sh03.lua, line 1934: disable_specific_notoriety_group( "deckers", level, "G_Decker_SUV_2S", true )
                                                  dlc2_m02_cellphone_call_wait true
                                                    1
                                                    • dlc2_m02.lua, line 1783: dlc2_m02_cellphone_call_wait( convo.cell_name, convo.recieving, convo.persona_handles[ 1 ] )
                                                    dlc2_m02_clapboards_get true
                                                      1
                                                      dlc2_m02_clapboards_reset true
                                                        1
                                                        dlc2_m02_clapboards_set true
                                                          1
                                                          dlc_achievement_counter_get true
                                                            3
                                                            dlc_achievement_counter_set true
                                                              6
                                                              dlc_gis_film_grain_load true
                                                                7
                                                                dlc_gis_film_grain_unload true
                                                                  12
                                                                  doc true
                                                                    1
                                                                    • cmp_common.lua, line 63: Cmp_specific_doc = -1 -- Handle of specific completion screen doc(mission, activity, stronghold)
                                                                    door_close true
                                                                      39
                                                                      door_is_open true
                                                                        12
                                                                        door_lock true
                                                                          63
                                                                          door_open true
                                                                            109
                                                                            do_nothing true 1
                                                                              drug_effect_clear_override_values true
                                                                                3
                                                                                drug_effect_set_override_values true
                                                                                  10