I’m making a new project using RPG Maker VX using (famous and really awesome) Yanfly Engine Melody recently, but there’s one bug that hasn’t been solved until now – probably because everyone prefers RPGMaker VX Ace but that’s just my opinion.

The problem is <quite> simple. I want my game to have 640×480 resolution and YEM did pretty well adjusting it. But when I open ITEM section from menu screen and choose to use a healing item, the ITEM window in the background is cut in its edge. It’s quite annoying since even after I finish using the item, the ITEM menu doesn’t go back to normal. I think there’s something wrong in selectable item menu, but I don’t know which script needs to be add since I am a newbie.

I don’t see the solution all over RPGM forum so I think I need to do it myself. To be honest I’m extremely new about RGSS2 and scripting in Ruby, so I try to fix it myself by editing RPGMakerVX own script (which is not recommended at all!) but surprisingly it works! For people who encounter same problem and are desperate enough searching for the solution might want to take a look at my modified script. I must warn you beforehand that this script is just for last resort.

The solution is pretty simple: if you use 640×480 screen resolution like me, you just have to replace all “544×416”. Note that the 640 (or initially 544) is game window width and 480 (or initially 416) is game window height. Search through “▼ Scenes” section in script window and click “Scene_Item” section. Replace all the content with my script below or just read through all original lines and modify what you need to edit. It’s rather easy even for newbies.

NB: About the lag, I can’t do anything about it yet

#==============================================================================
# ** Scene_Item
#------------------------------------------------------------------------------
# This class performs the item screen processing.
#==============================================================================

class Scene_Item < Scene_Base
#————————————————————————–
# * Start processing
#————————————————————————–
def start
super
create_menu_background
# @viewport = Viewport.new(0, 0, 544, 416) # THIS IS THE ORIGINAL
@viewport = Viewport.new(0, 0, 640, 480) # EDIT THIS:: replace 544, 416 to your game window resolution
@help_window = Window_Help.new
@help_window.viewport = @viewport
# @item_window = Window_Item.new(0, 56, 544, 360) # THIS IS THE ORIGINAL
@item_window = Window_Item.new(0, 56, 640, 424) # EDIT THIS:: replace 544 to your game window width
# but the width should be your game window height minus 56
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@item_window.active = false
@target_window = Window_MenuStatus.new(0, 0)
hide_target_window
end
#————————————————————————–
# * Termination Processing
#————————————————————————–
def terminate
super
dispose_menu_background
@viewport.dispose
@help_window.dispose
@item_window.dispose
@target_window.dispose
end
#————————————————————————–
# * Return to Original Screen
#————————————————————————–
def return_scene
$scene = Scene_Menu.new(0)
end
#————————————————————————–
# * Update Frame
#————————————————————————–
def update
super
update_menu_background
@help_window.update
@item_window.update
@target_window.update
if @item_window.active
update_item_selection
elsif @target_window.active
update_target_selection
end
end
#————————————————————————–
# * Update Item Selection
#————————————————————————–
def update_item_selection
if Input.trigger?(Input::B)
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::C)
@item = @item_window.item
if @item != nil
$game_party.last_item_id = @item.id
end
if $game_party.item_can_use?(@item)
Sound.play_decision
determine_item
else
Sound.play_buzzer
end
end
end
#————————————————————————–
# * Confirm Item
#————————————————————————–
def determine_item
if @item.for_friend?
show_target_window(@item_window.index % 2 == 0)
if @item.for_all?
@target_window.index = 99
else
if $game_party.last_target_index 0
$game_temp.common_event_id = @item.common_event_id
$scene = Scene_Map.new
end
end
end

Advertisements