Author Topic: [XP] Zydragon's Orb/Save Point Script  (Read 5874 times)

Offline Trainer Zydragon

  • Transcended Spirit
  • ***
  • Posts: 183
  • LV: 2
  • Gender: Male
  • Sup :D
    • View Profile
[XP] Zydragon's Orb/Save Point Script
« on: February 11, 2010, 11:40:59 AM »
Zy's Orb/Save Point Script
Authors: Zydragon
Version: v1.1
Type: Custom Save & Quit System
Key Term: Misc System

Introduction

Alright so this is my first finished script... Simple yes? I'm a noob coder at the moment :D

Basically this script allows an FF10 style Save Orb, with Quit and Cancel functions. You can easily set the orb to heal people as well for a true FF10 orb, or you can ask (if you're worse than a coding noob) and I'll add certain options on request.

I intend to work on this as my coding skills grow, probably adding Teleport functions, custom Save screens, possibly an Options menu, info bars, and MAYBE a few more windows showing character stats, time played etc.

Let me know if you have any problems, or any coding tips :D


Features

  • FF10 Style Orb Save Point
  • Plug and play
  • Shouldn't mess with ANY other scripts

Screenshots

(click to show/hide)

Demo

Orb_Save_Demo v1.0

Script

To call the script use a script call event with:
$scene=Orb_Menu.new

(click to show/hide)

Instructions

Script pretty much tells you what to do... Completely plug and play in v1.1, just copy&paste

Compatibility

This should be compatable with EVERY other CMS and script, since it's not a proper CMS and is only used for save orbs.

Credits and Thanks

  • Zydragon (me obviously)
  • game_guy (for Save and End fix)
  • nathmatt (for the simplification)
« Last Edit: February 12, 2010, 09:36:39 AM by Blizzard »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20005
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Zydragon's Orb/Save Point Script
« Reply #1 on: February 11, 2010, 01:50:15 PM »
When you apply the script submission topic template, your topic can be moved in the database. If you are unsure what to fill in the in the specific categories, just check out any topic in the Script Database.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Zydragon's Orb/Save Point Script
« Reply #2 on: February 11, 2010, 04:08:02 PM »
Here's a small edited version of your script. What it does is when you leave the end menu and the save menu it goes back to the orb menu.
Code: [Select]
#===============================================================================
#____Copyright_©____
#This Custom Menu System has been created by Zydragon™ and as such can not be
#used or distributed without formal acknowledgement and the acceptance of the
#creator. If this CMS is edited you must still acknowledge the original creator.
#
#____Version History____
#
#   v1.0      9/2/2010
#
#
#____Compatability Issues____
#
#As this script is a simple CMS, it messes with Scene_End and Scene_Save,
#directing any CANCEL functions towards this CMS rather than Scene_Menu.
#
#Apart from those small edits, this CMS is completely compatable with all other
#RPG Maker XP scripts.
#
#YOUR BEST BET IS TO COPY THE DEMO'S SCENE_SAVE AND SCENE_END
#
#===============================================================================
#-------------------------------------------------------------------------------
#This CMS shows a small window in the center of the screen with selectable
#options. This CMS is made specifically for use with an Orb or Crystal Save
#Point scheme.
#-------------------------------------------------------------------------------

#===============================================================================
#START Orb_Menu window
#-------------------------------------------------------------------------------

class Orb_Menu < Window_Base
 
  def initialize(menu_index = 0)
    @menu_index = menu_index #To show cursor position
  end
 
  def main
    s1 = "Save"
    s2 = "Quit"
    s3 = "Cancel"
    @window_orb = Window_Command.new(200, [s1, s2, s3]) #Creates array
    @window_orb.x=220
    @window_orb.y=176
    @window_orb.index = @menu_index
    @window_orb.back_opacity = 175
   
    @spriteset = Spriteset_Map.new #Screenshots current map for background
   
    $game_system.bgm_play($data_system.title_bgm) #Plays your title music in menu
   
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
   
    Graphics.freeze
    @spriteset.dispose
    @window_orb.dispose
  end

  def update #Define UPDATE shown in MAIN
 
    @window_orb.update
 
    if Input.trigger?(Input::C) #If ENTER pressed...
      case @window_orb.index
      when 0
        save
      when 1
        quit
      when 2
        cancel
      end
    end
   
    if Input.trigger?(Input::B) #If ESCAPE pressed...
      $game_system.se_play($data_system.cancel_se) #Play sound effect
      $scene = Scene_Map.new #Exits to map
    end
  end
 
  def save #Define SAVE option
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_ORBSave.new
  end
  def quit #Define QUIT option
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_ORBEnd.new
  end
  def cancel #Define CANCEL option
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Map.new
  end
 
end
class Scene_ORBSave < Scene_Save
  def on_cancel
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.decision_se)
      $scene = Orb_Menu.new
      return
    end
  end
end
class Scene_ORBEnd < Scene_End
  def update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.decision_se)
      $scene = Orb_Menu.new
      return
    end
    super
  end
end

   
#-------------------------------------------------------------------------------
#END Orb Menu window
#===============================================================================

Also when going into Scene_Map.new you don't need $game_map.autoplay as the map already does it itself when Scene_Map is called. Just a small scripting tip. Nice script by the way.

Offline Trainer Zydragon

  • Transcended Spirit
  • ***
  • Posts: 183
  • LV: 2
  • Gender: Male
  • Sup :D
    • View Profile
Re: [XP] Zydragon's Orb/Save Point Script
« Reply #3 on: February 11, 2010, 08:26:08 PM »
Creating a seperate Save call class for the Orb Menu... Why didnt I think of that XD
(do you want mentioning in the authors list for it? :D)

Cheers for the tips, and yeah Blizz, imma edit the layout now :D cheers ^_^

EDIT:
There we go Blizz, edited :)
« Last Edit: February 11, 2010, 08:58:32 PM by Zydragon »

Offline nathmatt

  • Chaos User
  • ******
  • Posts: 1289
  • LV: 114
  • Gender: Male
  • The Add_on King
    • View Profile
    • Nathmatt Productions
Re: [XP] Zydragon's Orb/Save Point Script
« Reply #4 on: February 11, 2010, 10:11:46 PM »
some friendly advise you dont have to def save , quit and cancel

Code: [Select]
#===============================================================================
#____Copyright_©____
#This Custom Menu System has been created by Zydragon™ and as such can not be
#used or distributed without formal acknowledgement and the acceptance of the
#creator. If this CMS is edited you must still acknowledge the original creator.
#
#____Version History____
#
#   v1.0      9/2/2010
#
#
#____Compatability Issues____
#
#As this script is a simple CMS, it messes with Scene_End and Scene_Save,
#directing any CANCEL functions towards this CMS rather than Scene_Menu.
#
#Apart from those small edits, this CMS is completely compatable with all other
#RPG Maker XP scripts.
#
#YOUR BEST BET IS TO COPY THE DEMO'S SCENE_SAVE AND SCENE_END
#
#===============================================================================
#-------------------------------------------------------------------------------
#This CMS shows a small window in the center of the screen with selectable
#options. This CMS is made specifically for use with an Orb or Crystal Save
#Point scheme.
#-------------------------------------------------------------------------------

#===============================================================================
#START Orb_Menu window
#-------------------------------------------------------------------------------

class Orb_Menu < Window_Base
 
  def initialize(menu_index = 0)
    @menu_index = menu_index #To show cursor position
  end
 
  def main
    s1 = "Save"
    s2 = "Quit"
    s3 = "Cancel"
    @window_orb = Window_Command.new(200, [s1, s2, s3]) #Creates array
    @window_orb.x=220
    @window_orb.y=176
    @window_orb.index = @menu_index
    @window_orb.back_opacity = 175
   
    @spriteset = Spriteset_Map.new #Screenshots current map for background
   
    $game_system.bgm_play($data_system.title_bgm) #Plays your title music in menu
   
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
   
    Graphics.freeze
    [@spriteset,@window_orb].each { |s| if s != nil s.dispose}
  end

  def update #Define UPDATE shown in MAIN
 
    @window_orb.update

    if Input.trigger?(Input::C) #If ENTER pressed...
      case @window_orb.index
      when 0
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 1
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      when 2
        $game_system.se_play($data_system.cancel_se)
        $scene = Scene_Map.new
      end
    end
   
    if Input.trigger?(Input::B) #If ESCAPE pressed...
      $game_system.se_play($data_system.cancel_se) #Play sound effect
      $scene = Scene_Map.new #Exits to map
    end
  end
 
end

#-------------------------------------------------------------------------------
#END Orb Menu window
#===============================================================================

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script
(click to show/hide)

Offline Trainer Zydragon

  • Transcended Spirit
  • ***
  • Posts: 183
  • LV: 2
  • Gender: Male
  • Sup :D
    • View Profile
Re: [XP] Zydragon's Orb/Save Point Script
« Reply #5 on: February 11, 2010, 10:28:57 PM »
Yeah I figured that, but I've been going off Dubealex's tutorials to help me along :)

Cheers tho :D, I'll edit that into v1.1, and I'll throw you a level :D

EDIT

Version 1.1 is up, no demo but the script is updated.
Simplified & Save/End fixed :)
« Last Edit: February 11, 2010, 11:50:29 PM by Zydragon »