[Thảo Luận] [Hỏi Script] Một số thắc mắc
Xin lỗi vì lại hỏi ạ.
1. XS - Item Mini
Em mù Script nên ai dó có thể sửa giúp em sao để cái dòng Item -> Vật phẩm và bỏ cái bảng công dụng khoanh đỏ đi được không ạ ? [hoặc đòi hỏi hơn là khi chọt vào vật phẩm thì nó mới hiện ra công dụng thôi ạ]
Script : [Cả Script và Script Core]

2.TheoAllen - Custom Title Command
Em cần hướng dẫ cụ thể về cách dùng Script này.
Trước em dã sử dụng rồi, chuẩn bị đầy đủ Graphic rồi quăng vào mục System mà vẫn không có gì thay đổi. Có lẽ sai ở kích thước ảnh hay cách dùng. Mong được chỉ dẫn.
Xin vô cùng cảm ơn trước ạ.
1. XS - Item Mini
Em mù Script nên ai dó có thể sửa giúp em sao để cái dòng Item -> Vật phẩm và bỏ cái bảng công dụng khoanh đỏ đi được không ạ ? [hoặc đòi hỏi hơn là khi chọt vào vật phẩm thì nó mới hiện ra công dụng thôi ạ]
Script : [Cả Script và Script Core]
#==============================================================================
# XaiL System - Core
# Author: Nicke
# Created: 07/01/2012
# Edited: 08/10/2013
# Version: 2.1f
#==============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#
# Core script for XaiL System.
# Caution! This needs to be located before any other XS scripts.
#
# *** Only for RPG Maker VX Ace. ***
#==============================================================================
($imported ||= {})["XAIL-XS-CORE"] = true
module Colors
#--------------------------------------------------------------------------#
# * Colors
#--------------------------------------------------------------------------#
White = Color.new(255,255,255)
LightRed = Color.new(255,150,150)
LightGreen = Color.new(150,255,150)
LightBlue = Color.new(150,150,255)
DarkYellow = Color.new(225,225,20)
Alpha = Color.new(0,0,0,128)
AlphaMenu = 100
end
module XAIL
module CORE
#--------------------------------------------------------------------------#
# * Settings
#--------------------------------------------------------------------------#
# Graphics.resize_screen(width, height )
Graphics.resize_screen(544,416)
# FONT DEFAULTS:
Font.default_name = ["Exotic"]
Font.default_size = 24
Font.default_bold = false
Font.default_italic = false
Font.default_shadow = true
Font.default_outline = true
Font.default_color = Colors::White
Font.default_out_color = Colors::Alpha
# USE_TONE = true/false:
# Window tone for all windows ingame. Default: true.
USE_TONE = false
# SAVE
SAVE_MAX = 20 # Default 16.
SAVE_FILE_VIS = 4 # Default 4.
# JAPANESE = true/false
JAPANESE = false
end
end
# *** Don't edit below unless you know what you are doing. ***
#==============================================================================#
# ** Game_System
#==============================================================================#
class Game_System
# // Method to determine japanese game.
def japanese? ; return XAIL::CORE::JAPANESE ; end
end
#==============================================================================#
# ** String
#==============================================================================#
class String
def to_class(parent = Kernel)
# // Method to convert string to class.
chain = self.split "::"
klass = parent.const_get chain.shift
return chain.size < 1 ? (klass.is_a?(Class) ? klass : nil) : chain.join("::").to_class(klass)
rescue
nil
end
def cap_words
# // Method to capitalize every word.
self.split(' ').map {|w| w.capitalize }.join(' ')
end
def slice_char(char)
# // Method to slice char.
self.split(char).map {|w| w.sub(char, " ") }.join(" ")
end
end
#==============================================================================#
# ** Vocab
#==============================================================================#
class << Vocab
def xparam(id)
# // Method to return xparam name.
case id
when 0 ; "Hit Chance"
when 1 ; "Evasion"
when 2 ; "Critical Chance"
when 3 ; "Critical Evasion"
when 4 ; "Magic Evasion"
when 5 ; "Magic Reflection"
when 6 ; "Counter Attack"
when 7 ; "HP Regeneration"
when 8 ; "MP Regeneration"
when 9 ; "TP Regeneration"
end
end
end
#==============================================================================
# ** Sound
#==============================================================================
class << Sound
def play(name, volume, pitch, type = :se)
# // Method to play a sound. If specified name isn't valid throw an error.
case type
when :se ; RPG::SE.new(name, volume, pitch).play rescue valid?(name)
when :me ; RPG::ME.new(name, volume, pitch).play rescue valid?(name)
when :bgm ; RPG::BGM.new(name, volume, pitch).play rescue valid?(name)
when :bgs ; RPG::BGS.new(name, volume, pitch).play rescue valid?(name)
end
end
def valid?(name)
# // Method to raise error if specified sound name is invalid.
msgbox("Error. Unable to find sound file: " + name)
exit
end
end
#==============================================================================
# ** DataManager
#==============================================================================
class << DataManager
def savefile_max
# // Method override, save file max.
return XAIL::CORE::SAVE_MAX
end
end
#==============================================================================
# ** SceneManager
#==============================================================================
class << SceneManager
def call_ext(scene_class, args = nil)
# // Method to call a scene with arguments.
@stack.push(@scene)
@scene = scene_class.new(args)
end
end
#==============================================================================
# ** Scene_File
#==============================================================================
class Scene_File < Scene_MenuBase
def visible_max
# // Method override, visible_max for save files.
return XAIL::CORE::SAVE_FILE_VIS
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# Importing font fix that will remove weird characters.
# Adding new methods such as new gauge, actor param, font text, icon drawing,
# big icon drawing and a line with a shadow.
#==============================================================================
class Window_Base < Window
# // Importing Custom font fix. (Credit Lone Wolf).
alias :process_normal_character_vxa :process_normal_character
def process_normal_character(c, pos)
return unless c >= ' '
process_normal_character_vxa(c, pos)
end unless method_defined? :process_normal_character
def draw_text_ex_no_reset(x, y, text)
# // Method to draw ex text without resetting the font.
text = convert_escape_characters(text)
pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
process_character(text.slice!(0, 1), text, pos) until text.empty?
end
alias xail_core_winbase_upt_tone update_tone
def update_tone(*args, &block)
# // Method to change tone of the window.
return unless XAIL::CORE::USE_TONE
xail_core_winbase_upt_tone(*args, &block)
end
def draw_gauge_ex(x, y, width, height, rate, color1, color2)
# // Method to draw a gauge.
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
contents.fill_rect(x, gauge_y, width + 1, height + 1, Color.new(255,255,255,64))
contents.fill_rect(x, gauge_y, width, height, Color.new(0,0,0,100))
contents.gradient_fill_rect(x, gauge_y, fill_w, height, color1, color2)
end
def draw_actor_param_gauge(actor, x, y, width, param_id, font, size, bar_color1, bar_color2, txt_color1, txt_color2)
# // Method to draw actor parameters with a gauge.
case param_id
when 2 ; param_rate = actor.param(2) / actor.param_max(2).to_f
when 3 ; param_rate = actor.param(3) / actor.param_max(3).to_f
when 4 ; param_rate = actor.param(4) / actor.param_max(4).to_f
when 5 ; param_rate = actor.param(5) / actor.param_max(5).to_f
when 6 ; param_rate = actor.param(6) / actor.param_max(6).to_f
when 7 ; param_rate = actor.param(7) / actor.param_max(7).to_f
end
contents.font.name = font
contents.font.size = size
contents.font.bold = true
contents.font.shadow = false
draw_gauge_ex(x, y - 14, width, 20, param_rate, bar_color1, bar_color2)
contents.font.color = txt_color1
draw_text(x + 10, y, 120, line_height, Vocab::param(param_id))
contents.font.color = txt_color2
draw_text(x + width - 38, y, 36, line_height, actor.param(param_id), 2)
reset_font_settings
end
def draw_actor_xparam_gauge(actor, x, y, width, xparam_id, font, size, bar_color1, bar_color2, txt_color1, txt_color2)
# // Method to draw actor xparameters with a gauge.
case xparam_id
when 0
xparam_rate = actor.xparam(0) / 100.to_f
xparam_name = Vocab.xparam(0)
when 1
xparam_rate = actor.xparam(1) / 100.to_f
xparam_name = Vocab.xparam(1)
when 2
xparam_rate = actor.xparam(2) / 100.to_f
xparam_name = Vocab.xparam(2)
when 3
xparam_rate = actor.xparam(3) / 100.to_f
xparam_name = Vocab.xparam(3)
when 4
xparam_rate = actor.xparam(4) / 100.to_f
xparam_name = Vocab.xparam(4)
when 5
xparam_rate = actor.xparam(5) / 100.to_f
xparam_name = Vocab.xparam(5)
when 6
xparam_rate = actor.xparam(6) / 100.to_f
xparam_name = Vocab.xparam(6)
when 7
xparam_rate = actor.xparam(7) / 100.to_f
xparam_name = Vocab.xparam(7)
when 8
xparam_rate = actor.xparam(8) / 100.to_f
xparam_name = Vocab.xparam(8)
when 9
xparam_rate = actor.xparam(9) / 100.to_f
xparam_name = Vocab.xparam(9)
end
contents.font.name = font
contents.font.size = size
contents.font.bold = true
contents.font.shadow = false
draw_gauge_ex(x, y - 14, width, 20, xparam_rate, bar_color1, bar_color2)
contents.font.color = txt_color1
draw_text(x + 10, y, 120, line_height, xparam_name)
contents.font.color = txt_color2
draw_text(x + width - 38, y, 36, line_height, "#{actor.xparam(xparam_id)}%", 2)
reset_font_settings
end
def draw_line_ex(x, y, color, shadow)
# // Method to draw a horizontal line with a shadow.
line_y = y + line_height / 2 - 1
contents.fill_rect(x, line_y, contents_width, 2, color)
line_y += 1
contents.fill_rect(x, line_y, contents_width, 2, shadow)
end
def draw_box(x, y, width, height, color, shadow)
# // Method to draw a box with shadow.
contents.fill_rect(x, y, width, height, color)
x += 1
y += 1
contents.fill_rect(x, y, width, height, shadow)
end
def draw_vertical_line_ex(x, y, color, shadow)
# // Method to draw a vertical line with a shadow.
line_x = x + line_height / 2 - 1
contents.fill_rect(line_x, y, 2, contents_height, color)
line_x += 1
contents.fill_rect(line_x, y, 2, contents_height, shadow)
end
def draw_icons(icons, alignment, x = 0, y = 0, offset_icon = [])
# // Method to draw icons in a horizonal or vertical alignment.
icons.each {|icon|
next if icon.nil?
# // If included in offset do extra spacing.
offset_icon.each {|offset|
if icon == offset
y += line_height * 1 if alignment == :vertical
x += line_height * 1 if alignment == :horizontal
end
}
draw_icon(icon.nil? ? nil : icon, x.nil? ? 0 : x, y.nil? ? 0 : y) rescue nil
y += line_height if alignment == :vertical
x += line_height if alignment == :horizontal
}
end
def draw_big_icon(icon, x, y, width, height, opacity = 255)
# // Method to draw a big icon.
bitmap = Cache.system("Iconset")
rect = Rect.new(icon % 16 * 24, icon / 16 * 24, 24, 24)
rect2 = Rect.new(x, y, width, height)
contents.stretch_blt(rect2, bitmap, rect, opacity)
end
def draw_font_text(text, x, y, width, alignment, font, size, color, bold = true, shadow = true)
# // Method to draw font text.
contents.font.name = font
contents.font.size = size
contents.font.color = color
contents.font.bold = bold
contents.font.shadow = shadow
contents.font.out_color = Color.new(0,0,0,255)
draw_text(x, y, width, calc_line_height(text), text, alignment)
reset_font_settings
end
def draw_font_text_ex(text, x, y, font, size, color, bold = true, shadow = true)
# // Method to draw font text ex.
contents.font.name = font
contents.font.size = size
contents.font.color = color
contents.font.bold = bold
contents.font.shadow = shadow
contents.font.out_color = Color.new(0,0,0,255)
text = convert_escape_characters(text)
pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
process_character(text.slice!(0, 1), text, pos) until text.empty?
reset_font_settings
end
end
#==============================================================================#
# ** Window_Selectable
#------------------------------------------------------------------------------
# Adding support for pageleft and pageright for window selectable.
#==============================================================================#
class Window_Selectable < Window_Base
def cursor_pageright ; end
def cursor_pageleft ; end
alias xail_core_winselect_process_cursor_move process_cursor_move
def process_cursor_move(*args, &block)
# // Method to process cursor movement.
xail_core_winselect_process_cursor_move(*args, &block)
cursor_pageright if !handle?(:pageright) && Input.trigger?(:RIGHT)
cursor_pageright if !handle?(:pageleft) && Input.trigger?(:LEFT)
end
alias xail_core_winselect_process_handling process_handling
def process_handling(*args, &block)
# // Method to process handling.
xail_core_winselect_process_handling(*args, &block)
return process_pageright if handle?(:pageright) && Input.trigger?(:RIGHT)
return process_pageleft if handle?(:pageleft) && Input.trigger?(:LEFT)
end
def process_pageright
# // Method to process page right.
Sound.play_cursor
Input.update
deactivate
call_handler(:pageright)
end
def process_pageleft
# // Method to process page left.
Sound.play_cursor
Input.update
deactivate
call_handler(:pageleft)
end
end
#==============================================================================#
# ** Window_Icon
#------------------------------------------------------------------------------
# New Window :: Window_Icon - A window for drawing icon(s).
#==============================================================================#
class Window_Icon < Window_Base
attr_accessor :enabled
attr_accessor :alignment
def initialize(x, y, window_width, hsize)
# // Method to initialize the icon window.
super(0, 0, window_width, window_height(hsize))
@icons = []
@index = 0
@enabled = true
@alignment = 0
refresh
end
def window_height(hsize)
# // Method to return the height.
fitting_height(hsize)
end
def refresh
# // Method to refresh the icon window.
contents.clear
end
def draw_cmd_icons(icons, index)
# // Draw all of the icons.
return if !@enabled
count = 0
for i in icons
align = 0
x = 110
next if i[index].nil?
case @alignment
when 1, 2 ; align = -110
end
draw_icon(i[index], x + align, 24 * count)
count += 1
break if (24 * count > height - 24)
end
end
end
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# Adding check item method to return a item based on the type.
#==============================================================================
class Game_Party < Game_Unit
def check_item?(item, type)
# // Method to return a item based on the type.
case type
when :items ; $data_items[item]
when :weapons ; $data_weapons[item]
when :armors ; $data_armors[item]
when :gold ; item
when :exp ; item
end
end
end
#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
# Adding methods to check for comments on events.
#==============================================================================
class Game_Event < Game_Character
def comment?(comment)
# // Method to check if comment is included in event.
unless empty? or @list.nil?
for evt in @list
if evt.code == 108 or evt.code == 408
if evt.parameters[0].include?(comment)
return true
end
end
end
end
return false
end
def comment_int?(comment)
# // Method to check for a integer in event.
unless empty? or @list.nil?
for evt in @list
if evt.code == 108 or evt.code == 408
if evt.parameters[0] =~ /<#{comment}:[ ]?(\d*)>?/
return ($1.to_i > 0 ? $1.to_i : 0)
end
end
end
end
end
def comment_string?(comment)
# // Method to check for a string in event.
unless empty? or @list.nil?
for evt in @list
if evt.code == 108 or evt.code == 408
if evt.parameters[0] =~ /<#{comment}:[ ]?(\w*)>?/
return $1.to_s
end
end
end
end
end
end # END OF FILE
#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#
#==============================================================================
# XaiL System - Item Mini
# Author: Nicke
# Created: 14/12/2012
# Edited: 20/12/2012
# Version: 1.0b
#==============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#==============================================================================
# Requires: XS - Core Script.
#==============================================================================
#
# The scripts will change the item scene to a more simple scene removing the
# help and category window completely.
#
# You can edit a few settings below such as diplaying a border below each
# item or determine if you wish to show the item amount etc.
#
# Categories are included but optiononal and can be changed ingame using
# the left or right button.
#
# *** Only for RPG Maker VX Ace. ***
#==============================================================================
($imported ||= {})["XAIL-ITEM-MINI"] = true
module XAIL
module ITEM_MINI
#--------------------------------------------------------------------------#
# * Settings
#--------------------------------------------------------------------------#
# Enable/disable showing item number.
# SHOW_ITEM_NUMBER = true/false
SHOW_ITEM_NUMBER = true
# Enable/disable showing a border under each item.
# SHOW_BORDER = true/false
SHOW_BORDER = true
# Enable/disable showing the description window.
# SHOW_DESCRIPTION = true/false
SHOW_DESCRIPTION = true
# Enable/disable showing categories.
# If enabled you can change the category using either left or right
# button ingame.
# SHOW_CATEGORY = true/false
SHOW_CATEGORY = true
# Label for category. Only in use if SHOW_CATEGORY is set to true.
# CATEGORY_LABEL = string
CATEGORY_LABEL = ""
# Enable/disable overriding category names.
# If disabled it will use the default category names.
# CATEGORY_NAMES = true/false
# CATEGORIES = [string, string, string...]
CATEGORY_NAMES = false
CATEGORIES = ["Item", "Weapons", "Armor", "Key item", "All"]
end
end
# *** Don't edit below unless you know what you are doing. ***
#==============================================================================#
# ** Error Handler
#==============================================================================#
unless $imported["XAIL-XS-CORE"]
# // Error handler when XS - Core is not installed.
msg = "The script %s requires the latest version of XS - Core in order to function properly."
name = "XS - Item Mini"
msgbox(sprintf(msg, name))
exit
end
#==============================================================================#
# ** Window_ItemList
#==============================================================================#
class Window_ItemList < Window_Selectable
def col_max
# // Method to determine col max.
return 1
end
def include?(item)
# // Method to include all usable items to the item window.
return item.is_a?(RPG::Item) || item.is_a?(RPG::Weapon) || item.is_a?(RPG::Armor) unless XAIL::ITEM_MINI::SHOW_CATEGORY
case @category
when :item
item.is_a?(RPG::Item) && !item.key_item?
when :weapon
item.is_a?(RPG::Weapon)
when :armor
item.is_a?(RPG::Armor)
when :key_item
item.is_a?(RPG::Item) && item.key_item?
when :all
item.is_a?(RPG::Item) || item.is_a?(RPG::Weapon) || item.is_a?(RPG::Armor)
else
false
end
end
def draw_item(index)
# // Method to draw a item.
item = @data[index]
if item
rect = item_rect(index)
rect.width -= 4
draw_item_name_mini(item, rect.x, rect.y, enable?(item))
draw_line_ex(rect.x, rect.y + 12, Color.new(255,255,255,100), Color.new(0,0,0,0)) if XAIL::ITEM_MINI::SHOW_BORDER
draw_item_number(rect, item) if $game_party.item_number(item) > 1 and XAIL::ITEM_MINI::SHOW_ITEM_NUMBER
end
end
def draw_item_number(rect, item)
# // Method to draw item number.
rect.x += 4
n = $game_party.item_number(item) > 9 ? "x%2d" : "x0%d"
draw_text(rect, sprintf(n, $game_party.item_number(item)), 0)
end
def draw_item_name_mini(item, x, y, enabled = true, width = 172)
# // Method to draw item name mini.
return unless item
draw_icon(item.icon_index, contents_width - 26, y, enabled)
change_color(normal_color, enabled)
if XAIL::ITEM_MINI::SHOW_ITEM_NUMBER
x += 26
name = " » " + item.name
else
x += 4
name = item.name
end
draw_text(x, y, width, line_height, name)
end
end
#==============================================================================
# ** Window_Item_Mini_Help
#==============================================================================
class Window_Item_Mini_Help < Window_Help
def initialize
# // Method to initialize item mini help window.
super(1)
end
def refresh
# // Method to refresh item mini help window.
contents.clear
create_contents
draw_font_text(@text, 0, 0, contents_width, 0, "Verdana", 16, Color.new(255,255,255))
end
end
#==============================================================================#
# ** Window_Item_Mini_Category
#==============================================================================#
class Window_Item_Mini_Category < Window_Base
def initialize(x, y, width, height)
# // Method to initialize item mini category window.
super(x, y, width, height)
end
def set_text(text)
# // Method to set text.
if text != @text
@text = text
refresh
end
end
def refresh
# // Method to refresh item mini category window.
contents.clear
draw_font_text(@text, 0, 0, contents_width, 1, "Verdana", 20, Color.new(255,255,255))
end
end
#==============================================================================#
# ** Scene_ItemBase
#==============================================================================#
class Scene_ItemBase < Scene_MenuBase
def start
# // Method to start the item base scene.
super
create_actor_window
create_background
end
def terminate
# // Method to terminate the item base scene.
super
dispose_background
end
end
#==============================================================================#
# ** Scene_Item
#==============================================================================#
class Scene_Item < Scene_ItemBase
def start
# // Method to start the item scene.
super
create_help_window if XAIL::ITEM_MINI::SHOW_DESCRIPTION
create_item_window
create_category_window if XAIL::ITEM_MINI::SHOW_CATEGORY
activate_item_window
end
def create_help_window
# // Method to create the help window.
@help_window = Window_Item_Mini_Help.new
@help_window.width = Graphics.width / 1.2
@help_window.x = (Graphics.width - @help_window.width) / 2
@help_window.y = (Graphics.height - @help_window.height) - 46
@help_window.back_opacity = 200
@help_window.z = 3
@help_window.viewport = @viewport
end
def create_item_window
# // Method to create the item window.
x = (Graphics.width / 2) / 2
y = (Graphics.height / 2) / 4
w = Graphics.width / 2
h = Graphics.height / 1.5
@item_window = Window_ItemList.new(x, y, w, h)
@item_window.z = 2
@item_window.back_opacity = 200
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@item_window.set_handler(:ok, method(:on_item_ok))
@item_window.set_handler(:cancel, method(:return_scene))
if XAIL::ITEM_MINI::SHOW_CATEGORY
@item_window.set_handler(:pageright, method(:next_category))
@item_window.set_handler(:pageleft, method(:prev_category))
end
@item_window.select_last
end
def create_category_window
# // Method to create category window.
w = Graphics.width / 2.5
x = (Graphics.width - w) / 2
y = 12
h = 48
@category_window = Window_Item_Mini_Category.new(x, y, w, h)
@category_window.back_opacity = 200
@category_window.viewport = @viewport
@category_window.z = 1
set_default_category
end
def set_default_category
# // Method to define categories and default one.
@categories = [:item, :weapon, :armor, :key_item, :all]
@category_pos = 0
@item_window.category = :item
update_category
end
def next_category
# // Method to set next category.
@category_pos != @categories.size - 1 ? @category_pos += 1 : @category_pos = 0
update_category
end
def prev_category
# // Method to set previous category.
@category_pos != 0 ? @category_pos -= 1 : @category_pos = @categories.size - 1
update_category
end
def update_category
# // Method to update category.
@item_window.category = @categories[@category_pos]
@item_window.activate
@item_window.select_last
# // Check if category names is true, if so, override default names.
label = XAIL::ITEM_MINI::CATEGORY_LABEL
if XAIL::ITEM_MINI::CATEGORY_NAMES
category = "#{label} #{XAIL::ITEM_MINI::CATEGORIES[@category_pos]}"
else
category = "#{label} #{@categories[@category_pos].to_s.capitalize.sub("_", " ")}"
end
@category_window.set_text(category)
end
end # END OF FILE
#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#

2.TheoAllen - Custom Title Command
Em cần hướng dẫ cụ thể về cách dùng Script này.
Trước em dã sử dụng rồi, chuẩn bị đầy đủ Graphic rồi quăng vào mục System mà vẫn không có gì thay đổi. Có lẽ sai ở kích thước ảnh hay cách dùng. Mong được chỉ dẫn.
Xin vô cùng cảm ơn trước ạ.
Comments
Belf thử search trong đó Weight với Height là ra thôi mà!
Đã tìm mà không thấy.
Em xem ở dòng 767 có hàm này:
[php]
def create_category_window
# // Method to create category window.
w = Graphics.width / 2.5
x = (Graphics.width - w) / 2
y = 12
h = 48
@category_window = Window_Item_Mini_Category.new(x, y, w, h)
@category_window.back_opacity = 200
@category_window.viewport = @viewport
@category_window.z = 1
set_default_category
end
[/php]
Trong đó w = width - chiều ngang, h = height - chiều cao và tọa độ x, y
2. Cái TheoAllen - Custom Title Command có Demo cơ mà em. Em xem vẫn chưa rõ phần nào?
Còn Custom Title thì em đã làm hoàn toàn đúng theo Demo mà hình như Script nó vẫn không hoạt động ấy ạ. Em thì không biết sai chỗ nào luôn.
Nó là cái hàm ở ngay trên đó em. Cách sửa tương tự cái kia.
[php]
def create_item_window
# // Method to create the item window.
x = (Graphics.width / 2) / 2
y = (Graphics.height / 2) / 4
w = Graphics.width / 2
h = Graphics.height / 1.5
@item_window = Window_ItemList.new(x, y, w, h)
@item_window.z = 2
@item_window.back_opacity = 200
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@item_window.set_handler(:ok, method(:on_item_ok))
@item_window.set_handler(:cancel, method(:return_scene))
if XAIL::ITEM_MINI::SHOW_CATEGORY
@item_window.set_handler(:pageright, method(:next_category))
@item_window.set_handler(:pageleft, method(:prev_category))
end
@item_window.select_last
end
[/php]
Có thể bị xung đột script em ạ.
Ví dụ như cái script này này. Anh thấy nó cũng tác động vào thì phải.
Em đặt cái script Custom Title Command xuống dòng cuối cùng (vẫn phải trước script Main) thử xem sao.
Như vậy thì nó sẽ là script được áp dụng cuối cùng, nó sẽ viết đè lên những thằng script trước đó.
Chỉnh lại màu của Window trong Database là được.