Skip to content

Creating a New Race

Redned edited this page Mar 4, 2020 · 2 revisions

Creating a new race within PwingRaces is very easy. Start off by navigating to /plugins/PwingRaces/races in your file manager and by default there should be two files called human.yml and dwarf.yml. With PwingRaces, you are easily able to modify any of the component within those files and even create your own.

To create your own, just create a new file, and call it whatever you please; but for the sake of this tutorial, we will be using werewolf.yml as our example and will be creating a new werewolf race. After you've created your new race file, open it up and it should be empty.

Now for the sake of this tutorial, we will be pulling what is already in the human.yml file to make this process a bit easier, but what you set this to is entirely up to you. Within human.yml, you'll be brought up with something like this:

race:
    name: Human
    display-name: "&fHuman"
    max-level: 30
    gui:
        slot: 10
        icon:
            type: player_head
            owner: Steve
            display-name: "&fHuman &7| &aUnlocked"
            lore:
            - '&7A race of intelligence primarily'
            - '&7strengthened in areas of combat'
            - '&7and survival.'
        icon-selected:
            type: player_head
            owner: Steve
            display-name: "&fHuman &7| &eSelected"
            lore:
            - '&7A race of intelligence primarily'
            - '&7strengthened in areas of combat'
            - '&7and survival.'
            enchants:
            - unbreaking 1
            item-flags:
            - hide_enchants
        icon-locked:
            type: skeleton_skull
            display-name: "&c??? &7| &cLocked"
            lore:
            - '&7Complete the tutorial to'
            - '&7unlock this race.'

Now, there are many different options presented here. Read below for more information.

Name Input Description Default
name string The name of the race. none
display-name string The display (visual) name of the race. name
max-level int The highest level the race can level up to. 30
require-unlock boolean Require if the player must unlock the race. false
spawn-location location Spawn location of the race. none
gui.slot int The slot that the race icon will be placed in /race. 0
gui.icon item The race icon (See: Item Syntax). none
gui.icon-selected item The race icon when selected (See: Item Syntax) gui.icon
gui.icon-locked item The race icon when locked (See: Item Syntax) gui.icon

There are some more things that can be defined here, but if you'd like to see more on that, please take a look at the respective pages for them.

Here is an example of a werewolf race. As you can see the syntax is very similar to that of the human race. You can change any of these values to whatever you please.

race:
   name: Werewolf
   spawn-location: world;100;20;100
   max-level: 30
   require-unlock: true
   gui:
       slot: 29
       icon:
           type: player_head
           owner: Werewolf
           display-name: "&cWerewolf &7| &aUnlocked"
           lore:
           - '&7At night, a dark curse falls upon'
           - '&7this race turning it into a vicious'
           - '&7werewolf!'
       icon-selected:
           type: player_head
           owner: Werewolf
           display-name: "&cWerewolf &7| &eSelected"
           lore:
           - '&7At night, a dark curse falls upon'
           - '&7this race turning it into a vicious'
           - '&7werewolf!'
           enchants:
           - unbreaking 1
           item-flags:
           - hide_enchants
       icon-locked:
           type: skeleton_skull
           display-name: "&c??? &7| &cLocked"
           lore:
           - '&7Defeat the Feral Lycan to'
           - '&7unlock this race.'

And now you know how to create a race! If you'd like to learn more about how you can make these races actually have a use, take a look at the other pages here.