Item Core Independent item Bug?

rechronicle

Mystvaldia
Veteran
Joined
Oct 30, 2013
Messages
137
Reaction score
109
First Language
Bahasa
Primarily Uses
RMMV
Hello!
Is anyone have a fix for this? Or is it intended?

Thanks!
 

Attachments

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,633
Reaction score
905
First Language
Dutch
Primarily Uses
RMMV
depends on the exact bug? are those seperate potions with the same name?
or does it stack? etc.

are your plugin in the correct order (if you use alot of YEP_ (yanfly) than make sure its
in the correct order to work properly.

if you use others as well, try shifting or turn them off and see if it is working correctly.
 

rechronicle

Mystvaldia
Veteran
Joined
Oct 30, 2013
Messages
137
Reaction score
109
First Language
Bahasa
Primarily Uses
RMMV
It's the same Potion item, with 'Independent item' set to ON from the plugin.

I have tried to turn off every other plugin except the CoreEngine, and the problem still persists. Guess it's a bug then. (more info: it works with shop event, but not with 'Change Item...' event and item drop from the enemy)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,003
Reaction score
7,481
First Language
German
Primarily Uses
RMMV
have you started a new playtest every time you turned off another plugin?
because most plugins store their data inside the savefiles, and loading an old save can bring back that plugins problems.
 

rechronicle

Mystvaldia
Veteran
Joined
Oct 30, 2013
Messages
137
Reaction score
109
First Language
Bahasa
Primarily Uses
RMMV
Yup, just tried to start the new playtest with 'New Game' and the problem still occurs.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,003
Reaction score
7,481
First Language
German
Primarily Uses
RMMV
then please give a screenshot of your plugin manager, and please tell us what exactly on the inventory screenshot you consider an error - there are several possibilities there, and at least one of them is an intentional feature from what I remember.
 

rechronicle

Mystvaldia
Veteran
Joined
Oct 30, 2013
Messages
137
Reaction score
109
First Language
Bahasa
Primarily Uses
RMMV
Alright. This is it, the plugin manager.
What I consider error: the new item should not be added beyond the inventory limit. In the screenshot, you can see that it goes to 8/3 from the intended limit 3/3.
 

Attachments

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,633
Reaction score
905
First Language
Dutch
Primarily Uses
RMMV
we need the full list of the plugin database. to see if other plugin canconflict the independent items.
 

Lay

Veteran
Veteran
Joined
Jul 18, 2019
Messages
124
Reaction score
47
First Language
French
Primarily Uses
RMMV
After a quick inspection of yanfly ItemCore code, it seems that the parameters Max Items, Max Weapons and Max Armors are only used in two functions. One draw the carried amount in windows and the other disable item in shop. This looks consistent with what you said.

Thus, even if it looks weird, it is not a bug but intentional.

if you want to trash all items that the player will receive in excess, you can use the code below, place it in a new plugin below ItemCore.
I've also fixed the issue it generates with the battle rewards display with this script, but it is possible that it will not work if you are using a custom victory reward info.

Then, I can't promise that this script will fix all of your expectations. You better have to learn a bit of JS if you want to hack yanfly plugins.


JavaScript:
var Imported = Imported || {};
var Yanfly = Yanfly || {};

if (Imported.YEP_ItemCore){

Game_Party_gainIndependentItem = Game_Party.prototype.gainIndependentItem;
Game_Party.prototype.gainIndependentItem = function(item, amount, includeEquip) {
  var max = this.getIndependentItemTypeMax(item);
  var cur = this.getIndependentItemTypeCur(item);
  if (max - cur < amount) amount = max - cur;
  Game_Party_gainIndependentItem.call(this,item,amount,includeEquip)
};

BattleManager_displayDropItems = BattleManager.displayDropItems;
BattleManager.displayDropItems = function() {

  maxItem = Yanfly.Param.ItemMaxItems;
  maxWeapon = Yanfly.Param.ItemMaxWeapons;
  maxArmor = Yanfly.Param.ItemMaxArmors;
  var items = this._rewards.items;

  cured_items = [];
  for (var i=0; i<items.length; i++){
    var curItem = items[i];
    if ( DataManager.isIndependent(curItem) ){
      var cur = $gameParty.getIndependentItemTypeCur(curItem);
      if ( DataManager.isItem(curItem) && maxItem > cur) {
        cured_items.push(curItem);
        maxItem -= 1;
      } else if ( DataManager.isWeapon(curItem) && maxWeapon > cur ){
        cured_items.push(curItem);
        maxWeapon -= 1;
      } else if (DataManager.isArmor(curItem) && maxArmor > cur){
        cured_items.push(curItem);
        maxArmor -= 1;
      };
    };
  };
  this._rewards.items = cured_items;
  BattleManager_displayDropItems.call(this);

};

}
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,003
Reaction score
7,481
First Language
German
Primarily Uses
RMMV
That is what I had in mind when I wrote about the intentional feature above, the item core does not delete given items simply because there is a risk of such a thing breaking the game (if you needed all versions of an item you could find to get through the game) and because it would have been destroying rewards that the player expects after solving quests etc.
 

rechronicle

Mystvaldia
Veteran
Joined
Oct 30, 2013
Messages
137
Reaction score
109
First Language
Bahasa
Primarily Uses
RMMV
After reading and giving it some thoughts...

One way is to delete any excess amount.

The other possibility, now I see that it will be bad if the new item is gone forever without confirmation/prompt to choose which item to bring forward. This is not a bug then, my bad. Thank you all!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts


Finally! I've been puzzling over why it wasn't working for two days now. Turns out all of my calculations were correct, I just forgot to give some events hitboxes. :kaoswt: Now my randomly generated maps check for collision errors, and move stuff around in real time if they finds any. :LZSexcite:
Ami
--- OP Candy ---

Kids: Trick Or Treat!
Hero: Alright,here's the Candies (Give A Bunch Of Candy).
Kids: Thank you,Mister! (Running)
Hero: How cute they are…
F.Archer: Did you give them a OP Candy,accidently?
Hero: Huh?
Halloween, a day where kids are encouraged to take candy from strangers.
Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!
Took a break from spriting dinosaurs to carve a dinosaur pumpkin.

Forum statistics

Threads
104,673
Messages
1,007,996
Members
136,163
Latest member
movingsolutionsmovers
Top