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

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
782
Reaction score
422
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,966
Reaction score
13,603
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,479
Reaction score
1,370
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,479
Reaction score
1,370
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,580
Reaction score
878
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
782
Reaction score
422
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,479
Reaction score
1,370
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
782
Reaction score
422
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,966
Reaction score
13,603
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,604
Reaction score
1,947
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
782
Reaction score
422
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

Woke up on an awful nightmare of being banned here because some mod didn't liked me in a super-heroes freeform round robin RP where I used throwing normal hammer as power and it was qualified being too OP. XD Nice to read you all guys. Will not wait next nightmares.
Staring at all the RPG Maker versions I have and realizing that my project has been a long time coming. But, I finally feel like I have the knowledge and experience to make it into something good.
We're almost done with the jam game! :D
I get scam calls all the time so today I gave them a piece of my mind. They hung up on me. Sweet revenge.

Forum statistics

Threads
104,321
Messages
1,005,560
Members
135,844
Latest member
andrewshetty123
Top