Thanks to nio kasgami for writing this. I found it very useful!
Mandatory functions
Non mandatory
JavaScript:
//==============================================================================
// ■ 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) {
this.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();
};
- 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.
- 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.
- start : it's the function who actually start the scene without this one your scene wouldn't run at all.
- 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
- 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.