Hi
i want to check the tile the player currently is to decide which battleback to show. it would be ideal to get that tile name as seen in the editor bottom-left hint.
Right now i can get the tile id like this but it's as far as i could get this time:
$gameMap.tileId($gamePlayer.x, $gamePlayer.y, 0);
// And:
let ts = $dataTilesets[$gameMap.tilesetId()];
anyone knows?
thx!
A couple of things:
1 - The engine already does this. If you change the tileset in the database to be World Type, you can then just edit the built-in function that produces battlebacks based on the tile ID.
2 - As far as I know, that "tile name" has no connection to the game at all. It's stored in separate text files that are only referenced by the editor, they're not loaded by the game engine.
Plus they're not universally used if you are using any tilesets other than the default included assets, so trying to base your code off of it would require you to spend additional effort making the text files, and then creating your own data structures and loading functions to get them into the game.
thx for the replies. i think the code seems bit undone but this is probably because they didn't want to create all the graphics like for example snow forest is missing.
but I guess you cant have everything 🙂
its for you to extend that list on the x/y I think on its type.
the list can be as long as you like to what to show where ^^
just extend the tile ID and add the battle back, it can be even 100 battlebacks
or even more, depending on your needs, and not sure on MapId's using different
tilesets.
so something need to be done through that too or a way to control mapId
and the tileId.
which YEP_RegionBattlebacks make this easier ^^.
there might be other plugins controlling battlebacks I think.