problem solved!
I needed to read the meta data from events of another map,
in order to get their event ID based on their EventNote.
this can be solved by replycating parts of the datamanager. and load the map from which you want to read the events meta.
Then this map can be accest over the console aswell ^^
By default "$dataMap" does read the events for the map on which you are .
So by replicating the Setup of "$dataMap" and adding another mapID this can be solved.
some example code that shows hopefully what i mean
(compare this code to the default code from "rpg_managers", in order to see what i changed, or in other words how i replicated the Setup of "$dataMap" .In my Case i named it "$dataGrave", because its for an "eventgrave"- plugin..)
I needed to read the meta data from events of another map,
in order to get their event ID based on their EventNote.
this can be solved by replycating parts of the datamanager. and load the map from which you want to read the events meta.
Then this map can be accest over the console aswell ^^
By default "$dataMap" does read the events for the map on which you are .
So by replicating the Setup of "$dataMap" and adding another mapID this can be solved.
some example code that shows hopefully what i mean
(compare this code to the default code from "rpg_managers", in order to see what i changed, or in other words how i replicated the Setup of "$dataMap" .In my Case i named it "$dataGrave", because its for an "eventgrave"- plugin..)
JavaScript:
// Data Manager (import Grave Map Data)----------------------------------------------------------------
//"$dataGrave" stores the Grave Map data (similar to "$dataMap" for default "$gameMap").
DataManager.loadGraveData = function(mapId) {
if (mapId > 0) {
var filename = 'Map%1.json'.format(mapId.padZero(3));
this._mapLoader = ResourceHandler.createLoader('data/' + filename, this.loadDataFile.bind(this, '$dataGrave', filename));
this.loadDataFile('$dataGrave', filename);
} else {
this.makeEmptyMap();
}
};
var _DataManager_onLoad = DataManager.onLoad
DataManager.onLoad = function(object) {
_DataManager_onLoad.call(this, object);
if (object === $dataGrave) {
this.extractMetadata(object);
for (var i = 0; i < object.events.length; i++) {
var data = object.events[i];
if (data && data.note !== undefined) {
this.extractMetadata(data);
}
}
}
};
//load Grave Map data
// _GraveMapId is the map id which you want to read
DataManager.loadGraveData(_GraveMapId);
//----------------------------------------------------------