Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Super Simple Vehicle System - Enhanced
#31
DerVVulfman,

It's been awhile, my friend. I hope the time has treated you well. You have definitely been busy! I have a few questions for you, if you don't mind.

I was having little trouble with the old vehicle system and I came here to check out the demo and found that you completely rewrote the entire thing! I'm sure you may remember, but I requested a few things regarding the old system as possibilities:

1. Transfer from map to HQ (Present on the updated version)

It is slightly different, as you cannot set the vehicle's XY coordinates as you could in the last version using: enter_hq("Vehicle Name", X, Y, Direction).
Would it be possible to do this again? No worries if it's too difficult.

2. Directly enter a vehicle from map (Not present on the updated version)
Command was enter_vehicle("Vehicle Name", "Map Name")

3. Exit vehicle and drop off on another map (Not present on the updated version)
Command was: drop_off("Map Name", X, Y, Direction)

I was wondering if it would be possible to put these into the updated version? The one that I would really like to use is #3, the drop off command. I can get around the #2 command by just using the #1 command, it's just nice to have both. Anyways, if this would be possible, I would greatly appreciate it. However if it's too much to ask, then I will try and find another way to make the scenes work in my game. Thanks!
Habs11
Reply }
#32
Transferring to and from the vehicle headquarters from a map can readily be done with a common [Transfer] command event. If you want a sort of spell effect, I guess you could use my Anchor/Recall script so you can make an item return you to an anchor position. It's an old fav of mine and should work fine too. Vehicles is pretty much easier to handle now.

OH... did you like that you can now drive the vehicle around and go from map to map (if applicable) and park your vehicle on other maps without a problem?
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }
#33
Yes, I do enjoy the updated system and all of it's uses. Pretty awesome what you have done! I can see now how I could use the regular transfer function to do just about anything now. I checked out your Anchor/Recall script (which is great as usual) and I can definitely use that for a recall event, so thanks for the suggestion!

However, I may be a great fool, but I cannot figure out how you could transfer directly from a vehicle (while riding) to a map.

For example:

You are sailing your ship and you happen to move over a teleport event for a dock. The teleport event would force you to exit your vehicle and transfer you out of your ship and place you on the dock. On the dock you could then set up a teleport event to the mobile HQ and return to riding your ship from there. Does that make sense? Even if it would be possible to make a command that would force you to teleport to your mobile HQ while riding the vehicle automatically without pressing any buttons could also do the trick. Any thoughts? Thanks man!
Habs11
Reply }
#34
I used the following script command in an event with a player-touch trigger:
Code:
$game_player.vehicle_disembark

That'll do it. For more control, you can set up a conditional block that ensures the player/vehicle is only facing one direction (like the port or shore).
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }
#35
Sorry I disappeared for a little while, I kinda had a master's thesis to defend. Thanks a bunch! This is perfect. Once again, you never fail to get things done. Much appreciated!

Hey man,

Sorry about the double post, but I have a new question for you, go figure. With the last system, you made a patch for the following map looping script:

Code:
#============================================================================
# Map Looping
# Extracted from Neo Mode 7 script
# MGC
#
# Add [L] in the maps names to define looping maps
#============================================================================

# To access maps names
$data_maps = load_data("Data/MapInfos.rxdata")

#============================================================================
# ** RPG::MapInfo
#============================================================================

class RPG::MapInfo
  # defines the map's name as the name without anything within brackets,
  # including brackets
  def name
    return @name.gsub(/\[.*\]/) {""}
  end
  #--------------------------------------------------------------------------
  # the original name with the codes
  def fullname
    return @name
  end
end


#============================================================================
# ** Game_System
#----------------------------------------------------------------------------
# Add attributes to this class
#============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  unless @already_aliased
    alias initialize_mapLooping_game_system initialize
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor :mapLooping # true : map looping mode
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    initialize_mapLooping_game_system
    self.mapLooping = false
  end
end


#============================================================================
# ** Game_Map
#----------------------------------------------------------------------------
# Methods modifications to handle map looping
#============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  unless @already_aliased
    alias scroll_down_mapLooping_game_map scroll_down
    alias scroll_left_mapLooping_game_map scroll_left
    alias scroll_right_mapLooping_game_map scroll_right
    alias scroll_up_mapLooping_game_map scroll_up
    alias valid_mapLooping_game_map? valid?
    alias passable_mapLooping_game_map? passable?
    alias old_setup_mapLooping setup
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Scroll Down
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_down(distance)
    unless $game_system.mapLooping
      scroll_down_mapLooping_game_map(distance)
      return
    end
    @display_y = @display_y + distance
  end
  #--------------------------------------------------------------------------
  # * Scroll Left
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_left(distance)
    unless $game_system.mapLooping
      scroll_left_mapLooping_game_map(distance)
      return
    end
    @display_x = @display_x - distance
  end
  #--------------------------------------------------------------------------
  # * Scroll Right
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_right(distance)
    unless $game_system.mapLooping
      scroll_right_mapLooping_game_map(distance)
      return
    end
    @display_x = @display_x + distance
  end
  #--------------------------------------------------------------------------
  # * Scroll Up
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_up(distance)
    unless $game_system.mapLooping
      scroll_up_mapLooping_game_map(distance)
      return
    end
    @display_y = @display_y - distance
  end
  #--------------------------------------------------------------------------
  # * Determine Valid Coordinates
  #     x          : x-coordinate
  #     y          : y-coordinate
  #   Allow the hero to go out of the map when map looping
  #--------------------------------------------------------------------------
  def valid?(x, y)
    unless $game_system.mapLooping
      return valid_mapLooping_game_map?(x, y)
    end
    if $game_system.mapLooping then return true end
    return (x >= 0 && x < width && y >= 0&& y < height)
  end
  #--------------------------------------------------------------------------
  # * Determine if Passable
  #     x          : x-coordinate
  #     y          : y-coordinate
  #     d          : direction (0,2,4,6,8,10)
  #                  *  0,10 = determine if all directions are impassable
  #     self_event : Self (If event is determined passable)
  #--------------------------------------------------------------------------
  def passable?(x, y, d, self_event = nil)
    unless $game_system.mapLooping
      return passable_mapLooping_game_map?(x, y, d, self_event)
    end
    unless valid?(x, y)
      return false
    end
    bit = (1 << (d / 2 - 1)) & 0x0f
    for event in events.values
      if event.tile_id >= 0 and event != self_event and
         event.x == x and event.y == y and not event.through
        if @passages[event.tile_id] & bit != 0
          return false
        elsif @passages[event.tile_id] & 0x0f == 0x0f
          return false
        elsif @priorities[event.tile_id] == 0
          return true
        end
      end
    end
    for i in [2, 1, 0]
      tile_id = data[x % width, y % height, i] # handle map looping
      if tile_id == nil
        return false
      elsif @passages[tile_id] & bit != 0
        return false
      elsif @passages[tile_id] & 0x0f == 0x0f
        return false
      elsif @priorities[tile_id] == 0
        return true
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # * Setup
  #     map_id : map ID
  #--------------------------------------------------------------------------
  def setup(map_id)
    old_setup_mapLooping(map_id)
    map_data = $data_maps[$game_map.map_id]
    $game_system.mapLooping = map_data.fullname.include?("[L]")
  end
end


#============================================================================
# ** Game_Character
#----------------------------------------------------------------------------
# "update" method modifications to handle map looping
#============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  unless @already_aliased
    alias initialize_mapLooping_game_character initialize
    alias update_mapLooping_game_character update
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor :x
  attr_accessor :y
  attr_accessor :real_x
  attr_accessor :real_y
  attr_accessor :map_number_x # map's number with X-looping
  attr_accessor :map_number_y # map's number with Y-looping
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    initialize_mapLooping_game_character
    self.map_number_x = 0
    self.map_number_y = 0
  end
  #--------------------------------------------------------------------------
  # * Update : handle map looping
  #--------------------------------------------------------------------------
  def update
    unless $game_system.mapLooping
      update_mapLooping_game_character
      return
    end
    # if x-coordinate is out of the map
    unless (x.between?(0, $game_map.width - 1))
      difference = 128 * x - real_x
      if self.is_a?(Game_Player)
        # increase or decrease map's number
        self.map_number_x += difference / (difference.abs)
      end
      # x-coordinate is equal to its equivalent in the map
      self.x %= $game_map.width
      self.real_x = 128 * x - difference
    end
    # if y-coordinate is out of the map
    unless (y.between?(0, $game_map.height - 1))
      difference = 128 * y - real_y
      if self.is_a?(Game_Player)
        # increase or decrease map's number
        self.map_number_y += difference / (difference.abs)
      end
      # y-coordinate is equal to its equivalent in the map
      self.y %= $game_map.height
      self.real_y = 128 * y - difference
    end
    update_mapLooping_game_character
  end
end


#============================================================================
# ** Game_Player
#============================================================================

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  unless @already_aliased
    alias center_mapLooping_game_player center
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Always center around the hero if map looping
  #--------------------------------------------------------------------------
  def center(x, y)
    unless $game_system.mapLooping
      center_mapLooping_game_player(x, y)
      return
    end
    $game_map.display_x = x * 128 - CENTER_X
    $game_map.display_y = y * 128 - CENTER_Y
  end
end


#============================================================================
# ** Sprite_Character
#============================================================================

class Sprite_Character < RPG::Sprite
  #--------------------------------------------------------------------------
  # * Aliased methods (F12 compatibility)
  #--------------------------------------------------------------------------
  unless @already_aliased
    alias update_mapLooping_sprite_character update
    @already_aliased = true
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    update_mapLooping_sprite_character
    if $game_system.mapLooping
      unless x + computed_right_width >= 0 && x - computed_left_width < 640
        self.x %= $game_map.width << 5
      end
      while y + computed_lower_height < 0
        self.y += $game_map.height << 5
        self.z += $game_map.height << 5
      end
      while y - computed_upper_height >= 480
        self.y -= $game_map.height << 5
        self.z -= $game_map.height << 5
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Sprite's upper height (doesn't handle rotation)
  #--------------------------------------------------------------------------
  def computed_upper_height
    return (oy * zoom_y).to_i
  end
  #--------------------------------------------------------------------------
  # * Sprite's lower height
  #--------------------------------------------------------------------------
  def computed_lower_height
    return ((src_rect.height - oy) * zoom_y).to_i
  end
  #--------------------------------------------------------------------------
  # * Sprite's left width
  #--------------------------------------------------------------------------
  def computed_left_width
    return (ox * zoom_x).to_i
  end
  #--------------------------------------------------------------------------
  # * Sprite's right width
  #--------------------------------------------------------------------------
  def computed_right_width
    return ((src_rect.width - ox) * zoom_x).to_i
  end
end

You used the following patch:

Code:
#==============================================================================
# ** Super Simple Vehicle System / Mode7 Patch
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 2
#    10-26-2007
#    
#------------------------------------------------------------------------------
#
#  This script appends the check_terrain routine in the Vehicle System to permit
#  looping vehicles.   Also, it calls on the valid? routine in the Mode7 system.
#
#  The only  'drawback'  to this system was the routine that prevents the player
#  from exiting vehicles  along map borders.   A strange nuance  about the Mode7
#  system  (or possibly  about any loop script)  is that  tiles detected  on map
#  borders read as terrain tag 1. To prevent landing/disembarking in water, this
#  patch prevents landing on map borders.
#
#  To use this system, merely paste it BELOW both the Vehicle and Mode7 systems.
#  This script handles the rest.
#
#==============================================================================



#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass for the
#  Game_Player and Game_Event classes.
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # * Check the terrain for the vehicle
  #   new_x     : future x position
  #   new_y     : future y position
  #--------------------------------------------------------------------------
  alias m7_check_terrain check_terrain
  def check_terrain(new_x, new_y)  
    m7_check_terrain(new_x, new_y)
    vehicle = $game_system.vehicle_number
    if vehicle != 0
      # Passable for matching terrain
      if VEHICLES[vehicle-1][4]!= nil
        # If loopable game map
        if $game_map.valid?(new_x, new_y)
          # Set the looping switch off
          ssvs_m7_looping = false
          # Branch on direction
          case @direction
          when 2; ssvs_m7_looping = true if new_y == $game_map.height and @y == ($game_map.height - 1)
          when 4; ssvs_m7_looping = true if new_x == -1 and @x == 0
          when 6; ssvs_m7_looping = true if new_x == $game_map.width and @x == ($game_map.width - 1)
          when 8; ssvs_m7_looping = true if new_y == -1 and @y == 0
          end
          # If looping noted...
          @state = true if ssvs_m7_looping
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Determine if Landing is Possible
  #     x : x-coordinate
  #     y : y-coordinate
  #--------------------------------------------------------------------------  
  alias m7_land_possible? land_possible?
  def land_possible?(x, y)
    # Original result
    result = m7_land_possible?(x, y)
    # Ensure false result if on map edges
    result = false if x == 0
    result = false if y == 0
    result = false if x == $game_map.width-1
    result = false if y == $game_map.height-1
    # Return result
    return result
  end
end

Would it be possible to update the patch for the new system? Thanks!
Habs11
Reply }
#36
DerVVulfman,

Sorry it's taken so long to get back to you, football season for me is quite busy. I have a few issues with the system if you have the time to check them out.

1. There is a bug in the audio. Let's say you have your "world map" set to "A" music and your vehicle set to "B" music. If you board your vehicle, and then land, it's all good. However, if you go to your mobile HQ while on your vehicle, and then back to the world map, the game will play the "A" music instead of continuing with the "B" music. Then if you land, the music will stop entirely. From there, you can reboard your vehicle and the "B" music will play, but if you land, the music stops entirely again. The same is true if you use your "$game_player.map_to_hq('Dragon')" command to board your vehicle. It's kinda hard to explain, I was just messing around on your demo to try and find out exactly what was going on. Let me know if you can find the problem.

2. Even if you have your Thru set to "false", your vehicle still goes right through things that are blocked by and X in the pass-ability portion of the tileset. Try making a forest in the middle of the ocean on your demo and see the ship go right through it. This is an issue for me, as my world map has several ports, and my ship just goes right over the other boats that are docked.

Along the same lines, you cannot trigger events that are set to "player touch" on your vehicle. For example, a certain area of the map is haunted and there are events set up around it to trigger the screen to tint to a darker shade when the player gets close. When my vehicle runs over the events, they do not trigger. However, interestingly enough, if I position the vehicle directly over them and press the action button, they will trigger. I know that on your demo you have an event that triggers on player touch with the "$game_player.vehicle_disembark" command, but if you try the same event while on the ship, it does not work. Not sure if this helps, but I'd thought I would let you know.

3. Regarding the "$game_player.vehicle_disembark" command, it will not work unless you are position on a tile that allows you do exit your vehicle. For example, if I was riding in my ship and I encountered another ship out on the seas, I would want to disembark the player, and then teleport them over to the other ship. However, I cannot do this, as the script will not allow the player to disembark while still on the water. Is there a way to just have you disembark anyway, regardless if it is "allowable" by the terrain in the script? If not, I think I may have a solution to get around it.

4. Last one. Have you got a chance to check out a "map loop" feature, as described in my previous post?

I know this is a lot of questions, and I totally understand if you are busy with other things. Any help would be appreciated. Thanks!
Habs11
Reply }
#37
You solved most of your issues... Look towards the 1st page and the 'submitted patches' section (the 2nd post) for a Mode7 'original' patch. Not that the Lycan ABS didn't have looping going on in it.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }
#38
BUMP!
to version 9.2

There was a bug discovered and reported by Habs11 after sending a copy of his game to his brother. The error message itself, very odd and never before seen, was triggered when using the feature that lets the player transfer to a vehicle headquarters. Fixing the error was simple enough as the offending statement was no longer used and depreciated.

So the newest version now extends credits to Habs11 for the bug discovery.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }
#39
ACK! I didn't realize Habs11 even asked a question when I came here to replace my map looping patch!!!!

This is a bump for the Map Loop patch, not the vehicle system itself.... The map loop patch now works with both the Mode7 system as well as the Lycan ABS which has its own map loop capabilities.

Oops... Sorry Habs. Confused
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }
#40
DerVVulfman, sorry to bring up an old topic I've only recently discovered your script.
Everything else works but the vehicle tends move through other events and other
parts of the map even though I set the through to be false. And not just the vehicle
the other events are moving through objects. This only happens when I enter the
vehicle. I want to make a land vehicle and I just cannot seem to make it work the
way I planned it out. If you the have the time could you please try and help me with
this problem?
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Enhanced Squad Movement DerVVulfman 5 5,241 02-24-2023, 04:40 PM
Last Post: DerVVulfman
   Zenith Tactical Battle System Plus (ZTBS+) DerVVulfman 0 1,974 05-10-2022, 10:42 PM
Last Post: DerVVulfman
   Text Scroll Script - Enhanced DerVVulfman 23 29,741 02-18-2021, 04:16 AM
Last Post: DerVVulfman
   Commercial System Package DerVVulfman 11 11,900 01-04-2020, 12:37 AM
Last Post: Pelip
   ACBS - Atoa Custom Battle System 3.2 Victor Sant 150 223,639 03-02-2019, 04:47 AM
Last Post: dragonprincess44
   DerVV's Simple Popup System DerVVulfman 4 10,878 10-08-2017, 04:53 PM
Last Post: DerVVulfman
   Super Simple MCISendString DerVVulfman 0 4,335 03-09-2017, 04:52 AM
Last Post: DerVVulfman
   Melly-Mel's Calendar System DerVVulfman 23 38,589 12-02-2016, 04:31 AM
Last Post: DerVVulfman
   The Magey Mage's Spellbook System DerVVulfman 3 8,994 10-31-2016, 01:45 AM
Last Post: Noctis
   CTB - A Final Fantasy X-like Battle System, Version 3.2 Charlie Fleed 572 640,389 05-19-2016, 05:38 PM
Last Post: Starmage



Users browsing this thread: