Skills - SamvanBerkel115/rpgSurvival GitHub Wiki

There are 8 skills in the game

  • Combat: Leveled by doing damage to other entities
  • Excavation: Leveled by digging with your shovel
  • Farming:
  • Fishing:
  • Magic:
  • Mining:
  • Woodcutting:

Combat

Leveling

Combat is leveled by damaging other entities. The more dangerous the entity, the more xp damaging that entity gives.

Unlocks

  • Level 5: Stone sword
  • Level 10: Iron sword
  • Level 15: Gold sword
  • Level 20: Diamond sword
  • Level 30: Netherite sword

Excavation

Training

Excavation is leveled by destroying blocks that are meant to be destroyed using a spade, for example: sand, dirt gravel etc. The amount of xp that each block gives can be customized in the config file.

Unlocks

Leveling excavation can unlock different tools. Whenever a player interact with a block using a tool that he has not unlocked yet, the interact event is cancelled. This means the user can not use any locked tool in any way.

  • Level 5: Stone spade
  • Level 10: Iron spade
  • Level 15: Gold spade
  • Level 20: Diamond spade
  • Level 30: Netherite spade

Fishing

Leveling

Fishing is leveled simply by caching fish using a fishing rod.

Mechanics

Whenever a player catches a fish, we add a random weight to the fish. The higher the player's fishing level, the higher the weight will be.


Woodcutting

Training

Woodcutting is trained by destroying any of the log blocks. The more rare the log is, the more xp destroying it gives.

Mechanics

Whenever a player destroys a log block that is part of a tree, there is a random chance that the entire tree falls down. This chance increases as the player's woodcutting level increases. To prevent this from occuring when a player destroys a log that he has placed himself, there is an algorithm in place to check if a log is part of a tree. The algorithm works as follows:

currentBlock = destroyedBlock

while currentBlock.type == 'log'
   currentBlock = block above currentBlock

if currentblock.type == leaf
  return true
else
  return false

Unlocks

  • Level 5: Stone axe
  • Level 10: Iron axe
  • Level 15: Gold axe
  • Level 20: Diamond axe
  • Level 30: Netherite axe