- Joined
- Mar 28, 2016
- Messages
- 40
- Reaction score
- 5
- First Language
- Italian
- Primarily Uses
- RMMV
Hi. I'm completely new to JavaScript and I have one question:
if I would like to "aliasing", for example, DataManager.loadDatabase, is this code is considered correct?
If not, how should I alias it? (I searched on the net, but I didn't find anything. I tried to figure myself reading some official .JS plugins included with the engline)
----------------------
Another unrelated question:
I need to "hack" the data initialization, in order to develop (also for RpgMaker MV) a translation system wich will load "on the fly" the desired translation for all the text around in the game.
On RpgMaker VX Ace I could it: I could alias DataManager.init() for my custom data initialization. But RpgMaker MV does not have an "init" subfunction under DataManager.
Excluding DataManager.loadDatabase (wich is the equivalent of DataManager.load_database in VX Ace), wich function should I "alias" wich could be considered "equivalent to" the old DataManager.init() in VX Ace? (I assume it could be not placed under DataManager but elsewhere).
Thank a lot
if I would like to "aliasing", for example, DataManager.loadDatabase, is this code is considered correct?
Code:
(function() {
var _DataManager_loadDatabase = DataManager.prototype.loadDatabase;
DataManager.prototype.loadDatabase = function() {
_DataManager_loadDatabase.call(this);
//adding here my custom changes
}
})();
----------------------
Another unrelated question:
I need to "hack" the data initialization, in order to develop (also for RpgMaker MV) a translation system wich will load "on the fly" the desired translation for all the text around in the game.
On RpgMaker VX Ace I could it: I could alias DataManager.init() for my custom data initialization. But RpgMaker MV does not have an "init" subfunction under DataManager.
Excluding DataManager.loadDatabase (wich is the equivalent of DataManager.load_database in VX Ace), wich function should I "alias" wich could be considered "equivalent to" the old DataManager.init() in VX Ace? (I assume it could be not placed under DataManager but elsewhere).
Thank a lot

