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)
fade_get_percent true
    6
    fade_in true
      51
      fade_in_block true 1 12
      fade_out true
        51
        fade_out_block true 1 15
        feedback_start true
          1
          • bh03.lua, line 1945: feedback_start(GEIGER_FEEDBACK, GEIGER_MIN_FEEDBACK + ratio * (1 - GEIGER_MIN_FEEDBACK), false, sync)
          finishers_disable true
            1
            finishers_enable true
              1
              flee true
                7
                flee_to_navpoint true
                  2
                  follower_is_unconscious true
                    10
                    follower_make_independent true
                      47
                      force_ai_mode_check_done true
                        4
                        force_fire true 1 10
                        force_fire_do true
                          1
                          force_fire_object_position true 1 1
                          force_fire_object_position_do true
                            1
                            force_fire_pull_alt_trigger true
                              1
                              force_fire_target true 1 1
                              force_fire_target_do true
                                2
                                force_melee true
                                  1
                                  force_throw true 1 3
                                  force_throw_char true 1 11
                                  force_throw_char_do true
                                    2
                                    force_throw_do true
                                      2
                                      force_throw_from_vehicle true
                                        3
                                        format_cash true 1 35
                                        format_cash_add_padding true 1
                                          format_clock true 1
                                            format_int_to_string true
                                              1
                                              fov_check true
                                                2
                                                • tss03.lua, line 477: if (not PERFORMING_COMPLIMENT and (fov_check(name, LOCAL_PLAYER) > 0.0) and los_check(name, LOCAL_PLAYER)) then
                                                • tss03_demo.lua, line 447: if (not PERFORMING_COMPLIMENT and (fov_check(name, LOCAL_PLAYER) > 0.0) and los_check(name, LOCAL_PLAYER)) then
                                                fov_check_xz_plane true
                                                  1
                                                  • em01.lua, line 1355: while (vehicle_exists(heli) and character_exists(target_human) and not fov_check_xz_plane(heli, target_human, 10.0)) do
                                                  framerate_get_dump_tag true
                                                    16
                                                    framerate_test_should_play_effects true
                                                      32
                                                      framerate_test_should_run_continuously true
                                                        16