VX 스크립트

11.PNG

 

이번 스크립트는 메시지가 출력될때 기본족으로 오른쪽정렬되어 출력되게 하는 스크립트입니다.

 

사용법은 스크립트만 추가시켜 주시면 적용이 됩니다. ^^

 

 

=begin
                        Arabic Reading Right to left

Author: Bulletxt
Version: 0.4
Date: 11/07/2009
=end

# this is an id switch, if ON it will reverse the letters of a word.
# example: "Hello World" will be "olleH dlroW"
REVERSE_LETTERS_OF_WORD = 1

############################## END CONFIGURATION ###############################

class Window_Message < Window_Selectable

  #--------------------------------------------------------------------------
  # * Start Message
  #--------------------------------------------------------------------------
  def start_message
    @text = ""
    for i in 0...$game_message.texts.size
      @text += "    " if i >= $game_message.choice_start
      m = $game_message.texts.shift

      m = m.split(//u).reverse.join
      m = m.split(/ /).map { |w| w.split(//u).reverse.join}.join(' ') if $game_switches[REVERSE_LETTERS_OF_WORD]
      
      #debug sentance
      #p sprintf (m)
      @text += m + "x00"

    end
    @item_max = $game_message.choice_max
    convert_special_characters
    reset_window
    new_page
  end
  
  #--------------------------------------------------------------------------
  # * New Page
  #--------------------------------------------------------------------------
  def new_page
    contents.clear
    if $game_message.face_name.empty?
      @contents_x = 512
    else
      name = $game_message.face_name
      index = $game_message.face_index
      draw_face(name, index, 416, 0)
      @contents_x = 406
    end
    @contents_y = 0
    @line_count = 0
    @show_fast = false
    @line_show_fast = false
    @pause_skip = false
    contents.font.color = text_color(0)
  end
  #--------------------------------------------------------------------------
  # * New Line
  #--------------------------------------------------------------------------
  def new_line
    if $game_message.face_name.empty?
      @contents_x = 512
    else
      @contents_x = 406
    end
    @contents_y += WLH
    @line_count += 1
    @line_show_fast = false
  end

  #--------------------------------------------------------------------------
  # * Update Message
  #--------------------------------------------------------------------------
  def update_message
    loop do
      c = @text.slice!(/./m)            # Get next text character
      case c
      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_LINE      # 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!(/[([0-9]+)]/, "")
        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
      else                              # Normal text character
        c_width = contents.text_size(c).width
        @contents_x -= c_width
        contents.draw_text(@contents_x, @contents_y, 40, WLH, c)

      end
      break unless @show_fast or @line_show_fast
    end
  end
  
end
Comment '3'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
29 메시지 Etude87 Dialogue History Scene file 습작 2014.07.07 1069
28 메시지 Etude87_Item_Choice ver.1.00 file 습작 2013.02.16 1771
27 메시지 Advanced Text System 3.0b by Modern Algebra 3 file Alkaid 2010.09.05 2206
26 메시지 문장 및 페이스 정렬 바꾸기 (Neonblack's Text Alignment and Face Flip script) MinaAubert 2012.09.19 2212
25 메시지 Advanced Text System 3.0c by Modern Algebra 3 file Alkaid 2010.09.08 2302
24 메시지 Universal Message System 0.3.0(beta) by ccoa 3 file Alkaid 2010.09.08 2304
23 메시지 넘버님의로딩수정101번눌르긴그레서..... 7 file 알피지vx초짜 2010.01.22 2394
» 메시지 메시지 오른쪽 정렬되어 나오는 스크립트 3 file 아방스 2009.07.12 3237
21 메시지 NMS 3.0 Beta 주석 번역본(한글) 4 인천항 2010.01.13 3369
20 메시지 MessageSound v2.0 글자에 소리 다다닥 스크립트 21 할렘 2009.02.02 3510
19 메시지 Display Flipped Picture 스크립트 11 Love♡ 2009.11.09 3585
18 메시지 HG_POP_TEXT (맵 화면에 문자 표시) 4 file 허걱 2011.09.16 3589
17 메시지 문장에서1글자마다소리내기 19 작은샛별 2010.03.07 3951
16 메시지 문자픽쳐 표시 스크립트 7 file 좀비사냥꾼 2009.03.19 4144
15 메시지 Quick Face Border 12 아방스 2008.03.05 4161
14 메시지 문장 넘길대 소리나게 하는스크립트 19 아방스 2008.01.24 4180
13 메시지 네오 메시지 시스템 최신 17 file RPGbooster 2008.10.08 4251
12 메시지 MultiMessage 멀티 메시지 스크립트 9 file 허걱 2010.02.23 4296
11 메시지 직접 생각해서 만든 "문장 속 특정 단어 색 바꾸기" 10 file X.66 2010.04.28 4363
10 메시지 조합한글 21 file 허걱 2009.06.27 4409
Board Pagination Prev 1 2 Next
/ 2