Yanfly Victory Aftermath and Mog Treasure Popup Battle Bug

Roult

Veteran
Veteran
Joined
Oct 25, 2015
Messages
41
Reaction score
4
Hi,


I use these 3 plugins:

- Yanfly Extra Enemy Drops, Victory Aftermath
-Mog Treasure Popup Battle

but there is an incompatibility.

The problem is that during the loot, I see the different objects (3 which can be the same or different), but during the result, I see only one object or 3 even .

In the item menu, they appear as they should.

Here's a video that shows the problem:


Can you help me?

Thanks
 

Marmit

La vie n'est qu'une toile vierge.
Veteran
Joined
May 1, 2020
Messages
30
Reaction score
2
First Language
English
Primarily Uses
RMMV
I'm not an expert but I believe the problem lies in that you're using plugins by different authours so they're interfering with each other. you might need to get ones that are all from the same authour.
 

Roult

Veteran
Veteran
Joined
Oct 25, 2015
Messages
41
Reaction score
4
yes that's why it's an incompatibility,
I will need a compatibility patch to fix this problem.

It is not possible to use only one plugin author with a large game.
 

Roult

Veteran
Veteran
Joined
Oct 25, 2015
Messages
41
Reaction score
4
The problem has been solved, many thanks to "Ahuramazda" for their help.

Code Changes - You need to edit 3 pieces of script yourself.

Main.js - this is to initialize droprates
Code:
//=============================================================================
// main.js
//=============================================================================

PluginManager.setup($plugins);

window.onload = function() {
    SceneManager.run(Scene_Boot);
    $droppeditems = [] // Added to initialize MOG/YEP VA Drops in an easy to find location.
};
MOG Item Drop plugin - Forced item drops into the above array one at a time for 100% accuracy

Code:
//==============================
// * Initialize
//==============================
SpriteEnemyTrP.prototype.gainDropItems = function() {
    var items = this._enemy._treasure.item;
    items.forEach(function(item) {
        $gameParty.gainItem(item, 1);
        $droppeditems.push(item) // Edit: Added to show exact number of drops.
    });
    console.log("From MOG: " + $droppeditems.length) // Edit: Added to show battle total in console.
};
YEP Victory Aftermath - Forces items from the array above in MOG script to be 100% accurate when dropped in Aftermath. Final line in the code that has // Edit is to reset the Array for the very next battle.


Code:
Window_VictoryDrop.prototype.extractDrops = function() {
    BattleManager._rewards.items = $droppeditems // Edit: Added to force match to MOG drops.
    console.log("YEP Total: " + BattleManager._rewards.items.length) // Edit: Added to show reward total in console. If same as "From MOG: " then is working as intended.
    BattleManager._rewards.items.forEach(function(item) {
      if (!item) return;
      if (DataManager.isItem(item)) this._dropItems.push(item.id);
      if (DataManager.isWeapon(item)) this._dropWeapons.push(item.id);
      if (DataManager.isArmor(item)) this._dropArmors.push(item.id);
    }, this);
    this._dropItems.sort(function(a, b){return a-b});
    this._dropWeapons.sort(function(a, b){return a-b});
    this._dropArmors.sort(function(a, b){return a-b});
    this._dropItems.forEach(function(id) {
      var item = $dataItems[id];
      if (item && !this._data.contains(item)) this._data.push(item);
    }, this);
    this._dropWeapons.forEach(function(id) {
      var item = $dataWeapons[id];
      if (item && !this._data.contains(item)) this._data.push(item);
    }, this);
    this._dropArmors.forEach(function(id) {
      var item = $dataArmors[id];
      if (item && !this._data.contains(item)) this._data.push(item);
    }, this);
    $droppeditems = [] // Edit: Added to reset after battle rewards shown.
};
this is a solution :)
 

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
239
Reaction score
72
First Language
Chinese
Primarily Uses
RMMV
Can you explain more clearly? Should I save these codes as plug-ins and load them, or add these codes to the codes of these three different plug-ins?
 

Roult

Veteran
Veteran
Joined
Oct 25, 2015
Messages
41
Reaction score
4
Hello,

I add these codes to the codes of these three different plug-ins. :)
 

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
239
Reaction score
72
First Language
Chinese
Primarily Uses
RMMV
Hello,

I add these codes to the codes of these three different plug-ins. :)
Thank you, the display is now correct!
:biggrin:
 
Last edited:

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

Latest Threads

Latest Profile Posts

Avery's Advent Calendar Day event has put me in a jolly mood, so I dug through my folders finished up some old generator pieces. Check my Fantasy Generator Expansion -Dwarfs! To see what I dropped.
Anyone else here think that closets are claustrophobic?
People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D

Forum statistics

Threads
105,872
Messages
1,017,124
Members
137,593
Latest member
narwhalkyrie
Top