More control over Visustella Item/Skill display data

Introduction

Required Plugins:
http://www.yanfly.moe/wiki/Core_Engine_VisuStella_MZ
http://www.yanfly.moe/wiki/Items_and_Equips_Core_VisuStella_MZ

Anyone using Visustella should be familiar with how Items and spells display more data for the player to see.
I've seen multiple requests inquiring how to omit specific lines from being displayed.
The plugin itself allows devs to customize what the display name of data elements are called; as well as changing the resulting data to something more custom.
Code:
<Status Info>
 key: data
</Status Info>
There are also custom notetags which allow the dev to include additional custom data.
Code:
<Custom Status Info>
 key: data
</Custom Status Info>
As is, there is no direct way to selectively omit specific data elements-- until now.

Spoiler: Default Item Display
DefaultSettings.png

Items may have a varying amount of data elements applied to them. Having an Item such as above would result in the following being displayed in game:
Default.png

Plug N Play

If you want to adjust the section of code which controls the display of this information, head to your plugin manager.
VisuMZ_1_ItemsEquipCore > Shop Status Window > Item Data > Item General > JS: Draw Item Data

From there, Replace the entire section of code with this:
Spoiler: JS: Draw Item Data code
Code:
const lineHeight = this.lineHeight();
let x = 0;
let y = 0;
let width = this.innerWidth;
let height = this.innerHeight;
let hw = Math.floor(width / 2);
let hx = x + width - hw;
const item = this._item;
// Draw Item Name and Quantity
this.drawItemName(item, x + this.itemPadding(), y, width - this.itemPadding() * 2);
this.drawItemDarkRect(x, y, width);
y += lineHeight;
// Draw Main Item Properties
if (!item.meta.Dconsume) {
    if (item.meta.Dqty) {
        if (this.drawItemConsumable(x, y, width)) y += lineHeight;
    }
    else {
if (this.drawItemConsumable(x, y, hw)) y += 0;
    }
}
if (!item.meta.Dqty) {
    if (item.meta.Dconsume) {
        if (this.drawItemQuantity(x, y, width)) y += lineHeight;
    }
    else {
if (this.drawItemQuantity(hx, y, hw)) y += lineHeight;
    }
}
if (item.occasion < 3) {
    if (!item.meta.Ddmg) {
    y = this.drawItemDamage(x, y, width);
    }
    if (!item.meta.Deffect) {
    y = this.drawItemEffects(x, y, width);
    }
}
y = this.drawItemCustomEntries(x, y, width);
// Draw Remaining Item Properties
if (item.occasion < 3) {
    if (!item.meta.Docc) {
        if (item.meta.Dscope) {
            if (this.drawItemOccasion(x, y, width)) y += lineHeight;
        }
        else {
    if (this.drawItemOccasion(x, y, hw)) y += 0;
    }
    }
 
    if (!item.meta.Dscope) {
        if (item.meta.Docc) {
            if (this.drawItemScope(x, y, width)) y += lineHeight;
        }
        else {
    if (this.drawItemScope(hx, y, hw)) y += lineHeight;
    }
    }
    if (!item.meta.Dhit) {
        if (item.meta.Drate) {
            if (this.drawItemHitType(x, y, width)) y += lineHeight;
        }
        else {
            if (this.drawItemHitType(x, y, hw)) y += 0;
        }
    }
    if (!item.meta.Drate) {
        if (item.meta.Dhit) {
            if (this.drawItemSuccessRate(x, y, width)) y += lineHeight;
        }
        else {
            if (this.drawItemSuccessRate(hx, y, hw)) y += lineHeight;
        }
    }
    if (!item.meta.Dspeed) {
        if (item.meta.Drep) {
            if (this.drawItemSpeed(x, y, width)) y += lineHeight;
        }
        else {
            if (this.drawItemSpeed(x, y, hw)) y += 0;
        }
    }
    if (!item.meta.Drep) {
        if (item.meta.Dspeed) {
            if (this.drawItemRepeats(x, y, width)) y += lineHeight;
        }
        else {
            if (this.drawItemRepeats(hx, y, hw)) y += lineHeight;
        }
    }
 
}
// Fill Rest of the Window
this.drawItemDarkRect(x, y, width, height - y);
item.meta.Data !== undefined ? this.drawTextEx(`<WordWrap>${item.meta.Data}`, x + this.itemPadding(), y, width - this.itemPadding() * 2) : null;

With the code in place, you can do nothing and everything will function as it always has.

Customise

If you want to selectively remove certain data elements to further customize your game see the examples below.
Changes can be made by including one or more of the following notetags on an item or skill.
Spoiler: Notetags
Code:
<Dconsume>
<Dqty>
<Ddmg>
<Deffect>
<Docc>
<Dscope>
<Dhit>
<Drate>
<Dspeed>
<Drep>

NOTE* These notetags REMOVE data from being displayed.
I will include the default settings along side the custom version.

Spoiler: Consumable Item?
Adding the notetag <Dconsume> to the item, display of Consumable data will no longer appear on that item.
Default.png
Dconsume.png

Spoiler: Quantity Held
Adding the notetag <Dqty> to the item, display of Quantity held data will no longer appear on that item.
Default.png
Dqty.png

Spoiler: Damage-related Information
Adding the notetag <Ddmg> to the item or skill, display of Damage data will no longer appear on that item or skill. NOTE* Damage data may include multiple lines of information if that item or skill has any(Database > Item/Skill > Damage[Type/Element/Formua(multiplier)]).
Default.png
Ddmg.png

Spoiler: Item/Skill Effects
Adding the notetag <Deffect> to the item or skill, display of Effects data will no longer appear on that item or skill. NOTE* Effects data may include multiple lines of information if that item or skill has any(Database > Item/Skill > Effects(Recover/State/Param/Other).
Default.png
Deffect.png

Spoiler: Occasion
Adding the notetag <Docc> to the item or skill, display of Occasion data will no longer appear on that item or skill. (Database > Item/Skill > General Settings > Occasion.)
Default.png
Docc.png

Spoiler: Scope
Adding the notetag <Dscope> to the item or skill, display of Scope data will no longer appear on that item or skill. (Database > Item/Skill > General Settings > Scope.)
Default.png
Dscope.png

Spoiler: Hit Type
Adding the notetag <Dhit> to the item or skill, display of Hit Type data will no longer appear on that item or skill. (Database > Item/Skill > Invocation > Hit Type.)
Default.png
Dhit.png

Spoiler: Hit Rate
Adding the notetag <Drate> to the item or skill, display of Hit Rate data will no longer appear on that item or skill. (Database > Item/Skill > Invocation > Success.)
Default.png
Drate.png

Spoiler: Invoke Speed
Adding the notetag <Dspeed> to the item or skill, display of Speed data will no longer appear on that item or skill. (Database > Item/Skill > Invocation > Speed.)
Default.png
Dspeed.png

Spoiler: Repeat Hits
Adding the notetag <Drep> to the item or skill, display of Hit data will no longer appear on that item or skill. (Database > Item/Skill > Invocation > Repeat.)
Default.png
Drep.png

NEW FEATURE!
Added the option insert own text(text codes allowed).
use notetag:
Code:
<Data:x>
Spoiler: Custom Data
1692535271990.png

Code:
<Dconsume>
<Dqty>
<Ddmg>
<Deffect>
<Docc>
<Dscope>
<Dhit>
<Drate>
<Dspeed>
<Drep>
<Data:This is a \C[14]test\C[0] of the emergency text system.
Write whatever lore seems suitable.
\I[115] \I[233]
May your maker dreams come true.
Enjoy!>
Hope you guys enjoy making use of this.
As always, Credit the Visustella team.
Envelope image by: dragoonwys & AealZX
https://www.gamedevmarket.net/asset/ad-visual-inventory-paper-vol-1/
Definitely seems super useful, I'm gonna be porting my project to MZ here soon so nice timing!
Definitely seems super useful, I'm gonna be porting my project to MZ here soon so nice timing!
I'm glad you find it useful. 🙂
What a useful addition! Thank you for this!
Is it possible for an addition to be made like adding HP cost, MP cost to the display window?
This just saved me a bunch of headaches. Thanks!
I don't mean to necropost but I have to ask: what would I need to do to simply hide all information and display a fluff/lore description longer than the one line in the menu? or are there different ways to do that?
rewrite the entire code section to display info as you like
rewrite the entire code section to display info as you like
I'm not sure how to, any pointers?
Thanks, this is very helpful, added to favorites.

I actually removed the shop status window because there was too much unnecessary information in skills and items.
Time to get to work, I have to redo everything 😮
I'm not sure how to, any pointers?
Updated to allow custom text
1692535519576.png
Updated to allow custom text
View attachment 273950
Thank you!
(Emergency?)
Thank you so much from France :LZYsmile:!
It's helping me and my brother creating our own game!
Updated to allow custom text
View attachment 273950


Very nice Update, this helps a lot!

When i use the <Data: x> command it displays <wordwrap> alongside the message.
Any idea why, and how i can remove it ?

Thank you
Very nice Update, this helps a lot!

When i use the <Data: x> command it displays <wordwrap> alongside the message.
Any idea why, and how i can remove it ?

Thank you
Not sure, I havent encountered this and dont have a setup to test. You can try changing word wrap settings in message core? u can try removing the wordwrap portion of the code?
Not sure, I havent encountered this and dont have a setup to test. You can try changing word wrap settings in message core? u can try removing the wordwrap portion of the code?
I dont use message core, i use galvs message styles but that dont seem to be the problem.

I will try to find the portion of the code and remove it thanks!
I was wondering, could the "Data" code be updated to handle longer descriptions and text codes like </i>? as of now longer descriptions get simply cut off as the window does not resize, and those kind of text codes break the notetag (probably because they act like a "notetag within a notetag" and the engine doesn't handle them, right?
There is another "problem" (I mean not really, it's expected behaviour): the "data" writing overlaps if you use a "shop icon picture" (VS feature) even a small 80px one for test, not necessarily a humongous one. A solution would be to force the picture anchoring to the bottom, but still, if you really like long descriptions, that's only a partial solution. AFAIK the Bestiary plugin has a scrolling functionality for text.

Original thread: https://forums.rpgmakerweb.com/threads/more-control-over-visustella-item-skill-display-data.146988/