Garry’s Mod – How To Use Custom Models for Background NPCs

Garry’s Mod – How To Use Custom Models for Background NPCs 1 - wpgameplay.com
Garry’s Mod – How To Use Custom Models for Background NPCs 1 - wpgameplay.com

Guide for Garry’s Mod – How To Use Custom Models for Background NPCs

Method to change the default models on the ‘Background NPCs’ to custom models from the workshop.

 

What you will need

In order to change the NPC models, you’ll require to have the 1.3 version. (Preferably the experimental version) That can be downloaded from here:
https://github.com/Shark-vil/background-citizens/releases/tag/1.3-experemental

You will also need the model that you want. These can be downloaded off of the workshop.

 

Changing the default models

Once you have downloaded the file, you must place it in your ‘addons’ folder. This is found here:

 steamapps\common\GarrysMod\garrysmod\addons

This will allow you to use the addon. Make sure you disable the workshop release.
The file ‘background-citizens-1.3-experemental’ should be in the addons folder.

In this folder select: lua>bg_citizens_core_sh_config.lua. ‘sh_config.lua’ is the configuration file for the addon, this is what you will edit. Upon opening, you will be prompted to choose a program to open it with. Choose Wordpad.

Make your way to the section here: (The highlighted text are the directories for the default models)

Garry’s Mod – How To Use Custom Models for Background NPCs 2 - gameplaylists.com
Garry’s Mod – How To Use Custom Models for Background NPCs 2 – gameplaylists.com

 

The text

 models/smalls_civilians/pack1/hoodie_male_0x_f_npc.mdl

and

 models/smalls_civilians/pack1/zipper_female_0x_f_npc.mdl

are the default citizen models. In order to change models, you must replace these with your desired model.

You may also want to change the rebel models as well. The same thing is done, but the models are just below. (Highlighted text is the rebel models)

Garry’s Mod – How To Use Custom Models for Background NPCs 3 - gameplaylists.com
Garry’s Mod – How To Use Custom Models for Background NPCs 3 – gameplaylists.com

The text

 models/survivors/npc/x.mdl

are the default rebel models. Change these with your desired model(s).

 

Finding your custom model directory via the addon section

Your models downloaded off of the workshop will end up in the same ‘addons’ folder that you placed your other folder into.

 steamapps\common\GarrysMod\garrysmod\addons

All the files here (except the folder that you just added) are .gma files. While opening these you should use Wordpad, but don’t modify them. All you need is the location of the .mdl file. Most NPC files will have a section that says:

 local NPC =

below this is the information. All you need is the model directory. You will see a section that says

 Model = "models/x.mdl"

This is the directory for the model. Copy this and replace the aforementioned default models.

 

**This is for NPCs – if you’re just ripping a ragdoll or a player model; you just need to search throughout the .gma file until you find the models/x.mdl file. I do not recommend just using a ragdoll, however, because they might not be able to move, and are just generally buggy.

Once you have replaced the default models, above it, there will be a flag called

 defaultModels =

This will be set as true. Replace this with ‘false’. Not replacing this will cause the default NPCs to spawn alongside you custom ones.

Garry’s Mod – How To Use Custom Models for Background NPCs 4 - gameplaylists.com
Garry’s Mod – How To Use Custom Models for Background NPCs 4 – gameplaylists.com

Once you’re done the section should read:
(for citizens)

 -- NPC classes that fill the streets
bgNPC.npc_classes = {
{
class = 'npc_citizen',
type = 'citizen',
fullness = 85,
team = { 'residents' },
weapons = {'weapon_pistol', 'weapon_357'},
money = { 0, 250 },
defaultModels = false,
models = {
'models/YOURCUSTOMMODEL(s).mdl',
},

(and for rebels)

        class = 'npc_citizen',
        type = 'gangster',
        fullness = 10,
        team = { 'bandits' },
        weapons = {'weapon_shotgun', 'weapon_ar2'},
        money = { 0, 500 },
        defaultModels = false,
        models = {
 'models/YOURCUSTOMMODELS(s).mdl',
        },

 

 

Save this and go into the game. It should have replaced rebels and citizens with your custom characters. As of 2021/1/20; there is no way to change the police model.

 

 

Bugs (and fixes)

 

No NPCs are showing up

If while editing the file, it sometimes gives you the prompt to save as ‘text only’ because of a ‘format issue’, don’t. This will cause the bug. To avoid this issue; don’t copy whole paragraphs of character files, do it one by one. I don’t know why, but doing this, I was able to avoid this issue and have dozens of character models.

 

NPCs Don’t Move

This tends to happen randomly with some models. I have tried many, and it seems like ragdolls w/o NPCs can cause it, but even still, some NPCs still refuse to move. I don’t know what causes this, so it may just be up to trial and error, to see which work, and which don’t.

 

There is an error message on the top left

I do not know how to fix this. If you do, please tell me.

By Nekro Minh

I hope you enjoy what we shared today about Garry’s Mod – How To Use Custom Models for Background NPCs. If there is anything, you want us to add, please let us know via the comment below! See you soon! And thanks!


Be the first to comment

Leave a Reply

Your email address will not be published.


*