Is it just preset which tiles can be passed by boat/ship and which not or can I change this somehow, and if how?
Passibility of tiles by boat/ship
RPG Maker MV SupportFrom what I know, boat/ship can only pass through tiles in the A1 spot of your tileset, which is almost exclusively is used by autotile water tiles, @BurningOrca. Pretty sure their maybe a plugin out there that let's you change that though.
In case it helps, here are the relevant passability functions (from rpg_objects.js):
I believe the 0x0200 and 0x0400 bits (used only for boat/ship passability as far as I can tell) are set by the editor based solely on a tile's location in its tileset, like JtheDuelist says. You could override these functions if needed, though. 🙂
If you're seeking land vehicles (i.e. no passability change from walking) then I'd suggest avoiding Game_Vehicle altogether; you can change the player character's sprite to make them look like a vehicle, and assign a "disembark" button via eventing or plugin that triggers an event to change them back.
Code:
Game_Map.prototype.isBoatPassable = function(x, y) {
return this.checkPassage(x, y, 0x0200);
};
Game_Map.prototype.isShipPassable = function(x, y) {
return this.checkPassage(x, y, 0x0400);
};
If you're seeking land vehicles (i.e. no passability change from walking) then I'd suggest avoiding Game_Vehicle altogether; you can change the player character's sprite to make them look like a vehicle, and assign a "disembark" button via eventing or plugin that triggers an event to change them back.
Thanks for the answer!
I wasn't searching for land vehicles, I solely wondered if you can set what tiles behave like shallow water and deep water.
But if this can only be set by the editor based on the location of the tiles then I propably can't set those bits manually, which answers my question.
I thought I could set them manually somewhere in the editor.
I wasn't searching for land vehicles, I solely wondered if you can set what tiles behave like shallow water and deep water.
But if this can only be set by the editor based on the location of the tiles then I propably can't set those bits manually, which answers my question.
I thought I could set them manually somewhere in the editor.
That would be a nice feature!
In case you're interested, Yanfly has a Vehicle Restrictions plugin to set boat/ship passability based on regions. 🙂
Original thread: https://forums.rpgmakerweb.com/threads/passibility-of-tiles-by-boat-ship.111267/