Greetings,
I have been struggling today trying to figure out how to make a specific modification to the way the Visustella ItemEquipsCore draws equipment data, and I thought it best at this point to reach out for some advice.
Basically, what I am trying to do is modify the JS: Draw Equip Data in the plugin parameters to check if an item is a weapon, and if so, draw the Weapon Type for that weapon from the database. Else, if the equipment is not a weapon, I want it to draw the Equipment Type from the database.
Here is the (mostly) default JavaScript code from JS: Draw Equip Data:
If you aren't familiar with the VisuStella ItemEquipsCore, the above code (more or less) creates the following window in game when inspecting a piece of equipment in the item menu:
In this picture, Main Hand is the Equipment Type as drawn from the database. However, since Hunting Knife is a weapon, I want it to show the Weapon Type instead (which would be Short Blade).
If anyone could offer some coding advice on how to make this idea reality, I would greatly appreciate it 🙂.
Thank you in advance and have a wonderful weekend.
-Niniann
I have been struggling today trying to figure out how to make a specific modification to the way the Visustella ItemEquipsCore draws equipment data, and I thought it best at this point to reach out for some advice.
Basically, what I am trying to do is modify the JS: Draw Equip Data in the plugin parameters to check if an item is a weapon, and if so, draw the Weapon Type for that weapon from the database. Else, if the equipment is not a weapon, I want it to draw the Equipment Type from the database.
Here is the (mostly) default JavaScript code from JS: Draw Equip Data:
// Draw Item Name, Type, and Quantity
this.drawItemName(this._item, x + this.itemPadding(), y, width - this.itemPadding() * 2);
this.drawItemDarkRect(x, y, width);
y += lineHeight;
if (this.drawItemEquipType(x, y, hw)) y += 0;
if (this.drawItemQuantity(hx+50, y, hw-50)) y += lineHeight;
If you aren't familiar with the VisuStella ItemEquipsCore, the above code (more or less) creates the following window in game when inspecting a piece of equipment in the item menu:
In this picture, Main Hand is the Equipment Type as drawn from the database. However, since Hunting Knife is a weapon, I want it to show the Weapon Type instead (which would be Short Blade).
If anyone could offer some coding advice on how to make this idea reality, I would greatly appreciate it 🙂.
Thank you in advance and have a wonderful weekend.
-Niniann