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

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
693
Reaction score
383
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,950
Reaction score
13,585
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,474
Reaction score
1,366
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,474
Reaction score
1,366
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,433
Reaction score
813
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
693
Reaction score
383
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,474
Reaction score
1,366
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
693
Reaction score
383
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,950
Reaction score
13,585
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,602
Reaction score
1,933
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
693
Reaction score
383
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 Profile Posts

When a parent (of a less than adult aged child) is like
"Oh, I'm like a friend to my child. We're friends."
I'm like
"Oh, that kid's gonna suck...."
Baby tiger gets a belly rub! ^.^
Ami
--- Friendship System ---

(F.Mage and F.Healer's FP is 100)
F.Mage: We did it! we can beat the monster easily!
F.Healer: With the Friendship System,we got stronger thanks to you F.Mage (Hugging)
F.Mage: (Blushing) Ahh...don't say like that. we are Best Friend Forever.
(In Distand)
M.Mage: They look happy...
M.Healer: Yeah...always like that...

Forum statistics

Threads
103,284
Messages
998,584
Members
134,793
Latest member
Vonerd
Top