The e_core is an adapter that provides support for compatibility with ESX and QBCore, QBox frameworks.
- to ensure framework-independent operation for eco_crafting and future scripts
- to provide users with customization
- to insert your own inventory functions/exports (addItem, removeItem, etc..)
- for inserting message systems (sendNotify, drawText, hideText, progressbar)
- in addition, various core functions can be adapted using the examples shown in the script
- a skill (xp) and labor system that uses a built-in metadata repository.
- lua helper functions
- fiveM utility functions
If you have a basic server, no changes are necessary. If you use ox_inventory, no changes are needed.
Config files:
- standalone/config/ - global settings
- standalone/overrides/custom_inventory/config.lua - Inventory specific settings
IMPORTANT! It is necessary to start e_core before the eco scripts in the server.cfg file!
# ECO SCRIPTS
ensure e_core
ensure eco_crafting
IMPORTANT! Due to the overwriting of later updates, it is advisable to make all changes in the 'standalone' folder! The 'standalone' folder is nothing more than a collection of override functions. All functions in the bridge folder can be copied to the 'standalone' folder and overwritten there. IMPORTANT! Copy the bridge functions to the 'standalone' folder and overwrite them! (of course only if necessary)
Example of customization:
function eCore:sendMessage(message, mType, mSec) -- bridge/esx/client.lua
ESX.ShowNotification(message, mSec, mType)
end
--- OVERRIDE in the 'standalone/overrides/core' folder:
function eCore:sendMessage(message, mType, mSec) -- standalone/overrides/core/client.lua
EXAMPLE.MyOwnNotify(message, mSec, mType)
end
Example of overriding an inventory function:
function eCore:removeItem(xPlayer, item, count, metadata, slot) -- bridge/esx/server.lua
xPlayer.removeInventoryItem(item, count, metadata, slot)
end
--- OVERRIDE in the 'standalone' folder:
function eCore:removeItem(xPlayer, item, count, metadata, slot) -- standalone/overrides/avp_grid_inventory/server.lua
return exports["avp_grid_inventory"]:RemoveItemBy(xPlayer.source, count, item)
end
The concept works along the lines of the ArcheAge MMORPG. Completing each job costs labor points, which also increases the character's skill.
For example, if you harvest a vegetable with my collecting script, it costs 5 lab points and it is added to the harvesting skill. This way, you can later receive discounts according to the rank setting, for example: faster harvesting, for fewer work points.
In the crafting system, it can be set that an item can only be produced after acquiring a certain skill and how many labor points it costs to make it.
With the help of exports, you can incorporate this into any of your own scripts. See:
- export_examples_server.md
- export_examples_client.md
The e_core uses both ESX and QBCore script details.