I try to create a plugin to load rpg maker xp maps/tilesets. One of the issues I run into is that it seems that I’m unable to load the tileset image? I have build a small testcase and tested it against the latest snapshot (Version 2020.01.22). I use Windows 10. Both relative and absolute paths don’t seem to work.
tiled testcase.zip (1023 Bytes)
Other issues I’m running into are (though to be fair I haven’t tested these in the latest snapshot):
-
Cannot load multiple tilesets at once when opening a single file (rmxp has ~50 tilesets in the file ‘Tilesets.rxdata’). Possible workarounds are ask for an id to open, or create lots of new tilesets
-
Arrow function expressions makes the keyword ‘this’ undefined. Workaround before arrow function use ‘const ctx = this;’. Kind of the defeats the purpose of arrow functions though.
-
console.log doesn’t accept %s and %o. Workaround: just use + variable +.
-
I get a type error while trying to set the name of an error object:
class CustomError extends Error {
constructor(message) {
super(message);
// This doesn’t seem to work for some reason:
this.name = this.constructor.name;
}
}throw new CustomError(‘Test’);
Workaround: Don’t set the name of custom errors…