질문과 답변

Extra Form

사진 보시는 것 처럼


레벨이 두자리 수가 되면서 저렇게 쪼그라 들듯이 붙어버리구요


체력, 마력 << 이 글씨도 그렇네요


체력도 높아지면 쪼그라들길래... 보기 흉해서 일부러 체력도 대폭 낮춘건데


다른부분이 또그러네요 ㅠㅠ


이거 해결 방법 없을까요??? 부탁드립니다


폰트 변경해서 바른고딕 쓰고있는데 폰트 문제는 아닌듯 한데요...ㅠㅠ

Comment '7'
  • profile
    9qxb6 2015.06.21 17:57

    스크립트로 기본 폰트 사이즈를 크게 하셨군요. '체력', '마력', 레벨 등의 정보를 그릴 때 폰트 사이즈를 지정해주지 않으면 전부 기본 폰트 사이즈를 따라가기 때문에 이런 일이 생깁니다.


    그러므로 일단 이 정보들만을 위해서 폰트 사이즈를 따로 지정해줍시다.


    "contents.font.size = 20" <= 임의로 20을 넣었지만 적당한 값을 입력하셔도 됩니다. 원래 폰트 보다는 작아야겠죠?


    VXACE의 창에서 글자를 그릴 때는, 말하자면 '캔버스'를 지정해 놓고 그 안에서만 글자를 그리는데요. 그릴 때 캔버스가 좁아서 글자를 다 못 쓸 것 같으면 일단 넓이를 최대한 압축해서 그려보고 그래도 안되면 그냥 나머지 글자를 그리다 맙니다. 그렇다면 캔버스의 크기를 조금만 늘려봅시다.

    "draw_text(x, y, 45, line_height, Vocab::hp_a)" <= 45부분이 원래는 30이었습니다. '캔버스'의 넓이를 늘린 것입니다.

    아래의 스크립트를 외부의 스크립트를 추가하는 방식과 동일하게 추가해주십시오.

    class Window_Status < Window_Selectable
      alias draw_basic_info_9qxb6_cbho  draw_basic_info
      def draw_basic_info(x, y)
        contents.font.size = 20 #<= 여기에 적절한 값을 대입해주세요.
        draw_basic_info_9qxb6_cbho(x, y)
        contents.font.size = Font.default_size
      end
      
      def draw_actor_hp(actor, x, y, width = 124)
        draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
        change_color(system_color)
        draw_text(x, y, 45, line_height, Vocab::hp_a) #원래는 30
        draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
          hp_color(actor), normal_color)
      end
        
      def draw_actor_mp(actor, x, y, width = 124)
        draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
        change_color(system_color)
        draw_text(x, y, 45, line_height, Vocab::mp_a) #원래는 30
        draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
          mp_color(actor), normal_color)
      end
        
      def draw_actor_level(actor, x, y)
        change_color(system_color)
        draw_text(x, y, 32, line_height, Vocab::level_a)
        change_color(normal_color)
        draw_text(x + 32, y, 36, line_height, actor.level, 2) #원래 width는 24
      end
    end
  • ?
    비백 2015.06.21 19:04 Files첨부 (1)

    정말!! 감사합니다

    이렇게 스크립트에 새로 추가 해주니까

    정보 창에 들어가서 볼때는 제대로 표기가 됩니다.

    그런데 메뉴창에서는 여전히 레벨 숫자와 체력 글씨가 작은제목 없음.png데 이건 어떻게 하나요?ㅠㅠ



  • profile
    9qxb6 2015.06.21 19:22
    창의 종류(클래스)만 다른 거 빼면 거의 똑같습니다.

    class Window_MenuStatus < Window_Selectable
      def draw_actor_simple_status(actor, x, y)
        #작게 그리고 싶은 부분-----------------------------
        contents.font.size = 20
        draw_actor_level(actor, x, y + line_height * 1)
        draw_actor_hp(actor, x + 120, y + line_height * 1)
        draw_actor_mp(actor, x + 120, y + line_height * 2)
        #원래 크기로 그리고 싶은 부분-----------------------------
        contents.font.size = Font.default_size
        draw_actor_name(actor, x, y)
        draw_actor_icons(actor, x, y + line_height * 2)
        draw_actor_class(actor, x + 120, y)
      end
      
      def draw_actor_hp(actor, x, y, width = 124)
        draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
        change_color(system_color)
        draw_text(x, y, 45, line_height, Vocab::hp_a) #원래는 30
        draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
          hp_color(actor), normal_color)
      end
        
      def draw_actor_mp(actor, x, y, width = 124)
        draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
        change_color(system_color)
        draw_text(x, y, 45, line_height, Vocab::mp_a) #원래는 30
        draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
          mp_color(actor), normal_color)
      end
        
      def draw_actor_level(actor, x, y)
        change_color(system_color)
        draw_text(x, y, 32, line_height, Vocab::level_a)
        change_color(normal_color)
        draw_text(x + 32, y, 36, line_height, actor.level, 2) #원래 width는 24
      end
    end

    아까 올린 스크립트 아래에 추가해주세요.
  • ?
    비백 2015.06.21 19:35
    우오!!!!! 완벽하네요!!
    정말 감사드립니다 ^^
    이렇게 까지 잘 알려주시다니....
    감사합니다!!!
  • ?
    비백 2015.06.21 19:46
    클래스만 빼고 거의 다 비슷하다고 하셨잖아요.
    그래서 제가 좀 해보려고 했거든요

    class Window_Status < Window_Selectable

    alias draw_basic_info_9qxb6_cbho draw_basic_info

    def draw_basic_info(x, y)

    contents.font.size = 20 #<= 여기에 적절한 값을 대입해주세요.

    draw_basic_info_9qxb6_cbho(x, y)

    contents.font.size = Font.default_size

    end



    def draw_actor_hp(actor, x, y, width = 124)

    draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)

    change_color(system_color)

    draw_text(x, y, 45, line_height, Vocab::hp_a) #원래는 30

    draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,

    hp_color(actor), normal_color)

    end

    이런식으로 되어있으면 저기 맨 위에 클래스 부분에서 배틀 장면에서의 HP 쪼그라드는거 바꿀려면
    어떤창인지를 모르겠네요 ㅠㅠ
  • profile
    9qxb6 2015.06.21 21:16

    그렇다면 차라리 가장 상위 클래스인 Window_Base의 메서드를 재정의합시다.

    그렇게 되면 Window_Status도 WIndow_MenuStatus도 Window_BattleStatus도 기타 등등도 전부 Window_Base의 메서드를 받아서 이용하게 됩니다.


    지금까지 제가 올린 2개의 스크립트를 지우시고 아래의 스크립트 하나만 추가해주세요.


    module Window_9qxb6

      #자주 쓰여서 그냥 모듈의 상수로 집어 넣었습니다.

      FONT_SIZE_SMALL = 20 #<= 적당한 수로 수정해주세요.

    end


    class Window_Base < Window

      def draw_actor_hp(actor, x, y, width = 124, font_size = Window_9qxb6::FONT_SIZE_SMALL)

        contents.font.size = font_size

        draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)

        change_color(system_color)

        draw_text(x, y, 45, line_height, Vocab::hp_a) #원래는 30

        draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,

          hp_color(actor), normal_color)

        contents.font.size = Font.default_size

      end

        

      def draw_actor_mp(actor, x, y, width = 124, font_size = Window_9qxb6::FONT_SIZE_SMALL)

        contents.font.size = font_size

        draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)

        change_color(system_color)

        draw_text(x, y, 45, line_height, Vocab::mp_a) #원래는 30

        draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,

          mp_color(actor), normal_color)

        contents.font.size = Font.default_size

      end

      

      def draw_actor_tp(actor, x, y, width = 124, font_size = Window_9qxb6::FONT_SIZE_SMALL)

        contents.font.size = font_size

        draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)

        change_color(system_color)

        draw_text(x, y, 45, line_height, Vocab::tp_a) #원래는 30

        change_color(tp_color(actor))

        draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2)

        contents.font.size = Font.default_size

      end

      

      def draw_actor_level(actor, x, y, font_size = Window_9qxb6::FONT_SIZE_SMALL)

        contents.font.size = font_size

        change_color(system_color)

        draw_text(x, y, 32, line_height, Vocab::level_a)

        change_color(normal_color)

        draw_text(x + 32, y, 36, line_height, actor.level, 2) #원래 width는 24

        contents.font.size = Font.default_size

      end

    end


    처음부터 이렇게 할껄 그랬나봐요.

  • ?
    비백 2015.06.21 23:39
    우와!!! 진짜 대단하시네요
    너무 완벽해졌네요 적용해보니까요
    저 혼자 써주신거 보고 독학 하려고 했는데 자꾸 오류떠서 반복하고있었는데...
    너무 감사합니다 ^^
    캬~~~~~~~ 지!전!

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12460
RMVX 어둠속불 사진 4 file VX입문했긩 2014.01.26 942
RMVX 어두을때, 모습달라지게하기 7 file 글쓰는상어 2013.06.26 805
RMVXA 어두운 필드에서 전투장면시에만 화면을 밝게 하려면 어떻게 해야 하나요? 2 repola 2014.05.12 872
RMVXA 어두운 동굴 효과 만드는법을 알고싶습니다. 1 파송송뇌진탕 2013.09.27 1113
RMMV 어느날 갑자기 리소스들이 증발해버렸습니다. file 게임잘날아가는닝겐 2016.02.21 111
기타 어느나라 글자? (중복일지는 모르겠지만) 11 file 동화같은이야기 2013.07.31 1121
RMXP 어느게 더 좋나? 2 keven12345 2011.06.03 1281
RMXP 어느 함수의 변수를 불러오는 방법 4 코아 코스튬 2010.10.30 719
RMVX 어느 지점을 지나면 혼자말 하는 방법 1 휴론 2014.11.19 543
RMVXA 어느 장소에 플레이어가 들어가면 그 장소의 이름이 뜨게하는법 2 file 알만툴 2013.01.06 785
RMVX 어그로(노려짐)확률을 스킬로 설정 할 수 있을까요? 빡새 2013.07.21 703
RMVXA 얘 성별이 뭐죠? 1 file 슘슘슘슘 2015.02.04 269
RMVX 얇은 벽만들기 2 멍짤이 2013.03.01 1089
RMVX 얀파이 Variable Controlled Discounts 사용 질문 2 하늘바라KSND 2012.07.19 931
RMMV 약의 지식이랑 방어효과는 무슨 효과가 있는거죠? 2 zero? 2016.02.10 256
RMVXA 약의 지식? 2 깡쨩 2015.01.26 222
기타 RMMV 약간 복잡한 질문 2 레기우스州 2020.11.21 112
게임찾기 약간 노진구 느낌나는 과학자 캐릭터가 있는 쯔구르게임 찾습니다 4 김군밤 2017.07.04 366
RMMV 앱으로 변환시 조이스틱 질문합니다. 2 ung 2015.12.15 167
RMVXA 앤딩크래딧 4 도스팡고3000M짜리 2013.11.01 998
Board Pagination Prev 1 ... 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 ... 517 Next
/ 517