New account registration is temporarily disabled.

A5 TILESET? IS THAT ENOUGH? (+ VEHICLE PASSIBILITY)

Posts

Pages: 1
Hey guys.
I have some speculations about the A tilesets. It‘s questions I presume have been asked before but I found it difficult to find exactly what I was looking for.
So when working on a game some time ago on Ace, I stopped trying to work with tilesets A1-A4. I just couldn‘t handle trying to make out how autotiles worked and stuff when trying to make my custom tilesets.
Then I came across Tileset A5 which did what I wanted in this case. I could just put my custom tiles wherever and they appeared in that exact spot in the editor. Basic stuff.
So on this project, I have no need for autotiles that I think of. My graphics for this particular game is extremely basic. Like old 198X NES graphics. Tiles are just tiles and nothing fancy about it. No specific borders or no borders. Also, and maybe more importantly, I don‘t think I need any animated tiles. If I make a move in a certain direction later I might need it for some maps but then I‘ll just have to master that.
So what I‘m wondering is...are there any major drawbacks when using only A5? I need very few tiles for each map so I don‘t need to fill a whole tileset template of different graphics. I‘ve just been using A5 and then B to put rocks, cliffs and stuff. And no, I have no transparent stuff on A5.

But another more complex question came up then.......how does this affect Ship and Airship passibility? How does that work for the A5 tileset? I have tried it and it seems at a glance that all tiles on A5 are impassable with a Ship. Can I change specific tiles in A5 to become passable with a ship and an airship? I suppose I could set a specific region on water tiles and make those regions passable on ships? Yes?

Thanks
Marrend
Guardian of the Description Thread
21806
I whipped up a quick test-map working off of a new project. I was using the "Interior" tile-set as a base, but removing all the "A" tiles, except for A5. From what I can tell, the Ship can pass through any "empty space" tile, but not terrain that players can walk on. The Airship passiblity is normal (ie: it flies over everything), and can only land on walkible terrian.
well I tried putting my ship in water impassable by my actors but it didn't move so I think I'll have to tell it that that's a water tile unless it's a specific space on the A5 template. Then obviously I don't want my ship to move anywhere else, it's not supposed to go through mountains. I only have one graphic for water, nothing animated and such so maybe that just has to occupy the correct water tile space on A1 (or A2 whichever it was).
Likewise a problem with the airship, I have forest tiles that are passable but I don't want the player to be able to land their airship on it. Same for swamp tiles for example

I don't think the A5 tileset is programmed like the other A sets to work with ships. Specific tiles on A1 for instance are meant for water tiles, whether it be custom made or default.
SunflowerGames
The most beautiful user on RMN!
13323

You might need a script made by Yanfly which uses regions to determine where actors and events can go. This will make it so that even through events can't cross specific regions.

https://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/

Marrend
Guardian of the Description Thread
21806
I went back to the test-project to double-check on something. Now, originally, the map I was testing on was technically a copy-paste of a map with water-tiles on it. Which might explain how I was able to move around on the boat. However, when I re-did the map from scratch, I was not able to move with either the boat or ship, like you observed.

I'm not really sure how it determines this via the tileset, but, there are a few functions in Game_Map...

class Game_Map
  #--------------------------------------------------------------------------
  # * Check Passage
  #     bit:  Inhibit passage check bit
  #--------------------------------------------------------------------------
  def check_passage(x, y, bit)
    all_tiles(x, y).each do |tile_id|
      flag = tileset.flags[tile_id]
      next if flag & 0x10 != 0            # [☆]: No effect on passage
      return true  if flag & bit == 0     # [○] : Passable
      return false if flag & bit == bit   # [×] : Impassable
    end
    return false                          # Impassable
  end
  #--------------------------------------------------------------------------
  # * Determine Passability of Normal Character
  #     d:  direction (2,4,6,8)
  #    Determines whether the tile at the specified coordinates is passable
  #    in the specified direction.
  #--------------------------------------------------------------------------
  def passable?(x, y, d)
    check_passage(x, y, (1 << (d / 2 - 1)) & 0x0f)
  end
  #--------------------------------------------------------------------------
  # * Determine if Passable by Boat
  #--------------------------------------------------------------------------
  def boat_passable?(x, y)
    check_passage(x, y, 0x0200)
  end
  #--------------------------------------------------------------------------
  # * Determine if Passable by Ship
  #--------------------------------------------------------------------------
  def ship_passable?(x, y)
    check_passage(x, y, 0x0400)
  end
end


...that may be of interest to you.
author=kory_toombs
You might need a script made by Yanfly which uses regions to determine where actors and events can go. This will make it so that even through events can't cross specific regions.

https://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/


yeah I knew something like that existed and am sure I could use it...so I'd just make the whole sea a specific region. Hopefully I can make it so that the actors can't pass but the ship can.

author=Marrend
I went back to the test-project to double-check on something. Now, originally, the map I was testing on was technically a copy-paste of a map with water-tiles on it. Which might explain how I was able to move around on the boat. However, when I re-did the map from scratch, I was not able to move with either the boat or ship, like you observed.

I'm not really sure how it determines this via the tileset, but, there are a few functions in Game_Map...

...that may be of interest to you.

Thanks for taking the time to test it. I'm no programmer although I've come to understand a lot just by changing some custom scripts and stuff so I'll not be editing any default scripts on my own. But I've been wondering where you could find stuff about the vehicles. I don't really understand why the database doesn't allow for more elaborate options for the vehicles. I would rather want to be able to change specific passability on the Tileset menu although it would evidently take some time I guess. Just having a menu for passability for ships and airships. This in turn would possibly allow to have more than one airship type like in FF5 where the dragon can't fly over certain mountain tiles, whilst the black chocobo and airship can (always bothered me how the black chocobo was so superior to a dragon....)

It's good to know where to find those script lines. I could take a look at that.
Marrend
Guardian of the Description Thread
21806
I think it might have been in the database of TsuK where it had a "Terrain" section, and developers could define what terrains were passable via ship or boat, or if players could land on that terrain via the airship. I forget if that option exists in XP or VX, but, it certainly doesn't in VX Ace's database. Terrain tags exist, yes, but do nothing by themselves. They have to be programmed separately.

Probably the closest thing I could even find regarding vehicle passability was the section I posted earlier from Game_Map, and I have no idea how those functions would arrive at the values mentioned. Game_Vehicles, by itself, has no information about vehicle passability, and that was the first place I looked.

Though, speaking of terrain tags, I think that's how I worked the bullet created by the Wand of Blasting to be allowed to pass over water-tiles. What I did there looked something like...

class Game_CharacterBase
  #--------------------------------------------------------------------------
  # * Determine if Passable
  #     d : Direction (2,4,6,8)
  #--------------------------------------------------------------------------
  def passable?(x, y, d)
    x2 = $game_map.round_x_with_direction(x, d)
    y2 = $game_map.round_y_with_direction(y, d)
    return false unless $game_map.valid?(x2, y2)
    return true if terrain_tag(x, y, d)
    return true if @through || debug_through?
    return false unless map_passable?(x, y, d)
    return false unless map_passable?(x2, y2, reverse_dir(d))
    return false if collide_with_characters?(x2, y2)
    return true
  end

  # Set tiles with a terrain tag not euqal to 0 passible by an event with a
  # predefined ID.
  def terrain_tag(x, y, d)
    # First, we define which event ID we want to find.
    event_id = 1
    # We check against the parameters of the function to see if the specified
    # event is the one we're looking at.
    x2 = $game_map.events[event_id].x
    y2 = $game_map.events[event_id].y
    if x == x2 && y == y2
      # If the terrain tag is not 0, the bullet can move through it.
      if $game_map.terrain_tag(x, y) != 0
        return true
        # But wait. If the NEXT tile's terrain tag is not 0, the bullet should
        # still be able to move!
      else
        x2 = $game_map.round_x_with_direction(x, d)
        y2 = $game_map.round_y_with_direction(y, d)
        if $game_map.terrain_tag(x2, y2) != 0
          return true
        end
        # Should all that fail, treat the tile normally.
        return false
      end
    end    
  end
end


...that mess. Of course, the situation you're looking at is different than what I wanted to do. I think what you want to do would be more of an if/then statement (case statement?) regarding what kind of vehicle the player is riding.
Well I only have one world map where you can use a ship and an airship. And only one type of water tile which is basically one of two tiles that are impassable for the actors, including mountain tiles.

The ship is supposed to pretty much just work on the sea tiles. I have some bridges as well which the ship should be able to pass under but I'll work that out with Events (although there has to be a distinction, since the actors pass over the bridge, the ship goes under).

The airship is fine regarding well, it can pass over everything, however, the problem with that comes with the landing part. It should be able to land on grassland, dirt paths and even deserts, but I need to exclude forests, swamps and more which are all passable for actors.

Haven't fetched it yet, but I'm gonna believe that regions plugin will work for all of this.
Pages: 1