Jump to content
  • Advertisement
Sign in to follow this  
Dko

RPG maker Xp and Ruby

This topic is 4309 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering if anyone here knew a good amount of Ruby? Ive been having lots of problems with some code in RPG maker XP (which uses RUBY) and can't seam to get help that actually... helps on the dedicated discussion boards. Im trying to design a custom system for the battles and require to add a variable that will hold another stat for each character for each level they are at. Much like the basic data base does. So far I have done something like this to add the new stat but have been unable to find a proper way to save and load the new data if I edit it in game.
class Scene_Title
  #--------------------------------------------------------------------------
  # * Main Database
  #--------------------------------------------------------------------------
  alias stats_main_database main_database
  def main_database
    stats_main_database
    $data_actors.each {|actor| actor.setup_stats if actor != nil}
  end
end

module RPG
  class Actor
    def setup_stats
      # Setup New Table
      parameters = Table.new(7, 100)
      # Run Through and Copy From Parameters
      @parameters.ysize.times do |y|
        @parameters.xsize.times do |x|
          parameters[x, y] = @parameters[x, y]
        end
      end
      # Setup new parameters
      @parameters = parameters
    end
  end
end

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Why not try asking at this forum

www.rmxp.org/forums

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!