질문과 답변

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 21168
기타 기타 RPG 95 튕김 현상 해결방법 인큐버스 2023.01.20 47
기타 RMMV 전투시 이미지 띄움 1 file 건담타 2025.06.14 48
스크립트 추천 RMMV 맵에 백그라운드 이미지 2장을 쓰고 싶습니다. 1 아무것도몰루 2025.06.23 51
이벤트 작성 RMVXA 이벤트 1 에이에스디에프 2021.08.11 52
이벤트 작성 RMMV 영상 연속재생 쿨타임 hurakan 2020.08.11 53
RMVXA 이벹트 질문 1 마하반야 2021.05.08 53
기타 RMMV 상태이상 발동 확률을 변수나 캐릭터 능력치 등으로 결정하고 싶습니다. 레기우스州 2020.08.27 54
에러 해결 RMVXA vx ace 정상적인 작동이 안됩니다 바퀴벌레의질긴생명력 2020.07.17 55
스크립트 사용 RMVXA 다음 맵으로 넘어갈때 원경 고정 풀리게 하는법좀요 도르마무 2020.03.10 55
RMXP 선택으로 다른 이벤트에 영향을 줄수있는 방법 있나요? lim9109 2020.05.03 56
스크립트 사용 RMVXA 턴제전투 끝나고 나오는 이벤트에서 SE 오류 유리컵 2020.03.30 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
이벤트 작성 RMMV 플레이어에게로 이동 버그 어떻게 해결하나요? 1 hurakan 2021.08.02 60
기타 RMVXA 메시지 출력 부분 x좌표를 변경하고싶어요! file 당고당고 2020.08.07 61
기본툴 사용법 RMMV 전투중에 메세지 창을 띄워도 UI나 윈도우가 사라지지 않게 할 수 있나요? PPPL 2020.04.13 61
스크립트 사용 RMMV 데이터베이스에서 '적들' 에 해당하는 스크립트는 무엇인가요? PPPL 2020.04.23 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