질문과 답변

Extra Form

http://avangs.info/rgss_vx/264048


이 스크립트를 스크립트 에디터에서 여기에 추가에 넣었는데

나오라는 한글은 안나오고 일어만 자꾸 나오네요


어떻게 해야하나요

Comment '18'
  • profile
    습작 2012.12.31 12:06
    0.
    해당 스크립트 자체는 문제가 없는 것입니다. 해당 스크립트를 추가한 위치가 정확한지 확인하시고, 그럼에도 불구하고 계속 문제가 발생한다면 작업중이신 스크립트 파일을 업로드 해보시기 바립니다. 스크립트 파일은 프로젝트 Data 폴더안에 있습니다.
  • ?
    KeV 2012.12.31 12:49
    .rvdata파일이 안올라가서 .txt로 강제로 바꿔서 올립니다.
    다운로드 하신 후에 .rvdata로 확장자를 바꾸셔서 문제점좀 알려주세요.
  • profile
    습작 2012.12.31 13:08
    1.
    일본어 이름 입력 스크립트인 名前入力画面가 한글어 이름 입력 스크립트보다 하단에 위치하기 때문에 해당 클래스의 내용을 재정의하고 있습니다. 위치를 서로 바꾸어주시거나, 일본어 이름 입력 스크립트를 삭제해 주세요.
  • ?
    KeV 2012.12.31 13:17
    엇 이걸 못봤네요
    감사합니다.
  • ?
    KeV 2012.12.31 13:28
    죄송합니다만
    470번 라인에 undefined method 'name_actor_id' for #<Game_Temp:0x16138d8>
    이라고 뜨는데 어떻게 해야하나요
  • profile
    습작 2012.12.31 13:50
    살펴보니 기본 스크립트에도 수정한 부분이 있네요.

    Scene_Map, Game_Interpreter, Game_Temp, Sound 등 여러곳이 수정되었는데, 이 이상 어디를 수정했는지 확실치 않아, 해당 부분들을 원상복귀하는 것을 추천해 드릴 수가 없네요.

    차라리 한글로 이름 입력하는 스크립트를 수정하는 방향으로 진행하는 것이 좋을 듯 합니다. 그 부분은 차후 댓글로 달아드리겠습니다.
  • profile
    습작 2012.12.31 13:55
    한글 이름 입력 스크립트에서 수정한 부분은 붉은 글씨로 수정하였습니다. 테스트를 많이 하지는 못했으니 추가 에러 발생시 재 문의 부탁드립니다.

    #==============================================================================
    # ■ Name Window Setting
    #==============================================================================
    module NWS
      
      BACKGROUND = true  #배경의 표시여부(true: 표시, false: 표시X)
      OPACITY = 200 #윈도우의 투명도(0~255)
      
      #캐릭터 그림과 이름이 표시되는 위쪽의 윈도우 부분
      NEW_X = 136 #x좌표
      NEW_Y = 72 # Y좌표
      
      #숫자, 자음, 모음 각각의 요소가 표시되는 아래쪽의 윈도우 부분
      NIW_X = 136 #x좌표
      NIW_Y = 200 # Y좌표
      
      #숫자, 자음, 모음 각각의 요소
      #순서를 바꿔도 괜찮고, ABCD라던가 새롭게 추가해도 괜찮습니다.
      #다만 바뀐것과 같게 아래의 VER_LINE, HOR_LINE, CONFIRM 세개도 
      #수정해 줍시다.
      TABLE = [ '1','2','3','4','5', '6','7','8','9','0',
                  'ㅂ','ㅈ','ㄷ','ㄱ','ㅅ', 'ㅛ','ㅕ','ㅑ','ㅐ','ㅔ',
                  'ㅃ','ㅉ','ㄸ','ㄲ','ㅆ',  '','','','ㅒ','ㅖ',
                  'ㅁ','ㄴ','ㅇ','ㄹ','ㅎ', 'ㅗ','ㅓ','ㅏ','ㅣ','',
                  'ㅋ','ㅌ','ㅊ','ㅍ','','ㅠ','ㅜ','ㅡ','','결정']
      VER_LINE = 5 #세로의 갯수
      HOR_LINE = 10 #가로의 갯수
      CONFIRM = 49 #'결정'의 위치
      
    end
    #==============================================================================
    # ■ Window_NameEdit
    #==============================================================================
    class Window_NameEdit < Window_Base
    #---------------------------------------------------------------------------
      CONSO = ["ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄸ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ","ㅁ","ㅂ","ㅃ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"]
      HEAD = ["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"]
      TABLE = ["ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ","ㅁ","ㅂ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"]
      TABLE_SIDE = ["ㄱ","ㄴ","ㄹ","ㅂ"]
      ANOTHER_TABLE_SIDE = [[nil,"ㅅ"],["ㅈ","ㅎ"],["ㄱ","ㅁ","ㅂ","ㅅ","ㅌ","ㅍ","ㅎ"],[nil,"ㅅ"]]
      VOWEL = ["ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ","ㅟ","ㅠ","ㅡ","ㅢ","ㅣ"]
      COM_VOWEL = ["ㅗ","ㅜ","ㅡ"]
      ANOTHER_COM_VOWEL = [["ㅏ","ㅐ","ㅣ"],["ㅓ","ㅔ","ㅣ"],"ㅣ"]
    #--------------------------------------------------------------------------
      attr_reader   :name                     # 이름
      attr_reader   :prompt                     # 프롬프트
      attr_reader   :index                     # 커서 위치
      attr_reader   :max_char               # 최대 문자수
    #--------------------------------------------------------------------------
      def initialize(actor, max_char)
        super(NWS::NEW_X, NWS::NEW_Y, (NWS::HOR_LINE + 1) * 32, 128)
        self.contents = Bitmap.new(width - 32, height - 32)
        self.opacity = NWS::OPACITY
        @actor = actor
        @prompt = []
        @max_char = max_char
        name_array = actor.name.split(//)[0...@max_char]
        @name = []
        @default_name = []
        for i in 0...name_array.size
          @name << name_array[i]
          @default_name << name_array[i]
        end
        self.active = false
        refresh
      end
    #--------------------------------------------------------------------------
      def restore_default
        @name = @default_name.dup
        @prompt = []
        refresh
      end
    #--------------------------------------------------------------------------
      def add(character)
        @prompt << character
        refresh
      end
    #--------------------------------------------------------------------------
      def back
        @prompt == [] ? @name.pop : @prompt.pop
        refresh
      end
    #--------------------------------------------------------------------------
      def item_rect(index)
        rect = Rect.new(0, 0, 0, 0)
        rect.x = 188 - (@max_char + 1) * 12 + index * 32
        rect.y = 32
        rect.width = 32
        rect.height = 32
        return rect
      end
    #--------------------------------------------------------------------------
      def refresh
        self.contents.clear
        draw_actor_graphic(@actor, 60, 70)
        name = prompt_to_letter
        if @name.size == @max_char
              @prompt = []
              name = ""
              @index = @name.size - 1
        else
              @index = @name.size
        end
        for i in 0...@name.size
          self.contents.draw_text(item_rect(i), @name[i], 1)
        end
        self.contents.draw_text(item_rect(@name.size), name, 1)
        update_cursor
      end
    #--------------------------------------------------------------------------
      def update_cursor
        self.cursor_rect = item_rect(@index)
      end
    #--------------------------------------------------------------------------
      def update
        super
        update_cursor
      end
     
    #============================================================================
    # ■ prompt_to_letter, 1st~5th phase, where?(array = from, c = what)
    #----------------------------------------------------------------------------
    # 이 이하는 글자를 조합하는 내용입니다.
    # 다른 부분은 관계없지만, 이 이하의 부분은 수정하지 않길 권장합니다.
    # 일부 폰트에서 특정 문자가 표현되지 않습니다. (삃,쮃 등등..)
    #
    # 2009. 3. 18 by Heircoss
    #============================================================================
      def prompt_to_letter
        size = @prompt.size
        case size
        when 0
              return ""
        when 1
              return @prompt[0]
        when 2
              first_phase
        when 3
              second_phase
        when 4
              third_phase
        when 5
              fourth_phase
        when 6
              fifth_phase
        end
      end
      def first_phase
        if CONSO.include?(@prompt[0])
              if CONSO.include?(@prompt[1])
                    c0, c1 = conso_plus_conso
              else
                    return conso_plus_vowel
              end
        else
              c0, c1 = vowel_plus_vowel
        end
        if c1 == nil
              return c0
        else
              @name << @prompt.shift
        end                  
        return @prompt[0]
      end
      def second_phase
        if CONSO.include?(@prompt[0])
              if CONSO.include?(@prompt[1])
                    if CONSO.include?(@prompt[2])
                          @name << conso_plus_conso(@prompt.shift, @prompt.shift)
                    else
                          @name << @prompt.shift
                          return conso_plus_vowel
                    end
              else
                    if TABLE.include?(@prompt[2])
                          return conso_plus_vowel_plus_table
                    else
                          c0, c1 = vowel_plus_vowel(@prompt[1], @prompt[2])
                          if c1 == nil
                                return conso_plus_vowel(@prompt[0],c0)
                          else
                                @name << conso_plus_vowel(@prompt.shift, @prompt.shift)
                          end
                    end
              end
        else
              @name << vowel_plus_vowel(@prompt.shift, @prompt.shift)
        end
        return @prompt[0]
      end
      def third_phase
        if CONSO.include?(@prompt[2])
              if CONSO.include?(@prompt[3])
                    c0, c1 = conso_plus_conso(@prompt[2], @prompt[3])
                    if c1 == nil
                          conso, vowel, table = @prompt[0],@prompt[1],c0
                          return conso_plus_vowel_plus_table(conso, vowel, table)
                    else
                          conso, vowel, table = @prompt.shift, @prompt.shift, @prompt.shift
                          @name << conso_plus_vowel_plus_table(conso, vowel, table)
                    end          
              else
                    conso, vowel = @prompt.shift, @prompt.shift
                    @name << conso_plus_vowel(conso, vowel)
                    return  conso_plus_vowel
              end
        else
              if TABLE.include?(@prompt[3])
                    conso = @prompt[0]
                    vowel = vowel_plus_vowel(@prompt[1], @prompt[2])
                    table = @prompt[3]
                    return conso_plus_vowel_plus_table(conso, vowel, table)
              else
                    conso = @prompt.shift
                    vowel = vowel_plus_vowel(@prompt.shift, @prompt.shift)
                    @name << conso_plus_vowel(conso, vowel)
              end
        end
        return @prompt[0]
      end
      def fourth_phase
        if CONSO.include?(@prompt[4])
              if CONSO.include?(@prompt[2])
                    conso = @prompt.shift
                    vowel = @prompt.shift
                    table = conso_plus_conso(@prompt.shift,@prompt.shift)
                    @name << conso_plus_vowel_plus_table(conso, vowel, table)
              else
                    c0, c1 = conso_plus_conso(@prompt[3], @prompt[4])
                    if c1 == nil
                          conso = @prompt[0]
                          vowel = vowel_plus_vowel(@prompt[1], @prompt[2])
                          table =  c0
                          return conso_plus_vowel_plus_table(conso, vowel, table)
                    else
                          conso = @prompt.shift
                          vowel = vowel_plus_vowel(@prompt.shift, @prompt.shift)
                          table = @prompt.shift
                          @name << conso_plus_vowel_plus_table(conso, vowel, table)
                    end
              end
        else
              @name << second_phase
              @prompt = @prompt[3..4]
              return first_phase
        end
        return @prompt[0]  
      end
      def fifth_phase
        if CONSO.include?(@prompt[5])
          conso = @prompt.shift
          vowel = vowel_plus_vowel(@prompt.shift, @prompt.shift)
          table = conso_plus_conso(@prompt.shift, @prompt.shift)
          @name << conso_plus_vowel_plus_table(conso, vowel, table)
        else
          @name << third_phase
          @prompt = @prompt[4..5]
          return first_phase
        end
        return @prompt[0]
      end
      def conso_plus_conso(c0 = @prompt[0], c1 = @prompt[1])
        index0 = where?(TABLE_SIDE,c0)
        if index0 != nil
              index1 = where?(ANOTHER_TABLE_SIDE[index0],c1)
              if index1 != nil
                    index0 = where?(CONSO, c0)
                    return CONSO[index0 + index1 + 1]
              end
        end
        return c0, c1
      end
      def vowel_plus_vowel(c0 = @prompt[0], c1 = @prompt[1])
        index0 = where?(COM_VOWEL,c0)
        if index0 != nil
              index1 = where?(ANOTHER_COM_VOWEL[index0],c1)
              if index1 != nil
                    index0 = where?(VOWEL, c0)
                    return VOWEL[index0 + index1 + 1]
              end
        end
        return c0, c1                 
      end                  
      def conso_plus_vowel(c0 = @prompt[0], c1 = @prompt[1])
        index0 = where?(HEAD,c0)
        index1 = where?(VOWEL,c1)                        
        return [44032 + (588 * index0) + (28 * index1)].pack('U*')
      end
      def conso_plus_vowel_plus_table(c0 = @prompt[0], c1 = @prompt[1], c2 = @prompt[2])
        index0 = where?(HEAD,c0)
        index1 = where?(VOWEL,c1)
        index2 = where?(TABLE,c2)
        return [44032 + (588 * index0) + (28 * index1) + index2 + 1].pack('U*')
      end
      def where?(array, c)
        if array.class != Array && array == c
              return 0
        else
              array.each_with_index do |item, index|
                    return index if item == c
              end
        end
        return nil
      end            
    end
    #============================================================================
    # ■ 여기까지
    #============================================================================
    #============================================================================
    # ■ Window_NameInput
    #============================================================================
    class Window_NameInput < Window_Base
    #--------------------------------------------------------------------------
      def initialize
        super(NWS::NIW_X, NWS::NIW_Y, (NWS::HOR_LINE + 1) * 32, (NWS::VER_LINE + 1) * 32 )
        self.contents = Bitmap.new(width - 32, height - 32)
        self.opacity = NWS::OPACITY
        @index = 0
        refresh
        update_cursor
      end
    #--------------------------------------------------------------------------
      def character
        return NWS::TABLE[@index]
      end
    #--------------------------------------------------------------------------
      def is_decision
        return (@index == NWS::CONFIRM)
      end
    #--------------------------------------------------------------------------
      def item_rect(index)
        rect = Rect.new(0, 0, 0, 0)
        rect.x = index % NWS::HOR_LINE * 32
        rect.y = index / NWS::HOR_LINE * 32
        rect.width = 32
        rect.height = 32
        return rect
      end
    #--------------------------------------------------------------------------
      def refresh
        self.contents.clear
        for i in 0...NWS::TABLE.size
          rect = item_rect(i)
          rect.x += 2
          rect.width -= 4
          self.contents.draw_text(rect, NWS::TABLE[i], 1)
        end
      end
    #--------------------------------------------------------------------------
      def update_cursor
        self.cursor_rect = item_rect(@index)
      end
    #--------------------------------------------------------------------------
      def cursor_down(wrap)
        if @index < NWS::VER_LINE * NWS::HOR_LINE - NWS::HOR_LINE
          @index += NWS::HOR_LINE
        elsif wrap
          @index -= NWS::VER_LINE * NWS::HOR_LINE - NWS::HOR_LINE
        end
      end
    #--------------------------------------------------------------------------
      def cursor_up(wrap)
        if @index >= NWS::HOR_LINE
          @index -= NWS::HOR_LINE
        elsif wrap
          @index += NWS::VER_LINE * NWS::HOR_LINE - NWS::HOR_LINE
        end
      end
    #--------------------------------------------------------------------------
      def cursor_right(wrap)
        if @index % NWS::HOR_LINE < (NWS::HOR_LINE - 1)
          @index += 1
        elsif wrap
          @index -= (NWS::HOR_LINE - 1)
        end
      end
    #--------------------------------------------------------------------------
      def cursor_left(wrap)
        if @index % NWS::HOR_LINE > 0
          @index -= 1
        elsif wrap
          @index += (NWS::HOR_LINE - 1)
        end
      end
    #--------------------------------------------------------------------------
      def cursor_to_decision
        @index = NWS::CONFIRM
      end
    #--------------------------------------------------------------------------
      def update
        super
        last_mode = @mode
        last_index = @index
        if Input.repeat?(Input::DOWN)
          cursor_down(Input.trigger?(Input::DOWN))
        end
        if Input.repeat?(Input::UP)
          cursor_up(Input.trigger?(Input::UP))
        end
        if Input.repeat?(Input::RIGHT)
          cursor_right(Input.trigger?(Input::RIGHT))
        end
        if Input.repeat?(Input::LEFT)
          cursor_left(Input.trigger?(Input::LEFT))
        end
        if Input.trigger?(Input::A)
          cursor_to_decision
        end
        if @index != last_index
          
        end
        update_cursor
      end
    end
    #===========================================================================
    # ■ class Scene_Name_ex
    #===========================================================================
    class Scene_Name_ex
    #---------------------------------------------------------------------------
      def main
        @actor = $game_actors[$game_temp.id]
        back = Spriteset_Map.new if NWS::BACKGROUND == true
        @edit_window = Window_NameEdit.new(@actor, $game_temp.name_max_char)
        @input_window = Window_NameInput.new
        Graphics.transition
        loop do
          Graphics.update
          Input.update
          update
          if $scene != self
            break
          end
        end
        Graphics.freeze
        back.dispose if NWS::BACKGROUND == true
        @edit_window.dispose
        @input_window.dispose
      end
    #--------------------------------------------------------------------------
      def terminate
        @menuback_sprite.dispose
        @edit_window.dispose
        @input_window.dispose
      end
    #--------------------------------------------------------------------------
      def return_scene
        $scene = Scene_Map.new
      end
    #--------------------------------------------------------------------------
      def update
        @edit_window.update
        @input_window.update
        if Input.repeat?(Input::B)
          if @edit_window.name == [] && @edit_window.prompt == []
            $game_system.se_play($data_system.buzzer_se)
          else
            @edit_window.back
          end
        elsif Input.trigger?(Input::C)
          if @input_window.is_decision
            if @edit_window.name.size == 0 && @edit_window.prompt.size == 0        # 이름이 비어있는 경우
              @edit_window.restore_default
              if @edit_window.name.size == 0 && @edit_window.prompt.size == 0
                $game_system.se_play($data_system.buzzer_se)
              else
                $game_system.se_play($data_system.decision_se)
              end
            else
              name = @edit_window.prompt_to_letter
              name = @edit_window.name.to_s + name
              @actor.name = name
              return_scene
            end
          elsif @input_window.character != "" && @input_window.character != nil
            if @edit_window.name.size > @edit_window.max_char
              $game_system.se_play($data_system.buzzer_se)
            else
              @edit_window.add(@input_window.character)        
            end
          end
        end
      end
    end
  • ?
    KeV 2012.12.31 14:05
    이번에는 Scene_Name 14번 줄에서 undefined method 'name_actor_id'가 뜨는데요
    Ruby는 다룰줄을 몰라서...
  • profile
    습작 2012.12.31 14:08
    에, 클래스 Scene_Name은 호출하지 않지 않나요? 제작자는 Scene_Name_ex를 호출하도록 했을텐데요?
  • ?
    KeV 2012.12.31 14:13
    그런가... 근데 이상하게 Scene_Name 스크립트에서 에러가 터지는데요
  • profile
    습작 2012.12.31 14:15
    죄송하지만, 다시 파일 업로드 부탁드립니다.^^;;
  • ?
    KeV 2012.12.31 14:18
    다시 올렸습니다 ^^
  • profile
    습작 2012.12.31 14:22 Files첨부 (1)

    확인 부탁드립니다.^^

  • ?
    KeV 2012.12.31 14:27
    오오오오 감사합니다
    드디어 작동이 되는군요

    죄송하지만 어느부분이 문제였는지 알려주실수 있나요
    메모를 좀 해둬야할것같은데
  • profile
    습작 2012.12.31 14:31
    처리는 위에서 언급한 바와 같이, 한글 이름 입력 스크립트에서 Scene_Name 클래스명을 Scene_Name_ex로 수정하고, $game_temp.name_actor_id를 $game_temp.id로 수정한 것이 전부입니다. 다만, 기존의 일본어 이름 입력 스크립트가 하단에서 재정의 해주고 있었기 때문에 서로 위치를 바꿔주거나 아니면 일본어 이름 입력 스크립트를 지워야 했기 때문에 그냥 지웠습니다.
  • ?
    KeV 2012.12.31 14:32
    일본어 이름입력 스크립트 주석처리되있지 않았나요?
    주석처리한걸로 기억하는데
  • profile
    습작 2012.12.31 14:33
    그냥 지워서 거기까진 확인하지 못했네요. 처리내용은 위의 것이 전부랍니다.^^
  • ?
    KeV 2012.12.31 14:46
    네 답변 감사합니다.^^

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 21145
기타 RMMV 전투시 이미지 띄움 1 file 건담타 2025.06.14 44
스크립트 추천 RMMV 맵에 백그라운드 이미지 2장을 쓰고 싶습니다. 1 아무것도몰루 2025.06.23 46
기타 기타 RPG 95 튕김 현상 해결방법 인큐버스 2023.01.20 47
RMVXA 이벹트 질문 1 마하반야 2021.05.08 52
이벤트 작성 RMVXA 이벤트 1 에이에스디에프 2021.08.11 52
이벤트 작성 RMMV 영상 연속재생 쿨타임 hurakan 2020.08.11 53
기타 RMMV 상태이상 발동 확률을 변수나 캐릭터 능력치 등으로 결정하고 싶습니다. 레기우스州 2020.08.27 53
에러 해결 RMVXA vx ace 정상적인 작동이 안됩니다 바퀴벌레의질긴생명력 2020.07.17 55
스크립트 사용 RMVXA 다음 맵으로 넘어갈때 원경 고정 풀리게 하는법좀요 도르마무 2020.03.10 55
스크립트 사용 RMVXA 턴제전투 끝나고 나오는 이벤트에서 SE 오류 유리컵 2020.03.30 55
RMXP 선택으로 다른 이벤트에 영향을 줄수있는 방법 있나요? lim9109 2020.05.03 56
RMMV 도트 임포트가 이상해요ㅠㅠ 에일링 2018.01.03 57
기타 RMMV 특정스탯이 되면 죽은것으로 처리하고 싶습니다. 2 JDG 2020.08.18 58
스크립트 작성 RMVXA 스킬의 일괄 삭제와 특정 변수 값을 가진 스킬을 배우게 하고 싶습니다 김탲누 2020.05.11 59
에러 해결 RMVXA 탈 것에 내리면 캐릭터가 투명이 됩니다. objuan 2019.08.26 59
플러그인 추천 RMMV 적의 정보를 스캔해주는 스킬 플러그인이 있나요? PPPL 2020.04.14 59
기타 RMVXA 메시지 출력 부분 x좌표를 변경하고싶어요! file 당고당고 2020.08.07 60
이벤트 작성 RMMV 플레이어에게로 이동 버그 어떻게 해결하나요? 1 hurakan 2021.08.02 60
스크립트 사용 RMVXA 전투중 적이 누구를 노리는지 미리 알수 있는 스크립트가 있을까요 겜만들고싶다앙 2021.04.10 60
기본툴 사용법 RMMV 전투중에 메세지 창을 띄워도 UI나 윈도우가 사라지지 않게 할 수 있나요? PPPL 2020.04.13 61
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 518 Next
/ 518