Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // EquipmentRarityColors.js
- //=============================================================================
- //v1.1
- /*:
- * @plugindesc Changes the weapons color based on rarity value you assign.
- * @author Jeremy Cannady
- *
- *
- * @help Changes the Items color based on the rarity you assign in the note field.
- *
- *
- <itemRarity:1> Uncommon
- <itemRarity:2>
- <itemRarity:3>
- <itemRarity:4>
- <itemRarity:5> Super Rare Mega Death Thingy
- *
- *
- *
- */
- (function(){
- var copyOfDrawItemName = Window_Base.prototype.drawItemName;
- Window_Base.prototype.drawItemName = function(item, x, y, width) {
- copyOfDrawItemName.call(this,item, x, y, width);
- width = width || 312;
- var iconBoxWidth = this.lineHeight();
- var padding = (iconBoxWidth - Window_Base._iconWidth) / 2;
- if(item){
- var rarity = parseInt(item.meta.itemRarity);
- //Change the this.textColor(x) where x is the color you want based off the system window.png
- if(rarity == 1){this.changeTextColor(this.textColor(3)) //Green
- }else if (rarity == 2){this.changeTextColor(this.textColor(1))//Blue
- }else if (rarity == 3){this.changeTextColor(this.textColor(20))//Orange
- }else if (rarity == 4){this.changeTextColor(this.textColor(10))//Red
- }else if (rarity == 5){this.changeTextColor(this.textColor(17))//Purple
- }else{this.resetTextColor();};
- this.drawText(item.name, x + iconBoxWidth, y, width - iconBoxWidth);
- };
- };
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement