RMMV [Yanfly Item Upgrade Slots] How do I make a stat increasing item that does not increase boost count?

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
170
Reaction score
60
First Language
English
Primarily Uses
RMMV
I want to have an item that increases the number of upgrade slots an item has. The issue is that if the item is already fully upgraded, the aforementioned upgrade cannot be applied. How do I make the item not need free slots?

I would also like this item to be the sole item that increases boost count, while all others that would also increase it do not. Can this be done?


The current issue is that the plugin has a hard coded rule that upgrades with the stat boosts also increase the boost count. While this can be changed with the state boost modifier, it cannot be set to zero. I would like to be able to set upgrading items to not increase boost count.

Edit: My quick fix is to make the items always have an odd amount of slots, and for all the items that consume slots to take up an even amount. This ensures there is always one free slot.

This still leaves the question of boost count though. I tried a few methods to get stat boosting items to not increase boost count. Setting an item's boost count to 0, +0 or -0 do not work, and simply make it use the default boost count of +1. I tried setting it to -1, which made it subtract boost count instead! What do I do?

Edit 2: I found that if I set the slot increasing item to consume no slots, it can always be applied. I am now changing the thread's title to reflect the remaining issue.
 
Last edited:

SundialShark

To Idyllic Times
Member
Joined
Nov 9, 2020
Messages
21
Reaction score
145
First Language
English
Primarily Uses
RMMV
You're going to have to change the hardcode. I did this for my personal project cause I wanted to set up a Dark Cloud-like item upgrade system that wouldn't boost it unless it was a "Level-Up Powder" or some such item.

Go to line 351 of YEP_X_ItemUpgrade and change it to "item.boostCountValue = 0;"
Go find "ItemManager.increaseItemBoostCount" in YEP_ItemCore itself and change it to:

Code:
ItemManager.increaseItemBoostCount = function(item, value) {
    value = value || 0;
    if (!item.boostCount) item.boostCount = 0;
    item.boostCount += value;
    this.updateItemName(item);
};

Now, if you don't define a value for Boosting in the notetags at all, it's not gonna attempt to add a +1. Example: My Posterboy was boosted, but it doesn't have a +1 modifier. Hope this helps.

1638835360283.png
 

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
170
Reaction score
60
First Language
English
Primarily Uses
RMMV
You're going to have to change the hardcode. I did this for my personal project cause I wanted to set up a Dark Cloud-like item upgrade system that wouldn't boost it unless it was a "Level-Up Powder" or some such item.

Go to line 351 of YEP_X_ItemUpgrade and change it to "item.boostCountValue = 0;"
Go find "ItemManager.increaseItemBoostCount" in YEP_ItemCore itself and change it to:

Code:
ItemManager.increaseItemBoostCount = function(item, value) {
    value = value || 0;
    if (!item.boostCount) item.boostCount = 0;
    item.boostCount += value;
    this.updateItemName(item);
};

Now, if you don't define a value for Boosting in the notetags at all, it's not gonna attempt to add a +1. Example: My Posterboy was boosted, but it doesn't have a +1 modifier. Hope this helps.

View attachment 208989
Decided to come back to this. Since I'm gonna have to alter the code anyway, there's one other thing I want to do to make this system work. As the plugin works, once all upgrade slots have been used, you can no longer access the upgrade menu for it if you don't use an item that increases the boost count before closing the menu. What do I modify to make it so that the menu remains accessible even if no slots remain free?
 

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
543
Reaction score
462
First Language
German
Primarily Uses
RMMV
I have not tested this, but from glancing at the code I would try to comment out line 1060 in YEP_X_ItemUpgradeSlots, where it says if (this._item.upgradeSlots <= 0) return;
 

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
170
Reaction score
60
First Language
English
Primarily Uses
RMMV
I don't know why and I don't know how, but one of the fixes I implemented also broke the ability to add more empty upgrade slots, which was the point of this all to begin with. What do I do now?

Edit: Nevermind. It's just that for some reason, stat upgrades don't work if the line is indented, which it is by default if you copy the format from the help document.
 

Latest Threads

Latest Posts

Latest Profile Posts

My brother makes some inane complaint about one of my stories in the comment section. My mom: if your bro doesn't understand it make it simpler. That prolly means others have questions too.☺️Me: Sorry. I can't do that. I don't speak stupid.
If you are ever looking for your cat among a room full of identical looking cats just find the one that is doing it's best to ignore you.
Isn't "tableau" such a fun word to say? Even better is that our resident artists know what it means without google and probably get to say it regularly.
ScreenShot_3_27_2023_4_30_39.png
one of the benefits of doing almost all the assets myself is being able to add my friend's OC from his comic book into my game as an NPC.
Quick survey: How much of importance is the game UI for your experience, as a player and game designer?

Forum statistics

Threads
129,894
Messages
1,206,023
Members
171,070
Latest member
gbnfg
Top