Entering Shop at the Buy screen

Krumpirov

Villager
Member
Joined
Sep 29, 2018
Messages
9
Reaction score
2
First Language
English
Primarily Uses
RMMV
Is there a way to go straight into a buy option when a player enters a shop?
I don't like the empty look of the screen before a players chooses Buy.
And since I only have the Buy option, without Selling, it would be much nicer if it went to the items list right away.

Bonus question - is there a script call that does the "OK" input automatically? Because that might be the easiest solution to what I asked above.
EDIT: Ignore the other question, it wouldn't work.
 

Krumpirov

Villager
Member
Joined
Sep 29, 2018
Messages
9
Reaction score
2
First Language
English
Primarily Uses
RMMV
Thanks! And I actually just found a very simple solution myself.
I added just one line in the rpg_scenes.js and it works great!
It works even better than I hoped because it leaves the Buy/Cancel buttons active. So a player can either choose an item to buy or hit cancel and exit the shop in one click.

If anyone wants to try it out just add this one bolded line right here (in rpg_scenes.js):

Scene_Shop.prototype.createBuyWindow = function() {
var wy = this._dummyWindow.y;
var wh = this._dummyWindow.height;
this._buyWindow = new Window_ShopBuy(0, wy, wh, this._goods);
this._buyWindow.setHelpWindow(this._helpWindow);
this._buyWindow.setStatusWindow(this._statusWindow);
this._buyWindow.hide();
this._buyWindow.setHandler('ok', this.onBuyOk.bind(this));
this._buyWindow.setHandler('cancel', this.onBuyCancel.bind(this));
this.addWindow(this._buyWindow);
this.activateBuyWindow();
};
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top