Classes


Overview

Classes (also known as HeroClasses) are the foundation which Heroes is built upon. We decided not to hard-code classes and instead, let the admin create their own. Classes allow admins to choose what weapons, armor and skills a person can use! You can have leather wearing rogues, a fireball throwing iron wearer or even a vagrant who can only afford wooden weaponry!

Our class system allows for a tiered hierarchy. This means you can require players to master (max level) certain classes before they can enter into other classes.

The class system also allows for dual-classing (as of 1.3).

Configuration

To configure a class, create a new file like the vagrant.yml in your classes subdirectory. Using Notepad++ you should start with the following as a base:

name: Citizen #can only be one word
default: true
wildcard-permission: true
parents:
    strong: []
    weak: []
primary: true
secondary: false
description: The Default Starter Path
permitted-armor:
permitted-weapon:
- FISHING_ROD
- SHEARS
- STONE
permitted-skills:
  ALL: sometext
experience-sources:
- KILLING
- CRAFTING
- MINING
- LOGGING
- FARMING
- QUESTING
- EXTERNAL
permission-skills:
base-max-health: 20
max-health-per-level: 0.1
base-max-mana: 75
max-mana-per-level: 1
mana-regen: 1
mana-regen-per-level: .05
expmodifier: 1.0
item-damage:
  air: 1
item-damage-level:
projectile-damage:
  Arrow: 3
projectile-damage-level:
expLoss: 0
tier: 0
recipes: [ default ]

Please, remember. Much like any other YML document, this requires four spaces, that means 4 " " not a tab.

Now, to create a new class you'll need to know what each element means and does.

name:

The above is the class name. This identifies the class to the player when they're trying to select the class. Meaning, this needs to be something readable and typable in minecraft. So please avoid long names such as "vagrantwarriormagesoawesomelolololo" as this won't be typable with the rest of the commands. This also needs to be unique, so no duplicate vagrant classes.

default:

This denotes the default class, meaning that when the player first logs in, this will be their class. This is a true or false value. False if this is a non-default class and true if it is.

wildcard-permission:

Identifies this class as a user-class. This means it gets added to the heroes.classes.* permission. This option will also make it so all players are able to join this class by default.

primary & secondary

These 2 options determine if the class can be chosen as a primary class or a secondary class.

max-level

This options lets you override the default maximum level set by the server. It can not be higher than the server maxLevel, and it will not alter the exp requirements to get to that level in this class. If this option is not present, the default server maxLevel will be used.

permitted-armor:

This is the types of armor that are allowed. It only does material types at the moment, meaning that it can't stop people from using helmets or boots, but will stop those pesky rogues being over powered by wearing diamond armor. It accepts these values:

DIAMOND
IRON
CHAINMAIL
GOLD
LEATHER

Optionally paired with these Descriptors:

HELMET
CHESTPLATE
LEGGINGS
BOOTS

permitted-weapon:

Much like "permitted-armor", this is the types of weapons users in the class can use. Anything not on the list, the person cannot use. It only accepts these values

WOOD
STONE
IRON
GOLD
DIAMOND

optionally paired with these types:

PICKAXE
AXE
HOE
SPADE
SWORD

permitted-skills:

This is the skills the person is allowed to use. Only skills put inside this will be available to the player. There will be a list of Skills after running the plugin for the first time. Generated in the file itself.

ALL: anything - will give the player access to all skills REGARDLESS of what comes after the ALL node.

experience-sources:

Experience sources is where the player gets their experience from. There are multiple experience sources, MINING, LOGGING, KILLING, CRAFTING, PVP, FARMING, QUESTING, FISHING, TAMING, SHEARING, ENCHANTING, EXTERNAL - currently Enchanting is only used to remove xp, qhile External and Questing don't perform any function within heroes. (they are for external plugins).

item-damage:

This is the list of damage values for the items that can be used as weapons by this class. Any material you define here will use the value sepcified for that item, rather than the default damage value.

projectile-damage:

This sets the damage this class does with certain projectiles. Currently only SNOWBALL, ARROW, and EGG are supported. Itworks just like item-damages but adjusts projectile damage instead.

permission-skills:

These are the permission skills that this class gains. These are defined in the permission-skills.yml file.

base-max-health:

The amount of maximum HP the class has at level 1.

max-health-per-level:

The amount of maximum health added to the class per level beyond the first.

expmodifier:

All xp a hero gains are multiplied by this amount. That means that a value of 1.0 will result in no xp alterations, a modifier of .5 will halve all exp, and a value of 2.0 will double all exp. This is generally for making it require less, or more, experience to get through different classes.

parents:

There are 2 sub-settings for parents. weak and strong. These options are intended to allow more flexibility in what classes are required before a player can go into another class. A player must have mastered ALL classes in the strong parent list before being able to join the class. Weak parents only require the player to master one of the classes listed to meet the requirements. A class can have both Strong and Weak parents. It will require all of the strong parents to be mastered and only one of the weak parents. This only works in 1.3.0+

expLoss:

This settings enables the alternative experience loss multiplier. A player will lose experience equal to the current level's required experience * expLoss.

tier:

This determines which list the class shows up in. Use 1 for the basic classes to be shown in /hero paths. All numbers greater than 1 will make the class show up in /hero specs. Generally use 0 as the default class.