RPG Maker MV- JS Script calls

Hey!

I'm messing with MV. I need some help. What would I do to call up the continue menu, not the save menu, with a script?

Also still looking for a way to skip the title entirely. Thank you so much! I'll be snooping around the folders.

Thank you!
lol ok window.close(); works.
just need to skip the title nows...
Isn't there a "built-in" plugin exactly for this?
Got it! In the rpg_scenes.js file, I just needed to change Scene_Title to Scene_Map in an argument. Winning!
Annnnnd Scene_Load fixed my other issue.

Woot!
Hey again...

What would i use to teleport the player to a specific place using js?

I looked up the transfer functions and whatnot...


Content Hidden Spoiler
  1. Scene_Map.prototype.create = function() {
  2.     Scene_Base.prototype.create.call(this);
  3.     this._transfer = $gamePlayer.isTransferring();
  4.     var mapId = this._transfer ? $gamePlayer.newMapId() : $gameMap.mapId();
  5.     DataManager.loadMapData(mapId);
  6. };
  7.  
  8. Scene_Map.prototype.isReady = function() {
  9.     if (!this._mapLoaded && DataManager.isMapLoaded()) {
  10.         this.onMapLoaded();
  11.         this._mapLoaded = true;
  12.     }
  13.     return this._mapLoaded && Scene_Base.prototype.isReady.call(this);
  14. };
  15.  
  16. Scene_Map.prototype.onMapLoaded = function() {
  17.     if (this._transfer) {
  18.         $gamePlayer.performTransfer();
  19.     }
  20.     this.createDisplayObjects();
  21. };
  22.  
  23. Scene_Map.prototype.start = function() {
  24.     Scene_Base.prototype.start.call(this);
  25.     SceneManager.clearStack();
  26.     if (this._transfer) {
  27.         this.fadeInForTransfer();
  28.         this._mapNameWindow.open();
  29.         $gameMap.autoplay();
  30.     } else if (this.needsFadeIn()) {
  31.         this.startFadeIn(this.fadeSpeed(), false);
  32.     }
  33.     this.menuCalling = false;
Expand to see the code.
This should do it for teleporting the player;
  1. $gamePlayer.reserveTransfer( $gameMap.mapId(), $gamePlayer.x, $gamePlayer.y );
Expand to see the code.

You've got MapId, X location and Y location there. There are an optional two more params for facing direction and if it fades or not or something like that.

This is exactly the method that is called with the Transfer player event.

Implementation: Game_Player.prototype.reserveTransfer
Line 7417 of rag_objects.js

Event reference; Game_Interpreter.prototype.command201
Line 9662 of rpg_objects.js

EDIT: In the performTransfer method of Game_Player you can find these methods which you can use to directly transfer the player without waiting for anything else to happen. This will disable events overriding the transfer destination if that's a concern (but the transfer events will still be called if they are awaiting on this script, just that they won't override this transfer).
  1. $gamePlayer.setDirection( _newDirection ); // SET PLAYER DIRECTION
  2. $gamePlayer.locate( _newX, _newY ); // SET PLAYER LOCATION
Expand to see the code.
OK. Speaking of events getting interrupted...

I'm trying to experiment with this transfer command because after my title screen, it will transfer to the new map, but the events on the map won't continue, or allow for progression.

Character can't move like there is a loop or an autorun event, but all loops have clean breaks when called and waits on them.

so...

1. Test game, goes straight to Title (a map, just like I set up)
2. Title is controlled by Common Events running off a switch
3. Player can choose, New, Continue, Quit
--Continue pulls up Scene_Load
--Quit calls the command window.close();
4. Player hits new,screen fade, clears all pictures, sets variables involved to 0s etc etc
5. Teleports to the next map, adds player, fade screen in
6. Displays nothing.

I tried to have it break event processing, but it doesn't really do anything. Kinda stuck.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=78882