Plugins Required:
http://www.yanfly.moe/wiki/Core_Engine_VisuStella_MZ
http://www.yanfly.moe/wiki/Skills_and_States_Core_VisuStella_MZ
Plugin Manager > VisuMZ_1_SkillsStatesCore > Skill Cost Types
Scroll all the way down to JS: Draw Gauge.
Replace code with:
The first line "const icon =32;
change this to the icon number you want.
Scroll all the way down to JS: Draw Gauge.
Replace code with:
Code:
// Declare Settings
const icon = 32;
const color1 = ColorManager.hpGaugeColor1();
const color2 = ColorManager.hpGaugeColor2();
// Declare Variables
const sprite = this;
const settings = sprite._costSettings;
const bitmap = sprite.bitmap;
const user = sprite._battler;
const currentValue = sprite.currentDisplayedValue();
const bitmapWidth = sprite.bitmapWidth();
const bitmapHeight = sprite.textHeight ? sprite.textHeight() : sprite.bitmapHeight();
const gaugeHeight = sprite.gaugeHeight();
// Draw Gauge
const gx = 0;
const gy = bitmapHeight - gaugeHeight;
const gw = bitmapWidth - gx;
const gh = gaugeHeight;
this.drawFullGauge(color1, color2, gx, gy, gw, gh);
// Draw Icon
const iconBitmap = ImageManager.loadSystem("IconSet");
const iw = ImageManager.iconWidth;
const ih = ImageManager.iconHeight;
const ix = (icon % 16) * iw;
const iy = Math.floor(icon / 16) * ih;
bitmap.blt(iconBitmap, ix, iy, iw, ih, 0, 0, 24, 24);
// Draw Value
const vw = bitmapWidth - 2;
const vh = bitmapHeight;
sprite.setupValueFont();
bitmap.textColor = ColorManager.hpColor(user);
bitmap.drawText(currentValue, 0, 0, vw, vh, "right");
change this to the icon number you want.
Plugin Manager > VisuMZ_1_SkillsStatesCore > Skill Cost Types
Scroll all the way down to JS: Draw Gauge.
Replace code with:
The first line "const icon =33;
change this to the icon number you want.
Scroll all the way down to JS: Draw Gauge.
Replace code with:
Code:
// Declare Settings
const icon = 33;
const color1 = ColorManager.mpGaugeColor1();
const color2 = ColorManager.mpGaugeColor2();
// Declare Variables
const sprite = this;
const settings = sprite._costSettings;
const bitmap = sprite.bitmap;
const user = sprite._battler;
const currentValue = sprite.currentDisplayedValue();
const bitmapWidth = sprite.bitmapWidth();
const bitmapHeight = sprite.textHeight ? sprite.textHeight() : sprite.bitmapHeight();
const gaugeHeight = sprite.gaugeHeight();
// Draw Gauge
const gx = 0;
const gy = bitmapHeight - gaugeHeight;
const gw = bitmapWidth - gx;
const gh = gaugeHeight;
this.drawFullGauge(color1, color2, gx, gy, gw, gh);
// Draw Icon
const iconBitmap = ImageManager.loadSystem("IconSet");
const iw = ImageManager.iconWidth;
const ih = ImageManager.iconHeight;
const ix = (icon % 16) * iw;
const iy = Math.floor(icon / 16) * ih;
bitmap.blt(iconBitmap, ix, iy, iw, ih, 0, 0, 24, 24);
// Draw Value
const vw = bitmapWidth - 2;
const vh = bitmapHeight;
sprite.setupValueFont();
bitmap.textColor = ColorManager.mpColor(user);
bitmap.drawText(currentValue, 0, 0, vw, vh, "right");
change this to the icon number you want.
Plugin Manager > VisuMZ_1_SkillsStatesCore > Skill Cost Types
Scroll all the way down to JS: Draw Gauge.
Replace code with:
The first line "const icon =87;
change this to the icon number you want.
Scroll all the way down to JS: Draw Gauge.
Replace code with:
Code:
// Declare Settings
const icon = 87;
const color1 = ColorManager.tpGaugeColor1();
const color2 = ColorManager.tpGaugeColor2();
// Declare Variables
const sprite = this;
const settings = sprite._costSettings;
const bitmap = sprite.bitmap;
const user = sprite._battler;
const currentValue = sprite.currentDisplayedValue();
const bitmapWidth = sprite.bitmapWidth();
const bitmapHeight = sprite.textHeight ? sprite.textHeight() : sprite.bitmapHeight();
const gaugeHeight = sprite.gaugeHeight();
// Draw Gauge
const gx = 0;
const gy = bitmapHeight - gaugeHeight;
const gw = bitmapWidth - gx;
const gh = gaugeHeight;
this.drawFullGauge(color1, color2, gx, gy, gw, gh);
// Draw Icon
const iconBitmap = ImageManager.loadSystem("IconSet");
const iw = ImageManager.iconWidth;
const ih = ImageManager.iconHeight;
const ix = (icon % 16) * iw;
const iy = Math.floor(icon / 16) * ih;
bitmap.blt(iconBitmap, ix, iy, iw, ih, 0, 0, 24, 24);
// Draw Value
const vw = bitmapWidth - 2;
const vh = bitmapHeight;
sprite.setupValueFont();
bitmap.textColor = ColorManager.tpColor(user);
bitmap.drawText(currentValue, 0, 0, vw, vh, "right");
change this to the icon number you want.
Replace const icon = x
with const icon = $gameVariables.value(x);
to change icons at any time(be sure to use a different variable for each stat)
with const icon = $gameVariables.value(x);
to change icons at any time(be sure to use a different variable for each stat)
Plugin Manager > VisuMZ_1_SkillsStatesCore > Skill Cost Types
Copy line 1 "HP" and paste it at the bottom.
Open the pasted version.
Change the name as to identify/call (using HPi for this example).
Scroll all the way down to JS: Draw Gauge.
Replace code with:
The first line "const icon =32;
change this to the icon number you want.
Copy line 1 "HP" and paste it at the bottom.
Open the pasted version.
Change the name as to identify/call (using HPi for this example).
Scroll all the way down to JS: Draw Gauge.
Replace code with:
Code:
// Declare Settings
const icon = 32;
const color1 = ColorManager.hpGaugeColor1();
const color2 = ColorManager.hpGaugeColor2();
// Declare Variables
const sprite = this;
const settings = sprite._costSettings;
const bitmap = sprite.bitmap;
const user = sprite._battler;
const currentValue = sprite.currentDisplayedValue();
const bitmapWidth = sprite.bitmapWidth();
const bitmapHeight = sprite.textHeight ? sprite.textHeight() : sprite.bitmapHeight();
const gaugeHeight = sprite.gaugeHeight();
// Draw Gauge
const gx = 0;
const gy = bitmapHeight - gaugeHeight;
const gw = bitmapWidth - gx;
const gh = gaugeHeight;
this.drawFullGauge(color1, color2, gx, gy, gw, gh);
// Draw Icon
const iconBitmap = ImageManager.loadSystem("IconSet");
const iw = ImageManager.iconWidth;
const ih = ImageManager.iconHeight;
const ix = (icon % 16) * iw;
const iy = Math.floor(icon / 16) * ih;
bitmap.blt(iconBitmap, ix, iy, iw, ih, 0, 0, 24, 24);
// Draw Value
const vw = bitmapWidth - 2;
const vh = bitmapHeight;
sprite.setupValueFont();
bitmap.textColor = ColorManager.hpColor(user);
bitmap.drawText(currentValue, 0, 0, vw, vh, "right");
change this to the icon number you want.
Plugin Manager > VisuMZ_1_SkillsStatesCore > Skill Cost Types
Copy line 2 "MP" and paste it at the bottom.
Open the pasted version.
Change the name as to identify/call (using MPi for this example).
Scroll all the way down to JS: Draw Gauge.
Replace code with:
The first line "const icon =33;
change this to the icon number you want.
Copy line 2 "MP" and paste it at the bottom.
Open the pasted version.
Change the name as to identify/call (using MPi for this example).
Scroll all the way down to JS: Draw Gauge.
Replace code with:
Code:
// Declare Settings
const icon = 33;
const color1 = ColorManager.mpGaugeColor1();
const color2 = ColorManager.mpGaugeColor2();
// Declare Variables
const sprite = this;
const settings = sprite._costSettings;
const bitmap = sprite.bitmap;
const user = sprite._battler;
const currentValue = sprite.currentDisplayedValue();
const bitmapWidth = sprite.bitmapWidth();
const bitmapHeight = sprite.textHeight ? sprite.textHeight() : sprite.bitmapHeight();
const gaugeHeight = sprite.gaugeHeight();
// Draw Gauge
const gx = 0;
const gy = bitmapHeight - gaugeHeight;
const gw = bitmapWidth - gx;
const gh = gaugeHeight;
this.drawFullGauge(color1, color2, gx, gy, gw, gh);
// Draw Icon
const iconBitmap = ImageManager.loadSystem("IconSet");
const iw = ImageManager.iconWidth;
const ih = ImageManager.iconHeight;
const ix = (icon % 16) * iw;
const iy = Math.floor(icon / 16) * ih;
bitmap.blt(iconBitmap, ix, iy, iw, ih, 0, 0, 24, 24);
// Draw Value
const vw = bitmapWidth - 2;
const vh = bitmapHeight;
sprite.setupValueFont();
bitmap.textColor = ColorManager.mpColor(user);
bitmap.drawText(currentValue, 0, 0, vw, vh, "right");
change this to the icon number you want.
Plugin Manager > VisuMZ_1_SkillsStatesCore > Skill Cost Types
Copy line 3 "TP" and paste it at the bottom.
Open the pasted version.
Change the name as to identify/call (using TPi for this example).
Scroll all the way down to JS: Draw Gauge.
Replace code with:
The first line "const icon =87;
change this to the icon number you want.
Copy line 3 "TP" and paste it at the bottom.
Open the pasted version.
Change the name as to identify/call (using TPi for this example).
Scroll all the way down to JS: Draw Gauge.
Replace code with:
Code:
// Declare Settings
const icon = 87;
const color1 = ColorManager.tpGaugeColor1();
const color2 = ColorManager.tpGaugeColor2();
// Declare Variables
const sprite = this;
const settings = sprite._costSettings;
const bitmap = sprite.bitmap;
const user = sprite._battler;
const currentValue = sprite.currentDisplayedValue();
const bitmapWidth = sprite.bitmapWidth();
const bitmapHeight = sprite.textHeight ? sprite.textHeight() : sprite.bitmapHeight();
const gaugeHeight = sprite.gaugeHeight();
// Draw Gauge
const gx = 0;
const gy = bitmapHeight - gaugeHeight;
const gw = bitmapWidth - gx;
const gh = gaugeHeight;
this.drawFullGauge(color1, color2, gx, gy, gw, gh);
// Draw Icon
const iconBitmap = ImageManager.loadSystem("IconSet");
const iw = ImageManager.iconWidth;
const ih = ImageManager.iconHeight;
const ix = (icon % 16) * iw;
const iy = Math.floor(icon / 16) * ih;
bitmap.blt(iconBitmap, ix, iy, iw, ih, 0, 0, 24, 24);
// Draw Value
const vw = bitmapWidth - 2;
const vh = bitmapHeight;
sprite.setupValueFont();
bitmap.textColor = ColorManager.tpColor(user);
bitmap.drawText(currentValue, 0, 0, vw, vh, "right");
change this to the icon number you want.
Now that you have settings in place, lets add them to our actors!
Database > Classes
in the Notebox add:
Code:
<Replace HP Gauge: HPi>
<Replace MP Gauge: MPi>
<Replace TP Gauge: TPi>
Plugin Manager > VisuMZ_1_SkillsStatesCore > Skill Cost Types >
Delete the original HP, MP, TP settings.
Go to your new settings(example: HPi)
under Name is Settings > Icon.
Change this to the same or whatever you like to show when displaying skill cost.
Leaving as 0 wont display any icon.
Cost by database and by notetag will still only use <HP Cost: x> and not <HPi Cost: x>
Delete the original HP, MP, TP settings.
Go to your new settings(example: HPi)
under Name is Settings > Icon.
Change this to the same or whatever you like to show when displaying skill cost.
Leaving as 0 wont display any icon.
Cost by database and by notetag will still only use <HP Cost: x> and not <HPi Cost: x>
Now that everything is working, change the HPi, MPi, and TPi back to HP, MP, TP.
Remove the notetags from the classes. all actors will display Icons.