Allows player to level up 5 different skills (Mining, Woodcutting, Crafting, Skinning, Aquire)

Supported Games
GameServerKingsGameServerKings
works with

This plugin, is remastered version of ZLevels plugin, which provides custom skills for players to level up to.

All of the skills works kinda the same like in the original ZLevels, a new skill was introduced called Crafting, which boosts your crafting speed depending on your Crafting skill level, to increase it, you must craft things obviously. The more time you spend on crafting, the more XP you get. Also when player reaches a point, where he has 100% faster crafting, all his items are instant crafted, if you craft more than 10 items at once, then items are Magic Crafted.

The XP loss formula was rewritten, so now you loose percentage of your current level XP instead of some fixed amount if you are level 10 and have 80% exp, and you should loose 60% exp on death, that means you'll be level 10 and 20% experience.Every hour spent alive, you'll loss less experience when killed. For example if you set XPPercentToLoose to 100%, after 5 hours you'll only loose 50% instead of 100%, hours counts even when you are offline. There is also 10 mins grace period, that when you die within first 10 mins you don't loose any experience. You can check how much XP you'll loose by typing /stats.

Available Skills

  • Mining - Gathering all types or ore
  • Woodcutting - Gathering wood, cactus
  • Skinning - Gathering animal
  • Aquire - Collecting (if disabled splitted over the above types)
  • Crafting
  • Fishing (fishing traps are not tracked, only fishing rods)

All of the features can be disabled via configuration file.

Permissions

Enable Permission is specifically for zlevelsremastered.use only

jackhammer and chainsaw permissions are separate and are always required

  • zlevelsremastered.jackhammer.allowed - allows players to mine with a jackhammer
  • zlevelsremastered.chainsaw.allowed - allows players to mine with a chainsaw
  • zlevelsremastered.weapons.blocked - prevents players from gathering with any weapon
  • Allow Mining Multiplier On Gibs - this will allow the player get their mining multiplier applied to the yielded amount, and allow them to get experience for it as well. setting this false will disable the multiplier but still allow experience gains.

The CUI

The CUI allows you to avoid typing /stats every second and check how much XP is left till you level up, etc.The CUI is draggable while the cursor is active - admins can use /statsui setui to save theirs as the new default and reset all players to it.Optionally use the Overlay: Display on Overlay (false, which retains previous behavior) - When enabled, Overlay will be used instead of Under. The Move button will be hidden while Overlay is enabled, as it is redundant. When Overlay is disabled, the Move button can be clicked through the Overlay. Overlay > Under.

Incompatible plugins

  • Hunt RPG for Rust (to make them work together, you must disable crafting in my plugin settings)
  • CraftingController

Console Commands

  • zl.info -- Display info for specified player; supports player name or Steam ID
  • zl.lvl -- Set levels for specific players, see the FAQ for more info
  • zl.pointsperhit - Change points per hit for all or specific skills (not saved to config)
  • zl.fishing.items - Prints a list of all catchable fishing items. Use from the F1 console for easy viewing, or from the server console. Server console spacing is preserved best with a monospace font, where every character has equal width (Consolas, Cascadia Mono, Lucida Console, Courier New, DejaVu Sans Mono, etc).

Chat Commands

  • /stats - displays stats.
  • /statsui - toggle's stats interface.
  • /statsui setui - Use to save your ui positioning as the new configuration default and reset all players to it.
  • /statinfo - Displays information about certain skill, including server configuration.

You can disable certain skills, by setting LevelCaps value for that skill to -1.The crafting skill is limited to 20.

The part "NightBonus" of the config works only with Time Of Day.

Configuration

{
  "CUI": {
    "Bounds": {
      "Offset Min": "-67.2 -36.9",
      "Offset Max": "67.2 36.9",
      "Normalized Anchor": "0.778 0.071"
    },
    "UI Scale": 1.5,
    "Display on Overlay": false,
    "Xp Bar Colors": {
      "ACQUIRE": "0.4 0 0.8 0.5",
      "CRAFTING": "0 1 0 0.5",
      "MINING": "0 0 1 0.5",
      "SKINNING": "1 0 0 0.5",
      "WOODCUTTING": "1 0.6 0 0.5",
      "FISHING": "0 0.75 1 0.5"
    },
    "Bounds Background": "0.1 0.1 0.1 0.1",
    "CUI Enabled": true,
    "Font Color": "0.74 0.76 0.78 1",
    "FontSize Bar": 11,
    "FontSize Level": 11,
    "FontSize Percent": 11,
    "Text Shadow Enabled": true,
    "Xp Bar Background": "0.2 0.2 0.2 0.2"
  },
  "Functions": {
    "Collectible Entities": {
      "diesel_collectable": true,
      "coconut-spawn": true,
      "sulfur-collectable": true,
      "hemp-collectable": true,
      "wood-collectable": true,
      "stone-collectable": true,
      "metal-collectable": true,
      "mushroom-cluster-6": true,
      "mushroom-cluster-5": true,
      "berry-yellow-collectable": true,
      "berry-white-collectable": true,
      "berry-red-collectable": true,
      "berry-green-collectable": true,
      "berry-blue-collectable": true,
      "wheat-collectable": true,
      "potato-collectable": true,
      "pumpkin-collectable": true,
      "corn-collectable": true,
      "hqm-collectable": true,
      "sunflower-collectable": true,
      "orchid-collectable": true,
      "rose-collectable": true,
      "halloween-stone-collectable": true,
      "berry-black-collectable": true,
      "halloween-metal-collectable": true,
      "halloween-wood-collectable": true,
      "halloween-sulfur-collectible": true,
      "halloween-bone-collectable": true
    },
    "Enable Collectible Pickup": true,
    "Collectible Pickup Hook": "OnCollectiblePickup",
    "Enable Crop Gather": true,
    "Enable Wood Gather": true,
    "Grant Wood XP Only": false,
    "Enable Stone Ore Gather": true,
    "Grant Stone XP Only": false,
    "Enable Sulfur Ore Gather": true,
    "Grant Sulfur XP Only": false,
    "Enable Metal Gather": true,
    "Grant Metal XP Only": false,
    "Enable HQM Gather": true,
    "Grant HQM XP Only": false,
    "Allow Mining Multiplier On Gibs": true
  },
  "Generic": {
    "Enable Level Up Broadcast": false,
    "Enable Permission": false,
    "Chainsaw On Gather Permission": "zlevelsremastered.chainsaw.allowed",
    "Jackhammer On Gather Permission": "zlevelsremastered.jackhammer.allowed",
    "Weapons On Gather Permission": "zlevelsremastered.weapons.blocked",
    "gameProtocol": 2633,
    "Penalty Minutes": 10,
    "Penalty Minutes (Suicide)": 10,
    "Penalty Resets All Levels To Default": false,
    "Penalty On Death": true,
    "Penalty On Suicide": false,
    "Permission Name": "zlevelsremastered.use",
    "Permission Name XP": "zlevelsremastered.noxploss",
    "Additional Boost Multipliers": {
      "zlevelsremastered.vip1": 2.0,
      "zlevelsremastered.vip2": 3.0,
      "zlevelsremastered.vip3": 4.0,
      "zlevelsvip1": 5.0,
      "zlevelsvip2": 6.0,
      "zlevelsvip3": 7.0
    },
    "Permission Name No Wipes": "zlevelsremastered.nowipes",
    "Player CUI Default Enabled": true,
    "Player Plugin Default Enabled": true,
    "Plugin Prefix": "<color=orange>ZLevels</color>: ",
    "SteamID Icon": 0,
    "Wipe Data OnNewSave": false
  },
  "Night Bonus": {
    "Points Per Hit At Night": {
      "ACQUIRE": 60.0,
      "MINING": 60.0,
      "SKINNING": 60.0,
      "WOODCUTTING": 60.0
    },
    "Points Per PowerTool At Night": {
      "MINING": 60.0,
      "WOODCUTTING": 60.0
    },
    "Resource Per Level Multiplier At Night": {
      "ACQUIRE": 2.0,
      "MINING": 2.0,
      "SKINNING": 2.0,
      "WOODCUTTING": 2.0
    },
    "Enable Night Bonus": false,
    "Broadcast Enabled Bonus": true,
    "Log Enabled Bonus Console": false
  },
  "Settings": {
    "Crafting Details": {
      "Time Spent": 1.0,
      "XP Per Time Spent": 3.0,
      "Percent Faster Per Level": 5.0,
      "Require Permission For Instant Bulk Craft": false,
      "Instant Bulk Craft Permission Does Not Require Max Level": false,
      "Permission For Instant Bulk Crafting At Max Level": "zlevelsremastered.crafting.instantbulk",
      "Require Inventory Slots": false
    },
    "Fishing Details": {
      "XP Per Catch": 30.0,
      "Extra Fish Chance Per Level (%)": 0.25,
      "Maximum Extra Fish Chance (%)": 50.0
    },
    "Default Resource Multiplier": {
      "ACQUIRE": 1.0,
      "MINING": 1.0,
      "SKINNING": 1.0,
      "WOODCUTTING": 1.0
    },
    "Level Caps": {
      "ACQUIRE": 200.0,
      "CRAFTING": 20.0,
      "MINING": 200.0,
      "SKINNING": 200.0,
      "WOODCUTTING": 200.0,
      "FISHING": 200.0
    },
    "Percent Lost On Death": {
      "ACQUIRE": 50.0,
      "CRAFTING": 50.0,
      "MINING": 50.0,
      "SKINNING": 50.0,
      "WOODCUTTING": 50.0,
      "FISHING": 50.0
    },
    "Percent Lost On Suicide": {
      "ACQUIRE": 0.0,
      "CRAFTING": 0.0,
      "MINING": 0.0,
      "SKINNING": 0.0,
      "WOODCUTTING": 0.0,
      "FISHING": 0.0
    },
    "No Penalty Zones": [
      "adminzone1",
      "999999"
    ],
    "Points Per Hit": {
      "ACQUIRE": 30.0,
      "MINING": 30.0,
      "SKINNING": 30.0,
      "WOODCUTTING": 30.0
    },
    "Points Per Power Tool": {
      "MINING": 30.0,
      "WOODCUTTING": 30.0
    },
    "Resource Per Level Multiplier": {
      "ACQUIRE": 2.0,
      "MINING": 2.0,
      "SKINNING": 2.0,
      "WOODCUTTING": 2.0
    },
    "Skill Colors": {
      "ACQUIRE": "#7700AA",
      "CRAFTING": "#00FF00",
      "MINING": "#0000FF",
      "SKINNING": "#FF0000",
      "WOODCUTTING": "#FF9900",
      "FISHING": "#00BFFF"
    },
    "Starting Stats": {
      "Acquire Level": 1.0,
      "Acquire Points": 10.0,
      "Crafting Level": 1.0,
      "Crafting Points": 10.0,
      "Mining Level": 1.0,
      "Mining Points": 10.0,
      "Skinning Level": 1.0,
      "Skinning Points": 10.0,
      "Woodcutting Level": 1.0,
      "Woodcutting Points": 10.0,
      "Fishing Level": 1.0,
      "Fishing Points": 10.0,
      "XP Multiplier": 100.0
    },
    "Use Mining Skill When Picking Up Stones And Ore": true,
    "Use Acquire Skill When Picking Up Wood": false
  },
  "Level Up Rewards (Reward * Level = Amount)": {
    "Economics Money": {
      "Acquire": 0.0,
      "Crafting": 0.0,
      "Mining": 0.0,
      "Skinning": 0.0,
      "Woodcutting": 0.0,
      "Fishing": 0.0
    },
    "ServerRewards Points": {
      "Acquire": 0.0,
      "Crafting": 0.0,
      "Mining": 0.0,
      "Skinning": 0.0,
      "Woodcutting": 0.0,
      "Fishing": 0.0
    },
    "SkillTree XP": {
      "Acquire": 0.0,
      "Crafting": 0.0,
      "Mining": 0.0,
      "Skinning": 0.0,
      "Woodcutting": 0.0,
      "Fishing": 0.0
    }
  }
}

FAQ

How to disable Crafting (or any other skill)?

You can disable it by simply setting it's LevelCap to -1.

Can I change player levels easily?

You can modify players level via RCON/Console, using the following commands:

  • zl.lvl <playername | steamid> <skillshortcutname> <XX> -- Set player level to XX level.
  • zl.lvl <playername | steamid> <skillshortcutname> <XX> -- Increase player level by XX levels.
  • zl.lvl <playername | steamid> <skillshortcutname> -<XX> -- Decrease player level by XX levels.
  • zl.lvl <playername | steamid> <skillshortcutname> /<XX> -- Divide player level by XX.
  • zl.lvl <playername | steamid> <skillshortcutname> *<XX> -- Set player XP rates to XX% of server rates (100 is default).

Instead of names you can use wildcard(*):

  • * -- affects online players.

  • ** -- affects all players.

  • Example: zl.lvl Player WC /2 -- Player gets his WC level divided by 2.

  • Example: zl.lvl * * 3 -- Everyone currently playing in the server gets 3 for all skills.

  • Example: zl.lvl ** * /2 -- Everyone (including offline players) gets their level divided by 2.

Shortcut codes for skills are:

  • C - Crafting
  • WC - Woodcutting
  • M - Mining
  • S - Skinning
  • A - Aquire
  • F - Fishing
  • * - All skills

API

These hooks are called after Item/ItemAmount is modified.

    void OnZLevelDispenserGather(ResourceDispenser dispenser, BasePlayer player, Item item, int prevAmount, int newAmount, bool isPowerTool) { }

    void OnZLevelCollectiblePickup(ItemAmount ia, BasePlayer player, CollectibleEntity ce, int prevAmount, float newAmount) { } // When `Collectible Pickup Hook` is set to `OnCollectiblePickup`
    
    void OnZLevelCollectiblePickedup(Item item, BasePlayer player, CollectibleEntity ce, int prevAmount, int newAmount) { } // When `Collectible Pickup Hook` is set to `OnCollectiblePickedup`

    void OnZLevelGrowableGathered(GrowableEntity ge, Item item, BasePlayer player, int prevAmount, int newAmount) { }

    void OnZLevelFishCatch(Item item, BaseFishingRod rod, BasePlayer player, int prevAmount, int itemAmount, bool extraFish) { }

Credits

  • Zeiser, the author of the original ZLevels plugin
  • Visagalis, the original author of the plugin
  • Fujicura, for helping maintain the plugin
  • Default, for helping maintain the plugin
  • nivex, current maintainer

MIT License


Copyright (c) 2020 Default


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.