Issues with Napoleon's Minimap script - Disposed bitmat crash

BrandyMoon

Villager
Member
Joined
Jan 5, 2016
Messages
14
Reaction score
1
First Language
english
Primarily Uses
Hey, I'm having trouble with Napoleon's Minimap script, notably from the 2nd part of it. It keeps giving me a disposed sprite/bitmap error either when I enter a new map, or reset the game (F12) and try to start again from the title screen.

Does anyone know how to fix this?



The script itself is here:

This has been giving me a lot of trouble and its really frustrating. I know it's not just a script interaction either because when I try to reset on Napolean's original demo it happens there aswell.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA
F12 was never meant to work for scripts, so you need to not use it. See if the demo has the original issue with changing maps though.
 

BrandyMoon

Villager
Member
Joined
Jan 5, 2016
Messages
14
Reaction score
1
First Language
english
Primarily Uses
F12 was never meant to work for scripts, so you need to not use it. See if the demo has the original issue with changing maps though.
Isn't it kind vital that a script doesn't break rpgmaker functions? I couldn't imagine a script working by crashing the interaction keys or whatnot.

Also I haven't witnessed stepping into other maps in the original demo. In my project, when you try to exit the initial location on a large map, an error pops up:

script nap 2/3 minimap line 540: RGSSError occurred. Disposed bitmap

After which the game closes.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA
Actually, no. F12 is a debug option and scripts do not have to support it for that reason. Plus F12 never worked right in the first place in ACE either, there's many issues with it in normal ACE with no scripts that has not ever been fixed officially.
 

BrandyMoon

Villager
Member
Joined
Jan 5, 2016
Messages
14
Reaction score
1
First Language
english
Primarily Uses
Actually, no. F12 is a debug option and scripts do not have to support it for that reason. Plus F12 never worked right in the first place in ACE either, there's many issues with it in normal ACE with no scripts that has not ever been fixed officially.
Well as a debug goes, my players use F12 and experience this error, that's all just semantics.

More importantly, this error happens far more often outside of F12 during regular gameplay so is there any real solution to it? Anything in the script that could be adjusted to prevent this crash? How do Dispose Bitmap errors usually get resolved?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA
No clue. I've never worked with that. Start by making sure you start a new game and not load an old save game, and if that is done you may need to wait until someone else who has used the script comes by.

Though, posting a link to the demo would also help.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,674
Reaction score
566
First Language
English
Primarily Uses
RMVXA
The error is saying that the bitmap the game is trying to change or update is disposed, so it can't do what it wants to do.
There are scripts to prevent using F12.
 

DerVVulfman

Resident Werewolf
Veteran
Joined
Jun 26, 2012
Messages
315
Reaction score
155
First Language
English
Primarily Uses
RMXP
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,447
Members
137,820
Latest member
georg09byron
Top