LunaFamiliar

Veteran
Veteran
Joined
Jan 24, 2021
Messages
31
Reaction score
5
First Language
English
Primarily Uses
RMMV
Hello everyone!

I'm currently in a bit of a pickle trying to find a way to modify one tiny window of the YEP Shop Menu Core scene.
Currently, when purchasing Items the menu looks like this...

Item Shop.PNG

It shows the amount party has in their current Inventory on the right hand-side. Perfect!
Except when it comes to shopping for Weapons & Armor the scene is different.

Gear Shop (Current).PNG
(Im using a plugin to change the Parameters like ATK, DEF etc to Icons that's why it's showing there btw)

Now see, on the right hand-side here Ilia actually does have this weapon equipped already, but the plugin isn't doing a very good job of showing that, which isn't great UX for the player.
Due to the nature of my game, I don't need to show a stat comparison when shopping for Weapons & Armor, so I would instead much rather show something like the Equip Status of the selected Weapon / Armor.

What im after would be something more along the lines of this...

Gear Shop (Example).PNG
(This example was mocked up in GIMP)

Since all of the important information regarding the piece of Weapon or Armor will be displayed in the top message box in my game (cut out of these images but ya'll have seen it before), I want to use this space to instead display the Equip Status of these selected weapon or armor.
This way the player knows instantly when they hover over it in the shop...
  • Which characters can equip it
  • Which characters can't equip it
  • Which characters already have it currently equipped
  • And how many of it including equipped does the party have
One final thing to note...
'Equipment' in my game (both weapons & armor) is called 'Gear'.
So I wouldn't want this screen to say "In Inventory" like the Item Shop, because it would need to say "Gear" instead since this is the Gear (Weapons & Armor) Shop.

I have zero knowledge of JS (I've only ever worked in C#) so I don't have a realistic idea of how big of a task this is to accomplish.
If anybody has any advice or can help me out at all please let me know!
Thank you ^_^
 

ThreeSixNine

Veteran
Veteran
Joined
Jan 22, 2019
Messages
360
Reaction score
298
First Language
English
Primarily Uses
RMMV
I think I have something that would work.

JavaScript:
 if (actor.isEquipped(this._item)) {
        text = 'Equipped';
    }

If you add this conditional branch between lines 1044 and 1045, it will change the text from '0' to 'Equipped' if the current item is equipped. The only problem I see with an edit like this comes with independent items.

While I don't remember specifically if items purchased from shops can have variable stats, if the stat comparison between the currently equipped item and the one to purchase is anything other than zero, that information will no longer be displayed to the player.

So I guess its a trade off in this situation. I suppose if you're not utilizing independent weapons and armors, this might not be an issue, as the stat comparison will always be the same.
 

LunaFamiliar

Veteran
Veteran
Joined
Jan 24, 2021
Messages
31
Reaction score
5
First Language
English
Primarily Uses
RMMV
Hi @ThreeSixNine thank you for your response.
Unfortunately this isn't really the solution I'm looking for...

By default, RPGMaker only checks to compare the ATK stat of weapons, and the DEF stat of armor when showing a comparison of +x or -x to the player on this menu.
There are several weapons & armor in my game where the ATK or DEF stats are the same, but M-DEF or M-ATK or even AGI & LUK are different.

If i were to use your suggestion, it would mean that any weapon with the same ATK stat as the currently equipped one (which RPG Maker would show as a +0 Change) would be displayed as "Equipped" when it actually isn't equipped.

It also doesn't really fix any of the other problems I want to address with this menu...
  • Which characters can equip it
  • Which characters can't equip it
  • Which characters already have it currently equipped
  • And how many of it including equipped does the party have

I appreciate your response and help, but I don't think that will really work to achieve the outcome I want <3
 

ThreeSixNine

Veteran
Veteran
Joined
Jan 22, 2019
Messages
360
Reaction score
298
First Language
English
Primarily Uses
RMMV
I believe you've misunderstood me. The solution I provided, doesn't use the stat comparison as a basis to show 'Equipped', it simply utilizes the same portion of the window that would normally show the stat difference vs what that actor currently has equipped. Since that is of no concern to you, try this:

JavaScript:
Window_ShopStatus.prototype.drawActorParamChange =
function(x, y, actor, item1) {
    var width = this.contents.width - this.textPadding() - x;
    var paramId = this.paramId();
    var change = this._item.params[paramId]
    change -= (item1 ? item1.params[paramId] : 0);
    this.changeTextColor(this.paramchangeTextColor(change));
    var text = (change > 0 ? '+' : '') + Yanfly.Util.toGroup(change);
    if (actor.isEquipped(this._item)) {
      text = 'Equipped';
    } else if (!actor.isEquipped(this._item) && actor.canEquip(this._item)) {
      text = 'Can Equip';
    } else {
      text = 'Unequippable';
    }
    this.drawText(text, x, y, width, 'right');
};

I have tested this in a nearly new project with very few plugins, so I don't think there's any issues there. I believe this does almost exactly what you are looking for. As an added bonus, this code will show the 'Can Equip' text as green if the item is better than what that actor has equipped, ,so you really aren't losing the stat comparison completely.

If you try this and it works for you, I'll look into showing the amount equipped in the possession field.
 

LunaFamiliar

Veteran
Veteran
Joined
Jan 24, 2021
Messages
31
Reaction score
5
First Language
English
Primarily Uses
RMMV
@ThreeSixNine Ohhh thank you for clarifying!
I understand what you were saying now, my bad ><

So I replaced the section Window_ShopStatus.prototype.drawActorParamChange section with the new code that you gave me, and this was the result...

Capture 1.PNG

In this example, Ilia already has a set of Pugilist Gloves equipped, but the text is still saying 'Can Equip'.

Capture 2.PNG

And here both Ilia & Leo have Sturdy Helmets equipped, but they both say 'Can Equip' instead of 'Equipped'.
No idea why this is happening :/

Things also get messy when I add augments to my party's weapons using YEP Attach Augments.
The white 'Can Equip' text changes to Red but it never says 'Equipped'.
Also I'd like to remove the ATK & DEF icons at the top since they're not useful information given what this menu is becoming.

I know this is a lot and it's all really complicated, so thank you so much for trying to help me out ^_^
 

ThreeSixNine

Veteran
Veteran
Joined
Jan 22, 2019
Messages
360
Reaction score
298
First Language
English
Primarily Uses
RMMV
Do you utilize Independent Items? Meaning, do you have independent versions of your weapons and armors that don't stack and can have variable stats across the different instances of the base version?
 

LunaFamiliar

Veteran
Veteran
Joined
Jan 24, 2021
Messages
31
Reaction score
5
First Language
English
Primarily Uses
RMMV
No i'm not using Independent Items :)

I've got the starting ID for them set to like 3000 so definitely not using them.
Unless when you Attach and Augment to a weapon or armor using YEP_X_AttachAugments, it treats it as independent?
I'm not sure how it works to be honest.
 

ThreeSixNine

Veteran
Veteran
Joined
Jan 22, 2019
Messages
360
Reaction score
298
First Language
English
Primarily Uses
RMMV
Yeah, to be able to use the attachments and augments you have to have the independent items activated.

The problems with the text are definitely due to independent items. I'll take a look tomorrow.

I also have an idea for the max jp per battle, if it's not already solved by the time I get back on tomorrow.
 

LunaFamiliar

Veteran
Veteran
Joined
Jan 24, 2021
Messages
31
Reaction score
5
First Language
English
Primarily Uses
RMMV
@ThreeSixNine I don't suppose you made any further progress with looking into this?
I really appreciate your help with my Job Points request btw! :D
 

ThreeSixNine

Veteran
Veteran
Joined
Jan 22, 2019
Messages
360
Reaction score
298
First Language
English
Primarily Uses
RMMV
@ThreeSixNine I don't suppose you made any further progress with looking into this?
I really appreciate your help with my Job Points request btw! :D
I have not yet been able to continue looking at this, but I have been thinking about it. I've taken a short break from game dev, but, this is definitely still on my mind and on my to do list when I come back. I'm hoping I'll be ready to come back in about a week.
 

LunaFamiliar

Veteran
Veteran
Joined
Jan 24, 2021
Messages
31
Reaction score
5
First Language
English
Primarily Uses
RMMV
I have not yet been able to continue looking at this, but I have been thinking about it. I've taken a short break from game dev, but, this is definitely still on my mind and on my to do list when I come back. I'm hoping I'll be ready to come back in about a week.
Hiya @ThreeSixNine
I don't mean to bother you, but it's been a lil bit and I thought I'd just check in to see where you were at since nobody else has chimed in on this, and I haven't had luck making any progress myself :)
Hope you're well! ^_^
 

ThreeSixNine

Veteran
Veteran
Joined
Jan 22, 2019
Messages
360
Reaction score
298
First Language
English
Primarily Uses
RMMV
Hiya @ThreeSixNine
I don't mean to bother you, but it's been a lil bit and I thought I'd just check in to see where you were at since nobody else has chimed in on this, and I haven't had luck making any progress myself :)
Hope you're well! ^_^
Hi @LunaFamiliar So I started looking at this again and I have abetter understanding than I did last time I looked at it.

Since the shop window already uses the base items to check stat increases or decreases, I'll have to find a way to check the actors current equipped item's base item id against the selected item.

I have some ideas on how I could make that work but I'd need to test them before I say anything definitively.

But I will definitely keep trying and I'll let you know if I make any progress. Don't feel bad about checking in on it either, I don't mind.
 

Latest Threads

Latest Profile Posts

I'm having toooo much fun designing the new MP (Mental Psyche) system. I've only worked it out for enemies so far, but it's fun to stun them, then go after their MP and delete them instead to farm for better item drops.
anyone know of a place I can promote my game? sorta like game awards but for indie devs, like a place where I can drop a trailer and like stir up some hype
Doing RPG Maker News for 17th October 2021

That moment when you came up with a very good game title, but when you searched it, it has already been used... T.T
Crazy week. My anxiety decides to go nutz. Worse thing about it is that it causes me to lose focus on my work. I was able to leave early one day and take a nap. Seemed to help. How is everyone? Boosters coming soon here. Get my life back on track again.

Forum statistics

Threads
115,874
Messages
1,093,661
Members
151,120
Latest member
ekizdehd
Top