RPGItem

A quite powerful plugin allows you to create your own items, based upon minecraft item types. To have items with longer durability, powers, strong enchantments and different damage.

# Configuration The default RPGItem configuration looks like:

`FormatLineSize: 39` `ItemTooltipGeneralInfoFormat: '&f%hand %type'` `ItemTooltipDamageFormat: '&fDamage: %dmgValue - %maxDmgValue'` `ItemTooltipPriceFormat: '&fPrice: %priceValue Aurei'` `ItemTooltipDescriptionFormat: '&f%description'` `ItemTooltipLoreFormat: '&o%lore'` `DurabitityLoss: true` `DurabilityAffectingUtility: 0`

Every configuration which is a string (combination of characters) can contain minecraft color codes ([color code table](http://www.minecraftwiki.net/wiki/Formatting_codes)) use '&' and the id to initialize colors. I admit to change these color codes in the main config and not at the item config, except of the lore and description which used to get longer than one line.

To change the max number of characters per line, change these value. The description and lore will automatically jump into the next line, so you must calculate that when creating your items.

`FormatLineSize: 39`

You can format the major lines of the items description and information. This format is the general information like weapon type and wether two handed or not. The '%hand' will be replaced by the hand you define for you item later and the '%type' will replace set weapon type.

`ItemTooltipGeneralInfoFormat: '&f%hand %type'`

The same as above, '%dmgValue will replace the minimal damage value and '%maxDmgValue' the maximal dmgValue a weapon can deal.

`ItemTooltipDamageFormat: '&fDamage: %dmgValue - %maxDmgValue'`

Here '%priceValue' replaces the number which a item is worth.

`ItemTooltipPriceFormat: '&fPrice: %priceValue Aurei'`

'%description' will replace the items descriprion and %lore replaces the items background story (lore).

`ItemTooltipDescriptionFormat: '&f%description'` `ItemTooltipLoreFormat: '&o%lore'`

If set to false items won't lose any durability, but be advised you can set them pretty high instead of disabling them.

`DurabilityLoss: true`

If higher than 0, this represents the percentage of durability a item needs to have to keep a of its power. And the damage will reduce on lower damage.

`DurabilityAffectingUtility: 0`

# Creating Your Own Items The default item configuration looks like [this](https://github.com/G4meM0ment/RPGEssentials/blob/master/itemConfExample.yml). You'll find it in the directory plugins/RPGEssentials/RPGItem/items every item you create need to be a new .yml file, where the name of the file is the item name. You can add color codes ([color code table](http://www.minecraftwiki.net/wiki/Formatting_codes)) use '&' and the id to initialize colors.

The display name configuration needs to be the same as the file name, it's only to define the capital letters.

`displayName: RPGItem`

You can define the maximal durability of the item type here. In difference to the minecraft default durability it counts down and 0 is an destroyed/unusable item.

`durability: 1000`

Change this material to define the item which represents the new item. It needs to be a bukkit material, all materials can be found on [this](http://jd.bukkit.org/rb/apidocs/org/bukkit/Material.html) list.

`skin: IRON_SWORD`

This will change the data value, which represents the sub id. You cannot set sub ids for items which have durability by default. It works for blocks like wood.

`dataValue: 0`

The color is only used for leather armor, it won't affect any other items. You can define not only minecraft colors. Use the RGB color system ([RGB color table](http://www.rapidtables.com/web/color/RGB_Color.htm)) to make colors you like most.

`color:` ` r: 0` ` g: 0` ` b: 0`

The 'damage' value is the minimal value a weapon can deal and the 'damageMax' value is the highest. If you're using heroes the value will be added upon the damage a hero deals with that weapon class.

`damage: 10` `damageMax: 12`

The price, description, lore, hand and type are only cosmetic until now. They won't change anything gameplay technical things. You can see how to add them to the items description at the configuration section.

`price: 50` `description: A normal iron sword` `lore: '&6No information are known about that sword'` `hand: one-handed` `type: sword`

The quality of an item can be TRASH, COMMON, UNCOMMON, RARE, EPIC and LEGENDARY the color of the itemname will change upon this quality, it's good for the players to see how good the item is.

`quality: COMMON`

Powers can be nightvision, speed, jump, scuba and invisiblity, the value is the strength of the power. Powers on armor will be applied while wearing on other items only when the player got the item in his hand.

`powers:` ` invisibility: 2` ` speed: 2`

Enchantments can be as high as you want, they will be added to the item, a list of the items can be found [here](http://jd.bukkit.org/rb/apidocs/org/bukkit/enchantments/Enchantment.html). `enchantments:` ` knockback: 1`


Comments

Posts Quoted:
Reply
Clear All Quotes