Garry's Mod

Garry's Mod

ANPlus [BASE] | Replacer Update
 This topic has been pinned, so it's probably important
filz0  [developer] 22 Oct, 2022 @ 6:08pm
[NPC TEMPLATE]
Github (finally figured it out):
https://github.com/filz0/anplus_base

Here's an empty template:
https://github.com/filz0/anplus_base/blob/main/lua/autorun/_template_empty.lua

Template NPC:
https://github.com/filz0/anplus_base/blob/main/lua/autorun/template_npc.lua

Some changes might need you to go back to the main menu for them to load properly.

Ask any questions below.
Last edited by filz0; 2 Feb, 2023 @ 10:01pm
< >
Showing 1-15 of 27 comments
ToastLord 27 Oct, 2022 @ 6:14pm 
Heya; I wanted to try my hand at the sound modification section for a npc_combine_s class npc, in a similar way how you did for the phoenix NPCs. This is the edit I made so far to the sound portion:

['SoundModification'] = { --['OverPitch'] = { 90, 110 }, -- Pitch override for realistic random voices. ['SoundList'] = { [1] = {"npc/combine_soldier/", ['SoundLevel'] = { 20 }, ['Pitch'] = nil, ['Channel'] = nil, ['Volume'] = { 0.3 }, ['Flags'] = 1024, ['DSP'] = 38, ['Replacement'] = nil} }, },

Unfortunately I'm not getting any changes from the combine voice lines, its still the same pitch without the voice-effect as the phoenix NPCs.

Just incase, I've also tried the npc path itself with just
"npc/"
With no dice. Any recommendations on where I might have gone wrong? If needed I can paste bin the entire .lua file.

Appreciate the help
filz0  [developer] 28 Oct, 2022 @ 3:12am 
Sadly Combine Soldiers and Metro police will not work because Lua doesn't detect them emitting any sounds. I've yet to find a way. "EntityEmitSound" hook doesn't pick scripted sequences that they use so unless this is fixed, I can't do much.
Last edited by filz0; 28 Oct, 2022 @ 3:44am
ToastLord 28 Oct, 2022 @ 6:32am 
Ahh, I gotcha. Bummer, I was hoping to make an npc using one of the alyx combine voice lines. But now I know its at least not my lack of coding, but a limit of the game.

Appreciate the help, ill see about experimenting with the vort npcs as well
Bullshit Man 29 Oct, 2022 @ 9:36am 
is their a video tutorial for this mod?
Redox 3 Nov, 2022 @ 6:01am 
Instead of 'if ANPlusLoaded == true then' at the top of these files it'd be better to do 'if ANPlusLoaded then return end'
filz0  [developer] 3 Nov, 2022 @ 6:14am 
Originally posted by Redox:
Instead of 'if ANPlusLoaded == true then' at the top of these files it'd be better to do 'if ANPlusLoaded then return end'
*snort* Ackchyually it would be "if !ANPlusLoaded then return end". But in all seriousness, it's a good point.
melomelo 25 Nov, 2022 @ 2:41am 
Cool mod. If ever, does this addon make a vanilla NPC have certain attributes like being medics? I have a certain NPC whose role is to function as a nurse/doctor by healing people, but they don't. Does this mod make that happen? Thank you!
filz0  [developer] 25 Nov, 2022 @ 3:53am 
if you mean like turning citizens/rebels into medics then yeah.
['KeyValues'] = { citizentype = CT_REBEL, SquadName = "resistance" }, ['SpawnFlags'] = SERVER and bit.bor( SF_NPC_DROP_HEALTHKIT, SF_CITIZEN_MEDIC ) or nil,
Am i dumb or something?

ANPlus removed weapon A from NPC. Weapon is not valid or its BASE has not been installed/enabled.

This weapon does exist and i susable by both npc and player, why doesn't it see it?
What am i missing???

For more context: I am using Simple Weapons: Base (I like it) but it seems to not work with ["DefaultWeapons"] of npc.
Last edited by Заморил деда; 14 Jan, 2023 @ 11:30am
filz0  [developer] 14 Jan, 2023 @ 12:54pm 
That feature will be removed in the next update.
filz0  [developer] 14 Jan, 2023 @ 4:11pm 
While it's still here, ANP checks if a weapon in ["DefaultWeapons"] tab has it's base installed.
filz0  [developer] 14 Jan, 2023 @ 4:12pm 
If not, it gets replaced.
It works kinda janky i think, because it says that even tho weapons base IS installed.
Btw where did combine medic go?
filz0  [developer] 15 Jan, 2023 @ 10:38am 
Removed as it will be moved to the Combine Units Plus. I'm in middle of making the workshop icon.
filz0  [developer] 15 Jan, 2023 @ 10:39am 
Weapon replacement function also has been removed with this update.
< >
Showing 1-15 of 27 comments
Per page: 1530 50