Giter Site home page Giter Site logo

ekhion76 / e_core Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 2.0 198 KB

It is an adapter for compatibility with ESX and QBCore frameworks and includes skill and lab system and helper functions.

License: MIT License

Lua 85.46% JavaScript 8.23% CSS 5.25% HTML 1.05%

e_core's Introduction

e_core

What is e_core for?

The e_core is an adapter that provides support for compatibility with ESX and QBCore, QBox frameworks.

Its goal:
  • to ensure framework-independent operation for eco_crafting and future scripts
  • to provide users with customization
It provides a connecting surface:
  • 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
Contain:
  • 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

Labor and skill system:

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.

e_core's People

Contributors

ekhion76 avatar rav3n95 avatar

Stargazers

森 avatar RIIZE ( Rise & Realise ) avatar

Forkers

rav3n95 vrcgta

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.