Yanfly Victory Aftermath and Mog Treasure Popup Battle Bug

Roult

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

I think I've created a monster.
...and I love it. <3
Today represents my one year anniversary of throwing out the tile map. :LZSexcite: One year ago my game looked like...


And now for those that don't know, it looks like..


What a year, what a year indeed. RIP Tile Map, nobody misses you. :LZSwink:
There is now a demo released for [Beyond the Mirror]! Check the team recruitment thread to learn more!
'Tis the season to see shipping prices and go 'Yikes'.

Forum statistics

Threads
105,696
Messages
1,015,681
Members
137,380
Latest member
UGANDAN_KNUCKLES
Top