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)
effect_play true
    42
    effect_play_finisher true
      3
      effect_play_on_human true
        25
        • dlc2_m02.lua, line 2929: --effect_play_on_human( "Effect BloodHit", target_npc, "Head" )
        • dlc2_m02.lua, line 3052: local shock_effect_handle = effect_play_on_human( "vfx_electric_body", homie, "spine2", true )
        • dlc2_m02.lua, line 3395: local shock_effect_handle = effect_play_on_human( "vfx_electric_body", npc, "spine2", true )
        • m02.lua, line 2908: M02_vfx.skydive_player_clouds.handles[1] = effect_play_on_human(M02_vfx.skydive_player_clouds.nav, LOCAL_PLAYER, nil, true, SYNC_LOCAL)
        • m02.lua, line 2918: M02_vfx.skydive_player_clouds.handles[2] = effect_play_on_human(M02_vfx.skydive_player_clouds.nav, REMOTE_PLAYER, nil, true, SYNC_REMOTE)
        • m02.lua, line 2930: M02_vfx.skydive_player_slow_clouds.handles[1] = effect_play_on_human(M02_vfx.skydive_player_slow_clouds.nav, LOCAL_PLAYER, nil, true, SYNC_LOCAL)
        • m02.lua, line 2940: M02_vfx.skydive_player_slow_clouds.handles[2] = effect_play_on_human(M02_vfx.skydive_player_slow_clouds.nav, REMOTE_PLAYER, nil, true, SYNC_REMOTE)
        • m02.lua, line 3322: local handle = effect_play_on_human(M02_vfx.skydive_player_streamers.nav, character_name, attach_point, looping, SYNC_LOCAL)
        • m02.lua, line 3677: M02_vfx.skydive_cloud_puff.handle = effect_play_on_human(M02_vfx.skydive_cloud_puff.nav, LOCAL_PLAYER, nil, false)
        • m08.lua, line 809: effect_play_on_human( "Effect BloodHit", M08_group.pierce.npcs[ 1 ], "Head" )
        • m16.lua, line 1513: effect_play_on_human(m16_vfx_spawn, LOCAL_PLAYER)
        • m16.lua, line 1515: effect_play_on_human(m16_vfx_spawn, REMOTE_PLAYER)
        • m16.lua, line 2610: effect_play_on_human(m16_vfx_deckers_damaged, member, "Head", true)
        • m16.lua, line 2612: effect_play_on_human(m16_vfx_deckers_attacking, member, "Head", true)
        • m16.lua, line 2618: effect_play_on_human(m16_vfx_spawn, member)
        • m16.lua, line 2691: effect_play_on_human(m16_vfx_spawn, LOCAL_PLAYER)
        • m16.lua, line 2693: effect_play_on_human(m16_vfx_spawn, REMOTE_PLAYER)
        • m16.lua, line 3114: effect_play_on_human(m16_vfx_despawn, npc_name)
        • m16.lua, line 3660: effect_play_on_human(m16_vfx_spawn, LOCAL_PLAYER)
        • m16.lua, line 3662: effect_play_on_human(m16_vfx_spawn, REMOTE_PLAYER)
        • m16.lua, line 3694: effect_play_on_human(m16_vfx_avatar_spawn, player)
        • m18.lua, line 2275: M18_vfxs.clouds.handle = effect_play_on_human(M18_vfxs.clouds.nav, LOCAL_PLAYER, nil, true, SYNC_ALL)
        • m18.lua, line 3940: M18_vfxs.random_clouds.handle = effect_play_on_human(M18_vfxs.random_clouds.nav, LOCAL_PLAYER, nil, false, SYNC_LOCAL)
        • m18.lua, line 3942: M18_vfxs.random_clouds_remote.handle = effect_play_on_human(M18_vfxs.random_clouds_remote.nav, REMOTE_PLAYER, nil, false, SYNC_REMOTE)
        • m24.lua, line 1871: effect_play_on_human( "Effect BloodHit", homie, "Head" )
        effect_play_on_script_object true
          26
          • dlc2_m01.lua, line 2702: Dlc2_m01_vfx.player_heli_fire.handle = effect_play_on_script_object(Dlc2_m01_vfx.player_heli_fire.name, Dlc2_m01_groups.kwilanna_heli.heli.vehicle, "exhaust", true)
          • m02.lua, line 2459: M02_vfx.debris_fire.box_handles[i] = effect_play_on_script_object(M02_vfx.debris_fire.name, box, nil, true)
          • m02.lua, line 2626: M02_vfx.debris_fire.dive_box_handles[i] = effect_play_on_script_object(M02_vfx.debris_fire.name, box, nil, true)
          • m02.lua, line 3560: vehicle_table.fire_handle = effect_play_on_script_object(M02_vfx.debris_fire.name, vehicle_table.name, nil, true)
          • m02.lua, line 3577: vehicle_table.fire_handle = effect_play_on_script_object(M02_vfx.debris_fire.name, vehicle_table.name, nil, true)
          • m06.lua, line 1567: --M06_effects.ball_effect.effect_handle = effect_play_on_script_object(M06_effects.ball_effect.name, M06_group.ball.vehicle, nil, looping)
          • m06.lua, line 1568: M06_effects.ball_effect.effect_handle = effect_play_on_script_object(M06_effects.ball_effect.name, LOCAL_PLAYER, nil, looping)
          • m11.lua, line 1697: effect_play_on_script_object("Vfx Mis11 Big Engine Fire 001", M11_groups.air_base.final_plane.vehicle, nil, true)
          • m16.lua, line 1684: effect_play_on_script_object(m16_vfx_forcefield_destroyed, M16_movers.gate1)
          • m16.lua, line 1975: effect_play_on_script_object(m16_vfx_forcefield_destroyed, M16_movers.gate2)
          • m16.lua, line 2135: effect_play_on_script_object(m16_vfx_forcefield_destroyed, M16_movers.gate3)
          • m16.lua, line 2172: effect_play_on_script_object(m16_vfx_forcefield_destroyed, M16_movers.final_gate_mover)
          • m16.lua, line 3239: effect_play_on_script_object(m16_vfx_avatar_spawn, M16_vehicles.tank_combat_player_tank_two)
          • m16.lua, line 3254: effect_play_on_script_object(m16_vfx_avatar_spawn, M16_vehicles.tank_combat_player_tank_one)
          • m16.lua, line 3273: effect_play_on_script_object(m16_vfx_avatar_spawn, M16_vehicles.tank_combat_npc_tank_one)
          • m16.lua, line 3287: effect_play_on_script_object(m16_vfx_avatar_spawn, M16_vehicles.tank_combat_npc_tank_two)
          • m16.lua, line 3300: effect_play_on_script_object(m16_vfx_forcefield_destroyed, mover)
          • m18.lua, line 2303: M18_runtime.debirs_fire_handles[#M18_runtime.debirs_fire_handles + 1] = effect_play_on_script_object(M18_vfxs.debris_fire.nav, debris, nil, true)
          • m18.lua, line 2644: M18_runtime.debirs_fire_handles[#M18_runtime.debirs_fire_handles + 1] = effect_play_on_script_object(M18_vfxs.debris_fire.nav, victim, nil, true)
          • m18.lua, line 2804: M18_runtime.debirs_fire_handles[#M18_runtime.debirs_fire_handles + 1] = effect_play_on_script_object(M18_vfxs.debris_fire.nav, debris, nil, true)
          • m18.lua, line 2825: M18_vfxs.cargo_plane_smoke.handle = effect_play_on_script_object(M18_vfxs.cargo_plane_smoke.nav, M18_groups.stag_cargo_plane.planes[1].plane, "headlight_glare", true, SYNC_ALL, 2)
          • m18.lua, line 2833: M18_vfxs.cargo_plane_smoke.handle = effect_play_on_script_object(M18_vfxs.stag_cargo_plane_explosion.nav, M18_groups.stag_cargo_plane.planes[1].plane, "headlight_glare", true, SYNC_ALL, 2)
          • m18.lua, line 3551: tank_group.contrail_handles[1 + (i - 1) * 2 + j] = effect_play_on_script_object(M18_vfxs.tank_streamers.nav, tank_group.tank, tag, true, SYNC_ALL, (j + 1))
          • m18.lua, line 3753: vehicle_table.fire_handle = effect_play_on_script_object(M18_vfxs.debris_fire.nav, vehicle_table.tank, nil, true)
          • m18.lua, line 3771: vehicle_table.fire_handle = effect_play_on_script_object(M18_vfxs.debris_fire.nav, vehicle_table.tank, nil, true)
          • m19.lua, line 2132: effect_play_on_script_object(M19_container_splash_effect, container.script_mover_name)
          effect_stop true
            72
            element_get_actual_size true 1 173
            element_get_scale_from_size true 1 6
            element_set_actual_size true 1 80
            enemy_set_cleanup true 1 4
            enemy_set_setup true 1 3
            error true
              4
              exit true
                1
                explosion_create true
                  44
                  • dlc2_m01.lua, line 3326: explosion_create("Medium Bang", Dlc2_m01_navpoints.alien_ambush_explosions[1], nil, false)
                  • dlc2_m01.lua, line 3331: explosion_create("Medium Bang", Dlc2_m01_navpoints.alien_ambush_explosions[2], nil, false)
                  • dlc2_m01.lua, line 3338: explosion_create("Medium Bang", Dlc2_m01_navpoints.alien_ambush_explosions[3], nil, false)
                  • dlc2_m01.lua, line 3354: explosion_create("Medium Bang", Dlc2_m01_navpoints.alien_ambush_explosions[4], nil, false)
                  • dlc2_m01.lua, line 3371: explosion_create("Medium Bang", Dlc2_m01_navpoints.alien_ambush_explosions[5], nil, false)
                  • dlc2_m01.lua, line 3376: explosion_create("Medium Bang", Dlc2_m01_navpoints.alien_ambush_explosions[6], nil, false)
                  • dlc2_m01.lua, line 3388: explosion_create("Medium Bang", Dlc2_m01_navpoints.alien_ambush_explosions[7], nil, false)
                  • dlc2_m01.lua, line 3393: explosion_create("Medium Bang", Dlc2_m01_navpoints.alien_ambush_explosions[8], nil, false)
                  • dlc2_m02.lua, line 1092: explosion_create( "alien_mindcontrol", nav, nil, nil, "vfx_mindcontrol_exp" )
                  • dlc2_m02.lua, line 1413: explosion_create( "alien_mindcontrol", nav, LOCAL_PLAYER, nil, "vfx_mindcontrol_exp" )
                  • dlc2_m02.lua, line 3085: explosion_create( "alien_mindcontrol", "nav_generator_explosion", LOCAL_PLAYER, nil, "vfx_mindcontrol_exp" )
                  • dlc2_m03.lua, line 1563: explosion_create("Plane", explosion)
                  • dlc2_m03.lua, line 1728: explosion_create("Plane", explosion)
                  • dlc2_m03.lua, line 2173: explosion_create("RPG-NPC", explosion)
                  • m01.lua, line 1831: explosion_create("Flashbang", LOCAL_PLAYER, M01_group.swat2_pair.members[1], false)
                  • m01.lua, line 1834: explosion_create("Flashbang", REMOTE_PLAYER, M01_group.swat2_pair.members[1], false)
                  • m01.lua, line 3438: explosion_create("M1_StatueExp", "horsie_nav", M01_group.start_homies.gat, explode_source)
                  • m02.lua, line 3580: vehicle_table.exp_handle = explosion_create("Mission02 Car Exp", vehicle_table.name, nil, true, "vfx_car_explosion 001")
                  • m05.lua, line 1305: explosion_create( "Barrel Exp", M05_movers[ 1 ], LOCAL_PLAYER )
                  • m09.lua, line 3774: explosion_create("Flashbang", crate.door, player)
                  • m10.lua, line 1544: explosion_create("Flashbang", M10_groups.stag_ambush.flashbang_throwers.targets[i], char, false)
                  • m17.lua, line 2016: explosion_create(M17_explosions.effect[rand_int(1, 2)], effect_nav)
                  • m17.lua, line 2228: explosion_create("Molotov Explosion", M17_group.hanger.npcs[2])
                  • m17.lua, line 2229: explosion_create("Molotov Explosion", M17_group.hanger.npcs[3])
                  • m17.lua, line 2273: explosion_create(M17_explosions.effect[rand_int(1, 2)], get_random_table_entry(M17_explosions.reactor))
                  • m17.lua, line 2275: explosion_create(M17_explosions.effect[rand_int(1, 2)], get_random_table_entry(M17_explosions.hall))
                  • m17.lua, line 2277: explosion_create(M17_explosions.effect[rand_int(1, 2)], get_random_table_entry(M17_explosions.deck))
                  • m17.lua, line 2610: explosion_create("Flashbang", M17_nav_barricade[i], char, false)
                  • m17.lua, line 2634: explosion_create(M17_explosions.effect[1], M17_group.ehall.explosion[1], nil, false)
                  • m17.lua, line 2656: explosion_create(M17_explosions.effect[1], M17_group.ehall.explosion[2], nil, false)
                  • m17.lua, line 2691: explosion_create("Molotov Explosion", npc)
                  • m17.lua, line 2702: explosion_create("Molotov Explosion", M17_group.fire.script[1][4])
                  • m17.lua, line 2704: explosion_create("Molotov Explosion", M17_group.fire.script[1][2])
                  • m17.lua, line 2795: explosion_create(M17_explosions.effect[2], dude, nil, nil, nil, 1.0)
                  • m18.lua, line 2810: explosion_create("Car Bomb Big", M18_vfxs.stag_cargo_plane_explosion.nav)
                  • m18.lua, line 3033: explosion_create("Tank_Rpg", LOCAL_PLAYER, M18_groups.skydiving_tank.tank_group.chars[1], false)
                  • m18.lua, line 3775: vehicle_table.exp_handle = explosion_create("Mission02 Car Exp", vehicle_table.tank, nil, true, M18_vfxs.car_exp.nav)
                  • m23.lua, line 1236: explosion_create("VTOL_M_Exp-NPC", character)
                  • m23.lua, line 1998: explosion_create("M23_daedalus_cannon_exp", found_gun.death_vfx)
                  • m23.lua, line 2656: explosion_create(M23_explosions.effect, explosion)
                  • m23.lua, line 2732: explosion_create(M23_explosions.effect, get_random_table_entry(M23_explosions.self_destruct_explosions))
                  • m23.lua, line 2741: explosion_create(M23_explosions.effect, get_random_table_entry(M23_explosions.vtol_escape_explosions))
                  • m23.lua, line 2934: explosion_create("VTOL_M_Exp-NPC", human)
                  • m23.lua, line 3198: --explosion_create("M23_daedalus_cannon", effect_nav, nil, false, effect_nav)