RMMV Using YEP_ShopMenuCore, making a 'Buy Only' Shop...

Status
Not open for further replies.

firestalker

Veteran
Veteran
Joined
Nov 18, 2015
Messages
399
Reaction score
50
First Language
English
Primarily Uses
RMMV
I have a few "Buy Only" shops in my game and at the moment it's a little annoying that I have to click the buy button when the Sell button is disabled to begin with. I would like to bypass that initial screen and simply go to the Buy Screen directly.

Is there a Script call that will get you there... Something like this Script call to get directly to the Item Menu Screen?
Code:
SceneManager.push(Scene_Item)
SceneManager.refresh

Please help...
 

mephet

Veteran
Veteran
Joined
Dec 3, 2020
Messages
34
Reaction score
67
First Language
English
Primarily Uses
RMMV
I would also be interested in this if someone knows how to do it!
 

theartofme

Veteran
Veteran
Joined
Feb 21, 2019
Messages
31
Reaction score
40
First Language
English
Primarily Uses
RMMV
Here's a quick-and-dirty way to handle it, create a new plugin (or paste it at the end of an existing one, whatever!) and add this:

JavaScript:
const LWPImmediateBuy_oldScene_Shop_create = Scene_Shop.prototype.create;
Scene_Shop.prototype.create = function() {
    LWPImmediateBuy_oldScene_Shop_create.call(this);
    if (this._purchaseOnly) {
        this._buyWindow.setHandler('cancel', this.popScene.bind(this));
        this._commandWindow.selectSymbol('buy');
        this._commandWindow.deactivate();
        this.commandBuy();
    }
};

Note: Must appear in the plugin list after YEP_ShopMenuCore. Doesn't hide the command window or anything, just simulates pressing "buy" immediately after entering the shop if it's a buy-only shop (and skips the menu on the way out, too, so you don't need to cancel twice to exit).
 
Last edited:

firestalker

Veteran
Veteran
Joined
Nov 18, 2015
Messages
399
Reaction score
50
First Language
English
Primarily Uses
RMMV
Works Great! Thanks... Just what I was looking for!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,225
Reaction score
14,250
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

I once thought about a boss gauntled game. I actually did it.
Stream will be live shortly with some Gex 3! Feel free to drop by!
Snippet from a game I'm working on. Not much happening here. Mostly look at atmosphere. May upload a longer version. Still need to make up some enemy arts.
Been slightly struggling with developing the latest chapter, I think I will downscale my ambitions and make it more linear.

Forum statistics

Threads
109,058
Messages
1,041,697
Members
141,544
Latest member
spacewaxamerica
Top