Help - Search - Members - Calendar
Full Version: where to start with VXA RGSS3?
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Ace Discussion
Adrien.
Where would be the best place to start in terms of developing scripts? What should some one consider in developing scripts for RGSS3?

I have a sample piece of code if some one wants to review it, but I have no idea where to start with creating scripts in RGSS3

CODE
class Game_System
  
  alias init initialize
  def initialize
    init
    saved_bgs = nil
  end
  
  def save_bgs
    @save_bgs = RPG::BGS.last
  end
  
  def replay_bgs
    @saved_bgs = RPG::BGS.replay if @saved_bgs
  end
  
end
Kread-EX
Start small. Decide to change one single thing (for instance, encompass the nickname display on the main menu to add some arbitrary string to it), go to the menu scene (Scene_Menu) and from there, find your way. You'll see that the scene create windows, that those windows are children of other windows, and so on...
If you know Ruby and have the help file nearby this won't be difficult. This is what I did years ago with RMXP and I didn't even know Ruby at the time (the closest was Perl).

As for your snippet, three things:
1. When you alias, use more complex method names to ensure compatibility. Instead of init, use something like adrien_game_system_init - though if you write many scripts you can end up aliasing the same method several times. Therefore adding the name of the current script as well could be a good idea.
2. The first saved_bgs is a local variable, not an instance variable like the others. Even so, since its default value is nil, you don't even need to declare it and could simply skip the initialize part altogether.
3. The point of the script is... unclear. The game has already a way to stop and replay BGS.
Adrien.
Ok. I just assumed what I was doing was right because in the Game_System they initialize the save_bgm = nil and the purpose was to do the same as save_bgm and and replay_bgm. I was just playing around I guess. I don't have the help file, well I do but its mostly in Japanese. and the comments for the scripts are in Japanese too so I just read the code and Google translate some of the comments when lost.

I did manage to make script that allows you change the max MP, HP, TP and Gold. but Yanfly already did that so my script would be pointless.

When is it ok to post scripts? do I have to have something huge and elaborate like a battle system or a new shop system?


I did it!!!!!!!! Be proud! biggrin.gif biggrin.gif biggrin.gif

Adds steps window to the status window above gold.

CODE
#==============================================================================
# ■ Module WindowVocab
#------------------------------------------------------------------------------
#  STEPS = name of the steps vocab.
#==============================================================================

module WindowVocab
  STEPS = "steps" #name of the steps
end


#==============================================================================
# ■ Window_Steps
#------------------------------------------------------------------------------
#  Return current steps
#==============================================================================

class Window_Steps < Window_Base
  #--------------------------------------------------------------------------
  # ● initalize
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, window_width, fitting_height(1))
    refresh
  end
  #--------------------------------------------------------------------------
  # ● Width
  #--------------------------------------------------------------------------
  def window_width
    return 160
  end
  #--------------------------------------------------------------------------
  # ● Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_currency_value(value, steps_vocab, 4, 0, contents.width - 8)
  end
  #--------------------------------------------------------------------------
  # ● Steps Value
  #--------------------------------------------------------------------------
  def value
    $game_party.steps
  end
  #--------------------------------------------------------------------------
  # ● Steps Vocab
  #--------------------------------------------------------------------------
  def steps_vocab
    WindowVocab::STEPS
  end
  #--------------------------------------------------------------------------
  # ● Open
  #--------------------------------------------------------------------------
  def open
    refresh
    super
  end
end

#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
#  Create the Menu - we are only editing one method and adding a new.
#==============================================================================


class Scene_Menu < Scene_MenuBase
  
  alias start_a start
  def start
    start_a
    create_steps_window
  end
  
  def create_steps_window
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = (Graphics.height - @steps_window.height) - 50
  end
  
end


this script has been severely cleaned up
Kread-EX
Closed at OP request.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.