# Changelog

<details>

<summary>Changelog - Version 0.4.3</summary>

### Changes

* Added compatibility support for wasabi\_ambulance\_v2, so players are properly healed on revive.
* Fixed walking style reset using an incorrect gender check, which could cause the wrong default walk style to be applied.
* Fixed the stumble effect not accepting boolean values when triggering it.
* Fixed an issue in the effect queue where threshold indexes weren't resolved correctly, which could cause errors or failed effect applications.

### Files Affected

* <mark style="color:yellow;">server/events.lua</mark>
* <mark style="color:yellow;">shared/functions.lua</mark>
* <mark style="color:yellow;">effect\_manager/effects/stumble.lua</mark>
* <mark style="color:yellow;">effect\_manager/effects/walkingStyle.lua</mark>
* <mark style="color:yellow;">effect\_manager/queue.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.4.2</summary>

### Changes

* Updated the camera shaking effect to support boolean values.
* Setting camera shaking to true will now automatically apply the default shake type and intensity.

### Files Affected

* <mark style="color:yellow;">effect\_manager/effects/cameraShaking.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.4.1</summary>

### Changes

* Added Lithuanian localization support for all notifications and status messages.
* Added new server-side functionality for other scripts to retrieve player status information.
  * Allows other resources to check a player's specific levels for stress, hunger, thirst, and drunkness.
  * Provides access to all raw status data for a player.

### Files Affected

* <mark style="color:yellow;">server/functions.lua</mark>
* <mark style="color:green;">locales/lt.lua</mark>
* <mark style="color:yellow;">shortcuts/server.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.4.0</summary>

### Changes

* Migrated to a new "rich effects" system for more immersive status feedback.
* Added threshold-based reactions that trigger specific behaviors when a status reaches a certain level.
  * Added custom animations and sounds that play upon hitting thresholds.
  * Added the ability to trigger screen effects, blurry vision, and camera shaking.
  * Added movement-based effects including speed modifiers, walking style changes, and stumbling.
  * Added physical limitations such as blocking the ability to jump or sprint based on status.
  * Added strength modifiers that can be tied to player status.
* Added support for notifications to appear when a status threshold is reached.
* Status updates now apply to the player instantly rather than waiting for the next sync cycle.
* Added comprehensive translation support for over 15 languages, including Arabic, German, Spanish, French, Japanese, and more.
* Added new functionality to perform a "Soft Reset" or a full "Reset" on player statuses.
* Added a developer command to manually trigger a status save.
* Adjusted the default stress effects and multipliers for better gameplay balance.
* Fixed an issue where screen effects would not properly clear if the resource was stopped.
* Fixed the debug mode being enabled by default in the configuration.
* Improved error handling to prevent issues when duplicate status IDs are detected.

### Files Affected

* <mark style="color:yellow;">client/events.lua</mark>
* <mark style="color:yellow;">server/direct\_effects/functions.lua</mark>
* <mark style="color:yellow;">server/freeze\_status.lua</mark>
* <mark style="color:yellow;">server/functions.lua</mark>
* <mark style="color:green;">server/reaction\_sounds.lua</mark>
* <mark style="color:yellow;">shared/config.lua</mark>
* <mark style="color:yellow;">shared/functions.lua</mark>
* <mark style="color:yellow;">.vscode/settings.json</mark>
* <mark style="color:yellow;">compatibility/client.lua</mark>
* <mark style="color:yellow;">compatibility/server.lua</mark>
* <mark style="color:yellow;">dev/server/main.lua</mark>
* <mark style="color:yellow;">effect\_manager/\*</mark>
* <mark style="color:yellow;">locales/\*</mark>
* <mark style="color:yellow;">statuses/hunger/config.lua</mark>
* <mark style="color:yellow;">statuses/stress/config.lua</mark>
* <mark style="color:yellow;">statuses/thirst/config.lua</mark>
* <mark style="color:yellow;">types.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.17</summary>

## Changes

* Instantly syncing your stats to the client after being reset, i.e remove effects right after being revived.
* Added various debug logs throughout the resource.

## Files Affected

* <mark style="color:yellow;">Replace all.</mark>

</details>

<details>

<summary>Changelog - Version 0.3.16</summary>

## Changes

* Fixed a faulty check when getting a sub-status using `GetStatus`.

## Files Affected

* <mark style="color:yellow;">server/functions.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.15</summary>

## Changes

* Ignore catching txadmin events if you have wasabi\_ambulance on your server, as that script already handles it. We just catch whatever wasabi dispatches.

## Files Affected

* <mark style="color:yellow;">server/events.lua</mark>
* <mark style="color:yellow;">shared/functions.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.14</summary>

## Changes

* Fixed incorrect logic that would block the shooting stress inducer.
* Added in various events for better wasabi\_ambulance healing support.

## Files Affected

* <mark style="color:yellow;">compatibility/client.lua</mark>
* <mark style="color:yellow;">client/small\_resources/shooting.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.13</summary>

## Changes

* Fixed an accidental double-registering of the tx healing event.

## Files Affected

* <mark style="color:yellow;">compatibility/server.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.12</summary>

## Changes

* Added version checker.
* Adjusted the logic for the ESX compatibility to better mirror their process.
* Corrected the value for non-reversed items for dummyReturn, ex. food at 100%, drunk at 0% and so on.
* Freezing statuses
  * Freezes the "onTick" that is ran.
  * Freezes all effects on the client.
  * Available via command.
    * See your config for available commands.
  * Available via exports.
    * [Freeze Status For Player](https://docs.zykeresources.com/free-resources/exports-and-events#freeze-status-for-player)
    * [Unfreeze Status For Player](https://docs.zykeresources.com/free-resources/exports-and-events#unfreeze-status-for-player)
    * [Get Frozen Players](https://docs.zykeresources.com/free-resources/exports-and-events#get-frozen-players)
    * [Is Player Statuses Frozen](https://docs.zykeresources.com/free-resources/exports-and-events#is-player-statuses-frozen)
* Check command length to register singular heal command correctly.
* Target id parser for commands, refactored the heal command to use this system.

## Files Affected

* <mark style="color:green;">server/commands/freeze\_status.lua</mark>
* <mark style="color:green;">server/freeze\_status.lua</mark>
* <mark style="color:green;">server/utils/command\_utils.lua</mark>
* <mark style="color:yellow;">client/events.lua</mark>
* <mark style="color:yellow;">client/main.lua</mark>
* <mark style="color:yellow;">compatibility/client.lua</mark>
* <mark style="color:yellow;">compatibility/server.lua</mark>
* <mark style="color:yellow;">dev/client/hud.lua</mark>
* <mark style="color:yellow;">effect\_manager/main.lua</mark>
* <mark style="color:yellow;">server/commands/heal.lua</mark>
* <mark style="color:yellow;">server/main.lua</mark>
* <mark style="color:yellow;">shared/config.lua</mark>
* <mark style="color:yellow;">locales/en.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.11</summary>

## Changes

* Fixed incorrect target when using the healing command.
* Simplified the dev hud drawing for new elements.
* Forcefully floor the max amount passed into the stat decimal manager.
* Added better ESX compatibility for grabbing a status via the standard event.

## Files Affected

* client/small\_resources/stat\_decimals.lua
* compatibility/client.lua
* dev/client/hud.lua
* server/commands/heal.lua
* locales/en.lua
* fxmanifest.lua

</details>

<details>

<summary>Changelog - Version 0.3.10</summary>

## Changes

* Added a missing check to avoid always ensuring the base value.

## Files Affected

* <mark style="color:yellow;">server/initialize.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.9</summary>

## Changes

* Fallback value to ensure one is always sent for QB events.

## Files Affected

* <mark style="color:yellow;">server/functions.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.8</summary>

## Changes

* Fixed an accidental table reference that would share status data, it is now copying content instead.

## Files Affected

* <mark style="color:yellow;">server/initialize.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.7</summary>

## Changes

* Generating & setting base values for new characters.
* Added `envi-hud` to the hudOverriding list.

## Files Affected

* <mark style="color:yellow;">server/functions.lua</mark>
* <mark style="color:yellow;">server/initialize.lua</mark>
* <mark style="color:yellow;">shared/functions.lua</mark>
* <mark style="color:yellow;">shared/config.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.6</summary>

## Changes

* Nullish check during compatibility translation.

## Files Affected

* <mark style="color:yellow;">compatibility/client.lua</mark>
* <mark style="color:yellow;">compatibility/server.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.5</summary>

## Changes

* Properly checking if value is missing.

## Files Affected

* <mark style="color:yellow;">client/functions.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.4</summary>

* Pre-define value to avoid weird nullish chaining error.

## Files Affected

* <mark style="color:yellow;">server/main.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.3</summary>

* Ensure pathing exists before setting values

## Files Affected

* <mark style="color:yellow;">server/initialize.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.2</summary>

## Changes

* Added fallback value for Qbox/QBCore.
* Added fentanyl high effects.

## Files Affected

* <mark style="color:yellow;">server/functions.lua</mark>
* <mark style="color:yellow;">statuses/high/config.lua</mark>
  * <mark style="color:green;">Config.Statuses.high\["fentanyl"]</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.3.1</summary>

## Changes

* Avoid error when healing after de-registering.
* Run onStart for queued effects that are not being ran, and no longer when just the value changes.
* Stumble effect, random change to fall.
  * Diffearent multipliers for your high, and if you're standing/walking/running.
* n2o/whippet high.
* Overhauled server-sided thread interval to handle priority players, to allow quicker intervals when needed.
* GetStatusSettings now relies on primitive types for input.
* Properly reset values, instead of setting to 0.0, avoids excess looping.

## Files Affected

* Replace all files.

</details>

<details>

<summary>Changelog - Version 0.3.0</summary>

## Changes

* Fixed reversed statuses, like hunger, executing incorrect threshold indexes for effects.
* Inserting key correctly to allow batch calls to client sync.
* Instantly sync status to client on heal.
* Instantly sync status to client on player status initialization, which is usually just character selection.
* Using stat decimal helper for damage effects for statuses, you can now use decimals to specify the damage a player should receive.
* Adjusted the default configs for hunger & thirst.
* Finalized direct effects, you can now trigger effects without tying them to a status effect.

## Files Affected

* <mark style="color:yellow;">client/events.lua</mark>
* <mark style="color:yellow;">effect\_manager/main.lua</mark>
* <mark style="color:yellow;">effect\_manager/queue.lua</mark>
* <mark style="color:yellow;">server/functions.lua</mark>
* <mark style="color:yellow;">server/direct\_effects/functions.lua</mark>
* <mark style="color:yellow;">shared/functions.lua</mark>
* <mark style="color:yellow;">shared/initialize.lua</mark>
* <mark style="color:yellow;">statuses/hunger/config.lua</mark>
* <mark style="color:yellow;">statuses/thirst/config.lua</mark>
* <mark style="color:yellow;">types.lua</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.2.6</summary>

## Changes

* Moved to the new zyke\_lib loader.
* Gain stress when shooting.
* Verify a "max" value exists when using the "stat decimal" feature.
* Added `mHud` to list of huds overriding player instance update interval.
* Defined T as global.
* Make sure value exists when grabbing from a player's direct effects.

## Files Affected

* <mark style="color:yellow;">.vscode/settings.json</mark>
* <mark style="color:yellow;">client/main.lua</mark>
* <mark style="color:green;">client/small\_resources/shooting.lua</mark>
* <mark style="color:yellow;">client/small\_resources/stat\_decimals.lua</mark>
* <mark style="color:red;">dev/hud.lua</mark>
* <mark style="color:green;">dev/client/hud.lua</mark>
* <mark style="color:yellow;">dev/server/main.lua</mark>
* <mark style="color:yellow;">server/direct\_effects/functions.lua</mark>
* <mark style="color:yellow;">shared/config.lua</mark>
  * <mark style="color:green;">Config.Settings.smallResources.shooting</mark>
  * <mark style="color:yellow;">Config.Settings.playerInstanceUpdate.hudOverriding</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.2.5</summary>

## Changes

* Handle a `max` parameter for the stat manager, to set a "cap" of what you can add to a stat. For example, smoking x will only allow you to get 20 armor at most, any addition past it is rejected.
* Fixed some mismatched names when checking "if" statements & registering events.
* Added `vms_hud` to list of huds overriding player instance update interval.
* Catching & handling txAdmin heal event.
* Creates sub-files for each command.
* Registering healing function, not overwriting by default.

Files Affected

* <mark style="color:red;">server/commands.lua</mark>
* <mark style="color:green;">server/commands/heal.lua</mark>
* <mark style="color:yellow;">server/events.lua</mark>
* <mark style="color:yellow;">shared/config.lua</mark>
  * <mark style="color:green;">Config.Settings.commands</mark>
* <mark style="color:yellow;">fxmanifest.lua</mark>

</details>

<details>

<summary>Changelog - Version 0.2.4</summary>

## Changes

* Added more client exports to integrate our script easier.
  * [Get All Statuses](https://docs.zykeresources.com/free-resources/status/exports-and-events#get-all-statuses)
  * [Shorthands (Hunger, thirst, stress & drunk)](https://docs.zykeresources.com/free-resources/status/exports-and-events#shorthands-hunger-thirst-stress-and-drunk)
  * [Get Raw Status](https://docs.zykeresources.com/free-resources/status/exports-and-events#get-raw-status)

## Files Affected

* client/functions.lua
* shortcuts/client.lua
* fxmanifest.lua

</details>

<details>

<summary>Changelog - Version 0.2.3</summary>

## Changes

* Added `izzy-hudv6`, `17mov_hud` & `ts_hud` to list of huds overriding player instance update interval.
* Changed the warning for grabbing uninitialized values from error to debug.
* Exported `AddDirectEffect`.
* Added direct effect calls for string effect values.
* Stat decimal manager - basically a primitive manager simplifying the process of adding small values in many iterations, like health & armor that doesn't support decimals.
* Added `AutoToStatus` which automatically triggers `AddToStatus` or `RemoveFromStatus` depending on the value being positive or negative.
* Simplified add/remove status command by also allowing +/- symbol. [@iSentrie](https://github.com/iSentrie)

## Files Affected

* client/small\_resources/stat\_decimals.lua
* compatibility/client.lua
* server/direct\_effects/functions.lua
* server/functions.lua
* shared/config.lua
* fxmanifest.lua

</details>

<details>

<summary>Changelog - Version 0.2.2</summary>

## Changes

* Basics for direct effect calls. This allows you to run our effects directly instead of relying on a status to trigger the effect.
* Better thread lifetime management for client idle performance.
* Configurable player instance updating intervals, to support certain huds not relying on events for information update.
* Modified some default values.
* Fixed incorrect links.
* Removed unused files.

## Files Affected

* client/events.lua

* client/main.lua

* dev/client.lua

* effect\_manager/queue.lua

* server/database.lua

* server/direct\_effects/README.md

* server/direct\_effects/events.lua

* server/direct\_effects/functions.lua

* server/functions.lua

* server/initialize.lua

* server/main.lua

* shared/config.lua

* statuses/caffeine/config.lua

* statuses/hunger/config.lua

* statuses/thirst/config.lua

* types.lua

* fxmanifest.lua

## SQL Modifications

```sql
ALTER TABLE `zyke_status`
ADD COLUMN `direct_effects` MEDIUMTEXT NOT NULL DEFAULT "{}";
```

</details>

<details>

<summary>Changelog - Version 0.2.1</summary>

## Changes

* Massively simplified the setup process.
* Only tracking active effects to have less load on your client when idling.
* Changed some default values for gaining & relieving stress.
* Updated some docstrings.

## Files Affected

* effect\_manger/queue.lua
* compatibility/server.lua
* shared/config.lua
* fxmanifest.lua

</details>

<details>

<summary>Changelog- Version 0.2.0</summary>

## Changes

* Moved from "pre-release" to official release as the resource has been tested without issues for a while.
* The database now runs automatically.
* Some internal re-structuring.
* Added `blockJumping` effect.
* Added `blockSprinting` effect.

## Files Affected

* client/main.lua

* effect\_manager/effects/blockJumping.lua

* effect\_manager/effects/blockSprinting.lua

* effect\_manager/effects/blurryVision.lua

* effect\_manager/effects/cameraShaking.lua

* effect\_manager/effects/movementSpeed.lua

* effect\_manager/effects/screenEffect.lua

* effect\_manager/effects/strength.lua

* effect\_manager/effects/walkingStyle.lua

* effect\_manager/main.lua

* effect\_manager/queue.lua

* server/database.lua

* server/initialize.lua

* fxmanifest.lua

* extras/zyke\_status.sql

</details>

<details>

<summary>Changelog - Version 0.1.5</summary>

## Changes

* Qbox compatibility.
* Changed default decimal accuracy from 3 to 6.
* Removed unused `ClearEffectQueueKey` client export.
* Added `RemoveFromQueue` & `RemoveFromQueueBulk` client exports.

## Files Affected

* effects/queue.lua

* server/functions.lua

* server/main.lua

* shared/config.lua

* README.md

* fxmanifest.lua

</details>

<details>

<summary>Changelog - Version 0.1.4</summary>

## Changes

* More versatile ESX compatibility.
* Ensuring walking style and avoid overriding crouching.
* Refactored a confusing debug message.
* Configurable stress gain when driving fast.
* Base for caffeine status.

## Files Affected

* client/small\_resources/driving.lua

* compatibility/client.lua

* compatibility/server.lua

* effects/queue.lua

* effects/walkingStyle.lua

* server/register\_statuses.lua

* shared/config.lua

* statuses/caffeine/config.lua

* statuses/caffeine/server.lua

* fxmanifest.lua

</details>

<details>

<summary>Changelog - Version 0.1.3</summary>

## Changes

* Smarter timeouts for syncing server to client. Bundles & processes first request instantly, but delays sequential requests to avoid overload.
* Better threshold management to space update intervals from drain.
* Properly ordering the tresholds for effects so the correct index is grabbed.
* Listed zyke\_lib as dependency.
* Ensure status is valid to add/remove/set.
* Reset status command for admins.
* New structure for passing primary and secondary status names.
* Some misc changes.

## Files Affected

* compatibility/server.lua
* dev/server.lua
* effects/main.lua
* effects/queue.lua
* server/events.lua
* server/functions.lua
* server/initialize.lua
* server/main.lua
* shared/config.lua
* shared/functions.lua
* statuses/addiction/config.lua
* statuses/addiction/server.lua
* statuses/drunk/server.lua
* statuses/high/config.lua
* statuses/high/server.lua
* statuses/hunger/server.lua
* statuses/stress/server.lua
* statuses/thirst/server.lua
* types.lua
* fxmanifest.lua

</details>

<details>

<summary>Changelog -. Version 0.1.2</summary>

## Changes

* Spacing the main thread interval for passive drain to preserve performance.
* Limit the value to ceiling when using the setter function.
* Executing qb actions instantly (not just stress) to keep the QB player object up to date.
* Smarter client syncing queue, now executing instantly and limiting consecutive requests, and bundling those updates to execute after a set threshold. Ensures up-to-date data whilst preserving performance if needed.
* Catching QB events `consumables:server:addThirst` & `consumables:server:addHunger`.
* Updated setup to remove `consumables:server:addThirst` & `consumables:server:addHunger` for QB in qb-smallresources.

## Files Affected

* compatibility/server.lua
* server/functions.lua
* server/main.lua
* statuses/addiction/server.lua
* statuses/drunk/server.lua
* statuses/high/server.lua
* statuses/hunger/server.lua
* statuses/stress/server.lua
* statuses/thirst/server.lua
* fxmanifest.lua

</details>

<details>

<summary>Changelog - Version 0.1.1</summary>

## Changes

* More universal SQL query.
* Miscellaneous cleanup.
* Ignore invalid events.
* Return the new status value after onSet.
* Set metadata instantly on stress update for QBCore.
* Provide primary & secondary when using `GetStatus` to avoid separating it.
* Catch common stress addition & removal events.
* Fixed ceiling typo for stress when setting.

## Files Affected

* client/events.lua
* extras/zyke\_status.sql
* notes.md
* server/events.lua
* server/functions.lua
* shared/config.lua
* shared/functions.lua
* statuses/hunger/server.lua
* statuses/stress/server.lua
* fxmanifest.lua&#x20;

</details>

<details>

<summary>Changelog - Version 0.1.0</summary>

Pre-release for ESX & QBCore.

</details>
