Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

bubble message system. syntax error.

Before i say anything, thank you for look at my post and considering to help me =)


Code:
#================================================= =============================
# + + Display messages FUKIDASHI ver. 2.01 + +
Parra # Script by dog
# Http://2d6.parasite.jp/
#------------------------------------------------- -----------------------------
# FUKIDASHI view of the
# Picture tail "(skin name) - top" "(skin name) - under" a
# "Graphics / Windowskins" import the folder you need.
#------------------------------------------------- -----------------------------
#
# [FUKIDASHI shown how to use]
Event # command "script" and "$ mes_id" Event ID assigning it a
# FUKIDASHI the event has to pop it.
# (Example: $ mes_id = 4)
-1 # ID assigned to the player, and a 0 to the event itself.
# Nil or "" Substitute, the message appears to return to normal.
# Position of the event, "text option" to change.
Position # "central" to the event, regardless of position
# Centered on the screen.
#
# [How to use the name of the window]
Event # command "script" and "$ mes_name" to assigning it a string
# Name window.
# (Example: $ mes_name = "ARUSHESU")
Control characters # \ N [n] is used, \ \ \ please describe.
# (Example: $ mes_name = "\ \ N [1]" $ mes_name = "\ \ N [\ \ V [1]]")
# "" Nil or assigned to the hide.
#
# The two functions are independent, so their use alone.
# $ Mes_id = (ID) + $ mes_name = "name": + Name FUKIDASHI display window
# $ Mes_id = (ID) + $ mes_name = "": FUKIDASHI (unnamed)
# $ Mes_id = nil + $ mes_name = "name": + Name default window window
# $ Mes_id = nil + $ mes_name = "": The default window (no name)
#
# [The message appears to change speed law]
Event # command "script" and "$ mes_speed" by assigning numerical values.
# 0 to assign a moment will be displayed.
# (Example: $ mes_speed = 1)
#
# [Auto send a message]
Event # command "script" and "$ mes_auto" by assigning numerical values.
The figures are drawn after the message # wait frames.
# Nil assigned to the Auto mode is released.
#
# [Additional control characters]
# \ I [file icon drawing
# "Graphics / Icons" in the picture. (Example: \ I [001-Weapon01])
# \ S [n] message speed change
# \ Size [n] change the font size
#
#================================================= =============================

module FUKI
  
   Skin set #
   # Skin of a window when using the same "" ""
   FUKI_SKIN_NAME = "001-Blue01" # FUKIDASHI for skin
   NAME_SKIN_NAME = "001-Blue01" # Name Display for skin
  
   Font size #
   MES_FONT_SIZE = 22 # FUKIDASHI
   NAME_FONT_SIZE = 14 # Name window
  
   # Color
   # (Color.new (0, 0, 0, 0) to specify the normal color.)
   FUKI_COLOR = Color.new (255, 255, 255, 255) # window FUKIDASHI
   NAME_COLOR = Color.new (255, 255, 255, 255) # Name window
  
   # Window transparency
   FUKIDASHI window FUKI_OPACITY = 255 #
   MES_OPACITY = 255 # normal message window
   NAME_OPACITY = 255 # Name window
  
   # Name window relative position
   Located next NAME_SHIFT_X = 0 #
   NAME_SHIFT_Y = 16 # vertical position
  
   # Window that protrude from the top and bottom screen time,
   # Automatic position (up and down) Change (true / false)
   POS_FIX = true

   # End of the screen is a little stagger FUKIDASHI
   # Skin round the corner and you have the same frame FUKIDASHI angle is true if the
   CORNER_SHIFT = false
   SHIFT_PIXEL = 4 # true when the number of pixels shifted
  
   The vertical size of the character #
   CHARACTOR_HEIGHT = 48
   # FUKIDASHI the relative position (vertical position)
   POP_SHIFT_TOP = 0 # position is on display when
   POP_SHIFT_UNDER = -16 # position is at the bottom when
  
   # Messages rate (the smaller fast. Instantaneous 0)
   # $ Mes_speed assigning numerical values to the changes accepted during the game.
   MES_SPEED = 1
  
   Use a # MESSEJISUKIPPU
   MES_SKIP = true # (true: enable / false: disabled)
   # Message to use skip button (the notation system, Input:: (button))
   # (Keyboard and the correspondence table Tsukuuru help "How to game".)
   MES_SKIP_KEY = Input:: A
   # Message ban skip the event ID switch
   # (Command event "switch operation" in the number of the switch while ON
   # MESSEJISUKIPPU to disable the feature)
   NO_MES_SKIP_SWITCH = 999

end

#================================================= =============================
# Æ Window_Message
#------------------------------------------------- -----------------------------
# Use text message window display.
#================================================= =============================

class Window_Message <Window_Selectable
   #------------------------------------------------- -------------------------
   # ? object initialization
   #------------------------------------------------- -------------------------
   alias alias_para_fuki_initialize initialize
   def initialize
     # Alias recall
     alias_para_fuki_initialize
     # Set of variables
     @ w = 0
     @ h = 0
     @ wait = 0
     @ dx = 0
     @ dy = 0
     @ dh = 0
     $ mes_speed = FUKI:: MES_SPEED
   end
   #------------------------------------------------- -------------------------
   # ? window position and opacity settings
   #------------------------------------------------- -------------------------
   alias alias_para_fuki_reset_window reset_window
   def reset_window
     # Alias recall
     alias_para_fuki_reset_window
     self.back_opacity = FUKI:: MES_OPACITY
   end
   #------------------------------------------------- -------------------------
   # ? frame update
   #------------------------------------------------- -------------------------
   def update
     super
     # FUKIDASHI mode, the event moves to follow
     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
     # Skip message
     if mes_skip?
       self.contents_opacity = 255
       if @ name_win! = nil
         @ name_win.opacity = 255
       end
       if @ tale! = nil
         @ tale.opacity = 255
       end
       if @ input_number_window! = nil
         @ input_number_window.contents_opacity = 255
       end
       @ fade_in = false
     end
     If fade #
     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 the message appears in #
     if @ contents_drawing
         One character at a time, drawing #
         refresh_drawtext
       return
     end
     If you type the number #
     if @ input_number_window! = nil
       @ input_number_window.update
       # Decision
       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 window to release figures
         @ input_number_window.dispose
         @ input_number_window = nil
         terminate_message
       end
       return
     end
     # Quit if the message appears
     if @ contents_showing_end
       # Skip determine message
       if mes_skip?
         Showing # choices must close the message window
         if $ game_temp.choice_max == 0
           terminate_message
           Discard FUKIDASHI #
           del_fukidasi
           return
         end
       end
       Auto mode #
       if @ mes_auto! = nil
         if @ mes_auto <= 0
           terminate_message
           Discard FUKIDASHI #
           del_fukidasi
           @ mes_auto = nil
         else
           @ mes_auto -= 1
         end
       end
       Showing # choices must pause to display signs
       # Mode is hidden FUKIDASHI
       if $ game_temp.choice_max == 0 and @ tale == nil
         self.pause = true
       else
         self.pause = false
       end
       Cancellation #
       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
       # Decision
       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
         Discard FUKIDASHI #
         del_fukidasi
       end
       return
     end
     # Fade-out in the waiting area outside the message or if there are options
     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
     # Message is not shown, if the window is visible
     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
   #------------------------------------------------- -------------------------
   # ? message termination
   #------------------------------------------------- -------------------------
   alias alias_para_fuki_terminate_message terminate_message
   def terminate_message
     # Alias recall
     alias_para_fuki_terminate_message
     @ contents_showing_end = false
   end
   #------------------------------------------------- -------------------------
   # ? rectangular cursor update
   #------------------------------------------------- -------------------------
   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
   #------------------------------------------------- -------------------------
   Skip determine effective message # ?
   #------------------------------------------------- -------------------------
   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
   #------------------------------------------------- -------------------------
   # ? determine the size of the window to create
   #------------------------------------------------- -------------------------
   def refresh_create
     self.contents.clear
     self.contents.font.color = normal_color
     self.contents.font.size = FUKI:: MES_FONT_SIZE
     # Retrieve the size of the window
     get_windowsize
     w = @ w + 32 + 8
     h = @ h + 26
     # Create a window FUKIDASHI
     set_fukidasi (self.x, self.y, w, h)
     Create window # Name
     set_namewindow
     # Variable initialization messages
     @ dx = @ dy = @ dh = @ max_font_h = 0
     @ cursor_width = 0
     @ contents_drawing = true
     The initial speed of message #
     @ mes_speed = $ mes_speed
     The font size of the initial #
     self.contents.font.size = FUKI:: MES_FONT_SIZE
     @ max_font_h = self.contents.font.size
     # Drawing characters
     refresh_drawtext
   end
   #------------------------------------------------- -------------------------
   # ? drawing one character at a time
   #------------------------------------------------- -------------------------
   def refresh_drawtext
     if $ game_temp.message_text! = nil
       If you skip a message on #
       if mes_skip?
         Drawing # drawing until the end of a loop
         while $ game_temp.message_text! = ""
           draw_massage
         end
       If speed is the message # 0
       elsif @ mes_speed == 0
         # Draw the end of the message or changes in speed until drawing a loop
         while $ game_temp.message_text! = "" and @ mes_speed == 0
           draw_massage
         end
       else
         if @ wait> 0
           @ wait -= 1
         elsif @ wait == 0
           Drawing #
           draw_massage
           @ wait = @ mes_speed
         end
       end
     end
     Drawing # end
     if $ game_temp.message_text == ""
       draw_opt_text
       @ contents_showing_end = true
       @ contents_drawing = false
     end
   end
   #------------------------------------------------- -------------------------
   # ? retrieve the size of the window
   #------------------------------------------------- -------------------------
   def get_windowsize
     x = y = 0
     @ h = @ w = 0
     max_font_h = self.contents.font.size
     @ cursor_width = 0
     If you make choices indented #
     if $ game_temp.choice_start == 0
       x = 16
     end
     # Messages are pending case
     if $ game_temp.message_text! = nil
     text = $ game_temp.message_text.clone
       # Character control
       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
       # For convenience, "\ \ \ \" "\ 000" to convert
       text.gsub! (/ \ \ \ \ /) ( "\ 000")
       # "\ \ C" to "\ 001", "\ \ G" "\ 002" to convert
       text.gsub! (/ \ \ [Cc] \ [([0-9] +) \] /) ( "\ 001")
       text.gsub! (/ \ \ [Gg] /) ( "\ 002")
       # "\ \ I" to "\ 003" to convert
       text.gsub! (/ \ \ [Ii] \ [(.*?) \] /) ( "\ 003 [# ($ 1)]")
       # "\ \ S" "\ 004" to convert
       text.gsub! (/ \ \ [Ss] \ [([0-9] +) \] /) ( "\ 004 [# ($ 1)]")
       # "\ \ Size" and "\ 005" to convert
       text.gsub! (/ \ \ size \ [([0-9] +) \] /) ( "\ 005 [# ($ 1)]")
       # C to obtain a single character (the character can not be obtained until the loop)
       while ((c = text.slice !(/./ m))! = nil)
         # \ \ Cases
         if c == "\ 000"
           # Revert to the original character
           c = "\ \"
         end
         # \ C [n] or \ G or if \ S [n] when
         if c == "\ 001" or c == "\ 002" or c == "\ 004"
           # Next character
           next
         end
         If the new line character #
         if c == "\ n"
           # Y plus 1
           y + = 1
           Get size aspect #
           @ 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 you make choices indented #
           if y> = $ game_temp.choice_start
             x = 8
           end
           # Next character
           next
         end
         # \ I [file] if
         if c == "\ 003"
           text.sub! (/ \ [(.*?) \] /, "")
           bitmap = RPG:: Cache.icon ($ 1)
           # X width plus an icon
           x + = bitmap.width
           # Next character
           next
         end
         # \ Size [n] if
         if c == "\ 005"
           text.sub! (/ \ [([0-9] +) \] /, "")
           # Change the font size
           self.contents.font.size = $ 1.to_i
           To get the maximum width of the vertical #
           if self.contents.font.size> max_font_h
             max_font_h = self.contents.font.size
           end
         end
         # X width plus character
         x + = self.contents.text_size (c). width
         To get the maximum width of the vertical #
         if self.contents.font.size> max_font_h
           max_font_h = self.contents.font.size
         end
       end
     end
     # Return the font size
     self.contents.font.size = FUKI:: MES_FONT_SIZE
     If the input number #
     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
   #------------------------------------------------- -------------------------
   Drawing # ?
   #------------------------------------------------- -------------------------
   def draw_massage
     # Messages are pending case
     if $ game_temp.message_text! = nil
       text = $ game_temp.message_text
       # Character control
       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
       # For convenience, "\ \ \ \" "\ 000" to convert
       text.gsub! (/ \ \ \ \ /) ( "\ 000")
       # "\ \ C" to "\ 001", "\ \ G" "\ 002" to convert
       text.gsub! (/ \ \ [Cc] \ [([0-9] +) \] /) ( "\ 001 [# ($ 1)]")
       text.gsub! (/ \ \ [Gg] /) ( "\ 002")
       # "\ \ I" to "\ 003" to convert
       text.gsub! (/ \ \ [Ii] \ [(.*?) \] /) ( "\ 003 [# ($ 1)]")
       # "\ \ S" "\ 004" to convert
       text.gsub! (/ \ \ [Ss] \ [([0-9] +) \] /) ( "\ 004 [# ($ 1)]")
       # "\ \ Size" and "\ 005" to convert
       text.gsub! (/ \ \ size \ [([0-9] +) \] /) ( "\ 005 [# ($ 1)]")
       To get a single character # c
       if ((c = text.slice !(/./ m))! = nil)
         If the option #
         if @ dy> = $ game_temp.choice_start
           # Indented to do
           @ dx = 8
           # Character to draw
           font_size = self.contents.font.size
           self.contents.draw_text (4 + @ dx, @ dh, font_size, font_size, c)
           # X drawn plus the width of the characters
           @ dx + = self.contents.text_size (c). width
           # Loop
           while ((c = text.slice !(/./ m))! = "\ n")
             # Character to draw
             font_size = self.contents.font.size
             self.contents.draw_text (4 + @ dx, @ dh, font_size, font_size, c)
             @ max_font_h = font_size
             # X drawn plus the width of the characters
             @ dx + = self.contents.text_size (c). width
           end
           if c == "\ n"
             The width of the cursor to update #
             @ cursor_width = [@ cursor_width, @ dx]. max
             # The maximum height of the font, add
             @ dh + = @ max_font_h + 10
             @ max_font_h = self.contents.font.size
             @ dx = 0
           end
           return
         end
         # \ \ Cases
         if c == "\ 000"
           # Revert to the original character
           c = "\ \"
         end
         # \ C [n] if
         if c == "\ 001"
           # Character to change the color
           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 case
         if c == "\ 002"
           Gold created a window #
           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 the new line character #
         if c == "\ n"
           # Y plus 1
           @ dy + = 1
           @ dx = 0
           # The maximum height of the font, add
           @ dh + = @ max_font_h + 10
           @ max_font_h = 0
           return
         end
         # \ I [file] if
         if c == "\ 003"
           text.sub! (/ \ [(.*?) \] /, "")
           bitmap = RPG:: Cache.icon ($ 1)
           font_size = FUKI:: MES_FONT_SIZE
           # Draw icon
           self.contents.blt (4 + @ dx, 5 + @ dh, bitmap, Rect.new (0, 0, bitmap.width, bitmap.height))
           # X drawn plus the width of an icon
           @ dx + = bitmap.width
           To get the maximum width of the vertical #
           if self.contents.font.size> @ max_font_h
             @ max_font_h = bitmap.height
           end
           return
         end
         # \ S [n] if
         if c == "\ 004"
           text.sub! (/ \ [([0-9] +) \] /, "")
           # Drawing speed change
           @ mes_speed = $ 1.to_i
           return
         end
         # \ Size [n] if
         if c == "\ 005"
           text.sub! (/ \ [([0-9] +) \] /, "")
           c = ""
           # Change the font size
           self.contents.font.size = $ 1.to_i
         end
         # Character to draw
         font_size = self.contents.font.size
         self.contents.draw_text (4 + @ dx, @ dh, font_size, font_size, c)
         # X drawn plus the width of the characters
         @ dx + = self.contents.text_size (c). width
         # Character to get the maximum width of the vertical
         if self.contents.font.size> @ max_font_h
           @ max_font_h = self.contents.font.size
         end
       end
     end
   end
   #------------------------------------------------- -------------------------
   # ? input number to enable choice
   #------------------------------------------------- -------------------------
   def draw_opt_text
     If the option #
     if $ game_temp.choice_max> 0
       @ item_max = $ game_temp.choice_max
       self.active = true
       self.index = 0
     end
     If the input number #
     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
   #------------------------------------------------- -------------------------
   Show # ? FUKIDASHI
   #------------------------------------------------- -------------------------
   def set_fukidasi (x, y, width, height)
     # $ Mes_id was empty when the FUKIDASHI Hide
     if $ mes_id == nil or $ mes_id == ""
       del_fukidasi
       reset_window
     else
       Sign # pose to hide
       self.pause = false
       # Position to obtain
       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
       Create a message window for FUKIDASHI #
       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
       Draw # FUKIDASHI tails
       if $ game_system.message_frame == 0
         # Position to obtain
         tale_pos = get_tale_pos
         @ tale = Sprite.new
         case @ message_position
           on when 0 #
             @ tale.bitmap = RPG:: Cache.windowskin (skin + "-top")
             @ tale.x = tale_pos [0]
             @ tale.y = tale_pos [1]
             @ tale.z = self.z + 1
           During when 1 #
             @ tale.dispose
             @ tale = nil
           under 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
   #------------------------------------------------- -------------------------
   # ? FUKIDASHI position to calculate
   #------------------------------------------------- -------------------------
   def get_fuki_pos (width, height)
     # Character to get
     @ character = get_character ($ mes_id)
     if @ character == nil
       # Characters are usually missing when the message window
       del_fukidasi
       reset_window
       return
     end
     # Coordinate treatment
     x = (@ character.real_x - $ game_map.display_x + 64) * 32 / 128 - (width / 2)
     # Run over the screen when you move to fit
     if x + width> 640
       x = 640 - width
     elsif x <0
       x = 0
     end
     To determine the position of the window #
     case $ game_system.message_position
       on when 0 #
         y = (@ character.real_y - $ game_map.display_y + 64) * 32 / 128 - height - FUKI:: CHARACTOR_HEIGHT + FUKI:: POP_SHIFT_TOP
       During when 1 #
         y = (480 - height) / 2
         x = (640 - width) / 2
       under when 2 #
         y = (@ character.real_y - $ game_map.display_y + 64) * 32 / 128 + 32 + FUKI:: POP_SHIFT_UNDER
     end
     # Temporary storage position message
     @ message_position = $ game_system.message_position
     # Protrude outside the screen at the top and bottom of the window to change
     if FUKI:: POS_FIX
       case @ message_position
         on when 0 #
           if y <= 0
             @ message_position = 2
             y = (@ character.real_y - $ game_map.display_y + 64) * 32 / 128 + FUKI:: POP_SHIFT_UNDER
           end
         under 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
   #------------------------------------------------- -------------------------
   # ? tail calculate the position
   #------------------------------------------------- -------------------------
   def get_tale_pos
     case @ message_position
       on when 0 #
         # Coordinate treatment
         x = (@ character.real_x - $ game_map.display_x + 64) * 32 / 128 - 16
         # Edge of the screen to move the position
         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
       During when 1 #
         x = nil
         y = nil
       under when 2 #
         # Coordinate treatment
         x = (@ character.real_x - $ game_map.display_x + 64) * 32 / 128 - 16
         # Edge of the screen to move the position
         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
   #------------------------------------------------- -------------------------
   # ? window to display the name of
   #------------------------------------------------- -------------------------
   def set_namewindow
     # $ Mes_name name was empty when the window display
     if $ mes_name == nil or $ mes_name == ""
       return
     else
       # Set of variables
       mes_name = $ mes_name
       # Character control
       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 window (frame) to create
       @ 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
       # Class window to limit the margin smaller than the dual structure
       @ 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
       # Color settings
       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
       # Adjust the size of the window
       rect = @ name_contents.bitmap.text_size (mes_name)
       @ name_win.width = rect.width + 32
       # Name Draw
       @ name_contents.bitmap.draw_text (rect, mes_name)
     end
   end
   #------------------------------------------------- -------------------------
   # ? destroy the window and the name of FUKIDASHI
   #------------------------------------------------- -------------------------
   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
   #------------------------------------------------- -------------------------
   Character # ? acquisition
   # Parameter: Parameters
   #------------------------------------------------- -------------------------
   def get_character (parameter)
     # Parameters branch
     case parameter
     Players when -1 #
       return $ game_player
     This event when 0 #
       events = $ game_map.events
       return events == nil? nil: events [$ active_event_id]
     else # specific event.
       events = $ game_map.events
       return events == nil? nil: events [parameter]
     end
   end
   #------------------------------------------------- -------------------------
   Usually the acquisition color # ?
   #------------------------------------------------- -------------------------
   def normal_color
     # Mode set to apply FUKIDASHI
     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
       # Rubber workers at the non-ordinary character color
       return super
     end
   end
end

#================================================= =============================
# Æ Window_InputNumber
#================================================= =============================

class Window_InputNumber <Window_Base
   #------------------------------------------------- -------------------------
   # ? object initialization
   # Digits_max: digits
   #------------------------------------------------- -------------------------
   def initialize (digits_max)
     @ digits_max = digits_max
     @ number = 0
     # Figures from the width of the cursor to calculate the width (0 to 9 and the assumption of equal width)
     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
   #------------------------------------------------- -------------------------
   Setup event # ?
   # Event_id: Event ID
   #------------------------------------------------- -------------------------
   alias setup_fuki setup
   def setup (list, event_id)
     setup_fuki (list, event_id)
     # Action must
     if! ($ game_temp.in_battle)
       To record the event ID #
       $ active_event_id = event_id
     end
   end
end


Paste it above main in an empty project and you will soon see whats wrong.  It happend to me on line 75 and i tried deleting  line 75 to see if that would work and line 125 has an error also.


Thank you =)



EDIT: If this helps... heres the link to where i got it at.    http://2d6.parasite.jp/rgss/script/fukidasi.html
 
No wonder...is full of errors...bad comments to be precise
for example:
Code:
FUKIDASHI window FUKI_OPACITY = 255 #
most probable it was meant to be like this
Code:
FUKI_OPACITY = 255 #FUKIDASHI window

there are more of them...
you should re-download the script.

Cya
 
I see now why the comments got f***ed up. Dont translate it, use it like that then it should work fine. If u need the comments then correct all the comments (on a 1000 line script... I dont think so XD) or just translate it and put it in a text file for reference.

Cya
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top