질문과 답변

Extra Form

게임을 만들때 게임파일에 대해 걱정이 하나 있습니다.

 

게임폴더에는 Data폴더 말고도 Graphics, Audio... Graphics 폴더 안에도 Character, Animation 폴더 등 다양하게 있는데

 

나중에 게임을 완성해서 배포할때 편의를 위해

 

다른사람이 게임을 받을때 쓸데없이 파일, 폴더가 많아져서 불편해하지 않도록

 

게임파일 내의 Graphics, Audio, Data 폴더를 한 폴더에 뭉칠 필요를 느꼈습니다.

 

 

인위적으로 데이터폴더를 합쳐버리면 경로가 흐트러져 버리니까

 

폴더를 합친 후 RPG모듈 안에있는 Cache 모듈을 편집해서 임시저장되는 파일의 경로를 그에맞게 바꾸려고 합니다.

 

그런데 RPGVX나 RPGVXA는 따로 Cache를 수정할수 있도록 스크립트편집창에 구비해놨는데

 

RPGXP는 그게없어서 어떻게할지 모르겠습니다.

 

따로 스크립트를 하나 만들어서 Cache를 수정시키면 될까요?

Comment '4'
  • profile
    습작 2012.08.03 23:02

    0.


      RPG Maker XP에서의 Cache 모듈의 내용은 아래와 같습니다. 필요하신 부분이 있으시다면 아래 내용을 재정의하는 방식으로 추가하여주신다면 될 것 같습니다. 그럼 수고하세요.^^


    module RPG
      module Cache
        @cache = {}
        def self.load_bitmap(folder_name, filename, hue = 0)
          path = folder_name + filename
          if not @cache.include?(path) or @cache[path].disposed?
            if filename != ""
              @cache[path] = Bitmap.new(path)
            else
              @cache[path] = Bitmap.new(32, 32)
            end
          end
          if hue == 0
            @cache[path]
          else
            key = [path, hue]
            if not @cache.include?(key) or @cache[key].disposed?
              @cache[key] = @cache[path].clone
              @cache[key].hue_change(hue)
            end
            @cache[key]
          end
        end
        def self.animation(filename, hue)
          self.load_bitmap("Graphics/Animations/", filename, hue)
        end
        def self.autotile(filename)
          self.load_bitmap("Graphics/Autotiles/", filename)
        end
        def self.battleback(filename)
          self.load_bitmap("Graphics/Battlebacks/", filename)
        end
        def self.battler(filename, hue)
          self.load_bitmap("Graphics/Battlers/", filename, hue)
        end
        def self.character(filename, hue)
          self.load_bitmap("Graphics/Characters/", filename, hue)
        end
        def self.fog(filename, hue)
          self.load_bitmap("Graphics/Fogs/", filename, hue)
        end
        def self.gameover(filename)
          self.load_bitmap("Graphics/Gameovers/", filename)
        end
        def self.icon(filename)
          self.load_bitmap("Graphics/Icons/", filename)
        end
        def self.panorama(filename, hue)
          self.load_bitmap("Graphics/Panoramas/", filename, hue)
        end
        def self.picture(filename)
          self.load_bitmap("Graphics/Pictures/", filename)
        end
        def self.tileset(filename)
          self.load_bitmap("Graphics/Tilesets/", filename)
        end
        def self.title(filename)
          self.load_bitmap("Graphics/Titles/", filename)
        end
        def self.windowskin(filename)
          self.load_bitmap("Graphics/Windowskins/", filename)
        end
        def self.tile(filename, tile_id, hue)
          key = [filename, tile_id, hue]
          if not @cache.include?(key) or @cache[key].disposed?
            @cache[key] = Bitmap.new(32, 32)
            x = (tile_id - 384) % 8 * 32
            y = (tile_id - 384) / 8 * 32
            rect = Rect.new(x, y, 32, 32)
            @cache[key].blt(0, 0, self.tileset(filename), rect)
            @cache[key].hue_change(hue)
          end
          @cache[key]
        end
        def self.clear
          @cache = {}
          GC.start
        end
      end
    end
    

     


  • ?
    지누준호 2012.08.04 15:34

    잘 찾아보니까 툴 도움말에도 있었던 내용이었군요
    감사합니다! ^^

     

    그런데 왜 rmxp는 cache나 다른 편입모듈들이 스크립트에디터에 없는건지..

    게임을 실행하면 에디터에 없는 내용들은 라이브러리에서 자동으로 빼오는 식으로 진행되는건가요?

  • profile
    JACKY 2012.08.04 19:28
    편입모듈들은 라이브러리에 미리 저장되어있고
    게임의 제일 핵심적인 부분이기에 기본적으로
    편집을 막아뒀습니다. 하지만 스크립트를 좀
    안다면 재정의하는 방법으로 편집가능합니다.
  • ?
    지누준호 2012.08.08 12:24
    답글의 댓글의 답글 감사합니다 ㅎㅎ

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12441
기타 RMVXA 테두리색을 바꾸면 굵기도 바뀌고 폰트가 적용이 안됩니다.. 3 file 스피아 2019.03.01 358
RMVX 테스트 실행시 캐릭터가 왼쪽,위로만 움직이고 방향키가 안먹습니다 도와주세요 ㅠㅠ 2 유즈 2014.02.09 1118
RMXP 테스트 플레이 도중 1 Hsik 2010.12.11 748
RMVXA 테스트 플레이 도중 렉이 걸립니다. 3 난현이라는 2012.03.17 2240
RMVX 테스트 플레이 도중 발생하는 오류... 2 메인디시 2013.07.16 902
RMVX 테스트 플레이 딜레이 3 김진리 2011.01.27 848
에러 해결 RM2k3 테스트 플레이 실행하면 이상한 화면하고 오류만 떠요 ㅠㅠ(급) file 호소지 2022.03.31 189
RMVX 테스트 플레이 오류 : Script 'Cache' line 80: RGSSError occurred. failed to create bitmap 해결방법좀 알려주세요ㅠㅠ 꿈꾸는레인 2018.08.03 264
RMVX 테스트 플레이를 실행하면 검은 화면 뒤에 오류문구가 뜨네요. 3 메인디시 2013.06.27 794
스크립트 사용 RMVXA 테스트 플레이시 게임 속도가 빨라지는 스크립트 없나요? 1 김현무 2019.04.10 160
RMVX 테스트 플레이시 까만 화면만 뜹니다(제발 도와주세요) 3 최펭귄 2013.05.24 712
RMVX 테스트 플레이에서 방향키가 안되요 3 파라디클로로벤젠 2012.07.12 2595
AGM 테스트 플레이할때 오류가 나요 1 file 아담 2011.01.25 1531
RMXP 테스트or게임시작 을 하면 '스크립트가 행업 했습니다' 라는 메시지가 떠요. 2 file BearNuclear 2011.08.03 2023
RMVX 테스트게임 느리게 될 경우에요, 2 별33 2010.10.15 748
RMVXA 테스트맵을 실행시키면 dll오류가 뜨고 system32에 dll을 넣어도 안돼네요.. 3 훈봉이 2013.07.27 6220
RMVX 테스트실행하는데 이런오류가뜸니다. 2 file 의사양반무슨말이오 2013.07.28 858
RMVXA 테스트창을 확대화 못시키나요? 3 훈봉이 2013.07.27 711
RMVX 테스트플레이 또는 게임 실행 시 특정 글자 인식 오류 3 NEXONON 2012.12.31 789
RM2k 테스트플레이 오류 1 휘록 2013.07.07 1106
Board Pagination Prev 1 ... 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 ... 516 Next
/ 516