MENU/PICTURE SIZE CHANGES.
Posts
Pages:
1
Hello everyone, I am very new to RPG Maker VX, and I am seeking assistance with setup changes I am making.
I am using melody for my battle system giving me sideview. As well I have increased party size to 6 characters.
1. The first issue I am having is that when I add a character to my team they seem to overlap another character in the party when battling... so they both get to act, but they seem to be positioned in the same location. I am wondering how I can change the characters position so that I would be able to see all battle characters without overlapping. (I'm guessing maybe I have to change the faceset display size at the bottom of the screen to allow more room. But not sure how to do that in the script.)
2. Also, how do I change my menu screen to show all six characters in party menu? Currently I see four, the remainder are below but unviewable as there is no cursor to move down to see them on the menu screen, any idea in which script to alter?
If someone could point me in the right direction and scripts to alter, it would be a great help. Thanks.
I am using melody for my battle system giving me sideview. As well I have increased party size to 6 characters.
1. The first issue I am having is that when I add a character to my team they seem to overlap another character in the party when battling... so they both get to act, but they seem to be positioned in the same location. I am wondering how I can change the characters position so that I would be able to see all battle characters without overlapping. (I'm guessing maybe I have to change the faceset display size at the bottom of the screen to allow more room. But not sure how to do that in the script.)
2. Also, how do I change my menu screen to show all six characters in party menu? Currently I see four, the remainder are below but unviewable as there is no cursor to move down to see them on the menu screen, any idea in which script to alter?
If someone could point me in the right direction and scripts to alter, it would be a great help. Thanks.
http://wiki.pockethouse.com/index.php?title=Configuration_(Battle_Engine_Melody)#Battler_Positioning_Settings
For #2, you need to edit Window_MenuStatus and make each actor block smaller.
Here's an example of how it could look:
This is my sloppy code that I did to make it look like that. I altered Window_MenuStatus within the script YEZ Party Selection; you'll have to edit/add to/take from Window_Base if you want to make some of these changes without that script.
Remember that a definition instead of a child (Window_MenuStatus is a child of Window_Selectable which is a child of Window_Base) overwrites the parent's definition; so, for example, even though Window_Base has def draw_actor_hp, you can overwrite it inside of Window_MenuStatus to adjust it.
For #2, you need to edit Window_MenuStatus and make each actor block smaller.
Here's an example of how it could look:

This is my sloppy code that I did to make it look like that. I altered Window_MenuStatus within the script YEZ Party Selection; you'll have to edit/add to/take from Window_Base if you want to make some of these changes without that script.
Remember that a definition instead of a child (Window_MenuStatus is a child of Window_Selectable which is a child of Window_Base) overwrites the parent's definition; so, for example, even though Window_Base has def draw_actor_hp, you can overwrite it inside of Window_MenuStatus to adjust it.
#==============================================================================
# Window_MenuStatus
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# overwrite method: refresh
#--------------------------------------------------------------------------
def refresh
@item_max = $game_party.members.size
create_contents
colour_non_battler_background
for i in 0..$game_party.members.size
draw_item(i)
end
end
#--------------------------------------------------------------------------
# overwrite method: create_contents
#--------------------------------------------------------------------------
def create_contents
self.contents.dispose
self.contents = Bitmap.new(width - 32, [height - 32, row_max * (96 - 32)].max) # FACE
self.contents.font.color = normal_color
end
def draw_actor_face(actor, x, y, size = 96)
opacity = 255
face_name = actor.face_name
face_index = actor.face_index
bitmap = Cache.face(face_name)
rect = Rect.new(0, 0, 0, 0)
rect.x = face_index % 4 * 96 + (96 - size) / 2
rect.y = face_index / 4 * 96 + (96 - size) / 2
rect.width = size
rect.height = size - 32
self.contents.blt(x, y, bitmap, rect, opacity)
bitmap.dispose
end
#--------------------------------------------------------------------------
# draw_item
#--------------------------------------------------------------------------
def draw_item(index)
actor = $game_party.members[index]
return if actor == nil
draw_actor_face(actor, 2, index * (96 - 32) + 2, 92)
x = 104
y = index * (96 - 32)
draw_actor_name(actor, x, y + 8)
#~ draw_actor_class(actor, x + 120, y)
draw_actor_state(actor, x - 96, y + WLH * 2 - 8)
#~ draw_actor_hp(actor, x + 120, y + 8, 120)
draw_actor_hp(actor, x, y + WLH * 2 - 16, 220)
draw_actor_mp(actor, x + 160, y + 8, 60) # unless actor.use_rage?
#~ draw_actor_rage(actor, x + 120, y + WLH * 2 - 8, 120) if actor.use_rage?
draw_menu_exp(actor, x + 92, y + 8, 60)
draw_actor_level(actor, x + 92, y + 8)
end
#--------------------------------------------------------------------------
# new method: draw_menu_exp
#--------------------------------------------------------------------------
def draw_menu_exp(actor, x, y, size = 120)
if actor.next_exp != 0
gw = size * actor.now_exp
gw /= actor.next_exp
else
gw = size
end
gc1 = text_color(YEZ::PARTY::EXP_GAUGE_1)
gc2 = text_color(YEZ::PARTY::EXP_GAUGE_2)
self.contents.fill_rect(x, y + WLH - 8, size, 6, gauge_back_color)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
self.contents.font.color = system_color
#~ self.contents.draw_text(x, y, 40, WLH, YEZ::PARTY::EXP_TEXT)
self.contents.font.color = normal_color
if actor.next_exp != 0
expercent = actor.now_exp * 100.0
expercent /= actor.next_exp
else
expercent = 100.0
end
expercent = 100.0 if expercent > 100.0
#~ text = sprintf(YEZ::PARTY::PERCENT_EXP, expercent)
text = Integer(expercent).to_s + "%"
#~ self.contents.draw_text(x, y, size, WLH, text, 2)
end
#--------------------------------------------------------------------------
# new method: colour_non_battler_background
#--------------------------------------------------------------------------
def colour_non_battler_background
color = Color.new(0, 0, 0, 200)
dy = $game_party.battle_members.size * 96
dh = $game_party.reserve_members.size * (96 - 32)
self.contents.fill_rect(0, dy, self.width - 32, dh, color) if dh > 0
end
#--------------------------------------------------------------------------
# overwrite method: top_row
#--------------------------------------------------------------------------
def top_row; return self.oy / (96 - 32); end
#--------------------------------------------------------------------------
# overwrite method: top_row=
#--------------------------------------------------------------------------
def top_row=(row); super(row); self.oy = self.oy / WLH * (96 - 32); end
#--------------------------------------------------------------------------
# overwrite method: page_row_max
#--------------------------------------------------------------------------
def page_row_max; return (self.height - 32) / (96 - 32); end
#--------------------------------------------------------------------------
# overwrite method: item_rect
#--------------------------------------------------------------------------
def item_rect(index)
rect = super(index)
rect.height = 96 - 32
rect.y = index / @column_max * (96 - 32)
return rect
end
#--------------------------------------------------------------------------
# overwrite method: update_cursor
#--------------------------------------------------------------------------
def update_cursor
if @index < 0
self.cursor_rect.empty
elsif @index < @item_max
super
elsif @index >= 100
self.cursor_rect.set(0, (@index - 100) * (96 - 32), contents.width, (96 - 32))
else
self.cursor_rect.set(0, 0, contents.width, @item_max * (96 - 32))
end
end
end # Window_MenuStatus
Perfect, thank you Craze. That is a great help! Luckily I figured out what I was doing wrong with number 1. I went in and added the coordinates for the extra party members.
Your help with number 2 just sped things up a great deal for me, thanks :)
Your help with number 2 just sped things up a great deal for me, thanks :)
Huh, I thought it was going to work... for some reason I'm getting an error when I go to access the mainmenu now. it says:
script "YEM main menu melody' line 472 arguement error occured wrong number of arguements (2 for 4)
any ideas?
this is the line from the scrip : @status_window = Window_MenuStatus.new(160, 0)
script "YEM main menu melody' line 472 arguement error occured wrong number of arguements (2 for 4)
any ideas?
this is the line from the scrip : @status_window = Window_MenuStatus.new(160, 0)
The error is telling you that you are passing an incorrect number of arguments to the newly called class. Review and make certain you are passing arguments that Window_MenuStatus is expecting.
EDIT: I am going to assume you don't know what an "argument" is, so I'll try and give a concise explanation below.
An "argument" is a way of telling methods certain information when you're calling it so that the method can use that information to do certain things.
An easy example would be the following:
When a method is defined, you can specify that the method expect certain arguments be passed to it ("x" and "y" in the above example). When you subsequently call the method with the arguments "2" and "7", which pass on to "x" and "y" respectively, the method can use "x" and "y" to do certain operations.
In the event you pass too many or too few arguments to a method, it will give off the error you mentioned. So for example, this will throw an error:
This will also throw an error:
You should consequently always make sure you define and pass arguments properly.
EDIT: I am going to assume you don't know what an "argument" is, so I'll try and give a concise explanation below.
An "argument" is a way of telling methods certain information when you're calling it so that the method can use that information to do certain things.
An easy example would be the following:
def foo(x, y)
print(x + y) # => Prints out the sum of x + y.
end
foo(2, 7) # => Prints out the sum of 2 + 7, which is 9.
When a method is defined, you can specify that the method expect certain arguments be passed to it ("x" and "y" in the above example). When you subsequently call the method with the arguments "2" and "7", which pass on to "x" and "y" respectively, the method can use "x" and "y" to do certain operations.
In the event you pass too many or too few arguments to a method, it will give off the error you mentioned. So for example, this will throw an error:
def foo(x, y)
print(x + y) # => Prints out the sum of x + y.
end
foo(2, 7, 1) # => Will throw out an error as I am passing 3 arguments when "foo" is expecting only 2.
This will also throw an error:
def foo(x, y, z)
print(x + y) # => Prints out the sum of x + y.
end
foo(2, 7) # => Will throw out an error as I am passing 2 arguments when "foo" is expecting 3.
You should consequently always make sure you define and pass arguments properly.
Pages:
1















