Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Resource Mover

arev

Sponsor

How can you tell it's that simple? :p I know of an uility like this for rm2k, but unfortunatelly haven't seen one for rmxp. But is it that hard to keep track of "used" resources in your game anyway?
 
You could move ALL of the graphics & audio to another dir.
(or the ones you're unsure about.)
Then play the game. It will error each time it looks for a
resource that's missing, then move that resource back.
Will take a little while, but probably less than hunting for them in RMXP one by one.
 
Hmmm....

I will whip up something that logs the images used, but it won't move them.

Code:
module RPG::Cache
  class << self
    if @seph_imagelog.nil?
      alias seph_imagelog_rpgcache_lb load_bitmap
      @seph_imagelog = true
    end
    def load_bitmap(folder_name, filename, hue = 0)
      path = folder_name + filename
      save_path(path) unless @cache.has_key?(path)
      seph_imagelog_rpgcache_lb(folder_name, filename, hue)
    end
    def save_path(path)
      name = 'Data/Bitmaps Used.rxdata'
      data = FileTest.exist?(name) ? load_data(name) : []
      data << path unless data.include?(path)
      save_data(data, name)
    end
    def print_usedfiles
      name = 'Data/Bitmaps Used.rxdata'
      data = FileTest.exist?(name) ? load_data(name) : []
      p data
    end
  end
end

Insert anywhere. To test what files were used, use
Code:
RPG::Cache.print_usedfiles

It will return a list of all used files.


There's no way to tell what images will be used since of the everychanging complexity of scripts. The only thing I could do was have it read scripts, but even then, it would only be able to read constant image file names (bitmap = RPG::Cache.picture('Something')).

I might be able to do the file moving thing, it would require me just to do a bit of look into the Dir class. If everyone wants it enough, I will do it.
 
Mmmm i'd like this to be perfected, i'd really love it... if it could simply delete the files that are not used or rename the one that are not used.
Having a list of the file to use would be useless for me, they are between 1000 and 2000 usually... would really take some time to find them all.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top