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.

Moving the Command Window in the Menu Screen

I'm trying to make a CBS, but I'm at a loss. I have no idea how to change the coordinates of the command window. Where would I add to or alter the code to change the x and y coordinates of the command window?
 
in your script, under where you made your command window, put in:
@command_window.x = Number
@command_window.y = Number
@command_window.z = Number(must be greater value than other windows in you scene)
Don't forget to change @"command_window" to whatever you instanced your window!

Hope I helped!
 
Thanks, I's working so far.

I have two more questions:

Where would I start if I wanted to separate the item, weapon, and armor inventories?
and
Where do I change the menu background? I can't seem to find it.
 
Huh? Ok, to seperate the item/armor/weapon inventories... That would take time.
you have to create a scene_item class for each type of item, i would think...
I'd find Legacy's One Scene CMS, and study that for a while.

And what do mean change the menu background, like having the map show?
 
No, instead of having the screenshot of the map show, I want to show a picture.

Legacy's CMS is one of my favorites for XP, so I'll take a look at it (but this is for RGSS2, so I'm not sure how much will work).
 
For the seperated item categories, that's been done a dozen times, so you should probably find many many topics if you look around. I'll still give you some basics of how to do it... which is kinda everything you need to do really... please keep in mind that I'm writing without RM** on my hands, so forgive me eventual errors...

First (well, before that, you might consider duplicating the window under another name for compatibility benefits), go for the Window_Item initialize definition, which first line you change from 'def initialize' to
Code:
def initialize(type)
, and a couple of lines after that (3 or so), this:
Code:
@type = type
Now, head for the draw_item area... if you can't find that because I messed up and no such definition exists, look for the >for i in 0..$data_items< something line. Directly underneath that, place
Code:
if ( item.is_a?(RPG::Weapon) and @type == 0 ) or ( item.is_a?(RPG::Armor) and @type == 1 ) or ( item.is_a?(RPG::Item) and @type == 2 )
This obviously allows only items to be pushed into the array that are both the requested type and the type id given by you when you call the item window. You of course do that by replacing '@something_window = Window_Item.new' with
Code:
@item_window = Window_Item.new(0)
That one has a 0 in the call, meaning the window would only display weapons.

For further know-hows of how to operate windows, you might check my Window Creating tutorial that's linked in my signature.


For your menu background, you have to use a sprite. The necessary code is:
Code:
initialize:
  @sprite = Sprite.new
  @sprite.bitmap = [your bitmap going here]
  @sprite.z = 1 # adjust the depth position of your pic to make it appear in the background

dispose:
  (@sprite.bitmap.dispose) # i think needed in RMXP, but not in VX
  @sprite.dispose
 

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