Saints Row 2 Function Reference

Local functions

These functions are defined within the patch lua files. They are assumed to be only available within the file that defines them or by including the file in another script.

Some of these functions may essentially be global since their files are always loaded; which files (and which functions) haven't been determined yet.

Function name Global Defined in Examples from patch (click blue number to expand)
limit false 1 4
  • main_menu.lua, line 2570: first_vis_item = limit(new_idx - half_max, 0, num_items - FIND_SERVER_MAX_ITEMS)
  • menu_base.lua, line 3179: first_vis_item = limit(new_item - half_max, 0, Menu_active.num_items - Menu_option_labels.max_rows)
  • pause_menu.lua, line 3817: first_vis_item = limit(new_idx - half_max, 0, active_pane.num_items - PLAYLIST_MAX_ITEMS)
  • vehicle_cust.lua, line 271: first_vis_item = limit(Menu_active.highlighted_item - half_max, 0, Menu_active.num_items - Menu_option_labels.max_rows)
liquor_store_add_items false 1
    liquor_store_cleanup false 1
      liquor_store_confirm_selection false 1
        liquor_store_delayed_food_highlight false 1
          liquor_store_exit false 1
            liquor_store_exit_confirm false 1
              liquor_store_exit_final false 1
                liquor_store_get_menu_data false 1
                  liquor_store_init false 1
                    liquor_store_init_store false 1
                      liquor_store_nav_item false 1
                        liquor_store_player_cash_update false 1
                          liquor_store_release false 1
                            liquor_store_select_item false 1
                              liquor_store_sort_swatches false 1 1
                              liquor_store_update_swatch false 1
                                los_check false 1 6
                                • bh10.lua, line 550: if not character_is_dead(LOS_DUMMIES[i-1]) and not los_check(LOCAL_PLAYER, LOS_DUMMIES[i-1]) and get_dist_char_to_nav(LOCAL_PLAYER, LOS_DUMMIES[i-1]) > 75 then
                                • tss03.lua, line 477: if (not PERFORMING_COMPLIMENT and (fov_check(name, LOCAL_PLAYER) > 0.0) and los_check(name, LOCAL_PLAYER)) then
                                • tss03.lua, line 581: if ((get_dist_char_to_char(human, LOCAL_PLAYER) < 25.0) and los_check(human, LOCAL_PLAYER)) then
                                • tss03.lua, line 591: if ((get_dist_char_to_char(human, REMOTE_PLAYER) < 25.0) and los_check(human, REMOTE_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
                                • tss03_demo.lua, line 548: if ((get_dist_char_to_char(human, LOCAL_PLAYER) < 25.0) and los_check(human, LOCAL_PLAYER)) then
                                lua_play_anim false 1 247
                                lua_play_tween false 1