Try pasting this in a blank above main:
CODE
#===============================================================================
# ** Item Description Addon
# Created by Jens of Zanicuud. Made exclusively for Vexus's Alive.
# Credit also ForeverZer0 since I've recycled part of his Diary script.
#===============================================================================
#===============================================================================
# ** Item_Description module
# configure here the detail window properties
#===============================================================================
module Item_Description
#items description
Descriptions = {
7 => "Some bandages. /n They are suitable to recover some damage",
8 => "Useful instrument. /n Use it carefully",
}
Detail_x = 160 #X of the detail window
Detail_y = 120 #Y of the detail window
Detail_width = 320 #Width of the detail window
Detail_height = 240 #Height of the detail window
Detail_opacity = 200 #Opacity of the detail window
Default_description = "No description available."
Detail_font_n = "Verdana" #font name
Detail_font_s = 24 #font size
Detail_font_c = Color.new(255,255,255) #font color
end
#===============================================================================
# ** Detail Window
#===============================================================================
class Window_Detail < Window_Base
#==========================================================================
# * Initialization
#==========================================================================
def initialize(item_id)
super(Item_Description::Detail_x,
Item_Description::Detail_y,
Item_Description::Detail_width,
Item_Description::Detail_height)
self.opacity = Item_Description::Detail_opacity
self.contents = Bitmap.new(width - 32, height - 32)
@item_id = item_id
@lines = []
refresh
end
#==========================================================================
# * Refresh (customized ForeverZer0 Diary Window)
#==========================================================================
def refresh
self.contents.clear
text = Item_Description::Default_description
if Item_Description::Descriptions.include?(@item_id)
text = Item_Description::Descriptions[@item_id]
end
self.contents.font.name = Item_Description::Detail_font_n
self.contents.font.size = Item_Description::Detail_font_s
# WARNING: Uses ForeverZer0 Bitmap Addon
# Divide the current entries into lines based off the text size and length.
@lines = self.contents.slice_text(text, self.contents.width)
@lines.flatten!
return if @lines.size == 0
self.contents.dispose
# Create bitmap to contain the lines.
self.contents = Bitmap.new(self.width - 32, @lines.size * 32)
self.contents.font.color = Item_Description::Detail_font_c
# Draw each line.
@lines.each_index {|i| self.contents.draw_text(0, i*32, 608, 32, @lines[i])} #i*32, 608, 32
end
end
#===============================================================================
# ** Scene_Item (modified LittleDRAGO Scene_Item)
#===============================================================================
class Scene_Item
#--------------------------------------------------------------------------
# * Aliases
#--------------------------------------------------------------------------
alias joz_update update
#--------------------------------------------------------------------------
# * Cancel Combination (aliased)
#--------------------------------------------------------------------------
def remove_detail
@detail_window.dispose
@detail_window = nil
@invcom_window[0].active = true
@invcom_window[0].visible = true
end
#--------------------------------------------------------------------------
# * Update Command Window
#--------------------------------------------------------------------------
def item_detail
@detail_window = Window_Detail.new(@item.id)
@detail_window.z = 9999
@invcom_window[0].active = false
@invcom_window[0].visible = false
return
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
joz_update
if @detail_window != nil
if Input.trigger?(Input::B)
remove_detail
end
end
end
end
Instructions are in the first few lines.
It works exactly as ForeverZer0's Diary script.
This script won't work if you haven't his Diary script implemented (I know you have it, Vex...)
Jens