Item On Event & Key Item Help Window (Patch) // Forum request; a purely visual compatibility patch.
Requires:
Setup:
Requires:
- Kadafi's Item Select Help (pastebin.com/Pbgq8AEf)
- Galv's Use Item on Event (galvs-scripts.com/galvs-use-item-on-event/)
- Adjust the vertical position of the item description window.
Setup:
- Paste under the Materials, and under Galv and Kadafi's scripts.
- While still usable, this script is not ideal for games that show messages in the middle of the screen with this window at the same time. (Personally find that to be an ugly design choice, generally.) I might try to improve how it looks later on.
- Don't remove the author part of the header.
- Script is allowed for commercial and non-commercial projects.
- Users are free to modify the script as they wish for their own projects.
Code:
#==============================================================================
#
# ** Title: ZS Item On Event & Key Item Help Window (Patch) 1.0
# Created: August 2019
# Creator: ZirconStorms
# Requires: Kadafi - Item Select Help + Galv - Use Item on Event
#
#------------------------------------------------------------------------------
#
# Script is allowed for commercial and non-commercial games.
# In the game's credits or read.me, credit "ZirconStorms".
#
#==============================================================================
# Customizable Section Begins Here.
#==============================================================================
module ZSKEYITEMHELPWINDOW
BOTTOM_SCREEN_WINDOW = true
# true changes the help window's y position to the bottom of the screen.
# false shows the help window above the Key Item selection window.
NOMSG_SWITCH = 1
# Turn the switch written above on when you show the Key Item
# window onscreen without a message.
TEXTOFFSET = 32
# Only applicable for those who have BOTTOM_SCREEN_WINDOW set to true.
# Subtracts this value to adjust the "heading" text vertically.
# It's recommended you use your heading's font size value here.
end
#==============================================================================
# Customizable Section Ends Here.
#==============================================================================
class Window_KeyItem < Window_ItemList
def update_placement
#----------
self.y = 0
@message_window.help_window.y = 0
#----------
if ZSKEYITEMHELPWINDOW::BOTTOM_SCREEN_WINDOW == true
if @message_window.y == 0
self.y = y + @message_window.height
@message_window.help_window.y = Graphics.height - @message_window.help_window.height
elsif @message_window.y <= Graphics.height / 2
self.y = 0
@message_window.help_window.y = Graphics.height - @message_window.help_window.height
else
self.y = 0
@message_window.help_window.y = Graphics.height - @message_window.help_window.height
@message_window.help_window.y -= @message_window.height if $game_switches[ZSKEYITEMHELPWINDOW::NOMSG_SWITCH] == true
end
#----------
else
if @message_window.y == 0
@message_window.help_window.y += @message_window.height
self.y += @message_window.height + @message_window.help_window.height
elsif @message_window.y <= Graphics.height / 2
self.y = Graphics.height - self.height
else
self.y += @message_window.help_window.height
@message_window.help_window.y = 0
end
#----------
end
end #update_placement
#--------------------------------------------------------------------------
alias zircon_draw_heading draw_heading
def draw_heading
zircon_draw_heading
#----------
if ZSKEYITEMHELPWINDOW::BOTTOM_SCREEN_WINDOW == false
if @message_window.y == 0
@heading.y = @message_window.height + @message_window.help_window.height + self.height
elsif @message_window.y <= Graphics.height / 2
@heading.y = @message_window.y + @message_window.height
else
@heading.y += @message_window.help_window.height
end
else
#----------
if @message_window.y == 0
@heading.y = Graphics.height - @message_window.help_window.height - ZSKEYITEMHELPWINDOW::TEXTOFFSET
elsif @message_window.y <= Graphics.height / 2
@heading.y = Graphics.height - @message_window.help_window.height - ZSKEYITEMHELPWINDOW::TEXTOFFSET
else
@heading.y = Graphics.height - @message_window.help_window.height - ZSKEYITEMHELPWINDOW::TEXTOFFSET
@heading.y -= @message_window.height if $game_switches[ZSKEYITEMHELPWINDOW::NOMSG_SWITCH] == true
end
end
end #draw_heading
#--------------------------------------------------------------------------
end #Window_KeyItem
#==============================================================================