BDR Sweep Version: 1.0 for RMVX
By: Fustel
Introduction
Remember the FF6 underground river, or any river that sweeps you past nearly unreachable treaseures ??
With this script, you can easily create such rivers, even aerial air currents, without overloading your maps withe events. Furthermore, ther is NO EVENT at all to achieve this. Just mapping.
Features
Screenshots
Demo
Script
Instructions
FAQ
Compatibility
No issue known.
Credits and Thanks
All done by myself
Author's Notes
If you have any trouble, look thoroughly at the demo, and do not hesitate to ask the silly question.
Terms and Conditions
You may not use this in a commercial game without my explicit permission.
You may not post this script anywhere without my explict permission.
You must give me credit.
By: Fustel
Introduction
Remember the FF6 underground river, or any river that sweeps you past nearly unreachable treaseures ??
With this script, you can easily create such rivers, even aerial air currents, without overloading your maps withe events. Furthermore, ther is NO EVENT at all to achieve this. Just mapping.
Features
- Create 'Sweep Maps' for each method of transport for any map you want.
- Define is a single input move is allowed between 2 sweep move for each method of transport
- The above properties are hierachized, so that a more detailed definition replaces a more generic. The levels of definition are
- Default: used by all methods (feet, ship, boat, airship)
- Air: used when aboard the airship
- Sea: used when at sea (boat or ship)
- Boat: used when abooard the boat
- Ship: used when abooard the ship
- Default: used by all methods (feet, ship, boat, airship)
- Define the 'Sweep Tiles' you will put on the 'Sweep Maps'. The default are the four arrowed tiles at the bottom loft.
Screenshots
None worth it
Show
The purpose of this script is about moving. No static image could be of any help
Demo
Open the chest
Show
http://www.mediafire.com/file/hljzmmdjhy1/BDR%20Sweep%20-%20%20v1.0.zip
Try and get the chest using various vehicles... or even your feets
Try and get the chest using various vehicles... or even your feets
Script
- #==============================================================================
- # ** BDR Sweep
- #------------------------------------------------------------------------------
- # © Fustel, 2010
- # 14/04/10
- # Version 1.0
- #------------------------------------------------------------------------------
- # VERSION HISTORY:
- # - 1.0 (14/04/10), Initial release
- #-------------------------------------------------------------------------------
- # INSTRUCTIONS:
- # - Install the 'BDR Tile v1.1' script
- # - Place this script in the 'Materials' section
- # - Set the following parameters in the BDR::Sweep module:
- # - Fille the following hash to link sweep maps to real maps
- # - Maps : default sweep maps
- # - Maps_Boat : sweep maps when on boat
- # - Maps_Ship : sweep maps when on ship
- # - Maps_Sea : sweep maps when at sea (boat or ship)
- # - Maps_Air : sweep maps when on airship
- # - Allow a single input move between 2 sweep, or not (true, false, nil)
- # - MOVE_BETWEEN : input move allowed between 2 sweeps
- # - MOVE_BETWEEN_BOAT : input move allowed between 2 sweeps when in boar
- # - MOVE_BETWEEN_SHIP : input move allowed between 2 sweeps when in ship
- # - MOVE_BETWEEN_SEA : input move allowed between 2 sweeps when at sea (in boat or ship)
- # - MOVE_BETWEEN_AIR : input move allowed between 2 sweeps when in airship
- # - Select the sweeping tiles in the hash:
- # - Tiles
- #------------------------------------------------------------------------------
- # NOTES
- # The 'move between sweep' and 'sweep maps' properties are hierarchicaly organized.
- # From a default level, they become more precise. If a more precise level is
- # defined, it replaces the more general level. These levels are:
- # - Default (MOVE_BETWEEN & Maps)
- # - in Airship (MOVE_BETWEEN_AIR & Maps_Air)
- # - at Sea (MOVE_BETWEEN_SEA & Maps_Sea)
- # - in Boat (MOVE_BETWEEN_BOAT & Maps_Boat)
- # - in Ship (MOVE_BETWEEN_SHIP & Maps_Ship)
- #------------------------------------------------------------------------------
- module BDR
- module Sweep
- # Maps are used in the folling prioty, if they do exist:
- # if the Hero is:
- # - on foor: Maps
- # - on Boat: Maps_Boat, Maps_Sea, Maps
- # - on Ship: Maps_Ship, Maps_Sea, Maps
- # - on Airship: Maps_Air, Maps
- #---------------------------------------
- # key = real map ID
- # data = ID of map containing directional tiles
- #----------------------------------------------
- Maps = {} # default for all
- Maps_Boat = {} # specific for boat
- Maps_Ship = {} # specific for ship
- Maps_Sea = {} # default for both boat & ship
- Maps_Air = {} # specific for airship
- Maps[ 1] = 5
- Maps_Boat[ 1] = 4
- Maps_Sea[ 1] = 2
- Maps_Air[ 1] = 3
- # Use the same pririty as Maps
- # Allows key input between forced moves
- #--------------------------------------
- MOVE_BETWEEN = true
- MOVE_BETWEEN_BOAT = nil
- MOVE_BETWEEN_SHIP = nil
- MOVE_BETWEEN_SEA = nil
- MOVE_BETWEEN_AIR = false
- # key = tile ID as returned by BDR::Tile::id
- # ( [ col, row] in tile panel A)
- # data = direction (1=S, 2=W, 3=E, 4=N)
- #
- # Those are the arrow tiles at the bottom-left
- #---------------------------------------------
- Tiles = {}
- Tiles[ [ 0, 31]] = 1
- Tiles[ [ 1, 31]] = 4
- Tiles[ [ 2, 31]] = 2
- Tiles[ [ 3, 31]] = 3
- end
- end
- class Game_Map
- attr_reader :bdr_sweep_map
- attr_reader :bdr_sweep_map_boat
- attr_reader :bdr_sweep_map_ship
- attr_reader :bdr_sweep_map_sea
- attr_reader :bdr_sweep_map_air
- alias bdr_sweep_initialize initialize
- def initialize
- @bdr_sweep_map = nil
- @bdr_sweep_map_boat = nil
- @bdr_sweep_map_ship = nil
- @bdr_sweep_map_sea = nil
- @bdr_sweep_map_air = nil
- bdr_sweep_initialize
- end
- alias bdr_sweep_setup setup
- def setup( map_id)
- bdr_sweep_setup( map_id)
- m = BDR::Sweep::Maps[ map_id]
- @bdr_sweep_map = m != nil ? load_data( sprintf( "Data/Map%03d.rvdata", m)) : nil
- m = BDR::Sweep::Maps_Boat[ map_id]
- @bdr_sweep_map_boat = m != nil ? load_data( sprintf( "Data/Map%03d.rvdata", m)) : nil
- m = BDR::Sweep::Maps_Ship[ map_id]
- @bdr_sweep_map_ship = m != nil ? load_data( sprintf( "Data/Map%03d.rvdata", m)) : nil
- m = BDR::Sweep::Maps_Sea[ map_id]
- @bdr_sweep_map_sea = m != nil ? load_data( sprintf( "Data/Map%03d.rvdata", m)) : nil
- m = BDR::Sweep::Maps_Air[ map_id]
- @bdr_sweep_map_air = m != nil ? load_data( sprintf( "Data/Map%03d.rvdata", m)) : nil
- end
- end
- class Game_Player < Game_Character
- alias bdr_sweep_initialize initialize
- def initialize
- @bdr_sweep_map = nil
- @bdr_sweep_mode = 1 # 1=move_by_input, 2=move_by_sweep
- bdr_sweep_initialize
- end
- alias bdr_sweep_move_by_input move_by_input
- def move_by_input
- return unless movable?
- return if $game_map.interpreter.running?
- # deterimine map ans move_by_input autorization acording to vehicle
- #------------------------------------------------------------------
- bdr_sweep_map_select
- bdr_sweep_move_batween = ( BDR::Sweep::MOVE_BETWEEN == nil ? false : BDR::Sweep::MOVE_BETWEEN)
- case @vehicle_type
- when 0: # on boat
- bdr_sweep_move_batween = BDR::Sweep::MOVE_BETWEEN_SEA if BDR::Sweep::MOVE_BETWEEN_SEA != nil
- bdr_sweep_move_batween = BDR::Sweep::MOVE_BETWEEN_BOAT if BDR::Sweep::MOVE_BETWEEN_BOAT != nil
- when 1: # on ship
- bdr_sweep_move_batween = BDR::Sweep::MOVE_BETWEEN_SEA if BDR::Sweep::MOVE_BETWEEN_SEA != nil
- bdr_sweep_move_batween = BDR::Sweep::MOVE_BETWEEN_SHIP if BDR::Sweep::MOVE_BETWEEN_SHIP != nil
- when 2: # on airship
- bdr_sweep_move_batween = BDR::Sweep::MOVE_BETWEEN_AIR if BDR::Sweep::MOVE_BETWEEN_AIR != nil
- end
- if @bdr_sweep_map == nil # no sweep map
- @bdr_sweep_mode = 1
- bdr_sweep_move_by_input
- elsif BDR::Sweep::Tiles[ @bdr_sweep_map.tile_id( @x, @y)] == nil # not on a sweeping tile
- @bdr_sweep_mode = 1
- bdr_sweep_move_by_input
- elsif @bdr_sweep_mode == 1 # last move was by input
- @bdr_sweep_mode = 2
- bdr_sweep_move_by_sweep
- elsif @bdr_sweep_mode == 2 # last move was by sweeping
- @bdr_sweep_mode = 1
- if bdr_sweep_move_batween
- bdr_sweep_move_by_input
- else
- bdr_sweep_move_by_sweep
- end
- end
- end
- def bdr_sweep_move_by_sweep
- case BDR::Sweep::Tiles[ @bdr_sweep_map.tile_id( @x, @y)]
- when 1: move_down
- when 2: move_left
- when 3: move_right
- when 4: move_up
- end
- end
- def bdr_sweep_map_select
- @bdr_sweep_map = $game_map.bdr_sweep_map
- case @vehicle_type
- when 0: # on boat
- @bdr_sweep_map = $game_map.bdr_sweep_map_sea if $game_map.bdr_sweep_map_sea != nil
- @bdr_sweep_map = $game_map.bdr_sweep_map_boat if $game_map.bdr_sweep_map_boat != nil
- when 1: # on ship
- @bdr_sweep_map = $game_map.bdr_sweep_map_sea if $game_map.bdr_sweep_map_sea != nil
- @bdr_sweep_map = $game_map.bdr_sweep_map_ship if $game_map.bdr_sweep_map_ship != nil
- when 2: # on airship
- @bdr_sweep_map = $game_map.bdr_sweep_map_air if $game_map.bdr_sweep_map_air != nil
- end
- end
- end
Expand to see the code.
Instructions
- Install 'BDR Tile v1.1', found here: http://www.hbgames.org/forums/viewtopic.php?f=11&t=70440
- Copy the script in the 'Materials' section
- Set the following constants in the BDR::Sweep module to define if a single input move is allowed between 2 sweep moves. These constants are hierachized as explained above. They can be set to: true (input move allowed), false (input move diallowed), or nil (use more global definition or false for the default definition). These constants are:
- MOVE_BETWEEN : default
- MOVE_BETWEEN_AIR : for airship
- MOVE_BETWEEN_SEA : at sea
- MOVE_BETWEEN_BOAT : for boat
- MOVE_BETWEEN_SHIP : for ship
- Create 'Sweep Maps' the same size of the real map it is attached to. Fill it with the tiles defined in the BDR::Sweep::Tiles hash. When the Hero is at the same position of one of these tiles in the main map, he is swept in the according direction.
- Fill the following hash in the BDR::Sweep module to link 'Sweep Maps' with real maps
- their structure is
- the key is the real map ID
- the data is the 'Sweep Map' ID
- these hash are
- Maps : default
- Maps_Air : for airship
- Maps_Sea : at sea
- Maps_Boat : for boat
- Maps_Ship : for ship
- their structure is
FAQ
Compatibility
No issue known.
Credits and Thanks
All done by myself
Author's Notes
If you have any trouble, look thoroughly at the demo, and do not hesitate to ask the silly question.
Terms and Conditions
You may not use this in a commercial game without my explicit permission.
You may not post this script anywhere without my explict permission.
You must give me credit.