[RMMV] New Game Script Call

EmmaB

Veteran
Veteran
Joined
Feb 20, 2018
Messages
82
Reaction score
116
First Language
English
Primarily Uses
RMMV
Hi everyone,

I was wondering if there is a new game script call that exists, as I am needing it for a game I am working on. I am wanting to use it for a custom title screen. Any help would really be appreciated.:)
 

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
435
Reaction score
192
First Language
English
Primarily Uses
RMMV
DataManager.setupNewGame();

That's the base you'll need, but odds are you'll need other things. The base code in the Scene_Title for a new game looks like this:

Scene_Title.prototype.commandNewGame = function() {
DataManager.setupNewGame();
this._commandWindow.close();
this.fadeOutAll();
SceneManager.goto(Scene_Map);
};

This video should offer some insight as well:

 

Prescott

argggghhh
Veteran
Joined
Aug 28, 2014
Messages
478
Reaction score
369
First Language
English
Primarily Uses
RMMV
So, what I do is just transfer them to a new map where the game starts. Depending on the way you've evented your title screen, it might just take them back to the title screen if they start a new game, since the default command of starting a new game will take you to the map your character is set to start on.
 

EmmaB

Veteran
Veteran
Joined
Feb 20, 2018
Messages
82
Reaction score
116
First Language
English
Primarily Uses
RMMV
Thanks for the quick replies.

@shockra I tried it and an error came up.

In my game, when I start the game, bring up the menu and quit back to the main menu (I have made the quit button transfer the player back to the title screen map), and then press new game, the game transfers the player to the starting map. The problem is, that I have made an event on the starting map that copies events from a different map and pastes them randomly on the starting map. So when the player starts a second game, it spawns the events on the map a second time (if you get what I'm saying) so that, in this case, the starting map will have two sets of the events when it was only meant to have one.

Sorry, this is very complex. If you don't understand, just let me know and I'll try to explain it better.

So the reason that I need a New Game script command, is that it will reset the whole game (except for the saves) and start at the title screen.
 

Prescott

argggghhh
Veteran
Joined
Aug 28, 2014
Messages
478
Reaction score
369
First Language
English
Primarily Uses
RMMV
If you have a skip title screen script, you can still use the default menu command for returning to the title because it is the equivalent of refreshing the game, not actually returning to the title. If you teleport to the title screen, then you're still running the same instance of the game.
 

EmmaB

Veteran
Veteran
Joined
Feb 20, 2018
Messages
82
Reaction score
116
First Language
English
Primarily Uses
RMMV
Hi @Prescott,
I tried using the default return to title screen command but it just went to a blank title screen with the different options (Not the first map). I am using Yami's Skip Title plugin. Is it the wrong skip title plugin to be using maybe? I'm not sure.
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
788
Reaction score
322
First Language
English (USA)
Primarily Uses
RMMV
Not much of an answer to provide. Gave this a try myself, got errors from it and gave up (almost) immediately.

As a workaround (and in case the OP still needs an alternative) I'm gonna risk necroposting and provide an idea of my own that I was debating for just this reason. What I ended up doing is to settle on a slideshow advanced by the player with the first slide set as the title itself. Then, using Hime's pre-title events I made my alternative menu screen (which should NOT be set as the title so leave that set to false and just put in the map ID you're using). Set the start game command as a goto for the normal title scene (the procedure is listed in the pre-title plugin help system if you need a reference point), set load game to push the load scene, exit command to close etc. The rest is particularly technical so make a backup and change only what I mention as the next part involves the source code (so you'd better know what you're doing beforehand... or else). From rpg_scenes.js change Scene_GameEnd.prototype.commandToTitle to call location.reload() instead of the default - this will hard reset immediately but I have not found a way to mitigate this for the sake of presentation so make what you will of it. However, this will also prevent you from going back to the opening slides that you're setting up for this. Finally, on the map where you set the player to start you can build out the rest of your opening sequence and then comment out the addCommand calls for continue and options from rpg_windows.js to finish the process. (Additionally, you should comment out anything and everything that also adds to the title menu in its source, plugin etc. or at least turn off its display from the plugin manager if you're allowed to do so.) You can also change the start game definition to read next page (or just next) and create show choices calls in the rest of the sequence to read likewise for an extra touch of professionalism.
 
Last edited:

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
788
Reaction score
322
First Language
English (USA)
Primarily Uses
RMMV
In that case (and in the event you can provide some insight of your own for improvements and such) then perhaps an idea of how you did it may be of use, either here or in MV tutorials (preferably the latter or subjective equivalent depending on method of resolution). Beyond that, you can elevate this to resolved and notify the mods via the report function if you're done with this.

EDIT: My issue is that tilesetNames is being reported null. That is to say, it "cannot read property 'tilesetNames' of null".
 
Last edited:

EmmaB

Veteran
Veteran
Joined
Feb 20, 2018
Messages
82
Reaction score
116
First Language
English
Primarily Uses
RMMV
I didn't exactly fix this problem, actually. I just found that I didn't need to use the New Game script call after all. :)
Thanks for the help anyway.
(If anyone knows how to fix this problem, you can still post it if you want to, as it may help someone else. :))
 

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

Latest Threads

Latest Posts

Latest Profile Posts

In the strangest turn of events, my animations now live in the characters folder, and my character images now live in the pictures folder. It's a complicated world, but weirdly a more resource efficient one. :LZSexcite:
Did you know that we use robotic spy animals to learn about how different species behave in the wild? We're only a step away from robotic spy humans, and then Terminator. :p
Not being able to do a commission/request after all and having to give back the money is so heartbreaking.

Sometimes I'm just way too eager to help people out and suddenly find myself in a very deep hole because I'm not gonna be able to finish it. I really hope I don't come across as unprofessional to these people and in general. =n="
Learning Action Sequences!

Forum statistics

Threads
98,046
Messages
948,816
Members
129,310
Latest member
eillajones309
Top