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
91
Reaction score
33
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
91
Reaction score
33
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
154
Reaction score
130
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
91
Reaction score
33
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

At work.
Co: "This bug drove me insane. I tried a lot of things to debug, it just stuck".
Me: "How did you debug it?"
Co: *shows a complicated debugging method using breakpoints and everything*
Me: "What about ... " *casually prints a stack trace in the try/catch exception
Co: "Wait, you can do that??"
Totally original and unique OC
Harold.png
So after completing the Mass Effect Trilogy the first time as a Vanguard, I decided to replay the trilogy as a Soldier. Thus far, I've just finished the Horizon mission in ME2, and I'm already exhausted from ME2's f**k-awful enemy design.
Yeah, now Yes !!!! "boom boom "
"Fire the monsters, guards!!!"

index.php
I can't stop buying resource packs I'll never use, or engines for that matter, or free resources as my two terabyte external will attest. I am a digital hoarder I guess. Some people get drunk off the silly juice when they are bored, I just buy shiny digital nonsense I don't need.

Forum statistics

Threads
118,651
Messages
1,117,577
Members
155,758
Latest member
Trashcanislandd
Top