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)
notoriety_allow_indoor_gang_spawning true
    2
    notoriety_force_no_spawn true
      147
      notoriety_get true
        8
        notoriety_get_decimal true
          17
          notoriety_reset true
            23
            notoriety_reset_vehicle_count true 1
              notoriety_restricted_zones_enable true
                2
                notoriety_set true
                  93
                  notoriety_set_can_decay true
                    5
                    notoriety_set_desired_vehicle_count true
                      14
                      notoriety_set_max true
                        124
                        notoriety_set_min true
                          121
                          npc_combat_enable true
                            59
                            npc_detection_enable true
                              3
                              npc_dont_auto_equip_or_unequip_weapons true
                                6
                                npc_do_drugs true
                                  1
                                  npc_enable_human_collision true
                                    2
                                    npc_follow_npc true
                                      4
                                      npc_go_idle true
                                        28
                                        npc_hearing_enable true
                                          2
                                          npc_holster true
                                            1
                                            npc_in_player_fov true
                                              4
                                              npc_is_in_party true
                                                5
                                                npc_leash_remove true
                                                  33
                                                  npc_leash_set_unbreakable true
                                                    6
                                                    npc_leash_to_nav true
                                                      25
                                                      npc_max_corpses_override true
                                                        1
                                                        npc_max_corpses_reset true
                                                          1
                                                          npc_respawn_after_death true
                                                            12
                                                            npc_respawn_after_death_time_override true
                                                              8
                                                              npc_respawn_dist_override true
                                                                7
                                                                npc_respawn_dist_reset true
                                                                  8
                                                                  npc_revive true
                                                                    4
                                                                    npc_set_boss_always_defend true
                                                                      2
                                                                      npc_set_boss_type true
                                                                        4
                                                                        npc_stop_following true
                                                                          10
                                                                          npc_suppress_persona true
                                                                            13
                                                                            npc_unholster_best_weapon true
                                                                              22
                                                                              npc_use_closest_action_node_of_type true
                                                                                15
                                                                                npc_weapon_pickup_override true
                                                                                  16
                                                                                  npc_weapon_spread true
                                                                                    59