I don't get how this code is working ... I am still trying to figure out how to recreate a message-window.
If you use the following code in an Event via Script it works:
$gameMessage.add("Show Text Script Call")But if you recreate the Game_Message() with different name nothing happens.
Here is my version I created:
Despite being literally the same code with different names there is nothing happening when I use it in the event-scripts:
$iklrgMessage.add("Show Text Script Call")And for that matter I realised something else. How does the MV know how to use the right Window-Class? As far as I understood the code of $gameMessage gets its values and than the Window_Message uses this information to create itself.
But WHERE is this stuff called????
This is the function in MV (rpg_objects.js -> Game_Message):
Game_Message.prototype.add = function(text) { this._texts.push(text);};You put in $gameMessage.add("Text"); and it displays text ... But there is NOTHING that in any way makes that possible ...
As far as I understand it, it just adds text to a text-array ... Nothing more nothing less ... There shouldn't happen ANYTHING ... but it does ...
My only other idea is that there might be something triggered by the Scene_Manager as soon as Game_Message or more specific $gameMessage is changed but I can't find ANYTHING ,....
So sry ... No more hidden Classes my ass MV-Marketing ... ... ... How is this working????
(And yes I know, technically Javascript doesn't seem to have any classes ... which makes this statement even cheaper ... Of course the new MV will have no more hidden classes if they use a programming language that doesn't have classes in the classic sense ... ... ... <.<)
If you use the following code in an Event via Script it works:
$gameMessage.add("Show Text Script Call")But if you recreate the Game_Message() with different name nothing happens.
Here is my version I created:
//This is all part of my plugin (yes the plugin itselfs works and everything is fine):var $iklrgMessage = null; //Declaring the Variable//Adding the new variable to the object-creationKLRG.FRO_Windows.DataManager_createGameObjects = DataManager.createGameObjects;DataManager.createGameObjects = function() { //if (!KLRG.FRO_Windows.DataManager_createGameObjects.call(this)) ; KLRG.FRO_Windows.DataManager_createGameObjects.call(this); $gameTemp = new Game_Temp(); $gameSystem = new Game_System(); $gameScreen = new Game_Screen(); $gameTimer = new Game_Timer(); $gameMessage = new Game_Message(); $gameSwitches = new Game_Switches(); $gameVariables = new Game_Variables(); $gameSelfSwitches = new Game_SelfSwitches(); $gameActors = new Game_Actors(); $gameParty = new Game_Party(); $gameTroop = new Game_Troop(); $gameMap = new Game_Map(); $gamePlayer = new Game_Player(); $iklrgMessage = new KLRGAME_Message(); //ADDING The new class console.log("HI here");};//My own new Game_Message-Object:function KLRGAME_Message() { this.initialize.apply(this, arguments);}KLRGAME_Message.prototype.initialize = function() { this.clear();};KLRGAME_Message.prototype.clear = function() { this._texts = []; this._faceName = ''; this._faceIndex = 0; this._background = 0; this._positionType = 2; };KLRGAME_Message.prototype.add = function(text) { this._texts.push(text); console.log("KLRGAME_Message.prototype.add");};KLRGAME_Message.prototype.setFaceImage = function(faceName, faceIndex) { this._faceName = faceName; this._faceIndex = faceIndex; console.log("KLRGAME_Message.prototype.setFaceImage");};KLRGAME_Message.prototype.setBackground = function(background) { this._background = background; console.log("KLRGAME_Message.prototype.setBackground");};KLRGAME_Message.prototype.setPositionType = function(positionType) { this._positionType = positionType; console.log("KLRGAME_Message.prototype.setPositionType");};KLRGAME_Message.prototype.isBusy = function() { return (this.hasText() || this.isChoice() || this.isNumberInput() || this.isItemChoice());};
$iklrgMessage.add("Show Text Script Call")And for that matter I realised something else. How does the MV know how to use the right Window-Class? As far as I understood the code of $gameMessage gets its values and than the Window_Message uses this information to create itself.
But WHERE is this stuff called????
This is the function in MV (rpg_objects.js -> Game_Message):
Game_Message.prototype.add = function(text) { this._texts.push(text);};You put in $gameMessage.add("Text"); and it displays text ... But there is NOTHING that in any way makes that possible ...
As far as I understand it, it just adds text to a text-array ... Nothing more nothing less ... There shouldn't happen ANYTHING ... but it does ...
My only other idea is that there might be something triggered by the Scene_Manager as soon as Game_Message or more specific $gameMessage is changed but I can't find ANYTHING ,....
So sry ... No more hidden Classes my ass MV-Marketing ... ... ... How is this working????
(And yes I know, technically Javascript doesn't seem to have any classes ... which makes this statement even cheaper ... Of course the new MV will have no more hidden classes if they use a programming language that doesn't have classes in the classic sense ... ... ... <.<)