I saw a lot of people complain about rgss1
saying this hard to read and to manipulate but be surprise
Xp structure is horrible we can't deny!
but when you look at the code more close to the rgss
you will notice the code are relatively simple
so for people who want to improve their code knowledge xp is a good way for improve it
(unless Alias because alias don't exist into RGSSI they only exist in RGSSII and RGSSIII)
why?
well RGSSI is less structural so this in some way less scary
RGSSIII is heavily structural and can be a little scary to play with
if I show a exemple of how window command is build
RGSSI
RGSSIII
did you notice how much this seem simple and less scary to look?
I don't say switch to xp for make script not at all! RGSSI have big flaw!
I mean this just a good way for learning to tweak with rgss!
this can be a good practice for help you to make script !
at least I can have false!
I just say my opinion of my though about xp I love simply the simpleness of RGSSI
and I think this a good way for practice in script making!
now Nio out~
saying this hard to read and to manipulate but be surprise
Xp structure is horrible we can't deny!
but when you look at the code more close to the rgss
you will notice the code are relatively simple
so for people who want to improve their code knowledge xp is a good way for improve it
(unless Alias because alias don't exist into RGSSI they only exist in RGSSII and RGSSIII)
why?
well RGSSI is less structural so this in some way less scary
RGSSIII is heavily structural and can be a little scary to play with
if I show a exemple of how window command is build
RGSSI
#==============================================================================# ** Window_Command#------------------------------------------------------------------------------# This window deals with general command choices.#==============================================================================class Window_Command < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization # width : window width # commands : command text string array #-------------------------------------------------------------------------- def initialize(width, commands) # Compute window height from command quantity super(0, 0, width, commands.size * 32 + 32) @item_max = commands.size @commands = commands self.contents = Bitmap.new(width - 32, @item_max * 32) refresh self.index = 0 end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear for i in 0...@item_max draw_item(i, normal_color) end end #-------------------------------------------------------------------------- # * Draw Item # index : item number # color : text color #-------------------------------------------------------------------------- def draw_item(index, color) self.contents.font.color = color rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index]) end #-------------------------------------------------------------------------- # * Disable Item # index : item number #-------------------------------------------------------------------------- def disable_item(index) draw_item(index, disabled_color) endend
#==============================================================================# ** Window_Command#------------------------------------------------------------------------------# This window deals with general command choices.#==============================================================================class Window_Command < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(x, y) clear_command_list make_command_list super(x, y, window_width, window_height) refresh select(0) activate end #-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- def window_width return 160 end #-------------------------------------------------------------------------- # * Get Window Height #-------------------------------------------------------------------------- def window_height fitting_height(visible_line_number) end #-------------------------------------------------------------------------- # * Get Number of Lines to Show #-------------------------------------------------------------------------- def visible_line_number item_max end #-------------------------------------------------------------------------- # * Get Number of Items #-------------------------------------------------------------------------- def item_max @list.size end #-------------------------------------------------------------------------- # * Clear Command List #-------------------------------------------------------------------------- def clear_command_list @list = [] end #-------------------------------------------------------------------------- # * Create Command List #-------------------------------------------------------------------------- def make_command_list end #-------------------------------------------------------------------------- # * Add Command # name : Command name # symbol : Corresponding symbol # enabled : Activation state flag # ext : Arbitrary extended data #-------------------------------------------------------------------------- def add_command(name, symbol, enabled = true, ext = nil) @list.push({:name=>name, :symbol=>symbol, :enabled=>enabled, :ext=>ext}) end #-------------------------------------------------------------------------- # * Get Command Name #-------------------------------------------------------------------------- def command_name(index) @list[index][:name] end #-------------------------------------------------------------------------- # * Get Activation State of Command #-------------------------------------------------------------------------- def command_enabled?(index) @list[index][:enabled] end #-------------------------------------------------------------------------- # * Get Command Data of Selection Item #-------------------------------------------------------------------------- def current_data index >= 0 ? @list[index] : nil end #-------------------------------------------------------------------------- # * Get Activation State of Selection Item #-------------------------------------------------------------------------- def current_item_enabled? current_data ? current_data[:enabled] : false end #-------------------------------------------------------------------------- # * Get Symbol of Selection Item #-------------------------------------------------------------------------- def current_symbol current_data ? current_data[:symbol] : nil end #-------------------------------------------------------------------------- # * Get Extended Data of Selected Item #-------------------------------------------------------------------------- def current_ext current_data ? current_data[:ext] : nil end #-------------------------------------------------------------------------- # * Move Cursor to Command with Specified Symbol #-------------------------------------------------------------------------- def select_symbol(symbol) @list.each_index {|i| select(i) if @list[:symbol] == symbol } end #-------------------------------------------------------------------------- # * Move Cursor to Command with Specified Extended Data #-------------------------------------------------------------------------- def select_ext(ext) @list.each_index {|i| select(i) if @list[:ext] == ext } end #-------------------------------------------------------------------------- # * Draw Item #-------------------------------------------------------------------------- def draw_item(index) change_color(normal_color, command_enabled?(index)) draw_text(item_rect_for_text(index), command_name(index), alignment) end #-------------------------------------------------------------------------- # * Get Alignment #-------------------------------------------------------------------------- def alignment return 0 end #-------------------------------------------------------------------------- # * Get Activation State of OK Processing #-------------------------------------------------------------------------- def ok_enabled? return true end #-------------------------------------------------------------------------- # * Call OK Handler #-------------------------------------------------------------------------- def call_ok_handler if handle?(current_symbol) call_handler(current_symbol) elsif handle?
ok) super else activate end end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh clear_command_list make_command_list create_contents super endend
did you notice how much this seem simple and less scary to look?
I don't say switch to xp for make script not at all! RGSSI have big flaw!
I mean this just a good way for learning to tweak with rgss!
this can be a good practice for help you to make script !
at least I can have false!
I just say my opinion of my though about xp I love simply the simpleness of RGSSI
and I think this a good way for practice in script making!
now Nio out~

