Yanfly Victory Aftermath and Mog Treasure Popup Battle Bug

Roult

Veteran
Veteran
Joined
Oct 25, 2015
Messages
34
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
34
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
34
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
34
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

rux
Just 80% of my motivation on game making lmao, anyone got tips on how to not be unmotivated?
I've signed up for a job training program for people with Asperger's Syndrome. I went to a "test run" today so they could see how well I did with simple jobs, and I amazed them. Most new people do it in 30+ minutes, while I finished in a mere 15 minutes. Gives me time to work on a screenplay for Studio MDHR...
People,I have seen that Someone from China/Chile and London is doing a Vaccine Against COVID-19.
Doing anything that yield good result in the long run is like sowing seeds. With proper care, they will grow and bear fruits. I'm excited for tomorrow. :D

Forum statistics

Threads
105,455
Messages
1,013,841
Members
137,105
Latest member
twilightprincess
Top