No more hidden classes my ass ...

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:

Spoiler
//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());};
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 ... ... ... <.<)
first of all  stop being insultative or such

it's simply you didn't code your stuff correctly it's show you lack knowledge in JS 

for creating a new game_message you still need to recreate message window because MessageWindow INITIALIZE some contents and DEPENDS of Game_Message you can't just append a new message system without the proper modification who go with it

and the fact it's no more hidden classes it's because in the previous maker we had hidden function and method who was hidden from us 

Now we have access to the WHOLE coding of MV unless the coding who create the editor

so first before complaining and whinning study the coding correctly the whole system is depend of specific ways of coding ...specific ways of coding you don't fullfill at all
K.L.R.G, I understand you're new here, but you seem to know the basics of programming. You haven't looked around enough. Have you looked at the Window_Message class to see how it displays messages on the map? It uses the values in $gameMessage. Have you looked in the Game_Map class? That's what displays the window itself.

This whole topic is fuel for a flame war, so I'm going to cut this short. There are no hidden classes. You can see exactly how the messages work by looking at the code for the window, the map, and the Game_Message class. You simply have not looked hard enough to find what you're looking for, so please, look again. 
Maybe you should ask questions instead of boldly claiming that something that can be easily fact-checked is a lie. You just make yourself look silly acting that way.
 

Anyway,

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 ...
I'll point you in the general direction: Scene_Map initializes the Message Window (and ScrollMessage Window) and leave them in its windowLayer, even when they are not visible.

The update method of the Message_Window, which is constantly being called, checks if there's anything in the _texts array. If there is, it displays the window and the message.
I have to prepare the burn heal for Nio.
Not much more to add. You just haven't looked far enough to see when $gameMessage is used by other scripts. After all, there has to be something that calls those methods and tells it to update, something that pulls information from them and puts it onto the screen.


Next time you want to make accusations like that, at least be sure of your facts. Your post would have gone over SO much better if you'd simply been honest and said "I can't figure this bit out".
keep looking bro... all code is there... 😀 ...

there's no dll in MV. so it's all open...

btw... try not just searching inside rpg_objects.js

there's other js files such as:

rpg_cores.js

rpg_managers.js

rpg_scenes.js

rpg_sprites.js

rpg_windows.js

if you're more to advanced stuff...  you might want to check other js files inside lib folder...
I'm going to close this, because you're not going to get much more in replies than the last few posts.


Once you've actually looked through ALL the scripts, if you still need help, go ahead and post a new thread. One that is more of a request for help than an attack on the engine or its creators or distributors.

Original thread: https://forums.rpgmakerweb.com/threads/no-more-hidden-classes-my-ass.49421/