Editing Statuses
All information you would need regarding the effect manager.
Effect Manager
The effect manager controls what happens to a player on the client side when a status crosses a threshold. Blurry vision, camera shaking, walking styles, screen overlays, stumbling, reactions - all of these are configured through the effect system.
Effects are driven by your status configs. You define thresholds, attach effect keys with values, and the system takes care of the rest. When multiple effects compete (e.g. two different walking styles from stress and alcohol), the system automatically resolves which one wins.
Table of Contents
How It Works
Each status has an
effectarray in its config file (statuses/<status>/config.lua).Each entry in that array has a
thresholdand one or more effect keys.Every second, the system checks each status value against its thresholds. When a threshold is crossed, the effects attached to it activate. When the value drops back below, they deactivate.
If multiple statuses try to control the same effect key (e.g. two different
walkingStylevalues), the system picks the most severe one automatically.
You configure everything in the status config. No code changes are needed.
Configuring Effects
Effects live inside the effect table of a status config. Each entry is a threshold with one or more effect keys attached to it.
Basic Example (Drunk)
At
10.0, the player starts walking wobbly.At
20.0, a screen effect kicks in and the walk gets worse.At
30.0, blur effects start on top.At
50.0, the screen effect gets more intense and the walking style is heavily impaired.
When the value drops below a threshold, its effects are automatically cleaned up.
Threshold Stacking
Thresholds are cumulative. When a player is at value 35.0 with the config above, thresholds at 10, 20, and 30 are all active simultaneously. The system picks the dominant value per effect key, so only one walkingStyle plays at a time (the highest threshold wins).
Combining Multiple Effects
You can attach as many effect keys as you want to a single threshold:
Simple vs Rich Values
Some effect keys accept either a simple value or a table with extra options:
Both forms work. The simple form just uses a default intensity of 1.0.
Effect Keys
Here are all the available effect keys you can use in your threshold configs:
screenEffect
string or {value, intensity}
Applies a timecycle modifier as a screen overlay
cameraShaking
string or {value, intensity}
Shakes the gameplay camera
walkingStyle
string
Changes the player's movement clipset (walk animation)
blurryVision
boolean
Periodically fades a blur overlay in and out
blockJumping
boolean
Prevents the player from jumping
blockSprinting
boolean
Prevents the player from sprinting
movementSpeed
number
Scales run/sprint speed (1.0 = normal, lower = slower)
strength
number
Scales unarmed melee damage (1.0 = normal)
stumble
number
Chance-based stumbling/ragdoll (higher = more frequent)
reaction
table
Synchronized animation + sound (see below)
damage
number
Deals damage per tick (see below)
notification
table
Shows a notification once (see below)
Notes
movementSpeed: We recommend not going below0.8as it starts to look weird.stumble: The value is a multiplier on the base chance. Running and sprinting significantly increase the stumble chance.walkingStyle: Won't override crouching.
Notifications
Notifications fire once when a threshold is first crossed. They are not queued effects, so they don't compete for dominance.
value
string
Translation key (from locales/) or a raw message string
play
string
When to show it. Use "start" (when the threshold is hit)
type
string?
Optional notification type (e.g. "warning")
force
boolean?
If true, always shows even when surpassing multiple thresholds at once
Anti-Spam
When a player jumps past multiple thresholds at once (e.g. from 0 to 60), only the highest threshold's notification plays. Use force = true on a specific notification if it should always play regardless:
Translation Keys vs Direct Messages
If the value matches a key in your locale files, the translation is used. Otherwise the string is shown directly:
Reactions (Animations & Sounds)
Reactions combine animations and/or sounds into one synchronized effect. They can play once or loop continuously.
Full Example (Stress Coughing)
You don't need both animation and sound, either one on its own works fine.
Animation Fields
dict
string
Animation dictionary
clip
string
Animation clip name
flag
integer
49
Animation flag (49 = upper body, doesn't freeze)
start
integer
nil
Start time in ms (skip the beginning)
stop
integer
nil
Stop time in ms (cut the animation short)
blendInSpeed
number
1.0
How fast the animation blends in
blendOutSpeed
number
1.0
How fast the animation blends out
forceAnim
boolean
false
Force replay even if already playing
speed
number
1.0
Playback speed
Sound Fields
name
string, string[], or table
Sound file(s). Supports {male = ..., female = ...} for gendered audio
volume
number
0.3
Playback volume
distance
number
10.0
How far other players can hear it
Sounds require
zyke_soundsto be running. If it's not available, the sound part is silently skipped.
Loop Settings
delay
integer or {min, max}
Delay in ms before repeating. Use a table for a random range
If loop is not defined, the reaction plays once and does not repeat.
Anti-Spam
Same as notifications. When surpassing multiple thresholds at once, only the highest threshold's reaction plays. You can override this on the threshold entry with force = true.
Damage
Damage is not queued and does stack. If two statuses both deal damage, the player takes both.
At value 85.0, both thresholds are active, so the player takes 0.5 + 1.5 = 2.0 damage per tick. The value is automatically scaled by time so it stays consistent.
FAQ
Q: Where do I configure effects? In the status config file at statuses/<status>/config.lua, inside the effect array.
Q: Can one threshold have multiple effect keys? Yes. Combine as many as you want on a single threshold.
Q: What happens when two statuses use the same effect key? The system picks the most severe value automatically. They don't stack, only one walkingStyle or screenEffect plays at a time.
Q: Does damage work the same way? No. Damage is the exception, it stacks across all active thresholds and all statuses.
Q: Do I need to restart after changing a config? Yes. Restart the resource for config changes to take effect.
Q: What if I set movementSpeed to a very low value? Anything below 0.8 starts to look and feel weird. We recommend staying at 0.8 or above.
Q: How does the intensity field work on screenEffect and cameraShaking? Higher intensity = stronger visual effect. If you don't specify it, it defaults to 1.0. Use lower values for subtle effects at early thresholds and ramp it up at higher ones.
Last updated