Having trouble finding the internal name in the script for:
Equipped Weapon
Equipped Shield
Equipped Helmet
Equipped Armor
Equipped Accessory
As well as how to display them on a menu.
Since my game only has one character and not 4, I've been revamping the game's menu system to display the stats screen on the main menu rather than a Status sub-menu. But I'm having trouble porting over the Draw Equipment functions. It's always missing an item number, or an item icon definition, and I can't seem to find any of the internal variable names.
I managed to get the stats/parameters to port over with no problem, but still can't get equipment to work. I'm going to start with my menu draw function, and what I'm trying to do, and then I'll link how the game drew it in the Status menu and maybe someone can tell me where I'm making a mistake in porting it over. The problem is with the very last line.
My function:
Now how I came to this solution was by following the draw functions backwards until I reached this.
Windows_Status defines "Draw Block 3" as:
...which then is defined in draw_equipments as:
...which is then defined in another class (Windows_Base) as draw_item_name:
The error I receive when trying to use this call is:
NoMethodError occurred.
undefined method "icon_index" for 1:Fixnum
Equipped Weapon
Equipped Shield
Equipped Helmet
Equipped Armor
Equipped Accessory
As well as how to display them on a menu.
Since my game only has one character and not 4, I've been revamping the game's menu system to display the stats screen on the main menu rather than a Status sub-menu. But I'm having trouble porting over the Draw Equipment functions. It's always missing an item number, or an item icon definition, and I can't seem to find any of the internal variable names.
I managed to get the stats/parameters to port over with no problem, but still can't get equipment to work. I'm going to start with my menu draw function, and what I'm trying to do, and then I'll link how the game drew it in the Status menu and maybe someone can tell me where I'm making a mistake in porting it over. The problem is with the very last line.
My function:
Code:
def draw_actor_simple_status(actor, dx, dy)
dy -= line_height / 2
dw = contents.width - dx - 124
draw_actor_name(actor, dx, dy)
draw_actor_nickname(actor, dx, dy + line_height * 1)
draw_actor_class(actor, dx + 200, dy, dw)
draw_actor_level(actor, dx, dy + line_height * 2)
draw_actor_hp(actor, dx, dy + line_height * 3, dw)
draw_actor_param(actor, dx, dy + line_height * 5, 2)
draw_actor_param(actor, dx, dy + line_height * 6, 4)
draw_actor_param(actor, dx, dy + line_height * 7, 3)
draw_actor_param(actor, dx, dy + line_height * 8, 5)
draw_actor_param(actor, dx, dy + line_height * 9, 6)
draw_actor_param(actor, dx, dy + line_height * 10, 7)
draw_item_name(actor, dx + 204, dy + line_height * 5, enabled = true, width = 172)
Now how I came to this solution was by following the draw functions backwards until I reached this.
Windows_Status defines "Draw Block 3" as:
Code:
def draw_block3(y)
draw_parameters(32, y)
draw_equipments(288, y)
end
...which then is defined in draw_equipments as:
Code:
def draw_equipments(x, y)
@actor.equips.each_with_index do |item, i|
draw_item_name(item, x, y + line_height * i)
end
end
...which is then defined in another class (Windows_Base) as draw_item_name:
Code:
def draw_item_name(item, x, y, enabled = true, width = 172)
return unless item
draw_icon(item.icon_index, x, y, enabled)
change_color(normal_color, enabled)
draw_text(x + 24, y, 172, line_height, item.name)
end
The error I receive when trying to use this call is:
NoMethodError occurred.
undefined method "icon_index" for 1:Fixnum