Garry's Mod

Garry's Mod

375 ratings
[SEF] Status Effect Framework
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Roleplay, Scenic
File Size
Posted
Updated
2.643 MB
Jul 3, 2024 @ 4:02pm
Mar 13 @ 3:32pm
35 Change Notes ( view )

Subscribe to download
[SEF] Status Effect Framework

In 1 collection by Aaron
Official SEF List
8 items
Description
Status Effect Framework

Bugs, ideas etc. post here on "Issues" tab: https://github.com/Aaronek10/SEF
Whole documentation which is up to date: https://github.com/Aaronek10/SEF/wiki

Support Server: https://discord.gg/d2m2Rgky66


Status Effect Framework (SEF) is an addon for Garry's Mod that allows Developers to apply various status effects to players, NPCs, and other entities. These effects can either buff or debuff the entity, altering their abilities and attributes.


DISCLAIMER!!!
Addon does nothing on it's own. Count it as library/expansion for other addons to work. You can still use commands like SEF_GiveEffect or SEF_GivePassive if you want to use included effects.





Built-in Status Effects
Name
Type
Description
Effect
Healing
BUFF
You are regenerating a certain amount of HP each 0.3 sec.
Regenerates health over time.
Health Boost
BUFF
Your max health has been increased by a certain amount of HP.
Increases the entity's maximum health.
Energized
BUFF
You are regenerating shield each 0.3 sec. [Max Armor: specified amount]
Regenerates armor over time up to a maximum value.
Broken
DEBUFF
Your health is capped at a certain amount of HP.
Limits the maximum health of the entity.
Exposed
DEBUFF
Received damage is doubled.
Increases the damage taken by the entity.
Endurance
BUFF
Received damage is reduced by 50%.
Reduces the damage taken by the entity.
Haste
BUFF
Your movement speed is increased by a certain amount of units.
Increases the movement speed of the entity.
Exhaust
DEBUFF
You are tired. Your speed can't be increased.
Limits the movement speed of the entity.
Hindered
DEBUFF
Your movement speed is decreased by a certain amount of units.
Decreases the movement speed of the entity.
Bleeding
DEBUFF
You are bleeding. You are losing a certain amount of HP each 0.3 sec.
Causes the entity to lose health over time.
Incapacitated
DEBUFF
You are unable to use any weapons or tools.
Prevents the entity from using weapons or tools.
Tenacity
BUFF
You've become immune to negative effects. Debuffs are 75% shorter.
Reduces the duration of debuffs by 75%.
Bloodlust
BUFF
You are hungry for blood! Damage you deal is increased by a certain percentage. Percentage of dealt damage is received as healing.
Increases damage dealt and converts a percentage of damage dealt into health.
Stunned
DEBUFF
You are unable to move or do any action.
Prevents movement and actions.
Wither
DEBUFF
You are losing a certain amount of HP each specified amount of seconds.
Causes the entity to lose health over time.
Discharge
DEBUFF
You are losing a certain amount of shield each specified amount of seconds.
Causes the entity to lose shield over time.
Poison
DEBUFF
You are losing a certain amount of HP each 0.5 sec. You can't heal.
Causes the entity to lose health over time and prevents healing in anyway.
Blindness
DEBUFF
Your vision is severely impaired.
Reduces the entity's vision, making it difficult to see or aim.




Developer Functions


ApplyEffect
Usage: entity:ApplyEffect(effectName, time, ...)
Description: Applies a specified effect to the entity for a given amount of time with optional additional arguments.


RemoveEffect
Usage: entity:RemoveEffect(effectName)
Description: Immediately removes a specified effect from the entity.


SoftRemoveEffect
Usage: entity:SoftRemoveEffect(effectName)
Description: Softly removes a specified effect from the entity, allowing for potential cleanup actions.

ApplyPassive
Usage: entity:ApplyPassive(passiveName)
Description: Applies passive which is permament (won't be removed on player's death).

RemovePassive
Usage: entity:RemovePassive(passiveName)
Description: Removes passive from entity.

HaveEffect
Usage: entity:HaveEffect(effectName)
Description: Checks if the entity currently has the specified effect applied.


GetTimeLeft
Usage: entity:GetTimeLeft(effectName)
Description: Returns the remaining time left for the specified effect on the entity.
If you want to create own status effect, here's code how to add your effect so StatusEffects list. table.Merge(StatusEffects, { EffectName = { --Name and ID of Effect Icon = "SEF_Icons/warning.png", --Icon on HUD and displays Desc = "" --Optional Type = "DEBUFF", --Type Effect = function(ent, time) --Effect on entity/player, function can be expanded by additional arguments end, HookType = "", --Hook name HookFunction = function() end -- What function should be added to set HookType. } })


ConCommands


SEF_GiveEffect

Usage: SEF_GiveEffect <effectName> <playerName> <time> [<arg1> <arg2> ...]
Description: Command to apply an effect to a specified player for a given amount of time with optional additional arguments.

SEF_GivePassive

Usage: SEF_GivePassive <passiveName> <playerName>
Description: Command to apply a Passive to a specified player.
SEF_RemovePassive
Usage: SEF_RemovePassive <passiveName> <playerName>
Description: Command to remove Passive from a specified player.


ConVars

SEF_StatusEffectX/Y
Usage: SEF_StatusEffectX <value> / SEF_StatusEffectY <value>
Description: Sets X for HUD Display of active effects

SEF_ScaleUI
Usage: SEF_ScaleUI 1

Description: Changes UI scale.

SEF_StatusEffectDisplay 0/1
Description: Shows active effects on NPCs, Players or Nextbots
100 Comments
Astral May 24 @ 8:53pm 
How would one remove the HUD, visual effects, and sounds? (cinematic purposes)
Groncho Huevoncho May 15 @ 11:39am 
You should put the answer in a FAQ on the Description isntead of your Discord Server, just sayin' :TheRooster:
Sims May 8 @ 10:38pm 
It seems like this mod removes the ear-ringing sound effect that plays when taking explosive damage
🕊 Peace&Death ⚰ Apr 7 @ 3:00am 
HOW TO REMOVE FCKNG VISUAL EFFECTS?
🕊 Peace&Death ⚰ Apr 7 @ 3:00am 
Визуальные эффекты всё портят
StarSpangledSenpai Mar 10 @ 3:24am 
how do I when it comes to effect like have when ever I'm shot cause bleeding?
Hellas Mar 9 @ 10:41am 
hello, can I remove visual effects on player when healing or do smth else?
brothetoast Feb 28 @ 12:12pm 
huh
Aaron  [author] Feb 26 @ 6:03am 
use SEF_StatusEffectX and SEF_StatusEffectY