It keeps giving me a disposed sprite/bitmap error either when I enter a new map
This first error happens with line 211:
@player_sprite.x = @location.x + @location.width / 2 + 16 * @map_zoom_x
The message reading that the sprite is disposed means that there is no @player_sprite in existence. Now while the minimap was initialized when the game started, and that it ran a method called 'create_cursor', I am thinking that once you exit a map, the sprites for the minimap are being disposed and not recreated for the next map.
Now, the 'post_transfer' method at the very bottom of the script calls upon this: $minimap.refresh. That is, it executes the minimap's own 'refresh' method when the map is reloaded. Might one add $minimap.create_cursor just above it to create the player's cursor first???
This is me spitballing as I do not have RPGMaker VXAce. But the logic should be sound.
And in difference to my colleague, F12 is not a debug feature. If it was, the F12 key would not work outside test-play. It is a reset key. What some do not understand is that it resets the game and the scripts within the scripts.rxdata/rvdata/rvdata2 files and aliasing methods from 'parent' classes or modules is where the issue lay.
If I was to alias content within the BITMAP class itself, I would normally get a stacking error if I hit F12. If I was using RPGMaker XP and try to alias a method within the hidden sprite class, one referenced in Game_Battler, I would get an error if I hit F12. The hidden classes do not get erased from memory and you can cause a stack error. The trick is to make sure that you can only alias these methods... Once!
Now the chances are, you have issues with this section of code beginning on line 798:
Code:
module DataManager
class << self
alias nap_minimap_make_save_contents make_save_contents
alias nap_minimap_extract_save_contents extract_save_contents
end
What you would do is to encapsulate the alias methods themselves with an if...end block, the value being tested only being created at the initial game.exe engine start.
Code:
module DataManager
class << self
if @f12_stack_fix_nap_minimap_datamanager.nil?
alias nap_minimap_make_save_contents make_save_contents
alias nap_minimap_extract_save_contents extract_save_contents
@f12_stack_fix_nap_minimap_datamanager = true
end
end
When the 'if' is first encountered, the value doesn't exist. So it runs the block and creates the value. THIS value stays in memory. Hit the F12 key, and it then sees that the value DOES exist and skips alias-ing the methods. Stack error prevented.