Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Waypoints VX Ver. 1.5, Diablo-style Waypoints for RMVX!
Mundane
post Aug 17 2008, 08:23 AM
Post #1


Level 1
Group Icon

Group: Member
Posts: 8
Type: Event Designer
RM Skill: Advanced




Waypoints VX
Ver. 1.5
By Mundane


Introduction

This is my first script. Waypoints VX is a portal system similar to that of the Diablo games. When the scene is called it gives you a list of places to go. Simple as that.

History

8/17/08: Updated script to Version 1.5; adds MUCH simpler Waypoint addition


Features

• Simple menu design
• Pre-activated waypoints
• Activation controlled by switches
• Configurable sounds and animations


Script

I highly recommend downloading the demo. The events in the demo will make it easier for you to implement this script as easily as possible.
[Show/Hide] Waypoints VX - Ver. 1.5

CODE
#===============================================================================
# * [VX] Waypoints VX
#   Ver. 1.5
#   By Mundane, mundane92@gmail.com
#-------------------------------------------------------------------------------
# Special thanks to:
#  • Yeyinde, for helping me improve the script
#
# History:
#  • 8/17/08 - Updated script to Ver. 1.5 which added easier Waypoint addition
#-------------------------------------------------------------------------------
module WayVX
#-------------------------------------------------------------------------------
# * CONFIGURATION
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Waypoint Set-Up:
#-------------------------------------------------------------------------------
# To add a Waypoint make a new line based on the following template:
# WAYPOINTS = [
#               [C, S, M, X, Y, N],
#               [C, S, M, X, Y, N]
#             ]
# •C: Corresponds to the command number. Starts at '0' and counts up.
# •W: Corresponds to the switch number that that point needs on to activate.
#     Set to '0' for pre-activated waypoints.
# •M: Corresponds to the ID of the map you are porting to.
# •X: Corresponds to the X coordinate on the map you are porting to, that you
#     want the user to appear at.
# •Y: Corresponds to the Y coordinate on the map you are pointing to, that you
#     want the user to appear at.
# •N: Sets the name of the Waypoint.
#-------------------------------------------------------------------------------
WAYPOINTS = [ #C  S  M  X  Y     N
               [0, 0, 1, 8, 6, "Garden"],
               [1, 1, 2, 8, 6, "Plains"],
               [2, 2, 3, 8, 6, "Tundra"]
             ]
              
# Optional Aesthetic and Audio Configuration:
TELEPORT_SE = "/Audio/SE/Teleport"    # Name of Teleport sound in Audio/SE/
TELEPORT_ANIM = 41                    # ID of Teleport animation in the Database
WINDOW_RIGHT = false                  # Position window on right? False is left.
#-------------------------------------------------------------------------------
end
#-------------------------------END CONFIG--------------------------------------

#-------------------------------------------------------------------------------
# * Window_WaypointHelp
#-------------------------------------------------------------------------------
class Window_WaypointHelp < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     x : window X coordinate
  #     y : window Y coordinate
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 258, 60)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.draw_text(4, 0, 250, 24, 'Select a Waypoint')
  end
end

#==============================================================================
# ** Window_Waypoints
#------------------------------------------------------------------------------
#  This window deals with Waypoint selection.
#==============================================================================

class Window_Waypoints < Window_Selectable
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :commands                 # command
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     width      : window width
  #     commands   : command string array
  #     column_max : digit count (if 2 or more, horizontal selection)
  #     row_max    : row count (0: match command count)
  #     spacing    : blank space when items are arrange horizontally
  #--------------------------------------------------------------------------
  def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
    if row_max == 0
      row_max = (commands.size + column_max - 1) / column_max
    end
    super(0, 0, width, row_max * WLH + 32, spacing)
    @commands = commands
    @item_max = commands.size
    @column_max = column_max
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index   : item number
  #     enabled : enabled flag. When false, draw semi-transparently.
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(rect, @commands[index])
  end
end

#===============================================================================
# ** Scene_Waypoints
#===============================================================================
class Scene_Waypoints < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #-----------------------------------------------------------------------------
  # * Start processing
  #-----------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    if WayVX::WINDOW_RIGHT == true
      @wayhelp_window = Window_WaypointHelp.new(286,0)
    else
      @wayhelp_window = Window_WaypointHelp.new(0,0)
    end
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @wayhelp_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    @wayhelp_window.update
    if @command_window.active
      update_command_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  # * Add your waypoints here!
  #--------------------------------------------------------------------------
  def create_command_window
    commands = WayVX::WAYPOINTS.collect{|waypoint| waypoint[5]}
    @command_window = Window_Waypoints.new(258, commands)
    waypoint = WayVX::WAYPOINTS[@command_window.index]
    @command_window.index = @menu_index
    if WayVX::WINDOW_RIGHT == true
      @command_window.x = 286
      @command_window.y = 60
    else
      @command_window.y = 60
WayVX::WAYPOINTS.each do |waypoint|
   if waypoint[1] > 0 && !$game_switches[waypoint[1]]
    @command_window.draw_item(waypoint[0], false)
  end
end
  #-----------------------------------------------------------------------------
  # * Update Command Selection
  #-----------------------------------------------------------------------------
def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      waypoint = WayVX::WAYPOINTS[@command_window.index]
      if waypoint[1] > 0 && !$game_switches[waypoint[1]]
        Sound.play_buzzer
        return
      else
        Audio.se_play(WayVX::TELEPORT_SE)    
        $game_player.animation_id = WayVX::TELEPORT_ANIM
        $game_map.setup(waypoint[2])                  
        $game_player.moveto(waypoint[3], waypoint[4])
        $game_player.refresh
        $scene = Scene_Map.new
        RPG::BGM.fade(120)
        RPG::BGS.fade(120)
        Graphics.fadeout(30)
        Graphics.wait(40)
        Graphics.frame_count = 0
        RPG::BGM.stop
        $game_map.autoplay
      end
    end
  end
end
end
end




Downloads

I have a demo available for your convenience. It features all the events you'll ever need built in. If the mirrors below don't work for you, request another one and I'll put it up.
MSN SkyDrive Mirror: Download
MediaFire Mirror: Download


Screenshots




Instructions

Instructions on how to add waypoints are provided in the script.

To call the Waypoint window put this line in a 'Script...' event command:
CODE
$scene = Scene_Waypoints.new


NOTE: Waypoints VX DOES NOT stop weather or reset screen tones! You must set your maps to change that up on arriving on it. Future versions may support weather and tone features.


FAQ

Q: Can I request add-ons for this script?
A: Don't PM me with requests for add-ons. If you mention it in here and I can do it - I will.

Q: Can I use the events in the demo in my games?
A: Yes. Feel free to just copy those events over to your games.


Compatibility

There are no known compatibility issues. Report any you may find here.


Credits and Usage

You can use this in any non-commercial project. If you wish to use it for a commercial project, please contact me before doing so. Please credit me if you use the script; it may be a cluster-fuck of default scripts, but I worked hard on it.

Special tanks to:
-Yeyinde, for helping me improve the script
-Enterbrain

Thanks for your interest in Waypoints VX!

Mundane

This post has been edited by Mundane: Aug 17 2008, 08:27 AM


__________________________
Go to the top of the page
 
+Quote Post
   
brawler12
post Aug 17 2008, 08:29 AM
Post #2


Pwnd.
Group Icon

Group: Revolutionary
Posts: 393
Type: Mapper
RM Skill: Intermediate




This looks like a pretty good script! I've always wanted to use a warping script in my games!


__________________________
Thank you Axerax!


Go to the top of the page
 
+Quote Post
   
Loki333
post Aug 17 2008, 09:53 AM
Post #3


Google it before asking stupid questions!!!
Group Icon

Group: Revolutionary
Posts: 134
Type: Event Designer
RM Skill: Masterful




Nice script, but is there any way that instead of the undiscovered waypoints being greyed out that they would just not be displayed at all until they have been discovered?


__________________________
My Current VX Project


My XP Scripts
Personalized Status Screen

My VX Scripts
None Yet...


Thanks for the uPic Leper!
Go to the top of the page
 
+Quote Post
   
SojaBird
post Aug 17 2008, 10:29 AM
Post #4


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




I've seen a simelar script on here before...Like that one better I guess. Perhaps you want to look at it sometime.


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
VerifyedRasta
post Aug 17 2008, 12:36 PM
Post #5


Level 20
Group Icon

Group: Revolutionary
Posts: 407
Type: Musician
RM Skill: Advanced




Very nice script! Works smoothly too!

QUOTE (Loki333 @ Aug 17 2008, 10:15 AM) *
Nice script, but is there any way that instead of the undiscovered waypoints being greyed out that they would just not be displayed at all until they have been discovered?


How will the waypoints be discovered, if they are not displayed lol? Unless you want the player to have to search for an invisible waypoint ...


__________________________
Go to the top of the page
 
+Quote Post
   
Mundane
post Aug 17 2008, 12:57 PM
Post #6


Level 1
Group Icon

Group: Member
Posts: 8
Type: Event Designer
RM Skill: Advanced




He just doesn't want the name to be on the list if it hasn't been discovered. This feature plus more will be available soon in Ver. 2.0.


__________________________
Go to the top of the page
 
+Quote Post
   
VerifyedRasta
post Aug 17 2008, 02:18 PM
Post #7


Level 20
Group Icon

Group: Revolutionary
Posts: 407
Type: Musician
RM Skill: Advanced




QUOTE (Mundane @ Aug 17 2008, 01:19 PM) *
He just doesn't want the name to be on the list if it hasn't been discovered. This feature plus more will be available soon in Ver. 2.0.


Oh ok i get it now thanks


__________________________
Go to the top of the page
 
+Quote Post
   
Arthin
post Oct 23 2008, 08:35 AM
Post #8


Level 3
Group Icon

Group: Member
Posts: 43
Type: Event Designer
RM Skill: Beginner




I found a "bug." The script is causing my Kylock's Time System to reset, when warping wink.gif
Else than that, really great.


__________________________
Go to the top of the page
 
+Quote Post
   
Mundane
post Oct 25 2008, 06:23 AM
Post #9


Level 1
Group Icon

Group: Member
Posts: 8
Type: Event Designer
RM Skill: Advanced




Hmmm. Strange. Is your Time Script above or below my script?


__________________________
Go to the top of the page
 
+Quote Post
   
Surichi
post May 27 2009, 08:30 AM
Post #10


Level 1
Group Icon

Group: Member
Posts: 6
Type: Developer
RM Skill: Beginner




Yeah, I'm having the same problem with the time resetting. I'm using BigEd's Final Fantasy 9 menu script and it is above the Waypoint script. So could you possibly help me with this? Great script by the way. It has made my game a lot more enjoyable.
Go to the top of the page
 
+Quote Post
   
buny
post Jun 3 2009, 10:18 PM
Post #11


Level 15
Group Icon

Group: Revolutionary
Posts: 294
Type: Developer
RM Skill: Intermediate




whew teleport script is use full


__________________________







Topic'Z

VLAD REQUIEM IS UPDATE! to ~8~
The TopicszZ


@~Action Battle System~@


[Show/Hide] Action Battle System
Bored Battle System Like This
[Show/Hide] Normal Style


So Do you liem MMORPG style?or Zelda?
if yes you'll need this...
style~>
[Show/Hide] Requiem SABS


Join Here ABS


@###@@@###@#
@####@##@##@##
@@#@@@##@@


[Show/Hide] good again
[Show/Hide] NEVER GIVE UP
[Show/Hide] DONT WASTE MY TIME AGAIN!!!!!!!!!!!!!!!!!!!!
[Show/Hide] LASSSSTTTTT ONE
clever you are the 99999999 visitors who open this get outta here!!!!!
Go to the top of the page
 
+Quote Post
   
rural_monk
post Aug 6 2009, 11:26 AM
Post #12


Level 2
Group Icon

Group: Member
Posts: 20
Type: Musician
RM Skill: Advanced




Wow, this is like, perfect! I'm defiantly gonna use it in me game thumbsup.gif


__________________________
The Rural Monk - the fresh smell of rum in the morning
Go to the top of the page
 
+Quote Post
   
Kaliosmaster
post Sep 16 2009, 09:24 AM
Post #13


Level 1
Group Icon

Group: Member
Posts: 10
Type: Mapper
RM Skill: Beginner




This What I was Looking For You rock!!! banana.gif

This post has been edited by Kaliosmaster: Sep 16 2009, 09:24 AM
Go to the top of the page
 
+Quote Post
   
dandanthedan
post Sep 19 2009, 01:43 AM
Post #14


Death Striker
Group Icon

Group: Revolutionary
Posts: 299
Type: Developer
RM Skill: Skilled




can you make this compatible with Vampyr Netgaming? this would be really awesome!

Vampyr Net Gaming


__________________________
[Show/Hide] My Current Project


Box by Me


[Show/Hide] click me!



recruiting: writer(for the dialogues), mapper and eventer...
visit this thread to join: Grendis Recruitment Thread
"You can tame a lion, but you can never make it vegetables"
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 21st May 2013 - 06:19 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker