I downloaded a unique speech bubble script from paradog's website and I am having a slight issue with it.
While it works great in action, the "tail" of the speech bubbles won't cooperate.
When the speech bubble is near the bottom of the screen, the tail will appear on the top of the box rather than on the bottom.
Here is a screen and a copy of the script.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi2.photobucket.com%2Falbums%2Fy26%2FJunkmanSP%2FSpeechbubble.jpg&hash=98b3df3baf8302d51c879e2be084cf778eae1531)
working fine
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi2.photobucket.com%2Falbums%2Fy26%2FJunkmanSP%2Fspeechbubbleproblem.jpg&hash=dfa44935d84ff281d1bdb895226e9407436b6e95)
slight problem
[spoiler]
#==============================================================================
#????????????????ver. 2.01???
#??Script by ???
#??http://2d6.parasite.jp/
#------------------------------------------------------------------------------
# ????????????
# ???????(????)-top??(????)-under??
# ?Graphics/Windowskins???????????????????????
#------------------------------------------------------------------------------
#
# ????????????
# ?????????????????$mes_id??????ID????????
# ?????????????????????????
# ????? $mes_id=4 ?
# ID?-1????????????0??????????
# nil???""???????????????????????
# ??????????????????????????
# ????????????????????????????
# ????????????
#
# ?????????????
# ?????????????????$mes_name?????????????
# ??????????????
# ????? $mes_name="?????" ?
# ???? \N[n] ????????\?\\??????????
# ????? $mes_name="\\N[1]" $mes_name="\\N[\\V[1]]"?
# ""???nil????????????????
#
# ????????????????????????????
# ?$mes_id=(ID) + $mes_name="??" ??????? ? ???????
# ?$mes_id=(ID) + $mes_name="" ??????? (????)
# ?$mes_id=nil + $mes_name="??" ??????????? ? ???????
# ?$mes_id=nil + $mes_name="" ??????????? (????)
#
# ?????????????????
# ?????????????????$mes_speed???????????
# 0????????????????
# ????? $mes_speed = 1 ?
#
# ????????????
# ?????????????????$mes_auto???????????
# ???????????????????????????
# nil?????????????????????
#
# ????????
# \I[?????] ???????
# ?Graphics/Icons????????????? ????\I[001-Weapon01] ?
# \S[n] ????????????
# \size[n] ??????????
#
#==============================================================================
module FUKI
# ??????
# ????????????????????""?
FUKI_SKIN_NAME = "001-Blue01" # ????????
NAME_SKIN_NAME = "001-Blue01" # ????????
# ???????
MES_FONT_SIZE = 18 # ????
NAME_FONT_SIZE = 14 # ???????
# ???
#? Color.new(0, 0, 0, 0)?????????????????? ?
FUKI_COLOR = Color.new(255, 255, 255, 255) # ?????????
NAME_COLOR = Color.new(255, 255, 255, 255) # ???????
# ?????????
FUKI_OPACITY = 100 # ?????????
MES_OPACITY = 255 # ?????????????
NAME_OPACITY = 255 # ???????
# ????????????
NAME_SHIFT_X = 0 # ???
NAME_SHIFT_Y = 16 # ???
# ???????????????????
# ????????????????? true / false ?
POS_FIX = true
# ??????????????????
# ????????????????????????????? true ???
CORNER_SHIFT = false
SHIFT_PIXEL = 4 # true???????????
# ????????????
CHARACTOR_HEIGHT = 48
# ??????????????
POP_SHIFT_TOP = -32 # ?????????
POP_SHIFT_UNDER = -16 # ?????????
# ?????????????????????0??????
# $mes_speed?????????????????????
MES_SPEED = 0
# ???????????????
MES_SKIP = true #? true??? / false??? ?
# ??????????????????????Input::??????
#????????????????????????????????????
MES_SKIP_KEY = Input::A
# ???????????????????ID
# ?????????????????????????????ON???????
# ????????????????????
NO_MES_SKIP_SWITCH = 999
end
#==============================================================================
# ? Window_Message
#------------------------------------------------------------------------------
# ?????????????????????
#==============================================================================
class Window_Message < Window_Selectable
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias alias_para_fuki_initialize initialize
def initialize
# ??????????
alias_para_fuki_initialize
# ??????
@w = 0
@h = 0
@wait = 0
@dx = 0
@dy = 0
@dh = 0
$mes_speed = FUKI::MES_SPEED
end
#--------------------------------------------------------------------------
# ? ????????????????
#--------------------------------------------------------------------------
alias alias_para_fuki_reset_window reset_window
def reset_window
# ??????????
alias_para_fuki_reset_window
self.back_opacity = FUKI::MES_OPACITY
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
super
# ???????????????????
if @tale != nil
pos = get_fuki_pos(self.width, self.height)
self.x = pos[0]
self.y = pos[1]
tale_pos = get_tale_pos
@tale.x = tale_pos[0]
@tale.y = tale_pos[1]
if @name_win != nil
name_height = FUKI::NAME_FONT_SIZE
@name_win.x = self.x + FUKI::NAME_SHIFT_X
@name_win.y = self.y - name_height - 16 + FUKI::NAME_SHIFT_Y
@name_contents.x = @name_win.x + 12
@name_contents.y = @name_win.y + 8
end
end
# ?????????
if mes_skip?
self.contents_opacity = 255
if @name_win != nil
@name_win.opacity = 255
end
if @tale != nil
@tale.opacity = 25
end
if @input_number_window != nil
@input_number_window.contents_opacity = 255
end
@fade_in = false
end
# ?????????
if @fade_in
self.contents_opacity += 24
if @name_win != nil
@name_win.opacity += 24
end
if @tale != nil
@tale.opacity += 24
end
if @input_number_window != nil
@input_number_window.contents_opacity += 24
end
if self.contents_opacity == 255
@fade_in = false
end
return
end
# ???????????
if @contents_drawing
# ???????
refresh_drawtext
return
end
# ????????
if @input_number_window != nil
@input_number_window.update
# ??
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_variables[$game_temp.num_input_variable_id] =
@input_number_window.number
$game_map.need_refresh = true
# ????????????
@input_number_window.dispose
@input_number_window = nil
terminate_message
end
return
end
# ????????????
if @contents_showing_end
# ???????????
if mes_skip?
# ??????????????????????????
if $game_temp.choice_max == 0
terminate_message
# ???????
del_fukidasi
return
end
end
# ??????
if @mes_auto != nil
if @mes_auto <= 0
terminate_message
# ???????
del_fukidasi
@mes_auto = nil
else
@mes_auto -= 1
end
end
# ?????????????????????
# ????????????
if $game_temp.choice_max == 0 and @tale == nil
self.pause = true
else
self.pause = false
end
# ?????
if Input.trigger?(Input::B)
if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
$game_system.se_play($data_system.cancel_se)
$game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
terminate_message
end
end
# ??
if Input.trigger?(Input::C) and $mes_auto == nil
if $game_temp.choice_max > 0
$game_system.se_play($data_system.decision_se)
$game_temp.choice_proc.call(self.index)
end
terminate_message
# ???????
del_fukidasi
end
return
end
# ??????????????????????????????
if @fade_out == false and $game_temp.message_text != nil
@contents_showing = true
$game_temp.message_window_showing = true
reset_window
refresh_create
if @name_win != nil
@name_win.opacity = 0
end
if @tale != nil
@tale.opacity = 0
end
Graphics.frame_reset
self.visible = true
self.contents_opacity = 0
if @input_number_window != nil
@input_number_window.contents_opacity = 0
end
@fade_in = true
@mes_auto = $mes_auto
return
end
# ????????????????????????????
if self.visible
@fade_out = true
self.opacity -= 48
if @name_win != nil
@name_win.opacity -= 48
end
if @tale != nil
@tale.opacity -= 48
end
if self.opacity == 0
self.visible = false
@fade_out = false
$game_temp.message_window_showing = false
del_fukidasi
end
return
end
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias alias_para_fuki_terminate_message terminate_message
def terminate_message
# ??????????
alias_para_fuki_terminate_message
@contents_showing_end = false
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def update_cursor_rect
if @index >= 0
n = $game_temp.choice_start + @index
font_size = self.contents.font.size
self.cursor_rect.set(8, n*(font_size+10)-5, @cursor_width, (font_size+10))
else
self.cursor_rect.empty
end
end
#--------------------------------------------------------------------------
# ? ?????????????
#--------------------------------------------------------------------------
def mes_skip?
if FUKI::MES_SKIP == true and Input.repeat?(FUKI::MES_SKIP_KEY) and $game_switches[FUKI::NO_MES_SKIP_SWITCH] == false
return true
else
return false
end
end
#--------------------------------------------------------------------------
# ? ????????????????
#--------------------------------------------------------------------------
def refresh_create
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = FUKI::MES_FONT_SIZE
# ???????????
get_windowsize
w = @w + 32 + 8
h = @h + 26
# ????????????
set_fukidasi(self.x, self.y, w, h)
# ??????????
set_namewindow
# ??????????????
@dx = @dy = @dh = @max_font_h = 0
@cursor_width = 0
@contents_drawing = true
# ?????????????
@mes_speed = $mes_speed
# ???????????
self.contents.font.size = FUKI::MES_FONT_SIZE
@max_font_h = self.contents.font.size
# ????
refresh_drawtext
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def refresh_drawtext
if $game_temp.message_text != nil
# ??????????????
if mes_skip?
# ????????????????
while $game_temp.message_text != ""
draw_massage
end
# ??????????0??
elsif @mes_speed == 0
# ????????????????????????????????
while $game_temp.message_text != "" and @mes_speed == 0
draw_massage
end
else
if @wait > 0
@wait -= 1
elsif @wait == 0
# ????
draw_massage
@wait = @mes_speed
end
end
end
# ????
if $game_temp.message_text == ""
draw_opt_text
@contents_showing_end = true
@contents_drawing = false
end
end
#--------------------------------------------------------------------------
# ? ???????????
#--------------------------------------------------------------------------
def get_windowsize
x = y = 0
@h = @w = 0
max_font_h = self.contents.font.size
@cursor_width = 0
# ???????????
if $game_temp.choice_start == 0
x = 16
end
# ???????????????
if $game_temp.message_text != nil
text = $game_temp.message_text.clone
# ??????
begin
last_text = text.clone
text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
end until text == last_text
text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
# ????"\\\\" ? "\000" ???
text.gsub!(/\\\\/) { "\000" }
# "\\C" ? "\001" ??"\\G" ? "\002" ???
text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001" }
text.gsub!(/\\[Gg]/) { "\002" }
# "\\I" ? "\003" ???
text.gsub!(/\\[Ii]\[(.*?)\]/) { "\003[#{$1}]" }
# "\\S" ? "\004" ???
text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\004[#{$1}]" }
# "\\size" ? "\005" ???
text.gsub!(/\\size\[([0-9]+)\]/) { "\005[#{$1}]" }
# c ? 1 ????? (????????????????)
while ((c = text.slice!(/./m)) != nil)
# \\ ???
if c == "\000"
# ????????
c = "\\"
end
# \C[n] ??? \G ??? ??? \S[n] ???
if c == "\001" or c == "\002" or c == "\004"
# ?????
next
end
# ???????
if c == "\n"
# y ? 1 ???
y += 1
# ????????
@h += max_font_h + 10
max_font_h = 0
@w = x > @w ? x : @w
if y >= $game_temp.choice_start
@w = x + 8 > @w ? x + 8 : @w
end
x = 0
# ???????????
if y >= $game_temp.choice_start
x = 8
end
# ?????
next
end
# \I[?????] ???
if c == "\003"
text.sub!(/\[(.*?)\]/, "")
bitmap = RPG::Cache.icon($1)
# x ??????????
x += bitmap.width
# ?????
next
end
# \size[n] ???
if c == "\005"
text.sub!(/\[([0-9]+)\]/, "")
# ????????
self.contents.font.size = $1.to_i
# ???????
if self.contents.font.size > max_font_h
max_font_h = self.contents.font.size
end
end
# x ????????
x += self.contents.text_size(c).width
# ???????
if self.contents.font.size > max_font_h
max_font_h = self.contents.font.size
end
end
end
# ????????
self.contents.font.size = FUKI::MES_FONT_SIZE
# ???????
if $game_temp.num_input_variable_id > 0
digits_max = $game_temp.num_input_digits_max
number = $game_variables[$game_temp.num_input_variable_id]
@h += 1
x = digits_max * self.contents.font.size + 16
@w = x > @w ? x : @w
end
end
#--------------------------------------------------------------------------
# ? ????
#--------------------------------------------------------------------------
def draw_massage
# ???????????????
if $game_temp.message_text != nil
text = $game_temp.message_text
# ??????
begin
last_text = text.clone
text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
end until text == last_text
text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
# ????"\\\\" ? "\000" ???
text.gsub!(/\\\\/) { "\000" }
# "\\C" ? "\001" ??"\\G" ? "\002" ???
text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
text.gsub!(/\\[Gg]/) { "\002" }
# "\\I" ? "\003" ???
text.gsub!(/\\[Ii]\[(.*?)\]/) { "\003[#{$1}]" }
# "\\S" ? "\004" ???
text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\004[#{$1}]" }
# "\\size" ? "\005" ???
text.gsub!(/\\size\[([0-9]+)\]/) { "\005[#{$1}]" }
# c ? 1 ?????
if ((c = text.slice!(/./m)) != nil)
# ??????
if @dy >= $game_temp.choice_start
# ??????
@dx = 8
# ?????
font_size = self.contents.font.size
self.contents.draw_text(4+@dx, @dh, font_size, font_size, c)
# x ????????????
@dx += self.contents.text_size(c).width
# ???
while ((c = text.slice!(/./m)) != "\n")
# ?????
font_size = self.contents.font.size
self.contents.draw_text(4+@dx, @dh, font_size, font_size, c)
@max_font_h = font_size
# x ????????????
@dx += self.contents.text_size(c).width
end
if c == "\n"
# ?????????
@cursor_width = [@cursor_width, @dx].max
# ?????????????
@dh += @max_font_h + 10
@max_font_h = self.contents.font.size
@dx = 0
end
return
end
# \\ ???
if c == "\000"
# ????????
c = "\\"
end
# \C[n] ???
if c == "\001"
# ??????
text.sub!(/\[([0-9]+)\]/, "")
color = $1.to_i
if color >= 0 and color <= 7
self.contents.font.color = text_color(color)
end
return
end
# \G ???
if c == "\002"
# ????????????
if @gold_window == nil
@gold_window = Window_Gold.new
@gold_window.x = 560 - @gold_window.width
if $game_temp.in_battle
@gold_window.y = 192
else
@gold_window.y = self.y >= 128 ? 32 : 384
end
@gold_window.opacity = self.opacity
@gold_window.back_opacity = self.back_opacity
end
return
end
# ???????
if c == "\n"
# y ? 1 ???
@dy += 1
@dx = 0
# ?????????????
@dh += @max_font_h + 10
@max_font_h = 0
return
end
# \I[?????] ???
if c == "\003"
text.sub!(/\[(.*?)\]/, "")
bitmap = RPG::Cache.icon($1)
font_size = FUKI::MES_FONT_SIZE
# ???????
self.contents.blt(4+@dx, 5+@dh, bitmap, Rect.new(0, 0, bitmap.width, bitmap.height))
# x ??????????????
@dx += bitmap.width
# ???????
if self.contents.font.size > @max_font_h
@max_font_h = bitmap.height
end
return
end
# \S[n] ???
if c == "\004"
text.sub!(/\[([0-9]+)\]/, "")
# ?????????
@mes_speed = $1.to_i
return
end
# \size[n] ???
if c == "\005"
text.sub!(/\[([0-9]+)\]/, "")
c = ""
# ????????
self.contents.font.size = $1.to_i
end
# ?????
font_size = self.contents.font.size
self.contents.draw_text(4+@dx, @dh, font_size, font_size, c)
# x ????????????
@dx += self.contents.text_size(c).width
# ??????????
if self.contents.font.size > @max_font_h
@max_font_h = self.contents.font.size
end
end
end
end
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
def draw_opt_text
# ??????
if $game_temp.choice_max > 0
@item_max = $game_temp.choice_max
self.active = true
self.index = 0
end
# ???????
if $game_temp.num_input_variable_id > 0
digits_max = $game_temp.num_input_digits_max
number = $game_variables[$game_temp.num_input_variable_id]
@input_number_window = Window_InputNumber.new(digits_max)
@input_number_window.number = number
@input_number_window.x = self.x + 8
@input_number_window.y = self.y + $game_temp.num_input_start * 32
end
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def set_fukidasi(x, y, width, height)
# $mes_id ????????????????
if $mes_id == nil or $mes_id == ""
del_fukidasi
reset_window
else
# ??????????
self.pause = false
# ?????
pos = get_fuki_pos(width, height)
x = pos[0]
y = pos[1]
skin = FUKI::FUKI_SKIN_NAME != "" ? FUKI::FUKI_SKIN_NAME : $game_system.windowskin_name
# ??????????????????
self.windowskin = RPG::Cache.windowskin(skin)
self.x = x
self.y = y
self.height = height
self.width = width
self.contents.dispose
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = FUKI::FUKI_OPACITY
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = FUKI::MES_FONT_SIZE
# ???????????
if $game_system.message_frame == 0
# ?????
tale_pos = get_tale_pos
@tale = Sprite.new
case @message_position
when 0 # ?
@tale.bitmap = RPG::Cache.windowskin(skin + "-top")
@tale.x = tale_pos[0]
@tale.y = tale_pos[1]
@tale.z = self.z + 1
when 1 # ?
@tale.dispose
@tale = nil
when 2 # ?
@tale.bitmap = RPG::Cache.windowskin(skin + "-under")
@tale.x = tale_pos[0]
@tale.y = tale_pos[1]
@tale.z = self.z + 1
end
end
end
end
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
def get_fuki_pos(width, height)
# ?????????
@character = get_character($mes_id)
if @character == nil
# ?????????????????????????????
del_fukidasi
reset_window
return
end
# ????
x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - (width / 2)
# ???????????????????
if x + width > 640
x = 640 - width
elsif x < 0
x = 0
end
# ???????????
case $game_system.message_position
when 0 # ?
y = ( @character.real_y - $game_map.display_y + 64) * 32 / 128 - height - FUKI::CHARACTOR_HEIGHT + FUKI::POP_SHIFT_TOP
when 1 # ?
y = (480 - height) / 2
x = (640 - width) / 2
when 2 # ?
y = ( @character.real_y - $game_map.display_y + 64) * 32 / 128 + 32 + FUKI::POP_SHIFT_UNDER
end
#??????????????
@message_position = $game_system.message_position
# ???????????????????????
if FUKI::POS_FIX
case @message_position
when 0 # ?
if y <= 0
@message_position = 2
y = ( @character.real_y - $game_map.display_y + 64) * 32 / 128 + FUKI::POP_SHIFT_UNDER
end
when 2 # ?
if y + height >= 480
@message_position = 0
y = ( @character.real_y - $game_map.display_y + 64) * 32 / 128 - height + 32 - FUKI::CHARACTOR_HEIGHT + FUKI::POP_SHIFT_TOP
end
end
end
return [x,y]
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def get_tale_pos
case @message_position
when 0 # ?
# ????
x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16
# ???????????
if FUKI::CORNER_SHIFT
if x == 0
x = FUKI::SHIFT_PIXEL
elsif x == 640 - 32
x = 640 - 32 - FUKI::SHIFT_PIXEL
end
end
y = self.y + self.height - 16
when 1 # ?
x = nil
y = nil
when 2 # ?
# ????
x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16
# ???????????
if FUKI::CORNER_SHIFT
if x == 0
x = FUKI::SHIFT_PIXEL
elsif @tale.x == 640 - 32
x = 640 - 32 - FUKI::SHIFT_PIXEL
end
end
y = self.y - 16
end
return [x,y]
end
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
def set_namewindow
# $mes_name ???????????????????
if $mes_name == nil or $mes_name == ""
return
else
# ??????
mes_name = $mes_name
# ??????
begin
last_text = mes_name.clone
mes_name.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
end until mes_name == last_text
mes_name.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
name_width = mes_name.size / 2 * FUKI::NAME_FONT_SIZE
name_height = FUKI::NAME_FONT_SIZE
name_x = self.x + FUKI::NAME_SHIFT_X
name_y = self.y - name_height - 16 + FUKI::NAME_SHIFT_Y
# ???????????????
@name_win = Window_Base.new(name_x, name_y, name_width + 16, name_height + 16)
skin = FUKI::NAME_SKIN_NAME != "" ? FUKI::NAME_SKIN_NAME : $game_system.windowskin_name
@name_win.windowskin = RPG::Cache.windowskin(skin)
@name_win.back_opacity = FUKI::NAME_OPACITY
@name_win.z = self.z + 1
# ???window??????????????????????
@name_contents = Sprite.new
@name_contents.x = name_x + 12
@name_contents.y = name_y + 8
@name_contents.bitmap = Bitmap.new(name_width, name_height)
@name_contents.z = @name_win.z + 2
# ??????
nil_color = Color.new(0,0,0,0)
if FUKI::NAME_COLOR != nil_color
@name_contents.bitmap.font.color = FUKI::NAME_COLOR
else
@name_contents.bitmap.font.color = normal_color
end
@name_contents.bitmap.font.size = FUKI::NAME_FONT_SIZE
# ???????????
rect = @name_contents.bitmap.text_size(mes_name)
@name_win.width = rect.width + 32
# ?????
@name_contents.bitmap.draw_text(rect, mes_name)
end
end
#--------------------------------------------------------------------------
# ? ???????????????
#--------------------------------------------------------------------------
def del_fukidasi
if @tale != nil
@tale.dispose
@tale = nil
end
if @name_win != nil
@name_win.dispose
@name_win = nil
@name_contents.dispose
@name_contents = nil
end
self.opacity = 0
self.x = 80
self.width = 480
self.height = 160
self.contents.dispose
self.contents = Bitmap.new(width - 32, height - 32)
self.pause = true
end
#--------------------------------------------------------------------------
# ? ?????????
# parameter : ?????
#--------------------------------------------------------------------------
def get_character(parameter)
# ????????
case parameter
when -1 # ?????
return $game_player
when 0 # ??????
events = $game_map.events
return events == nil ? nil : events[$active_event_id]
else # ???????
events = $game_map.events
return events == nil ? nil : events[parameter]
end
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def normal_color
# ??????????????
if $mes_id != nil and $mes_id != ""
nil_color = Color.new(0,0,0,0)
if FUKI::FUKI_COLOR != nil_color
color = FUKI::FUKI_COLOR
else
color = super
end
return color
else
# ?????????????
return super
end
end
end
#==============================================================================
# ? Window_InputNumber
#==============================================================================
class Window_InputNumber < Window_Base
#--------------------------------------------------------------------------
# ? ?????????
# digits_max : ??
#--------------------------------------------------------------------------
def initialize(digits_max)
@digits_max = digits_max
@number = 0
# ??????????????? (0?9 ??????)
dummy_bitmap = Bitmap.new(32, 32)
dummy_bitmap.font.size = FUKI::MES_FONT_SIZE
@cursor_width = dummy_bitmap.text_size("0").width + 8
dummy_bitmap.dispose
super(0, 0, @cursor_width * @digits_max + 32, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = FUKI::MES_FONT_SIZE
self.z += 9999
self.opacity = 0
@index = 0
refresh
update_cursor_rect
end
end
#==============================================================================
# ? Interpreter
#==============================================================================
class Interpreter
#--------------------------------------------------------------------------
# ? ???????????
# event_id : ???? ID
#--------------------------------------------------------------------------
alias setup_fuki setup
def setup(list, event_id)
setup_fuki(list, event_id)
# ????????
if !($game_temp.in_battle)
# ????ID???
$active_event_id = event_id
end
end
end
#==============================================================================
#???????????????????????ver.1.13????
# Script by
# ?????http://2d6.parasite.jp/
# ×
# ?? ?? http://xms.rdy.jp/
#
#------------------------------------------------------------------------------
# ?????????????????????????????????????
# ???????????????????????
#==============================================================================
# ????????????
# ???????(????)-top??(????)-under??
# ?Graphics/Windowskins???????????????????????
#------------------------------------------------------------------------------
#
# ????????????
# ?????????????????$mes_id??????ID????????
# ?????????????????????????
# ????? $mes_id=4 ?
# ID?0???????????? nil??????????????????????
# ??????????????????????????
# ????????????????????????????
# ????????????
#
#==============================================================================
#==============================================================================
# ? ??????????
#==============================================================================
class Window_Message < Window_Selectable
#--------------------------------------------------------------------------
# ??????????????
#--------------------------------------------------------------------------
# ???????????????????????????""??
FUKI_SKIN_NAME = "001-Blue01"
# ???????????????????160?
FUKI_OPACITY = 10
end
#==============================================================================
# ? Window_Message
#==============================================================================
class Window_Message < Window_Selectable
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias parashelf_terminate_message terminate_message
def terminate_message
# ????
parashelf_terminate_message
# ???????
del_tail
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
alias parashelf_refresh refresh
def refresh
# ????
parashelf_refresh
# ????????
del_tail
set_tail
end
#--------------------------------------------------------------------------
# ? ????????????????
#--------------------------------------------------------------------------
alias parashelf_reset_window reset_window
def reset_window
# ????
parashelf_reset_window
# ?????????
if $mes_id != nil and @tail != nil
tale_pos = get_tale_pos
@tail.x = tale_pos[0]
@tail.y = tale_pos[1]
end
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
alias parashelf_update update
def update
# ????
parashelf_update
# ??????????
update_tail
# ???????????
if @contents_showing
# ???????????????????
if @tail != nil
self.pause = false
end
end
# ??????????????????????
if $game_temp.message_window_showing == false and @def_skin_name != nil
# ??????
reset_fuki_skin
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????)
#--------------------------------------------------------------------------
def update_tail
# ???????????????????
if $mes_id != nil and @tail != nil
tale_pos = get_tale_pos
@tail.x = tale_pos[0]
@tail.y = tale_pos[1]
skin = $game_system.windowskin_name
case @message_position
when 0 # ?
@tail.bitmap = RPG::Cache.windowskin(skin + "-top")
when 2 # ?
@tail.bitmap = RPG::Cache.windowskin(skin + "-under")
end
end
end
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
def set_tail
# $mes_id ????????????????????
if $mes_id == nil or $game_temp.in_battle
del_tail
# ??????
reset_fuki_skin
else
# ???????
set_fuki_skin
# ???????????
skin = $game_system.windowskin_name
if $game_system.message_frame == 0
# ?????
tale_pos = get_tale_pos
@tail = Sprite.new
case $game_system.message_position
when 0 # ?
@tail.bitmap = RPG::Cache.windowskin(skin + "-top")
@tail.x = tale_pos[1]
@tail.y = tale_pos[0]
@tail.z = self.z + 1
when 1 # ?
@tail.dispose
@tail = nil
when 2 # ?
@tail.bitmap = RPG::Cache.windowskin(skin + "-under")
@tail.x = tale_pos[0]
@tail.y = tale_pos[1]
@tail.z = self.z + 1
end
# ?????????????
@extra_sprites = [] if @extra_sprites.nil?
@extra_sprites.push(@tail) if @tail != nil
end
end
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def get_tale_pos
character = get_character($mes_id)
x = [[character.screen_x - 16, self.x].max, self.x + self.width - 32].min
case $game_system.message_position
when 0
y = self.y + self.height - 16
else
y = self.y - 16
end
return [x, y]
end
#--------------------------------------------------------------------------
# ? ?????????
# parameter : ?????
#--------------------------------------------------------------------------
def get_character(parameter)
# ????????
case parameter
when 0 # ?????
return $game_player
else # ???????
events = $game_map.events
return events == nil ? nil : events[parameter]
end
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def del_tail
if @tail != nil
@tail.dispose
@tail = nil
end
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def set_fuki_skin
# ???????????
if FUKI_SKIN_NAME != "" and FUKI_SKIN_NAME != $game_system.windowskin_name
@def_skin_name = $game_system.windowskin_name
$game_system.windowskin_name = FUKI_SKIN_NAME
self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name)
end
# ???????
if self.back_opacity != FUKI_OPACITY
@def_back_opacity = self.back_opacity
self.back_opacity = FUKI_OPACITY
end
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def reset_fuki_skin
# ???????????
if @def_skin_name != nil
$game_system.windowskin_name = @def_skin_name
self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name)
@def_skin_name = nil
end
# ???????
if @def_back_opacity != nil
self.back_opacity = @def_back_opacity
@def_back_opacity = nil
end
end
end
[/spoiler]
Might be a PK error?
Thanks anyway, but I decided to just do away with the tails and it looks better.
Well, if you decided not to use them then that's fine. If you decide in the future to use them, I think that all you need to do is put in a Change Text Options command above the message and change the position from Top to Middle or Bottom.Also, I don't see any indication that he is using PK.
And by the way, when you post script codes, please use code tags:
<code><\code> with <> replaced by []. As you can see, the code will get corrupted otherwise.