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