질문과 답변

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 12448
RMVX 이벤트로 모든걸 할려그러면 렉이 얼마나 심해지나요? 5 타빙 2011.10.07 2077
RMVX 이벤트로 몬스터와 나와의 거리계산 4 황금시계 2012.02.17 2049
RMVXA 이벤트로 바닥피해 damage floor 주는 방법 헐이런것이! 2014.06.14 438
RMVXA 이벤트로 반짝거리는 이팩트 재생하기 5 떡좀쪄봐 2014.02.11 699
RMVX 이벤트로 변수설정이 안되서 질문남깁니다 야옹이 2011.11.11 1628
RMVX 이벤트로 술래잡기를 구현하는 방법 6 skeskin 2014.05.14 887
RMVX 이벤트로 스크립트 사용 2 file ba람이 2011.11.13 786
RMXP 이벤트로 아이템 획득후 시간이 지난후 다시 획득 가능하게 하는법... 5 도페로 2013.10.17 1102
RMVX 이벤트로 아이템창을 호출하려면 어떻게 해야하나요? 2 MMM 2015.03.14 266
이벤트 작성 RMMV 이벤트로 애니메이션을 재생하는 법이 궁금합니다 1 알만툴탐구 2023.05.11 70
RMVXA 이벤트로 엑알 만들기 질문 입니당 file 하나비애 2014.04.15 660
RMVX 이벤트로 인해 통행가능으로 설정하는 방법이 무엇인가요? 2 file 탄막병기 2014.03.06 691
RMVX 이벤트로 장소 이동 후 자동실행이 안돼요.. 4 file 하네 2013.10.02 1224
이벤트 작성 RMMV 이벤트로 재생하는 BGM을 반복시키고 싶습니다. 2 겐마 2020.09.13 105
RMVXA 이벤트로 제작한 체력바 오류 2 file 환장 2014.01.08 1062
RMMV 이벤트로 지형변경 1 쿠르스네이 2016.12.18 70
RMVXA 이벤트로 캐릭터를 만들었는데 계속해서 걷는 모션을 넣고싶어요. 2 Virtus 2013.11.25 999
RMVXA 이벤트로만 움직이게하기 (제목이 이상한거 같아;;) 7 꾸와 2014.02.16 481
RMVX 이벤트로부터 접촉은 어떻게 적용해야 하나요. 2 file Uiman 2015.05.25 175
RMVX 이벤트를 1번만 실행하게 하는 법좀 알려주세요 4 mzlaow 2016.01.09 159
Board Pagination Prev 1 ... 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 ... 516 Next
/ 516