VX 스크립트

 

여기 홈페이지 많고도 많은 대화창스크립트가 있는데

이걸 또 올리는 이유가 있습니다...

제가 예전에 질문한 것 중에

 <지금 속한 엑터의 인덱스에 따라 대화창에 이름이나 얼굴을 표시할 수 있게 할 수 있나요?>

라는 질문을 올린적이 있습니다..

몇 분께서 (감사함ㅎ)노력은 해 주셨지만 만족할만한 결과가 나오질 못했지요..

아직까지 그런 스크립트는 없다고 말들을 하셨습니다..

 

하지만 Yanfly Engine RD 이분의 싸이트에 가 보니 스크립트로 만들어져 있더군요..헐..

대화창에  pf[x] 를 넣으면 (x는 엑터 인덱스번호 입니다.) x번호에 해당하는 얼굴 그래픽을 보여주더군요..(대박이었음)

예를들어 pf[0]면 어느 누구던간에 그 선두 엑터의 얼굴그래픽을 보여줍니다.

마찮가지로 pn[0]을 입력하면 어느 누구던간에 그 선두 엑터의 이름을 표시합니다.

이게 왜 중요하냐면.... 엄청난 노가다를 단 한 단어로 해결되기 때문이지여..

지금 만들고 있는 수호지에 너무 유용하게 쓰입니다..

그 외에도 중요한 여러 효과가 많이 있습니다.

아쉬운 것은 말풍선효과와 글자소리내 주는 기능은 없습니다..

다른 메시지스크립트와는 반드시 충돌을 하니, 여기 스크립트 안에다가 새로 만드는 수밖에 없습니다..

지금.. 이 좋은 스크립트를 여러분도 활용하시지요..

출처입니다 : http://pockethouse.com/   (자료의 출처는 반드시 남깁시다.)

#===============================================================================
#
# Yanfly Engine RD - Custom Message System
# Last Date Updated: 2009.06.14
# Level: Easy, Lunatic
#
# This is by no means a complex message system like Modern Algebra's ATS or
# Woratana's Neo Message System. If you want a message system with a lot of
# features, I highly recommend that you take a look at those. This message
# system here will supply the most basic functions and needs without adding
# too many extra features.
#
# What this script has to offer is basic functionality for new tags, a namebox
# window, and drawn items, weapons, and armours along with their icons. There
# also exists a Lunatic Mode to create quick and easy custom shortcuts. For
# the most part, this script is plug and play.
#
#===============================================================================
# Updates:
# ----------------------------------------------------------------------------
# o 2009.06.14 - Started script and finished.
#===============================================================================
# Instructions
#===============================================================================
#
# Scroll down and bind ROW_VARIABLE to the desired variable. This variable will
# let you adjust how many rows can be viewed at once. If the rows are set to 0,
# it will display the default row amount of 4 rows.
#
# The following are codes you may use when typing out your messages. Replace
# x, y with numbers unless specified otherwise.
#
# Code:       Effect:
# v[x]       Writes variable x's value.
# n[x]       Writes actor x's name.
# c[x]       Changes the colour of the text to x.
# g          Displays the gold window.
# .          Waits 15 frames (quarter second).
# |          Waits 60 frames (a full second).
# !          Waits until key is pressed.
# >          Following text is instant.
# <          Following text is no longer instant.
# ^          Skips to the next message.
#           Writes a "" in the window.
#
# w[x]       Waits x frames (60 frames = 1 second).
#
# nb[x]      Creates a name window with x. Left side.
# nbl[x]     Creates a name window with x. Locks the namebox. Left side.
# nbu[x]     Creates a name window with x. Unlocks the namebox. Left side.
# rnb[x]     Creates a name window with x. Right side.
# rnbl[x]    Creates a name window with x. Locks the namebox. Right side.
# rnbu[x]    Creates a name window with x. Unlocks the namebox. Right side.
# nbu        Closes name window. Unlocks the namebox.
#
# fn[x]      Changes the font name to x. Set to 0 to reset font name.
# fs[x]      Changes the font size to x. Set to 0 to reset font size.
# fb         Changes the font to bold and back.
# fi         Changes the font to italic
# fh         Changes the font to shadowed and back.
#
# ac[x]      Writes actor x's class name.
# as[x]      Writes actor x's subclass name. Requires Subclass System.
# ax[x]      Writes actor x's combination class name. Requires Subclass System.
# af[x]      Replaces face with actor x's face.
# af[x:y]    Replaces face with actor x's face name but uses expression y.
#
# pn[x]      Writes ally's name in party slot x.
# pc[x]      Writes ally's class name in party slot x.
# ps[x]      Writes ally's subclass name in party slot x.
# px[x]      Writes ally's combination class name in party slot x.
# pf[x]      Replaces face with ally's face in party slot x.
# pf[x:y]    Replaces face with ally's face name but uses expression y.
#
# nc[x]      Writes class ID x's name.
# ni[x]      Writes item ID x's name.
# nw[x]      Writes weapon ID x's name.
# na[x]      Writes armour ID x's name.
# ns[x]      Writes skill ID x's name.
# nt[x]      Writes state ID x's name.
#
# i[x]       Draws icon ID x into the message window.
# ii[x]      Writes item ID x's name with icon included.
# iw[x]      Writes weapon ID x's name with icon included.
# ia[x]      Writes armour ID x's name with icon included.
# is[x]      Writes skill ID x's name with icon included.
# it[x]      Writes state ID x's name with icon included.
#
#===============================================================================
#
# Compatibility
# - Incompatible: Any other message systems obviously.
# - Alias: Window_Message: initialize, update, dispose, new_page
# - Overwrites: Game_Interpreter: command_101, setup_choices
# - Overwrites: Window_Message: convert_special_characters, update_message
#
#===============================================================================
# Credits:
# Woratana for reference on stringing multiple message text.
# Modern Algebra for reference on a few misc methods.
#===============================================================================

$imported = {} if $imported == nil
$imported["CustomMessageSystem"] = true

module YE
  module MESSAGE
   
    # This adjusts how many rows are shown. On screen. If it's 0 or under, a
    # maximum of 4 rows will be shown. If it's above, it will show that many
    # rows and texts following it immediately after will also display that many
    # extra rows.
    ROW_VARIABLE = 19
   
    # This adjusts the icon width. Used mostly for monospaced fonts so that
    # icons will not break the alignment.
    ICON_WIDTH = 24
   
    # This determines where you would like the namebox window to appear relative
    # to the message window. Adjust the following accordingly.
    NAME_WINDOW_X = 0        # Adjusts X position offset from Message Window.
    NAME_WINDOW_Y = 40       # Adjusts Y position offset from Message Window.
    NAME_WINDOW_W = 20       # Adjusts extra width added to the Name Window.
    NAME_WINDOW_H = 40       # Adjusts the height of the Name Window.
    NAME_COLOUR   = 6        # Default colour used for name box.
   
    # The following lets you adjust whether or not you would like to see the
    # back of the name window.
    NAME_WINDOW_SHOW_BACK = true
   
    # The following allows you to adjust the font defaults for ALL text in the
    # game. This includes the text outside of the message window and includes
    # the text within the menu windows.
    FONT_NAME = ["Verdana", "Arial", "Courier New"]
    FONT_SIZE = 20
    FONT_BOLD = false
    FONT_ITALIC = false
    FONT_SHADOW = true
   
   
  end # MESSAGE
end # YE

#===============================================================================
# How to Use: Lunatic Mode
#===============================================================================
#
# This portion is for those who know how to script.
#
# X[x] or X[x:y] or X[x:y:z]
# These let you create your own custom tags. If you use the first tag, there is
# one case for the "custom_convert" definition to return. If you use the second
# tag, there will be two cases for you to select from. And likewise, if there's
# three tags, then the z case will also be taken into account of.
#
#===============================================================================

class Window_Message < Window_Selectable
 
  def custom_convert(x_case, y_case = 0, z_case = 0)
    text = ""
    case x_case
    #---------------------------------------------------------------------------
    # //////////////////////////////////////////////////////////////////////////
    # This is where you begin adding in your own custom converted tags.
    #---------------------------------------------------------------------------
    when 1 # Show the full name of the actor.
      case y_case # This is the extra case for the actor.
      when 1
        text = "n[1] von Xiguel"
      when 2
        text = "Michelle n[2]"
      when 3
        text = "n[3] Manfred"
      when 4
        text = "n[4] Fernaeus"
      end
     
    when 2 # Show how much gold the party has.
      text = $game_party.gold
     
    when 3 # Show party's max level
      text = $game_party.max_level
     
    #---------------------------------------------------------------------------
    # This is the part you guys shouldn't touch afterwards.
    # //////////////////////////////////////////////////////////////////////////
    #---------------------------------------------------------------------------""
    end
    return text
  end
 
end # Window_Message

#===============================================================================
# Editting anything past this point may potentially result in causing computer
# damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
# Therefore, edit at your own risk.
#===============================================================================

Font.default_size = YE::MESSAGE::FONT_SIZE
Font.default_name = YE::MESSAGE::FONT_NAME
Font.default_bold = YE::MESSAGE::FONT_BOLD
Font.default_italic = YE::MESSAGE::FONT_ITALIC
Font.default_shadow = YE::MESSAGE::FONT_SHADOW

#===============================================================================
# Window_Message
#===============================================================================

class Window_Message < Window_Selectable
 
  #--------------------------------------------------------------------------
  # alias initialize
  #--------------------------------------------------------------------------
  alias initialize_cms initialize unless $@
  def initialize
    initialize_cms
    var = $game_variables[YE::MESSAGE::ROW_VARIABLE]
    @max_rows = (var <= 0) ? 4 : var
    nheight = YE::MESSAGE::NAME_WINDOW_H
    @name_window = Window_Base.new(YE::MESSAGE::NAME_WINDOW_X, 0, 100, nheight)
    @name_text = Window_Base.new(YE::MESSAGE::NAME_WINDOW_X, 0, 100, 56)
    @name_window.openness = 0
    @name_text.openness = 0
    @name_text.opacity = 0
    @name_window.z = self.z + 1
    @name_text.z = @name_window.z + 1
    @name_window_lock = false
  end
 
  #--------------------------------------------------------------------------
  # alias dispose
  #--------------------------------------------------------------------------
  alias dispose_cms dispose unless $@
  def dispose
    dispose_cms
    @name_window.dispose if @name_window != nil
    @name_text.dispose if @name_text != nil
  end
 
  #--------------------------------------------------------------------------
  # close
  #--------------------------------------------------------------------------
  def close
    super
    @name_window.close
    @name_text.close
    @name_window_lock = false
  end
 
  #--------------------------------------------------------------------------
  # alias update
  #--------------------------------------------------------------------------
  alias update_cms update unless $@
  def update
    @name_window.update
    @name_text.update
    refresh_size
    update_cms
  end
 
  #--------------------------------------------------------------------------
  # refresh_size
  #--------------------------------------------------------------------------
  def refresh_size
    var = $game_variables[YE::MESSAGE::ROW_VARIABLE]
    @max_rows = (var <= 0) ? 4 : var
    calc_height = @max_rows * 24 + 32
    if self.height != calc_height
      self.height = calc_height
      create_contents
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite reset_window
  #--------------------------------------------------------------------------
  def reset_window
    var = $game_variables[YE::MESSAGE::ROW_VARIABLE]
    wheight = var <= 0 ? 4 * 24 + 32 : var * 24 + 32
    @background = $game_message.background
    @position = $game_message.position
    self.opacity = (@background == 0) ? 255 : 0
    case @position
    when 0  # Top
      self.y = 0
      @gold_window.y = 360
    when 1  # Middle
      self.y = (Graphics.height - wheight) / 2
      @gold_window.y = 0
    when 2  # Bottom
      self.y = (Graphics.height - wheight)
      @gold_window.y = 0
    end
  end

  #--------------------------------------------------------------------------
  # overwrite convert_special_characters
  #--------------------------------------------------------------------------
  def convert_special_characters
    @name_window_open = false
    #-------------------------------------------------------------
    # Lunatic REGEXP Conversions
    #-------------------------------------------------------------
    @text.gsub!(/X[(d+)]/i) {
      custom_convert($1.to_i) }
    @text.gsub!(/X[(d+):(d+)]/i) {
      custom_convert($1.to_i, $2.to_i) }
    @text.gsub!(/X[(d+):(d+):(d+)]/i) {
      custom_convert($1.to_i, $2.to_i, $3.to_i) }
   
    #-------------------------------------------------------------
    # Default REGEXP Conversions
    #-------------------------------------------------------------
    @text.gsub!(/V[(d+)]/i)    { $game_variables[$1.to_i] }
    @text.gsub!(/V[(d+)]/i)    { $game_variables[$1.to_i] }
    @text.gsub!(/N[(d+)]/i)    { $game_actors[$1.to_i].name }
    @text.gsub!(/C[(d+)]/i)    { "x01{#{$1}}" }
    @text.gsub!(/G/i)             { "x02" }
    @text.gsub!(/./)             { "x03" }
    @text.gsub!(/|/)             { "x04" }
    @text.gsub!(/!/)              { "x05" }
    @text.gsub!(/>/)              { "x06" }
    @text.gsub!(/</)              { "x07" }
    @text.gsub!(/^/)             { "x08" }
    @text.gsub!(/\/)             { "" }
   
    #-------------------------------------------------------------
    # New REGEXP Conversions
    #-------------------------------------------------------------
    @text.gsub!(/W[(d+)]/i)    { "x09{#{$1}}" }
    @text.gsub!(/I[(d+)]/i)    { "x10{#{$1}}" }
    @text.gsub!(/FS[(d+)]/i)   { "x11{#{$1}}" }
    @text.gsub!(/FN[(.*?)]/i)   { "x12{#{$1}}" }
    @text.gsub!(/FB/i)            { "x13" }
    @text.gsub!(/FI/i)            { "x14" }
    @text.gsub!(/FH/i)            { "x15" }
   
    #-------------------------------------------------------------
    # Automatic Actor REGEXP Conversions
    #-------------------------------------------------------------
    @text.gsub!(/AN[(d+)]/i) {
      if $game_actors[$1.to_i] != nil
        $game_actors[$1.to_i].name
      else
        ""
      end }
    @text.gsub!(/AC[(d+)]/i) {
      if $game_actors[$1.to_i] != nil
        $game_actors[$1.to_i].class.name
      else
        ""
      end }
    @text.gsub!(/AS[(d+)]/i) {
      if $imported["SubclassSelectionSystem"] and
      $game_actors[$1.to_i] != nil and
      $game_actors[$1.to_i].subclass != nil
        $game_actors[$1.to_i].subclass.name
      else
        ""
      end }
    @text.gsub!(/AX[(d+)]/i) {
      combination_class($game_actors[$1.to_i]) }
    @text.gsub!(/AF[(d+)]/i) {
      if $game_actors[$1.to_i] != nil
        $game_message.face_name = $game_actors[$1.to_i].face_name
        $game_message.face_index = $game_actors[$1.to_i].face_index
      end
      "" }
    @text.gsub!(/AF[(d+):(d+)]/i) {
      if $game_actors[$1.to_i] != nil
        $game_message.face_name = $game_actors[$1.to_i].face_name
        $game_message.face_index = $2.to_i
      end
      "" }
   
    #-------------------------------------------------------------
    # Automatic Party REGEXP Conversions
    #-------------------------------------------------------------
    @text.gsub!(/PN[(d+)]/i) {
      if $game_party.members[$1.to_i] != nil
        $game_party.members[$1.to_i].name
      else
        ""
      end }
    @text.gsub!(/PC[(d+)]/i) {
      if $game_party.members[$1.to_i] != nil
        $game_party.members[$1.to_i].class.name
      else
        ""
      end }
    @text.gsub!(/PS[(d+)]/i) {
      if $imported["SubclassSelectionSystem"] and
      $game_party.members[$1.to_i] != nil and
      $game_party.members[$1.to_i].subclass != nil
        $game_party.members[$1.to_i].subclass.name
      else
        ""
      end }
    @text.gsub!(/PX[(d+)]/i) {
      combination_class($game_party.members[$1.to_i]) }
    @text.gsub!(/PF[(d+)]/i) {
      if $game_party.members[$1.to_i] != nil
        $game_message.face_name = $game_party.members[$1.to_i].face_name
        $game_message.face_index = $game_party.members[$1.to_i].face_index
      end
      "" }
    @text.gsub!(/PF[(d+):(d+)]/i) {
      if $game_party.members[$1.to_i] != nil
        $game_message.face_name = $game_party.members[$1.to_i].face_name
        $game_message.face_index = $2.to_i
      end
      "" }
   
    #-------------------------------------------------------------
    # Auto Class, Item, Weapon, and Armour REGEXP Conversions
    #-------------------------------------------------------------
    @text.gsub!(/NC[(d+)]/i) {
      $data_classes[$1.to_i].name }
    @text.gsub!(/NI[(d+)]/i) {
      $data_items[$1.to_i].name }
    @text.gsub!(/NW[(d+)]/i) {
      $data_weapons[$1.to_i].name }
    @text.gsub!(/NA[(d+)]/i) {
      $data_armors[$1.to_i].name }
    @text.gsub!(/NS[(d+)]/i) {
      $data_skills[$1.to_i].name }
    @text.gsub!(/NT[(d+)]/i) {
      $data_states[$1.to_i].name }
    @text.gsub!(/II[(d+)]/i) {
      "x10{#{$data_items[$1.to_i].icon_index}}" +
      "#{$data_items[$1.to_i].name}"}
    @text.gsub!(/IW[(d+)]/i) {
      "x10{#{$data_weapons[$1.to_i].icon_index}}" +
      "#{$data_weapons[$1.to_i].name}"}
    @text.gsub!(/IA[(d+)]/i) {
      "x10{#{$data_armors[$1.to_i].icon_index}}" +
      "#{$data_armors[$1.to_i].name}"}
    @text.gsub!(/IS[(d+)]/i) {
      "x10{#{$data_skills[$1.to_i].icon_index}}" +
      "#{$data_skills[$1.to_i].name}"}
    @text.gsub!(/IT[(d+)]/i) {
      "x10{#{$data_states[$1.to_i].icon_index}}" +
      "#{$data_states[$1.to_i].name}"}
     
    #-------------------------------------------------------------
    # Name box REGEXP Conversions
    #-------------------------------------------------------------
    @text.gsub!(/NB[(.*?)]/i) {
      if $1.to_s != nil
        refresh_name_box($1.to_s)
      end
      "" }
    @text.gsub!(/NBL[(.*?)]/i) {
      if $1.to_s != nil
        refresh_name_box($1.to_s)
        @name_window_lock = true
      end
      "" }
    @text.gsub!(/NBU[(.*?)]/i) {
      if $1.to_s != nil
        refresh_name_box($1.to_s)
        @name_window_lock = false
      end
      "" }
    @text.gsub!(/NBU/i) {
      @name_window.close
      @name_text.close
      @name_window_lock = false
      "" }
    @text.gsub!(/RNB[(.*?)]/i) {
      if $1.to_s != nil
        refresh_name_box($1.to_s, 1)
      end
      "" }
    @text.gsub!(/RNBL[(.*?)]/i) {
      if $1.to_s != nil
        refresh_name_box($1.to_s, 1)
        @name_window_lock = true
      end
      "" }
    @text.gsub!(/RNBU[(.*?)]/i) {
      if $1.to_s != nil
        refresh_name_box($1.to_s, 1)
        @name_window_lock = false
      end
      "" }
     
    # Close the Name Window
    unless @name_window_lock
      @name_window.close if !@name_window_open
      @name_text.close if !@name_window_open
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite update_message
  #--------------------------------------------------------------------------
  def update_message
    loop do
      text_height = [contents.font.size + (contents.font.size / 5), WLH].max
      c = @text.slice!(/./m)            # Get next text character
      case c
      #----------------------------------------------------------------------
      # Default Cases
      #----------------------------------------------------------------------
      when nil    # There is no text that must be drawn
        finish_message                  # Finish update
        break
      when "x00" # New line
        new_line
        if @line_count >= @max_rows     # If line count is maximum
          unless @text.empty?           # If there is more
            self.pause = true           # Insert number input
            break
          end
        end
      when "x01" # C[n]  (text character color change)
        @text.sub!(/{(d+)}/, "")
        contents.font.color = text_color($1.to_i)
        next
      when "x02" # G  (gold display)
        @gold_window.refresh
        @gold_window.open
      when "x03" # .  (wait 1/4 second)
        @wait_count = 15
        break
      when "x04" # |  (wait 1 second)
        @wait_count = 60
        break
      when "x05" # !  (Wait for input)
        self.pause = true
        break
      when "x06" # >  (Fast display ON)
        @line_show_fast = true
      when "x07" # <  (Fast display OFF)
        @line_show_fast = false
      when "x08" # ^  (No wait for input)
        @pause_skip = true
       
      #----------------------------------------------------------------------
      # New Cases
      #----------------------------------------------------------------------
      when "x09" # |  Wait x frames
        @text.sub!(/{(d+)}/, "")
        @wait_count = $1.to_i
        break
      when "x10" # i  Draws icon ID x
        @text.sub!(/{(d+)}/, "")
        icon = $1.to_i
        icon_width = (24 - YE::MESSAGE::ICON_WIDTH) / 2
        draw_icon(icon, @contents_x - icon_width, @contents_y)
        @contents_x += YE::MESSAGE::ICON_WIDTH
      when "x11" # fs Font Size Change
        @text.sub!(/{(d+)}/, "")
        size = $1.to_i
        if size <= 0 # If 0, revert back to the default font size.
          size = Font.default_size
        end
        contents.font.size = size
        text_height = [size + (size / 5), WLH].max
      when "x12" # fs Font Name Change
        @text.sub!(/{(.*?)}/, "")
        name = $1.to_s
        if name == "0" # If 0, revert back to the default font.
          name = Font.default_name
        end
        contents.font.name = name
      when "x13" # fb Font bold
        contents.font.bold = contents.font.bold ? false : true
      when "x14" # fi Font italic
        contents.font.italic = contents.font.italic ? false : true
      when "x15" # fi Font shadowed
        contents.font.shadow = contents.font.shadow ? false : true
       
      #----------------------------------------------------------------------
      # Finish Up
      #----------------------------------------------------------------------
      else                              # Normal text character
        contents.draw_text(@contents_x, @contents_y, 40, text_height, c)
        c_width = contents.text_size(c).width
        @contents_x += c_width
      end
      break unless @show_fast or @line_show_fast
    end
  end
 
  #--------------------------------------------------------------------------
  # alias new_page
  #--------------------------------------------------------------------------
  alias new_page_cms new_page unless $@
  def new_page
    new_page_cms
    contents.font.name = Font.default_name
    contents.font.size = Font.default_size
    contents.font.bold = Font.default_bold
    contents.font.italic = Font.default_italic
    contents.font.shadow = Font.default_shadow
  end
 
  #--------------------------------------------------------------------------
  # combination_class
  #--------------------------------------------------------------------------
  def combination_class(actor)
    return "" if actor == nil
    class1 = actor.class.name
    return class1 unless $imported["SubclassSelectionSystem"]
    return class1 if actor.subclass == nil
    class2 = actor.subclass.name
    text = sprintf(YE::SUBCLASS::DISPLAY_FORMAT, class1, class2)
    return text unless YE::SUBCLASS::USE_COMPLEX_CLASS_NAMES
    if YE::SUBCLASS::COMPLEX_CLASS_NAMES_FULL.include?(text)
      text = YE::SUBCLASS::COMPLEX_CLASS_NAMES_FULL[text]
    end
    return text
  end
 
  #--------------------------------------------------------------------------
  # refresh_name_box
  #--------------------------------------------------------------------------
  def refresh_name_box(name, side = 0)
    return if $game_temp.in_battle
    font_colour = YE::MESSAGE::NAME_COLOUR
    font_name = Font.default_name
    font_size = Font.default_size
    font_bold = Font.default_bold
    font_italic = Font.default_italic
    font_shadow = Font.default_shadow
    icon = 0
    name_width = 0
    #---Convert Special Characters
    name = name.gsub(/x01{(d+)}/i) {
      font_colour = $1.to_i
      ""}
    name = name.gsub(/x09{(d+)}/i) {""}
    name = name.gsub(/x10{(d+)}/i) {
      icon = $1.to_i
      name_width += YE::MESSAGE::ICON_WIDTH
      ""}
    name = name.gsub(/x11{(d+)}/i) {
      font_size = $1.to_i
      ""}
    name = name.gsub(/x12{(.*?)}/i) {
      font_name = $1.to_s
      ""}
    name = name.gsub(/x13/i) {
      font_bold = true
      ""}
    name = name.gsub(/x14/i) {
      font_italic = true
      ""}
    name = name.gsub(/x15/i) {
      font_shadow = true
      ""}
    #---Convert Special Characters
    @name_text.contents.font.name = font_name
    @name_text.contents.font.size = font_size
    @name_text.contents.font.bold = font_bold
    @name_text.contents.font.italic = font_italic
    @name_text.contents.font.shadow = font_shadow
    name_width += @name_text.contents.text_size(name).width
    name_width += YE::MESSAGE::NAME_WINDOW_W
    @name_window.width = name_width + 40
    @name_text.width = @name_window.width
    var = $game_variables[YE::MESSAGE::ROW_VARIABLE]
    wheight = var <= 0 ? 4 * 24 + 32 : var * 24 + 32
    position = $game_message.position
    case position
    when 0
      @name_window.y = self.height - YE::MESSAGE::NAME_WINDOW_H
      @name_window.y += YE::MESSAGE::NAME_WINDOW_Y
    when 1
      @name_window.y = (Graphics.height - wheight) / 2
      @name_window.y -= YE::MESSAGE::NAME_WINDOW_Y
    when 2
      @name_window.y = (Graphics.height - wheight)
      @name_window.y -= YE::MESSAGE::NAME_WINDOW_Y
    end
    offset = (@name_text.height - @name_window.height) / 2
    @name_text.y = @name_window.y - offset
    if YE::MESSAGE::NAME_WINDOW_SHOW_BACK and $game_message.background == 0
      @name_window.opacity = 255
    else
      @name_window.opacity = 0
    end
    if side == 0
      @name_window.x = YE::MESSAGE::NAME_WINDOW_X
    else
      @name_window.x = Graphics.width - YE::MESSAGE::NAME_WINDOW_X
      @name_window.x -= @name_window.width
    end
    @name_text.x = @name_window.x
    @name_window.create_contents
    @name_text.create_contents
    txh = [font_size + (font_size / 5), WLH].max
    @name_text.contents.font.color = text_color(font_colour)
    @name_text.contents.font.name = font_name
    @name_text.contents.font.size = font_size
    @name_text.contents.font.bold = font_bold
    @name_text.contents.font.italic = font_italic
    @name_text.contents.font.shadow = font_shadow
    if icon > 0
      iw = YE::MESSAGE::ICON_WIDTH
      @name_text.draw_icon(icon, YE::MESSAGE::NAME_WINDOW_W / 2, 0)
      @name_text.contents.draw_text(iw, 0, name_width + 8 - iw, txh, name, 1)
    else
      @name_text.contents.draw_text(0, 0, name_width + 8, txh, name, 1)
    end
    @name_window.open
    @name_text.open
    @name_window_open = true
  end
 
end # Window_Message

#===============================================================================
# Game_Interpreter
#===============================================================================

class Game_Interpreter
 
  #--------------------------------------------------------------------------
  # overwrite Show Text
  #--------------------------------------------------------------------------
  def command_101
    unless $game_message.busy
      $game_message.face_name = @params[0]
      $game_message.face_index = @params[1]
      $game_message.background = @params[2]
      $game_message.position = @params[3]
      flow = true
      loop {
        if @list[@index].code == 101 and meet_stringing_conditions and flow
          @index += 1
        else
          break
        end
        flow = @row_check
        while @list[@index].code == 401 and meet_stringing_conditions
          $game_message.texts.push(@list[@index].parameters[0])
          @index += 1
        end }
      if @list[@index].code == 102 # Show choices
        setup_choices(@list[@index].parameters)
      elsif @list[@index].code == 103 # Number input processing
        setup_num_input(@list[@index].parameters)
      end
      set_message_waiting # Set to message wait state
    end
    return false
  end
 
  #--------------------------------------------------------------------------
  # overwrite setup_choices
  #--------------------------------------------------------------------------
  def setup_choices(params)
    var = $game_variables[YE::MESSAGE::ROW_VARIABLE]
    rows = (var <= 0) ? 4 : var
    if $game_message.texts.size <= rows - params[0].size
      $game_message.choice_start = $game_message.texts.size
      $game_message.choice_max = params[0].size
      for s in params[0]
        $game_message.texts.push(s)
      end
      $game_message.choice_cancel_type = params[1]
      $game_message.choice_proc = Proc.new { |n| @branch[@indent] = n }
      @index += 1
    end
  end
 
  #--------------------------------------------------------------------------
  # meet_stringing_conditions
  #--------------------------------------------------------------------------
  def meet_stringing_conditions
    var = $game_variables[YE::MESSAGE::ROW_VARIABLE]
    rows = (var <= 0) ? 4 : var
    @row_check = (rows > 4) ? true : false
    return true if rows > $game_message.texts.size
    return false
  end
 
end # Game_Interpreter

#===============================================================================
#
# END OF FILE
#
#===============================================================================

TAG •
Comment '8'
  • ?
    사과나무 2010.01.31 12:08

    오오오ㅗ오오오 감사합니다!

    정말 필요했는데 ㅠㅜ

  • ?
    희믜 2010.02.17 16:44

    우와 ! 감사요 !

     

  • ?
    나의우주 2010.02.21 13:57

    우왕.. 감사 ㅎㅎ

  • ?
    박보영 2010.08.12 22:31

    스샷이..필요해요ㅜㅜ

  • ?
    환영유카 2010.10.23 21:30

    그니까는 pf[0]nb[n[1]] 요로코롬 문장에 넣으면 첫번째 해당하는 캐릭에 얼굴이 표기되면서 왼쪽상단에 데이터베이스에 있는 첫번째 이름 표기됩니다.

  • ?
    Maxim_Cool 2012.01.23 05:16

    수고하시네요!!!!

  • profile
    FNS키리토 2012.04.20 09:56

    오오! 이거 진짜 필요했었어요!ㅋ

  • ?
    아키Ra 2016.05.18 19:34
    Window_Popup 파일
    이 없다고 뜨는데 어떻게해야하나요??

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5452
29 메시지 Etude87 Dialogue History Scene file 습작 2014.07.07 1073
28 메시지 Etude87_Item_Choice ver.1.00 file 습작 2013.02.16 1775
27 메시지 문장 및 페이스 정렬 바꾸기 (Neonblack's Text Alignment and Face Flip script) MinaAubert 2012.09.19 2215
26 메시지 메시지를 빠르게 넘겨주는 스크립트 3 타카나시 소라 2012.07.23 5049
25 메시지 HG_POP_TEXT (맵 화면에 문자 표시) 4 file 허걱 2011.09.16 3590
24 메시지 소설풍(노벨풍) 문자 스크립트 31 file 맛난호빵 2011.01.03 5554
23 메시지 캐릭터 대화상자 - Character's Textbox ver 1.0 6 아방스 2010.12.17 6462
22 메시지 Advanced Text System 3.0c by Modern Algebra 3 file Alkaid 2010.09.08 2306
21 메시지 Universal Message System 0.3.0(beta) by ccoa 3 file Alkaid 2010.09.08 2305
20 메시지 Advanced Text System 3.0b by Modern Algebra 3 file Alkaid 2010.09.05 2206
19 메시지 직접 생각해서 만든 "문장 속 특정 단어 색 바꾸기" 10 file X.66 2010.04.28 4365
18 메시지 문장에서1글자마다소리내기 19 작은샛별 2010.03.07 3954
17 메시지 MultiMessage 멀티 메시지 스크립트 9 file 허걱 2010.02.23 4299
16 메시지 넘버님의로딩수정101번눌르긴그레서..... 7 file 알피지vx초짜 2010.01.22 2398
15 메시지 NMS 3.0 Beta 주석 번역본(한글) 4 인천항 2010.01.13 3371
14 메시지 Display Flipped Picture 스크립트 11 Love♡ 2009.11.09 3588
» 메시지 대화창효과 8 078656577er 2009.10.20 5978
12 메시지 얼굴표시 9 허걱 2009.09.23 5003
11 메시지 [완성]RPG Maker VX용 한글 조사 자동결정 10 file 시릴캣 2009.08.13 4601
10 메시지 메시지 오른쪽 정렬되어 나오는 스크립트 3 file 아방스 2009.07.12 3239
Board Pagination Prev 1 2 Next
/ 2