How to build your own Race
Races | Classes | Traits | Chat | Commands | Configuration | SkillTrees | Permissions | FAQ | Version History
Races
What is races?
Races is a group that players would be able to join. This group has many features, made by the admin. Some of these features are:
- Custom health (note! some plugins doesn't like health over or under 20)
- Mana
- Custom traits/spells/abilities
- Race tag
- Restrict armor
- Permission per race
Races config
The default race config looks like this:
Orc: config: tag: '[Orc]' healthbonus: '+10' armor: iron,diamond,chain guislot: 0 traits: DamageReduceTrait: operation: '*' value: 0.5 BerserkerRageTrait: operation: + value: 1 Elv: config: tag: '[Elv]' healthbonus: '+0' armor: leather,gold,chain guislot: 2 traits: FallResistanceTrait: operation: '-' value: 2 SprintTrait: duration: 10 value: 3
Making your own race
It is very simple to make your own race. To make your own race you need these things:
- Name
- Features of that race
- Traits (optional)
- Armor
- Health
- Mana (optional)
- Permissions (optional)
Thats it! Very simple
Layout
First we need to create an empty yml file in the races folder. Call it whatever you want. Best practice is the name of the race followed by .yml.
Now we want to take a look at how the different lines in the yml file affect the race:
(name): config: tag: '[(the race tag)]' healthbonus: (health to add to the race) armor: (Armor the race can wear) manabonus: '+100' (race has 100 mana mor, not affected by classes) guislot: -1 (The slot in the GUI to show this race) traits: (What special abilities does this race have?) trait: (can be any trait) Operation: (Information at the trait page) value: (Information at the trait page) permissions: (permissions for the individual race) - essentials.warps.orc (a permission to use the /warp orc)
It is very important that your race layout looks like this (the optional lines doesn't need to be there, like permissions and mana)
Name and Tag
A races name is defined by the FIRST line of the race (or '<>.config.name: ...'). Which means this one:
orc: <-- That one config: name: 'Orc' <-- Or this one (higher priority)
The tag is a different thing. A tag is a prefix for the player in the "tab" menu or in the chat, depends on your configuration of the plugin. Here is an example of a tag:
orc: config: tag: '[Orc]' <-- Here is the tag
Health and Mana
Simple (static value):
raceMaxHealth is what defines the maximum health the race can have. Health is defined here:
healthbonus: '+10'
This means that the race has a maximum of 30 health (20 base + 10 bonus). Equals to 15 hearts.
manabonus is what defines the maximum mana the race can have. Mana is defined here:
manabonus: '+100'
Advance (based on level):
healthbonus: '<5': 1 '6-10': 5 '11-15': 10 '>16': 15
The level description above works as following:
The key is the level range. Eithe from-to, < smaller as, or > greater as.
The value is the health / mana to add within the level range.
The base build apon is still 20 (lvl 14 would have 30 health in the example above).
Gui Slot
The Gui slot to show to. This is only used if the GUI is activated.
The Item for the Race is set to that slot number.
Armor
Armor is really just what is says. What armor can the race wear?
armor: leather,gold
This race can only wear leather and gold... shitty race, hehe
Traits
Traits, also known as: abilites or spells. They can ALL be added to EVERY race you want to.
It is recommended, that you keep a restricted amount of traits on each race to keep the game balanced. Traits can look like this:
FallResistanceTrait: operation: '-' value: 2
All you have to do is add that and it's there! For more information about how the traits work and how to configure them, go here trait page
Advanced
This is for the advanced server owner, who wants 100% customization on their races
Permissions
Permissions can be granted to the individual race, but beware! once the permission is added, it will NOT be removed from the permission group. Only by doing it manual Permissions are added like this:
permissions: - permission.perm
These permissions all depends on your permission plugin. Let's say you use groupmanager, then to deny the race a permission, you would use the double "-" Like this:
permissions: - -bukkit.op
Note that RaC will add global groups and add players to this group as sub, NOT as main group, so it will not change the current group of the player, but only give them the permissions
Per-Race Permissions
Races can have per-race permissions, which is very usefull for people wanting only one group to pick an exact race.
This could for example be a permission to the orc race:
- RaC.races.orc
To enable this, you would have to enable it in the config.yml file