RPG Maker Forums



class Teleportation System(version 1.0)

def Initialize:
Creates a scene where the player can choose from a list of locations they can travel too.
end

def Features:
  • New teleportation system.
  • Add locations as you play.
end

def How to use:
This script has a Customizeable Area inside of the script's module as well as details how to set up and add locations.
end

def Script:
Code:
#################################################################################↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓##↓                                                                            ↓##↓                     Teleportation System: Version 1.0                      ↓##↓                                                                            ↓##↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕##↑                                                                            ↑##↑                            Written By: Joe Pro                             ↑##↑                        Last Edited:  July 31, 2014                         ↑##↑                                                                            ↑##↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑##################################################################################◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙ ** Disclaimer                                                              ◙##◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙##◙                                                                            ◙##◙ This script is not for commercial, if you wish to use this script in a     ◙##◙ game please PM me. All credit is to be given to me as the author of this   ◙##◙ script.                                                                    ◙##◙                                                                            ◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙ ** How To Use                                                              ◙##◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙##◙                                                                            ◙##◙ * Cusomizable area below.                                                  ◙##◙                                                                            ◙##◙ * Use the following command in a script call to call the teleport scene.   ◙##◙       teleport                                                             ◙##◙                                                                            ◙##◙ * Use the following command in a script call to add a location.            ◙##◙       add_location(id_from_list_below)                                     ◙##◙                                                                            ◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙ ** Updates / Version Notes                                                 ◙##◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙##◙                                                                            ◙##◙   v0.1                                                                     ◙##◙ ~◄◙◙◙◙►~                                                                   ◙##◙ * This script creates a menu that displays areas the player can travel to. ◙##◙                                                                            ◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##################################################################################↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓##↓                                                                            ↓##↕                     Teleportation System: Version 0.1                      ↕##↑                                                                            ↑##↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑##################################################################################==============================================================================# ** Teleportation System #------------------------------------------------------------------------------#  This module manages the customizable and function modules.#==============================================================================module Teleportation_System    #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙Customizeable Area◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#  #=============================================================================  # * Fade Type  #=============================================================================    Fade_Type = "Normal"      #=============================================================================  # * Menu Windows BG Options  #=============================================================================    Teleport_SE = "Teleport"    Volume = 80    Pitch = 100      #=============================================================================  # * Teleport Header Text  #=============================================================================    Teleport_Header_Text = "Where would you like to teleport to?"      #=============================================================================  # * Locations  #=============================================================================    Locations = {    #Location ID      0 => { :display_name => "Adomite Factory",                         #[Map_id, X_Tile, Y_Tile, Direction]             :location => [   4  ,   8   ,   4   ,     2    ],           },          1 => { :display_name => "AEIOU Facility",                         #[Map_id, X_Tile, Y_Tile, Direction]             :location => [   5  ,   3   ,   55   ,    2    ],           },                2 => { :display_name => "Creadair Chamber",                         #[Map_id, X_Tile, Y_Tile, Direction]             :location => [   6  ,   3   ,   4   ,     4    ],           },            }#◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙End Customizeable Area◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙#end#==============================================================================# ** Game_System#------------------------------------------------------------------------------#  This class handles system data. It saves the disable state of saving and # menus. Instances of this class are referenced by $game_system.#==============================================================================class Game_System  #--------------------------------------------------------------------------  # * Public Instance Variables  #--------------------------------------------------------------------------  attr_accessor :teleport_locations              # Teleport Locations  attr_accessor :teleporting              # Teleport Locations  attr_accessor :list_window_index              # Teleport Locations  #--------------------------------------------------------------------------  # * Aliasing Method: Object Initialization  #--------------------------------------------------------------------------  alias :gsi04506451 :initialize    #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize    gsi04506451()    @teleport_locations = {}    @teleporting = false    @list_window_index = 0  endend#==============================================================================# ** Game_Map#------------------------------------------------------------------------------#  This class handles maps. It includes scrolling and passage determination# functions. The instance of this class is referenced by $game_map.#==============================================================================class Game_Map  #--------------------------------------------------------------------------  # * Aliasing Method: Object Initialization  #--------------------------------------------------------------------------  alias :gmu046560 :update    #--------------------------------------------------------------------------  # * Frame Update  #     main:  Interpreter update flag  #--------------------------------------------------------------------------  def update(main = false)    transfer_player if $game_system.teleporting == true    gmu046560(main)  end    #--------------------------------------------------------------------------  # * Teleport Locations  #--------------------------------------------------------------------------  def fade_type    Teleportion_System::Specs::Fade_Type  end  #--------------------------------------------------------------------------  # * Teleport Locations  #--------------------------------------------------------------------------  def teleport_se    ["Audio/SE/" + Teleportation_System::Teleport_SE, Teleportation_System::Volume, Teleportation_System::Specs::Pitch]  end  #--------------------------------------------------------------------------  # * Teleport Locations  #--------------------------------------------------------------------------  def current_map_info    $game_system.teleport_locations[$game_system.list_window_index][:location]  end  #--------------------------------------------------------------------------  # * Frame Update  #     main:  Interpreter update flag  #--------------------------------------------------------------------------  def transfer_player    $game_system.teleporting = false    map_id = current_map_info[0]    x = current_map_info[1]    y = current_map_info[2]    direction = current_map_info[3]    $game_player.reserve_transfer(map_id, x, y, direction)    $game_temp.fade_type = 1    Audio.se_play(teleport_se[0], teleport_se[1], teleport_se[2])  end  end#==============================================================================# ** Game_Interpreter#------------------------------------------------------------------------------#  An interpreter for executing event commands. This class is used within the# Game_Map, Game_Troop, and Game_Event classes.#==============================================================================class Game_Interpreter  #--------------------------------------------------------------------------  # * Calls Scene_Teleport Class  #--------------------------------------------------------------------------  def teleport    SceneManager.call(Scene_Teleport)  end    #--------------------------------------------------------------------------  # * Add Location by Name  #--------------------------------------------------------------------------  def add_location(id)    $game_system.teleport_locations[id] = Teleportation_System::Locations[id]  end  end#==============================================================================# ** Window_Base#------------------------------------------------------------------------------#  This is a super class of all windows within the game.#==============================================================================class Window_LocationHeader < Window_Base  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize(x, y, width, height)    super    refresh  end    #--------------------------------------------------------------------------  # * Refresh Processing  #--------------------------------------------------------------------------  def refresh    contents.clear    draw_text(-10, -10, ((Graphics.width / 5) * 3), 50, Teleportation_System::Teleport_Header_Text, 1)  end  end#==============================================================================# ** Window_Command#------------------------------------------------------------------------------#  This window deals with general command choices.#==============================================================================class Window_ConfirmLocation < Window_Command    #--------------------------------------------------------------------------  # * Refresh Processing  #--------------------------------------------------------------------------  def alignment    return 1  end  #--------------------------------------------------------------------------  # * Refresh Processing  #--------------------------------------------------------------------------  def col_max    return item_max  end  #--------------------------------------------------------------------------  # * Refresh Processing  #--------------------------------------------------------------------------  def window_width    return (Graphics.width / 5) * 3  end  #--------------------------------------------------------------------------  # * Refresh Processing  #--------------------------------------------------------------------------  def window_height    return 50  end  #--------------------------------------------------------------------------  # * Get Window Height  #--------------------------------------------------------------------------  def make_command_list    add_command("Confirm", :confirm)    add_command("Cancel", :cancel)  endend#==============================================================================# ** Window_Command#------------------------------------------------------------------------------#  This window deals with general command choices.#==============================================================================class Window_LocationList < Window_Command    #--------------------------------------------------------------------------  # * Get Window Width  #--------------------------------------------------------------------------  def window_width    (Graphics.width / 5) * 2  end    #--------------------------------------------------------------------------  # * Get Window Height  #--------------------------------------------------------------------------  def window_height    (Graphics.height / 5) * 3  end  #--------------------------------------------------------------------------  # * Teleport Locations  #--------------------------------------------------------------------------  def teleport_locations    $game_system.teleport_locations  end  #--------------------------------------------------------------------------  # * Check For Current Map  #--------------------------------------------------------------------------  def not_current_map?(index)    return (teleport_locations[index][:location][0] != $game_map.map_id)  end  #--------------------------------------------------------------------------  # * Get Window Height  #--------------------------------------------------------------------------  def make_command_list    teleport_locations.each_key { |i| add_command(teleport_locations[i][:display_name], :select, not_current_map?(i)) }  endend#==============================================================================# ** Scene_Teleport < Scene_MenuBase#------------------------------------------------------------------------------#  This class performs basic processing related to the teleport screen.#==============================================================================class Scene_Teleport < Scene_MenuBase  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize    super    create_windows  end  #--------------------------------------------------------------------------  # * Free Viewport  #--------------------------------------------------------------------------  def dispose_main_viewport    @viewport.dispose if @viewport  end    #--------------------------------------------------------------------------  # * Create Windows  #--------------------------------------------------------------------------  def create_windows    create_header_window    create_list_window    create_confirm_window  end  #--------------------------------------------------------------------------  # * Create List Window  #--------------------------------------------------------------------------  def create_header_window    @location_header_window = Window_LocationHeader.new((Graphics.width / 5) * 1, ((Graphics.height / 5) * 1) - 50, (Graphics.width / 5) * 3, 50)  end  #--------------------------------------------------------------------------  # * Create List Window  #--------------------------------------------------------------------------  def create_list_window    @location_list_window = Window_LocationList.new((Graphics.width / 5) * 1.5, (Graphics.height / 5) * 1)    @location_list_window.set_handler(:select, method(:command_select))  end  #--------------------------------------------------------------------------  # * Create List Window  #--------------------------------------------------------------------------  def create_confirm_window    @confirm_window = Window_ConfirmLocation.new((Graphics.width / 5), ((Graphics.height / 5) * 2) + 10)    @confirm_window.set_handler(:confirm, method(:command_confirm))    @confirm_window.set_handler(:cancel, method(:command_cancel))    @confirm_window.deactivate    @confirm_window.select(0)    @confirm_window.openness = 0  end  #--------------------------------------------------------------------------  # * Create Windows  #--------------------------------------------------------------------------  def command_select    @location_list_window.deactivate    @confirm_window.open    @confirm_window.select(0)    @confirm_window.activate  end  #--------------------------------------------------------------------------  # * Create Windows  #--------------------------------------------------------------------------  def command_confirm    $game_system.teleporting = true    return_scene  end  #--------------------------------------------------------------------------  # * Create Windows  #--------------------------------------------------------------------------  def command_cancel    @confirm_window.close    @confirm_window.select(0)    @confirm_window.deactivate    @location_list_window.activate  end  #--------------------------------------------------------------------------  # * Update Processing  #--------------------------------------------------------------------------  def update    super    case     when Input.trigger?(:      return_scene    when Input.trigger?(:UP)      $game_system.list_window_index = @location_list_window.index    when Input.trigger?(:DOWN)      $game_system.list_window_index = @location_list_window.index    end  endend
end

def Credit, Licence & Commercial Usage:
This script is free to use for non-commercial use. If you want to obtain a license to use this script in a commercial game(contests included)
please PM me. Credit is to be give to myself, JoePro.
end

end

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,446
Members
137,820
Latest member
georg09byron
Top