Each player can have a single race. Players begin as the race with "default" set to true.
/race list (or
/races) shows the races available to the players (taking into account any permissions.
Players on the default race can change to any other, but are then forever locked. Just use
/race [racename] to select the race.
/plugins/LegendQuest/races/ folder contains the available races for selection.
Each race config file looks like this.
name: Hobbit chattag: "[H]" description: "Small Hairfoot" longdescription: "Short race, with above average nimbleness." plural: Hobbitses size: 1.0 groups: - Humanoid perm: server.goldmember frequency: 200 default: false basespeed: 0.2 basehealth: 10 baseMana: 10 manaPerSecond: 1 statmods: str: -1 dex: 1 int: 0 wis: 0 con: 0 chr: 0 allowCrafting: true dissallowCrafting: - BOOTS allowSmelting: false allowBrewing: false allowEnchating: false allowRepairing: false allowTaming: false allowedWeapons: - ALL allowedTools: - woodtools - stonetools - irontools allowedArmour: - leather - chain dissallowedWeapons: - bow dissallowedTools: - DIAMOND_AXE dissallowedArmour: - BOOTS skillPoints: 5 skillPointsPerLevel: 0.1 skills: dodge: level: 5 cost: 0 vars: soakchance: 50.0 soak: 5 dodgemod: 5 permskills: portabench: level: 0 cost: 10 manaCost: 10 cooldown: 15000 perm: essentials.workbench perms: - someother.perm - and.another.perm command: workbench levels: 10: hp: 5 50: dex: 1 hp: 5 100: hp: 5 mana: 5 sp: 5 manaregen: 2.5 allowarmour: CHAINMAIL_BOOTS allowcraft: BOOTS xpAdjustKill: -10.0 xpAdjustMine: 15.0 xpAdjustSmelt: 10.0
The above uses all the possible settings to make a complete race for the example. And here's an example of config for a default race.
name: Undecided plural: Undecided size: 1.6 frequency: 0 default: true basehealth: 10 baseMana: 10 manaPerSecond: 0 statmods: str: 0 dex: 0 int: 0 wis: 0 con: 0 chr: 0 groups: - None skillPoints: 0 skillPointsPerLevel: 0
Here's what all the parts do.
- The name of the race. e.g. Human, Elf
- A brief description of the race e.g. "Forest Dwelling race"
- A longer description of the race e.g. "Agile, but frail race, "
- A shorter name to use in chat prefixes. Omit to just use the full race name.
- The name for a group of the race. e.g. Humans Elves. This will be useful in future for quest plugins, but is unused as of v1.0.0.
- How common this race is. Used when randomly selecting a race for, for example an NPC add on.
- The size of this race in meters. Humans are 1.8, for every 0.5 difference the chance to hit and doge is adjusted by one. Some skills may also use size to determine outcome or modify effect.
- the permissions node required to select this character.
- The race that players begin as. Players of this 'race' are allowed to change once (if other races exist), to disable races just have a single race set to default.
- A list of groups that this race is a member of. This is used to group races together when setting permissions for classes.
- The base maximum HP for the race (before any class modifiers). One HP is half a heart and health values over healthScale are displayed scaled to healthScale (but only for display).
- The walking speed of this race. Normal walking speed is 0.2 - 0.4 would be twice as fast.
- The base mana used to power skills.
- The amount of mana regained per second.
- Each stat modifies the base star for the player. Players have a random statline based on their uuid, or all 12s depending on the server config. Each stat effect attribute checks for various elements. For example strength (STR) effects damage, dexterity( DEX) effects hitting/dodging, constitution (CON) hitpoints, intelligence (INT) skill points, wisdom (WIS) enchanting and Charisma (CHR) trading.
- Sets whether the race can use a craft bench, both 2x2 or 3x3 blocked.
- Sets whether the race can use a furnace
- Sets whether this race can brew potions.
- Sets whether the race can enchant items.
- Sets whether this race can use an anvil.
- Sets whether this race can tame animals
- If the allow ability nodes are true, these lists can be used to exclude specific items or groups.
- These sections set the allowed and disallowed items for each race by material.
By default each item is disallowed unless named as allowed in a race or class. Items marked as disallowed get the final say, prevent use/wearing even is allowed by a different class. The data.yml file lists groups of materials that you can refer to for groups.
For example, the above config example allows leather and chain armour, but then disallows BOOTS. Meaning that Hobbits can never wear Boot type armour even if a class would later allow.
- The starting number of skill points for this race.
- Number of skill points extra per level.
- See the skills section for more information on how this section is configured.
- Percentage modifier to apply to all experience from kills
- Percentage modifier to apply to all experience from mining
- Percentage modifier to apply to all experience from smelting
- The levels section allows you to give specific 'rewards' at levels of your choice.
- you can use the following nodes
hp: health points.
sp: skill points.
mana: mana points
manregen: extra mana regeneration
[str|dex|con|int|wis|chr]: extra stat points
allow[craft|repair|smelt|brew|enchant|tame|weapon|tool|armour]: allow access to a material for the chosen core ability
disallow[craft|repair|smelt|brew|enchant|tame|weapon|tool|armour]: disallow access to a material for the chosen core ability