Effects
config/effects.lua
Last updated
config/effects.lua
Last updated
In this file you can find the effects triggered by the items crafted using av_business. Effects will be triggered based on the item ingredients or item type.
If the item doesn't have any ingredients it will trigger an effect based on item type.
In Config.DefaultEffects you have the effects triggered based on item type
There's some examples like drink, food, alcohol and joint but if you add more item types to the script make sure to register an effect.
Every option is a function that triggers a different event or function, for example drink and food triggers an export that adds thirst/hunger to your player, alcohol triggers an alcohol effect and joint triggers a drugs effect... Customize your own item types with the export, event or function that u want is on you to create it.
Alcohol/drug functions can be found in client/editable/effects.lua
If the item contains ingredients you can trigger a different effect per ingredient, for example, if we consume an item named Chocolate Milkshake that contains the ingredients Ice, Milk and Chocolate, we are gonna trigger a different effect for every ingredient:
Milk triggers the export to add 100 points of thirst for our character
Chocolate triggers the export to add 100 points of thirst for our character
Ice triggers the export to add 25 points of thirst for our character
Chocolate Milkshake will add 225 points of thirst to our character after consume it, and this is because every ingredients triggers its own function.
If you mix ingredients that has functions with ingredients that don't trigger anything, the only effects you will have are the ones from the ingredients with custom effects.
DefaultEffects are only triggered if the item doesn't have any ingredients or if the ingredients didn't triggered any effect.
IMPORTANT: Is on you to edit and make sure your ingredients triggers your custom exports/events correctly, Config.Effects/Config.DefaultEffects are triggered client side.