ArcheoFox

Novice
Veteran
Joined
Aug 18, 2015
Messages
36
Reaction score
27
First Language
French
Primarily Uses
I have a major compatibility problem with the plugin from Yanfly “ItemCore” and Galv's plugin named "Single Actor Menu Target".

The problem is when I use an item on the map menu, an error message appears and contains these errors:

TypeError: Cannot read property ‘isDead’ of undefined
at Game_Action.testApply (-----/js/rpg_objects.js:1568:46)
at Scene_Item. (-----/js/rpg_scenes.js:997:23)
at Array.some (native)
at Scene_ItemBase.isItemEffectsValid (-----/js/rpg_scenes.js:996:36)
at Scene_ItemBase.canUse (-----/js/rpg_scenes.js:990:52)
at Scene_ItemBase.onActorOk (-----/js/rpg_scenes.js:939:14)
at Scene_Item.onItemOk (-----/js/plugins/Galv_SingleActorMenuTarget.js:81:9)
at Window_ItemList.Window_Selectable.callHandler (-----/js/rpg_windows.js:896:31)
at Window_ItemList.Window_Selectable.callOkHandler (-----/js/rpg_windows.js:1165:10)
at Window_ItemList.Window_Selectable.processOk (-----/js/rpg_windows.js:1150:14)

I only have these two plugins that are active and Galv confirms that there seems to be a compatibility problem.
Has anyone ever had the same problem? And can someone please help me? I really need to run these two plugins together.
 

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
608
Reaction score
1,440
First Language
English
Primarily Uses
RMMZ
Assuming you have Yanfly first, and Galv second, this little patch plugin should get you fixed. (I tested it on a blank project and it fixed the error.)

Just paste into a text editor, save as a .js file in your plugins folder, and add it to your game (below the other two).
Code:
//Patches YEP_ItemCore.js v1.28 and Galv_SingleActorMenuTarget.js v1.0

Scene_ItemBase.prototype.itemTargetActors = function() {
    var action = new Game_Action(this.user());
    action.setItemObject(this.item());
    if (!action.isForFriend()) {
        return [];
    } else if (action.isForAll() || Galv.SAMT.oneMember()) {
        return $gameParty.members();
    } else {
        return [$gameParty.members()[this._actorWindow.index()]];
    }
};
 

ArcheoFox

Novice
Veteran
Joined
Aug 18, 2015
Messages
36
Reaction score
27
First Language
French
Primarily Uses
Thank you so much ! This solves the problem with a blank project. Nevertheless, with my project (which contains more than 200 plugins) it poses problems. If I can identify conflicts, I'll come back here. Anyway, I'm sure it will allow me to fix the problem in the end, so thank you again. If I use that, can I credit yourself? With wich name?
 

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
608
Reaction score
1,440
First Language
English
Primarily Uses
RMMZ
Ah, sorry, when you said you had only those two active, I assumed you meant in your entire project, not as a troubleshooting step. Yes, with 200 plugins, you're going to have conflicts. That's a lot of plugins!

You don't need to credit me, it's a simple fix.

I've been digging at it a little more. I can't figure out a way to put a proper patch on this [and ensure maximum plugin compatibility], so try instead making the following one-line edit to Galv's code (this is allowed by his Terms of Use):

Find the block starting with "Galv.SAMT.Scene_Item_onItemOk". (There's also a Scene_Skill block...make sure it's the Scene_Item block!) Change the "if" statement to the following:
Code:
        if (Galv.SAMT.oneMember()) {
            SceneManager._scene._actorWindow._index = 0; //edit added for plugin compatibility
            this.onActorOk();
            this.onActorCancel();
        }
Once you do that, ditch my patch plugin.
 

ArcheoFox

Novice
Veteran
Joined
Aug 18, 2015
Messages
36
Reaction score
27
First Language
French
Primarily Uses
I tried with your new method (and with only these two plugins) but unfortunately the selection of my only player is still.
It works for you with only "ItemCore" and "Galv.SAMT (edit version)" plugins?

I have another problem that I did not notice before: with the patch version (your first method), when I use a potion, that I return to the categories of items and that I select another one, it does not cancel my item selection while I am no longer supposed to be there.

I'm not sure if I'm clear, my english is a bit limited ^^ '
 
Last edited:

Amerrigan

Villager
Member
Joined
Feb 18, 2017
Messages
27
Reaction score
4
First Language
English
Primarily Uses
RMMV
Just a note I'd like to add in case anyone searches for this fix in the future and finds this thread when trying to get the compatibility to work:

I have the YEP Item core and the Galv Single Actor running. I have used the patch above as a new plug in. (The first one.) It worked well.

However... there is still one minor bug to be aware of.

Here is an example: If you have an item that you wish to be able to use to trigger a common event on the map, you would usually put the scope as 'none', just because it logically doesn't have a scope. But, if you have the item's 'scope: none', then it will only return a fail sound. (Note: Before the patch was installed, doing this would just crash the game).

Here is the fix: If you instead set an item's scope to 'scope: The User' it will work and trigger the event the way it is intended. So, pay attention to scopes if you plan on using the YEP/GALV/PATCH method to make a single actor game.
 

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
608
Reaction score
1,440
First Language
English
Primarily Uses
RMMZ
@ArcheoFox yes I was using a blank project with only those two plugins and the patch.

Unfortunately I am not able to troubleshoot further right now; I simply don't have the time. I wanted to let you know so that you can try to find someone else to help. My apologies.
 

yoluko

Veteran
Veteran
Joined
Mar 9, 2020
Messages
46
Reaction score
9
First Language
English
Primarily Uses
RMMV
I hope it's ok to gravedig this thread, but the problem appears to go beyond ItemCore. I'm using YEP Message Core and MainMenu Core and getting the same error (those are the only YEP plugins I'm using)
 

Latest Threads

Latest Posts

Latest Profile Posts

Upgraded my avatar to be cuter.
When you look for several things for ages and then suddenly find it all at once.

Status.png
Status2.png
equip.png
I'm going to see if I can set up a triple booting setup. Windows for standard use & gaming, debian for linux development and manjaro for linux gaming, wine & proton use.
Who's got 2 thumbs and discovered an issue with his plugin after deleting the last fully functional copy? This guy xD
Well after a bit of a health break, back to streaming. Going to start in about 30 minutes.


...Also bored and figured I'd stream early on an off day. :LZSsmile:

Forum statistics

Threads
129,698
Messages
1,204,387
Members
170,762
Latest member
zaprobaa
Top