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
101
Reaction score
39
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
10
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.

1638835360283.png
 

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
101
Reaction score
39
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
170
Reaction score
144
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
101
Reaction score
39
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

Newbie, please be gentle
reworkMZ.png
To keep myself motivated to make the MZ SF tiles normal and usable modern tiles I like to make tiny maps and toggle between the options :3
Character selection in games be like
Special Tractor Operation! :kaojoy:
Current status screens for Shadows of the Earth: The Vrila'an Legend. Need to do something about the color scheme lol
Captura de pantalla (259).pngCaptura de pantalla (260).png

Forum statistics

Threads
122,083
Messages
1,146,341
Members
160,368
Latest member
slotgacorunsurtoto
Top