Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Costumizing Window in RGSS2

For example, you have things displayed... Like, the characters Status, the window where you open your items, your equipment, etc. I want to make some smaller, to make some wider, to take some things of ones and to add some things and etc.

Did I make myself clear? :S
 

khmp

Sponsor

Changing the window size isn't a big thing. Same for changing where they are displayed. Now adding things and removing things is a little more involved and should probably become a request.

Let's say for example I have a window that's just a Window_Base object. But all Windows derive from Window_Base so these following abilities apply to Window_Selectable(Items) and Window_Command(Menu).
Code:
@window_variable = Window_Base.new(0, 50, 250, 150)
@window_variable.x = x
@window_variable.y = y
@window_variable.width = width
@window_variable.height = height

As I've said adding and removing is a little more advanced and involving. You then have to change the actual window drawing code and behavior. I'm not trying to discourage you but you need to clarify what you want so I can decide whether this is a request or a question.
 
It is more of a question, because I still need to figure our what to do. And no, I'm not discouraged =P If I were, when I messed up the codes I would already be =P

I can change sizes of windows, but I cannot move them either in the x/y, only make them larger or shorter. Any help on that?
 

khmp

Sponsor

Oh ok yeah if you do something like self.x = x or self.y = y there it won't have any affect. Where you need to actually go is Scene_Menu and look for "@gold_window.x" and "@gold_window.y". There you can actually change the position of the windows. If I might make a suggestion for editing the default scripts. You can override methods rather than edit the old ones. Like for example given:
Code:
class Testing_Class
  def method_test
    print 'method_test'
  end
end

Later on we can have a piece of code that looks like this:
Code:
class Testing_Class
  def method_test
    print 'method_test_override'
  end
end

If you were to copy and paste the above code into the Script Editor with the inclusion of the following:
Code:
test = Testing_Class.new
test.method_test

The only thing to print out will be "method_test_override". We have just overridden the previous method definition so the old method that just printed out "method_test" is never even used. You can apply this same thinking to overriding the default scripts. And you don't need to redefine every method. You only need to redefine the methods you need to.

Good luck with it NunoAle! :thumb:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top