Passibility of tiles by boat/ship

Discussion in 'RPG Maker MV' started by BurningOrca, Jul 20, 2019.

  1. BurningOrca

    BurningOrca Veteran Veteran

    Messages:
    68
    Likes Received:
    50
    First Language:
    German
    Primarily Uses:
    RMMV
    Is it just preset which tiles can be passed by boat/ship and which not or can I change this somehow, and if how?
     
    #1
  2. JtheDuelist

    JtheDuelist Just a dev who actually got a game finished Veteran

    Messages:
    1,152
    Likes Received:
    1,414
    Location:
    RMW Forums, Granvia, or Askr
    First Language:
    English
    Primarily Uses:
    RMMV
    From 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.
     
    #2
    caethyril likes this.
  3. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,054
    Likes Received:
    659
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    In case it helps, here are the relevant passability functions (from rpg_objects.js):
    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);
    };
    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.
     
    #3
  4. BurningOrca

    BurningOrca Veteran Veteran

    Messages:
    68
    Likes Received:
    50
    First Language:
    German
    Primarily Uses:
    RMMV
    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.
     
    #4
  5. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,054
    Likes Received:
    659
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    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. :)
     
    #5

Share This Page