My minimap seems to bug on this line of code:
@has_image = File.exist?("Graphics/#{FOLDER}/#{filename}.#{FILE_EXT}")It always returns false when the game data is compressed and encrypted. Obviously there is no Graphics/Minimap/whatever.png file anymore.. how do I solve that? I tried moving the code to the Cache but that doesn't work either.
http://forums.rpgmakerweb.com/index.php?/topic/13801-napoleons-minimap/?p=155370
This still seems to work (as it should according to the documentation):
#===============================================================================# Cache#===============================================================================module Cache #-------------------------------------------------------------------------- # * Get Minimap Graphic #-------------------------------------------------------------------------- def self.minimap(filename) load_bitmap("Graphics/#{Nap::Minimap::FOLDER}/", filename) endendThe official documentation:
Encrypted ArchivesEncrypted archives make it difficult for others to analyze and/or modify the game contents. Normally, all data and graphic files (but not audio and font files) are stored in Game.rgss3a. You can create an encrypted archive by checking the [Create encrypted archive] box when compressing the game data.The files within the encrypted archive can be accessed as though they were in the game folder by using the following methods from the built-in game library:load_data, Bitmap.new, Graphics.transitionWhen there is an encrypted archive in the game folder, the script data (normally Data\Scripts.rvdata) defined in the Scripts line of Game.ini will always be read from the archive. This is a limitation that prevents files within the archive from being read by an external script.Due to its nature, the encrypted archive's internal format has not, and will not, be released to the public. Please refrain from analyzing it.Uh... so there is no File.exists support here? I simply have to use Bitmap.new(filename) and then catch it if it crashes? I hope there is a better solution.
@has_image = File.exist?("Graphics/#{FOLDER}/#{filename}.#{FILE_EXT}")It always returns false when the game data is compressed and encrypted. Obviously there is no Graphics/Minimap/whatever.png file anymore.. how do I solve that? I tried moving the code to the Cache but that doesn't work either.
http://forums.rpgmakerweb.com/index.php?/topic/13801-napoleons-minimap/?p=155370
This still seems to work (as it should according to the documentation):
#===============================================================================# Cache#===============================================================================module Cache #-------------------------------------------------------------------------- # * Get Minimap Graphic #-------------------------------------------------------------------------- def self.minimap(filename) load_bitmap("Graphics/#{Nap::Minimap::FOLDER}/", filename) endendThe official documentation:
Encrypted ArchivesEncrypted archives make it difficult for others to analyze and/or modify the game contents. Normally, all data and graphic files (but not audio and font files) are stored in Game.rgss3a. You can create an encrypted archive by checking the [Create encrypted archive] box when compressing the game data.The files within the encrypted archive can be accessed as though they were in the game folder by using the following methods from the built-in game library:load_data, Bitmap.new, Graphics.transitionWhen there is an encrypted archive in the game folder, the script data (normally Data\Scripts.rvdata) defined in the Scripts line of Game.ini will always be read from the archive. This is a limitation that prevents files within the archive from being read by an external script.Due to its nature, the encrypted archive's internal format has not, and will not, be released to the public. Please refrain from analyzing it.Uh... so there is no File.exists support here? I simply have to use Bitmap.new(filename) and then catch it if it crashes? I hope there is a better solution.