NPC Proficiency 2

So I found this old addon, fixed it up a bit, and now I’ll be releasing it. I doubt I’ll be working on this much anymore, if any lua coders want to fix something up/add things feel free to do so.

I’ve created a menu that lists all of the npcs and proficiencies.

Console commands are:
Manually set the proficiency.


npc_prof [NPC_NAME] [PROFICIENCY]

Open the menu pictured above.


npc_prof_menu

Download


**This ONLY affects NPCs that hold guns!**

http://www.garrysmod.org/img/?t=dll&id=102516

I wish there were a way to change the range at which npcs saw/attacked you.

Awesome add-on, mate! You’ve got my DL!

It doesn’t improve that much, but when you set the rebel accuracy to horrible and combine to perfect, you got yourself a fairer match!

Ok this improves combine accuracy a shitload. Now they feel like real supersoldiers! :slight_smile:

Same here, maps that are anything more than CQC are a cakewalk because you can engage without them retaliating.

How would you integrate this into a swep when an npc uses it? I’m having trouble with SetCurrentWeaponProficiency getting an error when spawned on an npc saying that it is a nil value?

That should not be hard to to. There is a flag for all npc entitys in source that you can check called “long visibility/shoot”. Npcs have this turned off by default which explaines why they don’t shoot far when spawned in gmod. I think all that needs to be done is for someone to make an addon that changes the flag whenever an npc is spawned.

FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU-doesn’t work for me, just like the previous version. Same, exact error.
weapons\gmod_tool\stools/npcproficiency.lua:31: attempt to call method ‘GetCurrentWeaponProficiency’ (a nil value)
Because of this, the proficiency choices don’t even show up.

Awesome! I thought you forgot about me asking you to find this, and then you make a V2. Now if only I hadn’t uninstalled gmod yesterday…

Man, I’m in GMod right now (I’m using the Steam Overlay Browser to post this), and I got the PlayerFactions mod.
It allows me to switch sides between Combine, Rebel or Zombies, based on my playermodel.
The problem is that I’d get literally OWNED if I’m on Combine.
What I just did is that I set the Combine guys’ proficiency on “perfect”, and they LITERALLY TEAR AWAY the rebels!
Thanks!! I’ve been looking for something to make the Combine awesome and more challenging to the others!

This doesn’t even have a stool, remove the old version.

Right. Sorry.

[editline]10:57AM[/editline]

Sigh… lua error:
Hook ‘NPC Proficiency’ Failed: autorun/NPCProflist.lua:125: attempt to call method ‘SetCurrentWeaponProficiency’ (a nil value)
Picture:

Im getting the same error when I use the SetCurrentWeaponProficiency function on my new sweps D:

What does this even do?

It changes how accurate NPCs are with weapons.

Oh, could you please make it so that it saves your preferences for this script?
Doesn’t seem to remember my settings.

Nevermind, I figured it out. Read a bit more lul.

Could you explain a little more? What weapon was the NPC holding, what did you try changing the proficiency to.

Npc was holding all the possible guns. I didn’t even get to see the proficiency choices because the function failed. I even left the npc with no weapon, as seen in the picture.