CAN ANYONE TEACH ME HOW TO MAKE A CUSTOM BATTLE MENU LAYOUT IN VX?
Posts
The title of this topic says it all.
I couldn't find a tutorial for this, I did find one for basic scripting but it didn't say anything about menu layouts, either in battle or otherwise. But it did give me some minor understating of RPG Maker VX scripting. So if anyone is good at making custom battle menu layouts, please give me some tips.
(Tips on how to make out of battle menu layouts would also be appreciated.)
I couldn't find a tutorial for this, I did find one for basic scripting but it didn't say anything about menu layouts, either in battle or otherwise. But it did give me some minor understating of RPG Maker VX scripting. So if anyone is good at making custom battle menu layouts, please give me some tips.
(Tips on how to make out of battle menu layouts would also be appreciated.)
Be patient and don't double post like that.
It's not that simple/can be explained in a single post if you don't now the basics. What you can do is learn the basics and download an already-made custom battle menu and see how people do it.
Perhaps someone who is experienced here can help you, but it is doubtful.
It's not that simple/can be explained in a single post if you don't now the basics. What you can do is learn the basics and download an already-made custom battle menu and see how people do it.
Perhaps someone who is experienced here can help you, but it is doubtful.
Well that's the thing McBick, the kind of menu style I want is a little hard for me to explain with text, which is why I want to learn how to script custom battle menu styles.
What I can explain in text is that it's one that would look good in a solo RPG.
What I can explain in text is that it's one that would look good in a solo RPG.
This help?
I figured being able to change equipment in battle would give the player more of a chance since it's a solo RPG and I have a system where the player's skill set is governed by what equipment they wear.
So it'd be like if you have an item equipped that gives you fire spells but are facing an enemy which absorbs fire but is weak to ice, you could swap the fire equipment for ice equipment on a dime.

I figured being able to change equipment in battle would give the player more of a chance since it's a solo RPG and I have a system where the player's skill set is governed by what equipment they wear.
So it'd be like if you have an item equipped that gives you fire spells but are facing an enemy which absorbs fire but is weak to ice, you could swap the fire equipment for ice equipment on a dime.
Well, excluding the fact that it shows the player's level and face and allows them to change equipment during battle, this is pretty much the normal battle system with the commands rearranged.
Yes, the picture helps a lot!
The first thing you want to do is design the "behavior" of the scene & menu from start to finish.
The default system displays the "Party Command Window" on the left (Fight, Escape).
When you choose "Fight", it slides off the left, and the status & "Actor Command Window" slide left. Do you want to keep the same behavior?
Then you look at the 'window' you've designed above. Practically, this is really 2 windows: The Battle_Status window, and the Actor_Command window. We can make it look like one window by drawing the status window the width of the screen, and setting the command window to invisible & just lay it over the top of the status window.
Then, address the 2 new commands. Equip: I assume calls the equip scene for the one actor in the party (You don't need actor selection if there is only one.), then returns to the command window to select a battle action.
Escape: Is this only enabled when you check "Can Escape" in the Battle Processing event command? Does this behave the same as the Party Command, "Escape"? (random success of escaping)
Think about, and answer those. Then we'll move on to the next step, designing the window(s)
The first thing you want to do is design the "behavior" of the scene & menu from start to finish.
The default system displays the "Party Command Window" on the left (Fight, Escape).
When you choose "Fight", it slides off the left, and the status & "Actor Command Window" slide left. Do you want to keep the same behavior?
Then you look at the 'window' you've designed above. Practically, this is really 2 windows: The Battle_Status window, and the Actor_Command window. We can make it look like one window by drawing the status window the width of the screen, and setting the command window to invisible & just lay it over the top of the status window.
Then, address the 2 new commands. Equip: I assume calls the equip scene for the one actor in the party (You don't need actor selection if there is only one.), then returns to the command window to select a battle action.
Escape: Is this only enabled when you check "Can Escape" in the Battle Processing event command? Does this behave the same as the Party Command, "Escape"? (random success of escaping)
Think about, and answer those. Then we'll move on to the next step, designing the window(s)
Everything works the way it does in the default battle menu. Picking escape gives the player a random chance to escape the encounter. It is enabled in all random encounters but not enabled in special encounters, such as boss battles and battles that are brought on via cutscenes. Equip works exactly the way you described it.
Ok, let's change the Status window first.
Grab a copy of Window_BattleStatus, and paste it right below "( Insert here )"
We want to change the width of the window to the full width of the screen.
In the initialize method, change 416 to 544
We don't need to change the dispose or refresh methods.
In the draw_item method...
We don't need the actor name, but we do want the actor face.
so change the line:
to:
We don't want actor state, but I'm going to argue that point, so let's just comment that line out for now
Now let's move & resize the HP & MP to:
Test it out & see how it looks.
Pretty good! The selection cursor is still there. We'll get rid of that.
Now for the argument; Level really doesn't matter much in battle, state does.
Compelling? :)
Let's change the state line to:
If you really want Level instead, comment state back out, and add:
Now let's get rid of that cursor. The reason it's there is because this is a
selection window. Change the class declaration (first line) to:
Test
You get an error: "..undefined method: item_rect"
Go back to the editor. It takes you right to the line where the error occurred.
item_rect is a method in Window_Selectable, but not in Window_Base.
Let's get rid of the item_rect & rect references.
Another error: undefined method 'index=' for #<Window_BattleStatus:...
Go back to the editor. It takes you to Scene_Battle where it tries to set the index. We don't want to edit Scene_Battle if we can help it, so let's just put the 'index=' method back in the window class.
There's a cool way to create 2 methods to read & set a parameter from outside a class. 'attr_accessor'. Add this line below 'class Window_BattleStatus < Window_Base'
this creates the parameter @index, and 2 methods 'index' & 'index='
Test again. Hey, it works. No cursor. :)
How's that look? did you go with State or Level? Anything you want to change?
We'll tackle the command window next.
TTFN
Grab a copy of Window_BattleStatus, and paste it right below "( Insert here )"
We want to change the width of the window to the full width of the screen.
In the initialize method, change 416 to 544
We don't need to change the dispose or refresh methods.
In the draw_item method...
We don't need the actor name, but we do want the actor face.
so change the line:
draw_actor_name(actor, 4, rect.y)
to:
draw_actor_face(actor, 4, rect.y)
We don't want actor state, but I'm going to argue that point, so let's just comment that line out for now
#draw_actor_state(actor, 114, rect.y, 48)
Now let's move & resize the HP & MP to:
draw_actor_hp(actor, 108, rect.y, 120)
draw_actor_mp(actor, 108, rect.y + 32, 120)
Test it out & see how it looks.
Pretty good! The selection cursor is still there. We'll get rid of that.
Now for the argument; Level really doesn't matter much in battle, state does.
Compelling? :)
Let's change the state line to:
draw_actor_state(actor, 108, rect.y + 64, 120)
If you really want Level instead, comment state back out, and add:
draw_actor_level(actor, 108, 64)
Now let's get rid of that cursor. The reason it's there is because this is a
selection window. Change the class declaration (first line) to:
class Window_BattleStatus < Window_Base
Test
You get an error: "..undefined method: item_rect"
Go back to the editor. It takes you right to the line where the error occurred.
item_rect is a method in Window_Selectable, but not in Window_Base.
Let's get rid of the item_rect & rect references.
def draw_item(index)
self.contents.clear
self.contents.font.color = normal_color
actor = $game_party.members[index]
draw_actor_face(actor, 0, 0)
draw_actor_state(actor, 108, 64, 120)
# draw_actor_level(actor, 108, 64)
draw_actor_hp(actor, 108, 0, 120)
draw_actor_mp(actor, 108, 32, 120)
end
Another error: undefined method 'index=' for #<Window_BattleStatus:...
Go back to the editor. It takes you to Scene_Battle where it tries to set the index. We don't want to edit Scene_Battle if we can help it, so let's just put the 'index=' method back in the window class.
There's a cool way to create 2 methods to read & set a parameter from outside a class. 'attr_accessor'. Add this line below 'class Window_BattleStatus < Window_Base'
attr_accessor :index
this creates the parameter @index, and 2 methods 'index' & 'index='
Test again. Hey, it works. No cursor. :)
How's that look? did you go with State or Level? Anything you want to change?
We'll tackle the command window next.
TTFN
Brewmeister, you should post a series of tutorials! This is helpful even for me having (slightly) more than a mystified question mark over my head where RGSS2 is concerned and also having chopped into some other custom arrangements.
Brew, the selection to base window is going to cause at least one more problem. Any ally selecting skill/item is going to look for methods (such as move_cursor I believe) that no longer exist.
Without the program in front of me, I see three possible solutions:
1) editing Scene_Battle, which you are not a fan of, though is my usual choices when working on a whole system for personal use,
2) changing the window back to selectable and just moving the cursor to a more appropriate spot; it changes the appearance and would add a "confirm" of sorts to self-selecting skills, but that might be desirable, or
3) setting all ally skills and items to self. As I am not positive how self-targeting is set up, I'm only theorizing that this will work.
You could also create functions for all the missing and used functions, but really, that's getting a little bit ridiculous.
Without the program in front of me, I see three possible solutions:
1) editing Scene_Battle, which you are not a fan of, though is my usual choices when working on a whole system for personal use,
2) changing the window back to selectable and just moving the cursor to a more appropriate spot; it changes the appearance and would add a "confirm" of sorts to self-selecting skills, but that might be desirable, or
3) setting all ally skills and items to self. As I am not positive how self-targeting is set up, I'm only theorizing that this will work.
You could also create functions for all the missing and used functions, but really, that's getting a little bit ridiculous.
Hey Brewmeister, I can't get this to work. It's not that I don't understand it, I was able to do everything you described, but even with it set up exactly as you described it the battles still play out with the default system. I don't get it, no matter what I do it still plays the default system. I even went as far as to completely deleting the default Window_Battlemenu and replacing it with the new one, yet it still played the default battle system. Which doesn't even seem possible considering I cut it out of the script. 0_0
@Versalia, I usually don't have time to get this detailed. (work, wife, band, admin at 'that other place'...) But you're welcome to compile this into a tutorial when we're done. ;)
@Racheal, thanks for reading through it. A 2nd set of educated eyes always helps. I did consider actor selection for skills/items (with 'ally' scope). Since there is only one actor, actor selection isn't really necessary. If anything, maybe we'll add a confirmation dialog when a skill or item is selected that has 'ally' scope. "Use ____ on yourself? Y/N". (Or your option 3)
I'm not opposed to editing Scene_Battle. Hell, I'll rewrite hidden classes if I have to :). I should have worded it "... for now."
I'm trying to keep this simple... one step at a time for now. (but I am looking a few moves ahead :) )
@Exclane, the only thing that should be different at this point, is the status window is wider, the status items drawn match your prototype (face, HP, MP, Status),
and the selection cursor is gone. Other than that, it still works like the default system.
Download this demo & compare it to what you've done.
http://hbgames.org/user_files/Exclane_Battle_Status.exe
@Racheal, thanks for reading through it. A 2nd set of educated eyes always helps. I did consider actor selection for skills/items (with 'ally' scope). Since there is only one actor, actor selection isn't really necessary. If anything, maybe we'll add a confirmation dialog when a skill or item is selected that has 'ally' scope. "Use ____ on yourself? Y/N". (Or your option 3)
I'm not opposed to editing Scene_Battle. Hell, I'll rewrite hidden classes if I have to :). I should have worded it "... for now."
I'm trying to keep this simple... one step at a time for now. (but I am looking a few moves ahead :) )
@Exclane, the only thing that should be different at this point, is the status window is wider, the status items drawn match your prototype (face, HP, MP, Status),
and the selection cursor is gone. Other than that, it still works like the default system.
Download this demo & compare it to what you've done.
http://hbgames.org/user_files/Exclane_Battle_Status.exe
That link doesn't work for me, it says "Cannot locate remote server". It's either the link itself for my crappy computer, I'd believe both. :(
Also, when I said it uses the default system, I mean it also has the default arrangement. Literally nothing on the battle menu even looks different, the character's face isn't on it or anything. Despite editing the Battle_Menu.
Also, when I said it uses the default system, I mean it also has the default arrangement. Literally nothing on the battle menu even looks different, the character's face isn't on it or anything. Despite editing the Battle_Menu.

















