Skip to main content
Server Client Proxied to ug-core. Needs belong to the loaded character. Values go from 0 to 100. The server changes them every interval ms by rate per minute and saves them in ug_needs every 5 minutes, on unload and on stop.
config/needs.lua
number
Value of a new character, and after a reset.
number
Change per minute. Negative drains, positive fills.
integer
Health lost on every tick while the need is at 0. 0 never hurts.
  • pauseWhileDown: needs stop changing while the player is downed or dead.
  • resetOnRespawn: needs go back to start on respawn.

Server

Get / GetAll

nil when no character is loaded, or the need does not exist.

Set / Add / Remove

amount goes from 0 to 100. Values are clamped to 0 to 100. Unknown needs return not_found, an unloaded player not_loaded, bad numbers invalid_args.
Every change emits UgCore.Enums.Events.Needs.Changed with (source, name, value, previous) on the server.

Reset

Every need back to its start.

Client

The client only reads. Changes arrive from the server and emit UgCore.Enums.Events.Needs.Changed with (name, value, previous). value is nil once the character unloads.

Console

ug needs <id> prints the values of a player.