Skip to content


How to add or change NPC parameters?

1. Download one of the ready-made examples:

2. Place the example in the game folder:

  • ..\GarrysMod\garrysmod\addons

3. Change the name of the files and folders to your own. Example:

  • bgn_my_custom_models\lua\background_npcs_core\custom_modules\config\mynick_folder\sh_my_custom_module.lua

You can just put the file in the "config" folder, but then it is recommended to come up with a more unique file name:

  • bgn_my_custom_models\lua\background_npcs_core\custom_modules\config\sh_mynick_my_custom_module.lua

4. See the standard config for orientation:


5. Add your parameters to your lua script. Example:

    -- Gets the config of the actor with the ID Key "citizen"
    local citizen = bgNPC.cfg.npcs_template['citizen']
    -- Change or add parameters:
    citizen.random_skin = true
    citizen.random_bodygroups = true
    citizen.models = {

6. If you're done and want to upload the configuration to the workshop, use any of these tutorials: