YEP_Core - Item Scope "The User" don't work

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
668
Reaction score
368
First Language
Poland
Primarily Uses
RMMV
I have yanfly's Target Core, Selection control, item core, equip core and item categories plugins (in proper order)
and I added some items where MUST HAVE scope "The User" so I made one test item with that scope and that scope
don't work...

Ok, no problem, I read help and try set some notetags from those plugin and I try again.

Dang... We have problem, after 2 hours of experimenting with notetags in game map item with scope "The User" always shows list of party members and asks on wich party member use that item.

Any help would be appreciated
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,930
Reaction score
13,567
First Language
English
Primarily Uses
RMMV
Please post a screenshot of your plugin manager, as well as screenshots of your notetags. By simply describing it to us, you're not giving us enough detail about how you have things set up (and yes, I'm asking for a screenshot of the plugin manager because I've lost count of the number of times people have sworn they were in the correct order when they weren't).

Also, check the console and see if there are any error messages or warnings shown there. If there are, please grab a screenshot of that as well.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,467
Reaction score
1,357
First Language
English
Primarily Uses
RMMV
How would an item (not a skill, but an item) used on the map know who the user is? Unless I'm not understanding what you mean.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,467
Reaction score
1,357
First Language
English
Primarily Uses
RMMV
Scope "The User" is interpretated by engine as currently selected actor and other actor cannot be selected. I can't more easly explain
I mean how do you want the user defined mechanically? As in by default, you open the game menu, select the item command, and use the item from there. It can't know who is using it unless it counts the target as the user, in which case you're looking at a chicken-or-the-egg problem.

If you're defining who the user is supposed to be somewhere else, like assigning their ID to a variable or something, you could use:

Code:
<Custom Select Condition>
condition = target === $gameActors.actor($gameVariables.value(1));
</Custom Select Condition>
Or something like that. Of course, I could be completely wrong about what you're trying to do. :)
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,388
Reaction score
791
First Language
Dutch
Primarily Uses
RMMV
your YEP Plugins arent in the correct order though.
Make sure its in the correct order.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
668
Reaction score
368
First Language
Poland
Primarily Uses
RMMV
Never mind, it turns out it's some deeper problem.
I deleted all plugins - plugin manager now is empty and scope still doesn't work.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,467
Reaction score
1,357
First Language
English
Primarily Uses
RMMV
Just to clarify, you're trying to do this from the world map and not battle, right? In the world map, it doesn't know who the user is until the item is used, hence party member selection.

Edit: Also I tried out my solution and it only works in battle, not on the field for some reason. Yanfly's Selection Control can be a bit wonky I guess.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
668
Reaction score
368
First Language
Poland
Primarily Uses
RMMV
Yes! Correct, but I think how to overcome it, I'll be back in a moment.

Edit: Moderators can close this topic, I made some test and it looks like @Aesica is right, Scope "The User" works only in battles, not on maps, but I bet my hand I had some time ago working "The User" item in maps...

Anyway, I state this problem is solved and topic can be closed.
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,930
Reaction score
13,567
First Language
English
Primarily Uses
RMMV
Actually, I think "the user" is only valid when you're using the item in battle. That's the only time a specific actor gets to choose an item.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,600
Reaction score
1,931
First Language
English
Primarily Uses
RMMV
How would that work though? If you're using an item from the map, there is no user because there is no concept of "turns".

Well actually that's not strictly speaking true. If I remember correctly, when you use an item from the menu it considers the user to be the party member with the highest Pharmacology.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
668
Reaction score
368
First Language
Poland
Primarily Uses
RMMV
Hmm... Maybe if I rewrite this method
JavaScript:
Scene_ItemBase.prototype.determineItem = function() {
    var action = new Game_Action(this.user());
    var item = this.item();
    action.setItemObject(item);
    if (action.isForFriend()) {
        this.showSubWindow(this._actorWindow);
        this._actorWindow.selectForItem(this.item());
    } else {
        this.useItem();
        this.activateItemWindow();
    }
};
I will get what I need.

EDIT: Yes! This is what I needed all along!!
JavaScript:
Scene_ItemBase.prototype.determineItem = function() {
    var action = new Game_Action(this.user());
    var item = this.item();
    action.setItemObject(item);
    if (action.isForFriend()) {
        if (item.scope === 11){
            this.showSubWindow(this._actorWindow);
            this._actorWindow.selectForItem(this.item());
            this.useItem();
            this.hideSubWindow(this._actorWindow);
        }
        else {
            this.showSubWindow(this._actorWindow);
            this._actorWindow.selectForItem(this.item());
        }
    } else {
        this.useItem();
        this.activateItemWindow();
    }
};
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

Recent threads, and my very poor algorithm for my minimap plugin have made me face the fact that I need to review algorithms and such.

Going through Cracking the Coding Interview now. I am so excited.
Kes
I've seen a reference to a Community Lighting plugin for MZ, but cannot find it. Is it still in beta?

Todo:
Add fog of war
Add enemy indicators
Make window draggable
Optimise map drawing algorithm (5 seconds to load the map you see, so it's a... poo-poo algorithm)

Any suggestions? :kaoblush:
bleh studio hell job haha at least they like it didnt had time to do much laundry tho ;w;'....YES I DO AT LEAST TAKE A SHOWER everyday!
Ami
--- Food Ingredients ---

Hero: Since the Chef are in Hospital,we can't eat his Dish in 3 Days.
F.Mage: What we have to Eat?
M.Healer: Don't worry,we can Eat the Food Ingredients.
Hero & F.Mage
: Really?

(3 Days Later)

Chef: Hi,Guys. I'm Ba---
(Entire Party Collapse After Eat Raw Meat)
Chef: Wha...WHAT GOING ON HERE!!!!!!

Forum statistics

Threads
102,913
Messages
995,916
Members
134,362
Latest member
ankh75
Top