Introduction
This is a revised and enhanced version of the XaiL main menu written by Nicke. Now available for RPGMaker XP, it recreates the main features of his menu system. Game developers can add new options into their main menu and toggle their availability based on game switches. And it can display an information stats window that can hold various pieces of game data at the game developer's discretion.
Features
Revised Layout Design
Faces in menu option
Able to rearrange the actual menu elements
Able to add new menu options in a configuration page
Music in menus
Built-in Party Order feature
Screenshots
Basic Screen
Yep, pretty basic. I should have selected something just so I could show the cursor rect around someone.
Screen with Icons and Faces
Yeah, I know. I mis-aligned the bars a bit. But it still looks hella sweet. And those bars are part of the system itself.
Visual Graphics Menu
Are those Moghunter bars and a Moggy background? Yep. Pity it isn't animated because the background does shift about.
And if I wanted, I could have resized the menu command window so it could scroll options in that space.
Instructions
The configuration sections have comments, but the main header is loaded with them.
FAQ
It took all day to type the instructions.
Compatibility
This revision of the XaiL Menu system was designed solely for RPGMaker XP and overwrites the Main Menu itself. As such, it will not function with any other Main Menu script. But it isn't just the Scene_Menu class that was rewritten, but the Window_MenuStatus class as well. But that class is only used by the main menu by default, so no actual conflict should exist.
Credits and Thanks
Thanks goes to Nicke for the creation of the original script for RPGMaker VXAce, and to RASHIDA12 for the request to convert it to RPGMaker XP. And additional thanks goes to SephirothSpawn who added the color_between method to the Color class, used for gradient bar rendering.
Terms and Conditions
Free for use, even in commercial games. Only due credit to Nicke, RASHIDA12 and myself is required.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
This area is for the Q/A section. I expect it to grow. But if it doesn't, I have some users that are apparently dabbling in Rubyscripting.
QUESTION #1:
The HP values are centered. How do I make them left-adjusted?
ANSWER:
The XaiL menu uses its own HP, SP and Exp drawing methods which mimic the original RPGMaker VXAce version. The replacement I used to display the HP stats is on line 463.
Code:
def draw_actor_xailhp(actor, x, y, width = 144)
xail_bars(x, y, actor.hp, actor.maxhp, X_MAIN::AV::BAR_HP_COLOR1,
X_MAIN::AV::BAR_HP_COLOR2, X_MAIN::AV::BAR_HP_BACKGD)
text = actor.hp.to_s + "/" + actor.maxhp.to_s
if X_MAIN::PARTY::EXP_DISPLAY != nil
text += " " + $data_system.words.hp
end
self.contents.draw_text(x, y, width, 32, text, 1)
end
The magic is in the last statement in that method, the draw_text method.
Normally, that statement just has five parameters: x, y, width, height and text. But this one has a sixth parameter, the alignment value of '1'. You can set the value to '1' for a centered text, '2' for right aligned, or '0' for left aligned (though that is also the default.
If you want it left-justified, make the params (x, y, width, 32, text)
And the same goes for the SP and EXP stats code just below.
I haven't found any bugs with it either, it's really great! The only things I found were 100% my own fault, because I somehow managed to common event some things, and after investigating, it was in all of my backups and backups of backups before I even used this script!
I am making my own changes to it, as the magnificent and mighty DerVVulfman already knows, so we'll see how far this script can go!
(I haven't broken the script yet, so we're doin' well so far! )
Dear Der VVulfman, I found two bugs in XaiLVisual. Despite the fact that EXP is being added, the bar doesnt show any reactions.
If I gain 13 EXP, there is no reaction in the EXP BAR.
Btw. I tried to get the XAIl Visual Menu on my project where I have the ATOAS ACBS script by ATOA. Only the two scripts.
Whenever I open the menu I get the following bug reaction: Look at my attachment.
The Line is here:
1037: draw_actor_name(actor, new_x, new_y, self.contents.font.color)
I mis-configured the name of the EXP bar. In the config for the Visual demo, I named it EP_Bar rather than EXP_bar. In that case, you have two choices, either fix the filename in the config, or just rename the bar to EP_Bar.
Insofar as the issue with the draw_actor_name command, I guess one of the scripts you are using has its own new variant. Perhaps placing Xail below the battlesystem will fix this issue, so it overwrites the revised one in your battlesystem.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
(07-17-2016, 08:29 PM)DerVVulfman Wrote: YOU FELL INTO MY TRAP!!! MWAHAHAHA!!!! URP....
I mis-configured the name of the EXP bar. In the config for the Visual demo, I named it EP_Bar rather than EXP_bar. In that case, you have two choices, either fix the filename in the config, or just rename the bar to EP_Bar.
Insofar as the issue with the draw_actor_name command, I guess one of the scripts you are using has its own new variant. Perhaps placing Xail below the battlesystem will fix this issue, so it overwrites the revised one in your battlesystem.
Okay, first problem solved.
I already tried to place the script below and after the battle system.
When I placed it above the battle system, the bug came which I described above. But when I placed it very below the Battle system, the bug didint show up, the menu opened but some things looked very misplaced, it was a mess.
Problem is:
My Project: I've my project with various scripts: Placing above will result into the bug. Placing above will result in to a mess.
I've so far made a new project with only ATOAS ACBS Menu.
When I put the scripts above the battle system, the same bug came.
Putting it below made it work fine.
But I want it to make it work for my project
I've tried to put a # before the line 1037:
Changed it to:
#draw_actor_name(actor, new_x, new_y, self.contents.font.color)
Suddenly, it seemed to work. Do you think it will somehow disturb the script or is there any other solution?
Well, you could copy the actual [b]draw_actor_name[b] method from the Xail script and re-pasted it as a separate script by itself below everything else.... effectively ensuring it takes precedent over the other version.
Code:
class Window_Base
def draw_actor_name(x,y,whatever,whatever)
....blah blah blah...
....blah blah blah...
....blah blah blah...
end
end
Just post the method in its own Window Base class after the others, and you should be good to go.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
(07-18-2016, 03:18 AM)DerVVulfman Wrote: Well, you could copy the actual [b]draw_actor_name[b] method from the Xail script and re-pasted it as a separate script by itself below everything else.... effectively ensuring it takes precedent over the other version.
Code:
class Window_Base
def draw_actor_name(x,y,whatever,whatever)
....blah blah blah...
....blah blah blah...
....blah blah blah...
end
end
Just post the method in its own Window Base class after the others, and you should be good to go.
Sorry, did I understood you rigth?
you mean?
Quote:def draw_item_name(actor, x, y, arrayval)
return if arrayval.nil?
self.contents.font.size = arrayval[0]
new_x = x + arrayval[1]
new_y = y + arrayval[2]
draw_actor_name(actor, new_x, new_y, self.contents.font.color)
end
Yep. As in a new script below your menu AND battlesystem scripts, just so the Xail version of the draw_actor_name takes over.
To be specific, just paste THIS below it all:
Code:
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Name
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# color : font color
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y, color=normal_color)
self.contents.font.color = color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
end
The original version has only three parameters. Mine has four, but it assumes that the color value defaults to the normal text color.
Hrm. Oddly, I wonder why the battlesystem script conflicts here. It is as if something else may be rewriting that method. But that would be a separate thread/topic.
EDIT: Atoa's system......
You mentioned that. So I took a look at Atoa's system.
Paste THIS below everything:
Code:
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Name
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# color : font color
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y, color=normal_color)
self.contents.font.color = color
if $game_temp.in_battle or Text_Format_in_Menu
self.contents.font.name = Name_Config[2]
self.contents.font.size = Name_Config[3]
self.contents.font.bold = Name_Config[4]
self.contents.draw_text(x, y, 120, 32, actor.name)
set_default_font
else
self.contents.draw_text(x, y, 120, 32, actor.name)
end
end
It combines features from both. If you are in battle or have a custom system built into Atoa's system turned on, it uses Atoa based values to change the font. Otherwise, it draws normally (or as normal as the XAIL system goes).
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)