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

Once again working on a game I'm not sure I'm going to sell or even publish
That feel when you're awake past midnight and suddenly you're one year older :ninja:
I miss collaborations, but I don't know how to find someone to make face parts just to share them with others, and even though I don't like writing or music, I can't trust anyone with writing on my game because it has themes that are easy to mess up, and music needs a clear tone and scenes.
People donating to me for my upcoming birthday so I can pay my team a little. Such angels, I'm so happy. T uT I smile so much my face hurts. Good souls in this world.
Playing Ragnarok Online again is very nostalgic. The last time I played it was 20 years ago, when I was ten-twelve old.
My first mmorpg.^^

Forum statistics

Threads
105,571
Messages
1,014,723
Members
137,245
Latest member
dashstop
Top