[SEF] Status Effect Framework
Добавить в игру через Steam
Нажмите «Подписаться»
На странице Steam войдите в аккаунт, если потребуется.
Подписаться
О материале
«[SEF] Status Effect Framework» — материал мастерской Garry’s Mod. Аддоны, карты, персонажи и инструменты для песочницы. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
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
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.