질문과 답변

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 12448
스크립트 작성 RMMV 변수에 따라 표시이미지를 다르게 띄우고 싶습니다 1 file 도Vㅏ킨 2024.06.23 14
스크립트 추천 RMVXA 미니게임을 하는동안 위에 점수판을 띄워주고싶은데 방법이 없을까요? 홍홍이1 2024.02.07 15
이벤트 작성 RMVXA 스위치가 꺼질 경우 이미지를 끄게 하고 싶습니다. 1 Payroy 2024.01.05 16
에러 해결 RMMV bgm파일이 뜨지를 않아요 1 초본 2024.01.10 16
이벤트 작성 RMMV 보트가 움직여지지 않습니다. 3 file pokapoka 2024.02.19 17
맵배치 RMXP 맵칩 버그 ssplokks 2023.10.20 18
에러 해결 RMVXA rgss301파일이 복사 붙여넣기가 안됩니다 다크크리에이터 2023.11.16 18
퀘스트 작성 RMVXA 연타 이벤트가 안 작동되어요... 1 file tokki 2023.12.24 18
기본툴 사용법 RMVXA 특정 맵에서 플레이어가 움직이지 않습니다. 유_ 2023.12.25 19
액션 전투 RMMV 메인 메뉴 혹은, 현재 메뉴 화면을 새로고침 할 수 있는 방법이 궁급합니다. 니노미야 2023.11.20 19
기타 RMVXA 대사 글꼴 바꾸는법좀 알려주세요 ㅠ 극세사이불 2024.02.26 20
기본툴 사용법 RMMV 분명히 배경음악 m4a+ogg 파일 둘 다 넣었는데 게임 툴에서 인식을 못합니다 파트로클로스 2023.12.08 21
기타 RMMV 색조변경이 적용되지 않는 이벤트 무명시절 2023.01.08 21
스크립트 사용 RMVXA 전투 개시시 상태 부여 스크립트 질문 AAAA. 2023.11.14 21
이벤트 작성 RMVXA 대화 중 이벤트 멈춤 해결 방안 질문 1 이름뭐하지 2024.05.19 22
게임 배포 RMMZ 여러분들 게임 파일 단일화 어떤 프로그램으로 하시나요? 하라아아암 2023.11.22 22
에러 해결 RMXP BGM을 발견못하는 오류 file wombat 2024.01.31 22
기타 RMMV 플레이어가 팔로어를 바라보고 있다라는 스크립트를 찾고 있습니다 무명시절 2024.01.04 23
기타 RMMZ 그림을 클릭하면 이벤트 발생 1 Sian 2024.02.07 23
기타 기타 RPG 95 튕김 현상 해결방법 인큐버스 2023.01.20 24
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 516 Next
/ 516