NPC Scripts

What gcf files/folders are the source npcs located? I’m talking about barney, zombie, scanner, etc. scripts.

If you mean Lua scripts there are none. They are coded in C++ and (AS FAR AS I KNOW) their source is not normally available.

I know they arn’t in lua, they’re in .txt files, but I’m pretty sure they exist. I swear I’ve found them before, but I can’t find them now.

EDIT: Okay, I was thinking of the sound.txt files. I think I found the scripts, but they’re in dsp format -_-
What program do I need to open dsp?

if you’re wondering how to create a custom snpc for gmod then you could download a cutom npc and check out it’s LUA script and change out whatever is in it to make a custom one and save it as the name of your npc. I did it with the fear rifle swep and made an admin auto-shotty ;D

He means the code of the NPC spawn menu

My current question is “How do I open a .dsp file?” I’ve already figured out that I’m going to have to extract the basic ncps scripts from the dsp, modify them to my liking, and then saving them again.

Notepad will do, but that won’t help you since you can NOT in any way modify the source of these NPCs. Your only option is creating a new mod, this can’t be done in Garrys’s Mod.

I’m not trying to be unhelpful, it’s just the truth.

You’re not being unhelpful, you’re making me consider more factors. I figured I could make an addon folder and thrown the scripts in there, and then make an npc list with the npcs from the scripts.

Hmm, Notepad did work, but the file I had didn’t contain what I was looking for, dang.
Has anybody found where the scripts are located? I tried the “hl2_scripts,” but it just named everything. I’m looking for something simular to the lua scripts for SNPCS.

I’m only trying to modify the models, because if you try to make an npc list with say, a barney npc, but you try to change the model, it won’t change. I hope this info helps people help me.

I’ll just restate it. Those scripts don’t exist because they’re not scripts. :smile: They’re compiled into the game and there is nothing you can do to alter them. The best you can do (And to a certain degree of ease) is create a SNPC that has the exact same behavior.

And if changing the model is all you want you can spawn Barney and then change his model (it works) but don’t expect that new model to have all of barney’s special animations.

Oh, okay. So if I really was desperate to make a stand alone roller mine I’d have to decompile the actually game, which is illegal. I wanted to make a non-advance dupe npc spawn list, but it doesn’t seem like that’ll happen.
Thank you for the help.