T2 // Gameplay & Base

coe_needs

Metabolism, Physiology & Needs

Realistic Metabolic Decay with Overexertion & Dehydration

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_hud
coe_needs 3 exports · 0 commands

Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.

01 // OVERVIEW

Calculates caloric burn, hydration decay, and stress accumulation based on physical player exertion (sprinting, swimming, jumping). Severe dehydration results in gradual health loss and blurred peripheral vision; quality meals restore stamina and grant temporary endurance buffs.

On FiveM Enhanced

Decoupled sub-tick interval updates; mathematical calculations process in background batches without impacting frametimes.

02 // FEATURES

What the module delivers

01

Dynamic Exertion Decay

Heavy physical activities naturally accelerate caloric and water consumption.

02

Physiological Impairments

Dehydration penalizes sprint velocity and blurs camera edges.

03

Nutritional Buffs

High-quality chef meals grant accelerated stamina regeneration.

04

Zero Tick Hitching

Mathematical routines run asynchronously without frame latency impact.

ARCHITECTURAL LAYERS // CLEAN ARCHITECTURE

4-Layer Isolation with 0.00 ms Idle

Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:

L4
Headless Operation (No UI)
Zero DOM · CoE UI Delegation
Headless
L3
Application & Server
Atomic locks · Rate limiting
Auth Server
L2
Platform & HAL
Core.Platform · Mock natives
Gen9 HAL
L1
Domain & ACID Database
Prepared SQL · MariaDB pool
ACID Pool
LAYER 04 // HEADLESS SERVICE

Headless Service (No Dedicated NUI)

Operates strictly within layers L1–L3 (domain, HAL, and server-authoritative application logic). Visual interactions and management flows are delegated to centralized ecosystem apps (coe_ui / coe_tablet), guaranteeing 0.00 ms idle client overhead in FiveM DX12.

Zero CEF graphic overhead: no background web pages or NUI bridges loaded
Typed public contracts (types.lua) consumed directly by external resources and UIs
Strict adherence to the Server-Authoritative model with zero direct DOM manipulation
ADMIN POWERS // OPERATION & MANAGEMENT

What this script delivers to Server Owners

Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:

🛡️
ACE Permissions
Administrative operations strictly protected by coe.staff and coe.admin principals.
IsPlayerAceAllowed(src, "coe.admin")
📊
Ledger Auditing
Relevant actions write audit records to the database through coe_audit.
exports.coe_audit:Record(severity, category, event, context)
⚡
0.00ms Idle Telemetry
Event-driven thread dispatch that stays dormant until network events fire.
Clean Architecture & HAL
03 // EXPORTS

Public API 3

Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.

exports['coe_needs']:GetNeeds(playerSource) → CoeNeedsSnapshot|nil

[shared] On server receives `playerSource`; on client takes no arguments and returns the local snapshot.

ParameterType
playerSource optionalinteger
LUA
local result = exports['coe_needs']:GetNeeds(playerSource)
exports['coe_needs']:SetNeed(playerSource, needName, value) → boolean|'caller_not_allowed'|'character_not_loaded'|'invalid_need'

[server] Sets the absolute value (0..100) of a vital need. Requires ACE `coe.needs`.

ParameterType
playerSourceinteger
needNameCoeNeedName
valuenumber
LUA
local result = exports['coe_needs']:SetNeed(playerSource, needName, value)
exports['coe_needs']:AddNeed(playerSource, needName, delta) → boolean|'caller_not_allowed'|'character_not_loaded'|'invalid_need'

[server] Adds `delta` (positive or negative) to a vital need. Requires ACE `coe.needs`.

ParameterType
playerSourceinteger
needNameCoeNeedName
deltanumber
LUA
local result = exports['coe_needs']:AddNeed(playerSource, needName, delta)
04 // COMMANDS

In-game commands 0

This module registers no commands: it is driven by exports and events.