질문과 답변

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 12451
RMXP 맵칩과 기타 공백이 전부 검은색으로 변했어요 2 file 공개아이디 2011.07.02 2027
RMXP 맵칩 적용법 2 폭풍강타 2013.08.17 1760
맵배치 RMXP 맵칩 이거저거 쓰고 싶어서 다른 타일셋의 칩을 합성하고 싶어요 1 아스리테 2022.03.04 226
RMXP 맵칩 우선순위 질문 4 file 삼팸스튜디오 2013.06.01 831
RMXP 맵칩 오류 떄문에요....... 꼭 부탁드립니다. 1 NightWolf 2010.12.30 451
RMXP 맵칩 수정하는 방법 좀 알려주세요. 1 배고픈 2011.12.17 1985
RMXP 맵칩 설정관련 백개의검 2011.02.13 731
맵배치 RMXP 맵칩 버그 ssplokks 2023.10.20 19
RMXP 맵칩 2 크루즈 2011.02.08 579
RMXP 맵이름 표시 스크립트/맵이름을 사진표시보다 위로 설정하는법좀.. 1 소 울 2011.04.10 1426
RMXP 맵이름 스크립트의 표시를 사진표시보다 위로 하려면 어떻게 해야 하나요? 2 file 팥떡 2012.11.26 1000
RMXP 맵이동시 맵 색조변경해제 방법 어떻게하나요? 4 소울상 2013.10.12 1008
RMXP 맵이동 1 아저씨앙아앙라 2010.09.25 821
RMXP 맵이동 1 김윤아 2010.11.12 801
RMXP 맵의 몬스터를 모두 해치우면 특정 이벤트 자동실행 4 라랍두 2013.01.29 1069
RMXP 맵의 모든 이벤트를 조사 2 말짱꽝이지롱 2012.08.19 1290
RMXP 맵을 복제해서 해당맵으로 이동하게하는법좀요 2 식빵족추장 2012.09.23 1212
RMXP 맵을 만들엇는데 이동할수있는 공간이 못갈떄 해결방법;; 2 조규상 2011.05.29 1015
RMXP 맵을 넘어가도 따라오는 npc 질문 알피지가좋아요 2013.08.16 927
RMXP 맵에서의 캐릭터 스프라이트 관련 질문 4 file Lighna 2012.05.28 2119
Board Pagination Prev 1 ... 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 ... 90 Next
/ 90