Garry's Mod

Garry's Mod

NPC Daemon
Soldier 16 Mar, 2024 @ 2:55pm
Suggestion
I have a suggestion for <Damage Filter: Outgoing> <condition> <damage>:

A damage condition that checks to see how much damage (within a certain time frame if possible) is dealt to either the victim or the attacker and continuously adds up the damage dealt until it hits a variable "total damage" cap OR the set time frame runs out, which the former passes the condition once enough damage is dealt and the action is executed, and the latter does not pass the condition and the action is therefor not executed.
The time frame could be toggled so that damage will be added up indefinitely until it hits the total damage cap.
Once the total damage cap is reached, the action can be executed, and the damage counter will be reset back to 0, to either reach the damage cap again or disabled once it has reached the counter, with a set amount of times it can reach the damage cap multiple times before disabling.

To summarize:

Total Damage within a variable amount of time in seconds
(e.x., Total Damage that must be reached to execute action = 100)
(Time in seconds for Total Damage to be reached = 5 seconds)

If the timer runs out before the damage dealt can reached, the condition will be failed and the action will not be executed, resulting in the timer and damage counter resetting back to their original values or disabling entirely.

The timer itself can be disabled, and allow for damage to add up forever until the Total Damage is reached.
< >
Showing 1-14 of 14 comments
sockpuppetclock  [developer] 16 Mar, 2024 @ 6:26pm 
That's a nice idea. I'll put it on the todo list
Soldier 16 Mar, 2024 @ 10:06pm 
I forgot to mention that it could also probably work with <Damage Filter: Incoming> as well.
sockpuppetclock  [developer] 18 Mar, 2024 @ 2:52pm 
This is added now, to Attacker/Victim conditions. For now, disabling the condition on success can be done in Damage Filter > Disable After Pass, but I'm still thinking about the best way to do disabling on failure.
Soldier 18 Mar, 2024 @ 4:39pm 
I've been playing around with it and I wonder if this could also work with kills as well? Like a killstreak counter of some sort, could work the same way but just counting how many kills an entity has gotten.
Mister Leeroy 31 Mar, 2024 @ 3:05pm 
An option that replaces the grenade entity the combines throw. A bit like the one that replaces the manhack for the metropolices.
sockpuppetclock  [developer] 31 Mar, 2024 @ 5:12pm 
i put in a WIP, it is really funny when you replace the grenade with another npc
Mister Leeroy 1 Apr, 2024 @ 1:17am 
Oh hell yeah man! they gonna be able to throw my custom grenades now thanks a lot!
Mister Leeroy 10 Apr, 2024 @ 5:01am 
A way to execute console commands. For exemple, in my NPCD profile it's like a one for all. And it would be cool that after a certain amount of kills i do on NPCS it executes a console command.

In my case it would be to change between random maps after a certain amount of kill.

A table random with a list of "changelevel *mapname*"
Ethan 24 Apr, 2024 @ 8:06am 
i like this addon but it could really use mod support
sockpuppetclock  [developer] 27 Apr, 2024 @ 11:10pm 
what would your idea of mod support be? like addon creators making their own values?

i've been considering allowing custom commands or custom lua but i'm worried it'd be too dangerous to let the client run anything they want through the server
Last edited by sockpuppetclock; 27 Apr, 2024 @ 11:12pm
sockpuppetclock  [developer] 18 May, 2024 @ 5:26pm 
Originally posted by Mister Leeroy:
A way to execute console commands. For exemple, in my NPCD profile it's like a one for all. And it would be cool that after a certain amount of kills i do on NPCS it executes a console command.

In my case it would be to change between random maps after a certain amount of kill.

A table random with a list of "changelevel *mapname*"
I added "Entity Functions" as a value and damage filter action. you should be able to run the function ConCommand on players, which is at least safer than directly having the server run any concommand
Last edited by sockpuppetclock; 18 May, 2024 @ 5:27pm
Soldier 18 May, 2024 @ 5:33pm 
Originally posted by sockpuppetclock:
Originally posted by Mister Leeroy:
A way to execute console commands. For exemple, in my NPCD profile it's like a one for all. And it would be cool that after a certain amount of kills i do on NPCS it executes a console command.

In my case it would be to change between random maps after a certain amount of kill.

A table random with a list of "changelevel *mapname*"
I added "Entity Functions" as a value and damage filter action. you should be able to run the function ConCommand on players, which is at least safer than directly having the server run any concommand
How does this work exactly?
sockpuppetclock  [developer] 18 May, 2024 @ 5:48pm 
Originally posted by barnbuilder1785:
How does this work exactly?
https://wiki.facepunch.com/gmod/Player:ConCommand
it runs a given string as a console command on the player.

this would only work if called on a player, so for example in Damage Filter > Actions: Victim > Entity Functions
the value would have an entry like Function = "ConCommand", Arguments = "changelevel gm_flatgrass"
Last edited by sockpuppetclock; 18 May, 2024 @ 5:50pm
sockpuppetclock  [developer] 29 May, 2024 @ 5:39pm 
i added a condition for cumulative kills, finally
< >
Showing 1-14 of 14 comments
Per page: 1530 50