Hi guys!
Here Nio Kasgami for explain to you...
How to create your custom Scene in MV!
it's nice to have new scene but how it's works!?
hehe it's simple but in first let's see a fast overview on how it's would "normally" look in MV
//==============================================================================
// ■ Scene_Test
//------------------------------------------------------------------------------
// this a dummy Scene for show structure.
//==============================================================================
function Scene_Test(){this.initialize.apply(this,arguments);}
//----------------------------------------------------------------------------
// ◎ new inheritance : SceneMenuBase
//----------------------------------------------------------------------------
//<"Makes Scene_Test inherit the functions and properties of Scene_MenuBase">
//----------------------------------------------------------------------------
Scene_Test.prototype = Object.create(Scene_MenuBase.prototype);
//----------------------------------------------------------------------------
// ◆ new constructor: Scene_Test
//----------------------------------------------------------------------------
// tell the function constructor is Scene_Test
//----------------------------------------------------------------------------
Scene_Test.prototype.constructor = Scene_Test;
//----------------------------------------------------------------------------
// ○ new function: prepare
//----------------------------------------------------------------------------
// <"Permits to transfert external values from event scripts calls in game.">
//----------------------------------------------------------------------------
Scene_Test.prototype.prepare = function(ai_id) {
.scene_id = ai_id;
};
//----------------------------------------------------------------------------
// ○ new function: initialize
//----------------------------------------------------------------------------
// <"Sets the default values of the scene">
// EXTRA : <"Always do inheritance with your Scene initialize function
// it's important!">
//----------------------------------------------------------------------------
Scene_Test.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
//----------------------------------------------------------------------------
// ○ new function: start
//----------------------------------------------------------------------------
// <"it's set's the flag ready and start the scene always do inheritance.">
//----------------------------------------------------------------------------
Scene_Test.prototype.start = function() {
Scene_MenuBase.prototype.start.call(this);
}
//----------------------------------------------------------------------------
// ○ new function: create
//----------------------------------------------------------------------------
// <"Serve for create your scene contents and to load it in your scene.">
//---------------------------------------------------------------------------
Scene_Test.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this.get_ai_data();
this.create_window();
};
//----------------------------------------------------------------------------
// ○ new function: update
//----------------------------------------------------------------------------
// <"Update the Scene.">
//---------------------------------------------------------------------------
Scene_Test.prototype.update = function() {
Scene_MenuBase.prototype.update.call(this);
};
//----------------------------------------------------------------------------
// ○ new function: terminate
//----------------------------------------------------------------------------
// <"dispose the content of the scene">
//---------------------------------------------------------------------------
Scene_Test.prototype.terminate = function() {
Scene_MenuBase.prototype.terminate.call(this);
};
/////////////////////////////////////////////////////////////
// personal function
// <"Unrelated to the tutorial.">
////////////////////////////////////////////////////////////
Scene_Test.prototype.get_ai_data = function() {
$game_personalities.get_personality(this.scene_id);
};
Scene_Test.prototype.create_window = function() {
this.message_window = new Window_Message();
};
Okai now you maybe why ask...WHY THIS structure exclusively?
not that's it's mandatory, but it's recommended to do this why?
Simply how Ojima-san coded the whole setup of SceneManager make the system having "forced" function in our scene.
But not all these function are mandatory in the good works of a Scene...let's show both category and their use.
Mandatory functions
Non mandatory
and that's all I hope this tutorial help you to understand how works Scene in MV
Here Nio Kasgami for explain to you...
How to create your custom Scene in MV!
it's nice to have new scene but how it's works!?
hehe it's simple but in first let's see a fast overview on how it's would "normally" look in MV
//==============================================================================
// ■ Scene_Test
//------------------------------------------------------------------------------
// this a dummy Scene for show structure.
//==============================================================================
function Scene_Test(){this.initialize.apply(this,arguments);}
//----------------------------------------------------------------------------
// ◎ new inheritance : SceneMenuBase
//----------------------------------------------------------------------------
//<"Makes Scene_Test inherit the functions and properties of Scene_MenuBase">
//----------------------------------------------------------------------------
Scene_Test.prototype = Object.create(Scene_MenuBase.prototype);
//----------------------------------------------------------------------------
// ◆ new constructor: Scene_Test
//----------------------------------------------------------------------------
// tell the function constructor is Scene_Test
//----------------------------------------------------------------------------
Scene_Test.prototype.constructor = Scene_Test;
//----------------------------------------------------------------------------
// ○ new function: prepare
//----------------------------------------------------------------------------
// <"Permits to transfert external values from event scripts calls in game.">
//----------------------------------------------------------------------------
Scene_Test.prototype.prepare = function(ai_id) {
.scene_id = ai_id;
};
//----------------------------------------------------------------------------
// ○ new function: initialize
//----------------------------------------------------------------------------
// <"Sets the default values of the scene">
// EXTRA : <"Always do inheritance with your Scene initialize function
// it's important!">
//----------------------------------------------------------------------------
Scene_Test.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
//----------------------------------------------------------------------------
// ○ new function: start
//----------------------------------------------------------------------------
// <"it's set's the flag ready and start the scene always do inheritance.">
//----------------------------------------------------------------------------
Scene_Test.prototype.start = function() {
Scene_MenuBase.prototype.start.call(this);
}
//----------------------------------------------------------------------------
// ○ new function: create
//----------------------------------------------------------------------------
// <"Serve for create your scene contents and to load it in your scene.">
//---------------------------------------------------------------------------
Scene_Test.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this.get_ai_data();
this.create_window();
};
//----------------------------------------------------------------------------
// ○ new function: update
//----------------------------------------------------------------------------
// <"Update the Scene.">
//---------------------------------------------------------------------------
Scene_Test.prototype.update = function() {
Scene_MenuBase.prototype.update.call(this);
};
//----------------------------------------------------------------------------
// ○ new function: terminate
//----------------------------------------------------------------------------
// <"dispose the content of the scene">
//---------------------------------------------------------------------------
Scene_Test.prototype.terminate = function() {
Scene_MenuBase.prototype.terminate.call(this);
};
/////////////////////////////////////////////////////////////
// personal function
// <"Unrelated to the tutorial.">
////////////////////////////////////////////////////////////
Scene_Test.prototype.get_ai_data = function() {
$game_personalities.get_personality(this.scene_id);
};
Scene_Test.prototype.create_window = function() {
this.message_window = new Window_Message();
};
Okai now you maybe why ask...WHY THIS structure exclusively?
not that's it's mandatory, but it's recommended to do this why?
Simply how Ojima-san coded the whole setup of SceneManager make the system having "forced" function in our scene.
But not all these function are mandatory in the good works of a Scene...let's show both category and their use.
Mandatory functions
Spoiler
Spoiler
how to setup :
you first of all call it inside the function like this :
function Scene_Test() {this.initialize.apply(this,arguments);}
it's will tell the system the first method executed is initialize.
Inheritance : mandatory why?
because it's here the scene get all the information from Stage. Stage is a special JS portion in the Rpg Core who handles Scene drawing on screen.
how to setup :
Scene_Test.prototype.initialize = function() { Scene_MenuBase.prototype.initialize.call(this); };
it's a super equivalent in JS it's will get the proprieties of the parent function
PS : do not forgot to do this for permit your Scene to get the inheritance.
Scene_Test.prototype = Object.create(Scene_MenuBase.prototype);
- initialize : this function is the core of your scene it's what who actually initialize your function but it's can rename like you want...but for permit inheritance with MV function and comprehension better name it initialize.
Spoiler
how to setup :
you first of all call it inside the function like this :
function Scene_Test() {this.initialize.apply(this,arguments);}
it's will tell the system the first method executed is initialize.
Inheritance : mandatory why?
because it's here the scene get all the information from Stage. Stage is a special JS portion in the Rpg Core who handles Scene drawing on screen.
how to setup :
Scene_Test.prototype.initialize = function() { Scene_MenuBase.prototype.initialize.call(this); };
it's a super equivalent in JS it's will get the proprieties of the parent function
PS : do not forgot to do this for permit your Scene to get the inheritance.
Scene_Test.prototype = Object.create(Scene_MenuBase.prototype);
- create : This section is the place where you create and load all your contents Ojima setup the SceneManager make call create when loading the scene. So it's better to input all your "create" and load method in this.
Spoiler
How to setup : It's like a regular function where you call your method.
Inheritance : non-mandatory why?
actually in the Scene_Base is done so it's not mandatory unless you want to inherit of the SceneMenu_Base contents.
How to setup : It's like a regular function where you call your method.
Inheritance : non-mandatory why?
actually in the Scene_Base is done so it's not mandatory unless you want to inherit of the SceneMenu_Base contents.
- start : it's the function who actually start the scene without this one your scene wouldn't run at all.
Spoiler
How to setup : as a regular function.
Inheritance : mandatory why?
Because it's here is set the ready flags in so be sure to do likes the initialize method and to call it
How to setup : as a regular function.
Inheritance : mandatory why?
Because it's here is set the ready flags in so be sure to do likes the initialize method and to call it
- update : it's the function who update your screen it's inherit of important option for your scene so be sure to add it with all the inheritance who go with it.
Non mandatory
Spoiler
- terminate : it's the function who Dispose all your content Specially your sprite at the end of the scene. it's not forced to add to the Scene function if you don't dispose anything's.
- prepare : casual function used in ace...it's was used to get named like you want but now you are forced to name it prepare due how SceneManager is handle...In simple this method serve for transfer data from a event script call to the Scene Function...use it when you absolutely need to transfer data. Unless that it's not useful.
- isBusy : this one serve for the Fadein time don't add it unless you want to change the time you transfer your scene.
and that's all I hope this tutorial help you to understand how works Scene in MV
Last edited by a moderator:


