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
90
Reaction score
32
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
90
Reaction score
32
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
152
Reaction score
126
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
90
Reaction score
32
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

SF_People3_3 added!
index.php

ScreenShot_1_3_2022_1_32_12.png
I feel QSprite for MV is underrated. I basically am able to use my chibi sideview battlers I drew on the maps and have all the motions available. this'll help a lot with cutscenes.
I've figured out how to reasonably tall-ify chibi sprites on my editor. I like that making tall sprites gives me control on expressing how tall characters seem on the field relative to each other as well as better differentiate adult sprites from child sprites.
doing some wacky experimental stuff in MV right now :kaoluv: I cannot wait to drop what I've been working on
Doing RPG Maker News for this week. (January 14th - 20th, 2022)

Forum statistics

Threads
118,556
Messages
1,116,932
Members
155,594
Latest member
000dsdsc
Top