if not Config then Config = {} end Config.MenuCommand = "skill" -- string or false Config.Keybind = false Config.Item = false -- string or false | update 1.0.6 -- client event | devhub_skillTree:client:openSkillTree Config.XpBoost = 1.0 -- float Config.BaseXp = 100 -- int | Base xp for each level Config.LevelBasedXp = 50 -- int | Xp increase for each level (BaseXp + (Level * LevelBasedXp)) function xpAlgorithm(level, categoryUid) return Config.BaseXp + (Config.LevelBasedXp * level) end Config.PointsPerLevel = 1 -- int | Points given for each level up Config.CloseUiOnDeath = true -- bool | Close the UI when the player dies , disable ui while dead , must be configured in devhub_lib "dh_lib:client:setDeathStatus" Config.HpRegenerationTimeout = 5000 -- int | If player has unlocked skill, every how many sec he should restore hp Config.EnableGenerator = true -- bool | Enable the generator for the skill tree [ONLY EXCLUSIVE VERSION] Config.EarnXpTick = 1000 -- int | Time in ms for each tick , check if players is doing actions from Config.EarnXp, keep it above 1000 Config.EarnXp = { -- if you want to disable option , just remove it ['running'] = { xp = 2, -- int | Xp given for each tick timeout = 10000, -- int | Timeout in ms , cooldown for receiving xp addTo = { -- table | Add xp to specific skill category | update 1.0.6 ['personal'] = true, } }, ['swimming'] = { xp = 2, timeout = 10000, addTo = { ['personal'] = true, } }, ['melee'] = { xp = 2, timeout = 10000, addTo = { ['personal'] = true, } }, ['shooting'] = { xp = 2, timeout = 10000, addTo = { ['personal'] = true, } }, ['driving'] = { xp = 1, timeout = 10000, addTo = { ['personal'] = true, } }, } Config.Debug = false -- bool | Enable debug messages -- update 1.0.2 Config.SkillReset = { -- give the player the option to reset skills Enabled = true, -- bool | Enable the skill reset PaymentType = false, -- string , bool | Payment type ("cash" or "item", false to make it for free) Cash = 1000, -- int | Price for reseting the skills Item = { Name = "cash", -- string | Item name Amount = 1000 -- int | Amount of item }, type = "reset", -- string | "reset" or "clear" , reset = reset skills but points , clear = clear skills, points, xp, level } -- update 1.0.4 Config.MaxLevel = { -- ['personal'] = 7, -- int | Max level for personal skills } -- You can set up custom order for loading events on player loaded -- Why? In database we store player data as hashmap, so we do not have control over the order of loading -- Usually you do not need to change this, but sometimes you may want to load some events before others to make sure they overwrite some values -- It only affect the loading order of events during first time player loading -- First we execute events that are not in this table, after that we execute events in this table Config.SkillLoadingOrder = { -- ['betterAccuracy_1'] = 1, -- ['betterAccuracy_2'] = 2, -- ['fasterReload_1'] = 3, -- ['fasterReload_2'] = 4, } -- update 1.0.9 Config.MeleeWeapons = { -- used in pre-made skills, uid: meleeDamageMultiplier ["weapon_hammer"] = true, ["weapon_wrench"] = true, ["weapon_stungun"] = true, ["weapon_nightstick"] = true, ["weapon_bat"] = true, ["weapon_bottle"] = true, ["weapon_flashlight"] = true, ["weapon_golfclub"] = true, ["weapon_hatchet"] = true, ["weapon_knuckle"] = true, ["weapon_crowbar"] = true, ["weapon_knife"] = true, ["weapon_machete"] = true, ["weapon_switchblade"] = true, ["weapon_battleaxe"] = true, ["weapon_poolcue"] = true, ["weapon_stone_hatchet"] = true, } Config.SkillDefaultValues = { -- values that will be applied if player has not skill and is base for further calculations ['moreStamina'] = 100.0, ['moreMaxHp'] = 200, ['timeUnderwater'] = 10.0, ['feastDamageMultiplier'] = 1.0, } -- If you removed skill from personal category and you dont want default effect to by applied, set it to true -- Why only this skills? Because only this apply default value no matter if you have skill or not -- DO NOT CHANGE THIS IF YOU HAVE NOT REMOVED A CORRESPONDING SKILL FROM "personal" CATEGORY -- FROM UPDATE 2.2.0 this is detected automatically anything you do will be overwritten Config.DisableDefaultSkillEffects = {} Config.DisableRefreshOnPedOrPidChanged = false -- bool | Disable refreshing some player skills on ped change or pid change -- update 2.0.1 Config.DisableXpEarnWhileDead = false -- bool | Disable earning xp while dead -- To make it work you must have configured dh_lib:client:setDeathStatus inside devhub_lib Config.UnlockHandlerForSkills = { -- ['CATEGORY_UID'] = { -- skill category uid -- ['SKILL_UID'] = { -- unlockRequirementMessage = 'You need to have energy drink to unlock this skill', -- string | Message shown when unlock fail and when they inspect skill in ui -- handler = function(source) -- -- this is triggered server side -- -- return false to prevent unlocking the skill -- -- to use devhub_lib core functions in here -- return false -- end -- }, -- ['SKILL_UID_1,SKILL_UID_2'] = { -- multiple skills in one handler, separated by comma "," -- unlockRequirementMessage = 'You need to have energy drink to unlock this skill', -- string | Message shown when unlock fail and when they inspect skill in ui -- handler = function(source) -- -- this is triggered server side -- -- return false to prevent unlocking the skill -- -- to use devhub_lib core functions in here -- return false -- end -- }, -- }, } -- update 2.1.7 Config.XpCacheLimit = 10 -- int | Used for xp virtualization in all categories from Config.EarnXp, how many ticks should be cached before sending to server -- How it works? When player earns xp, it is cached in client side and sent to server only when player has enough ticks to send