Need help fixing a bug with Napoleon's Minimap

Discussion in 'RGSS3 Script Requests' started by KingHazeel, Aug 1, 2019.

  1. KingHazeel

    KingHazeel Veteran Veteran

    Messages:
    125
    Likes Received:
    5
    First Language:
    English
    Primarily Uses:
    RMVXA
    Here's a couple of links I found for his Master Demo if anyone needs help finding it:

    http://www.mediafire.com/file/hbd8yrme95495bu/Napoleons_Master_Demo.zip/file
    https://mega.nz/#!PctVjAwb!2sUL3px0CSQRIEfajYTbcv34ZTf8soWVnkMZwry5XSg

    Basically this issue occurs whenever the minimap is turned off, either by script call or switch. This is the minimap while on:

    https://i.imgur.com/XFq17ID.png

    And turning it off initially has no issues:

    https://i.imgur.com/hdlGNFh.png

    However, if you pause at any point after turning the minimap off, the map will remain hidden, but your cursor sprite will pop back up:

    https://i.imgur.com/SIRsxu5.png

    Does anyone know what might be causing this or how it can be fixed?
     
    #1
  2. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,598
    Likes Received:
    349
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    I don't how you have it configured in your game. I use the same script and using the @minimap.enabled = true
    works and setting a switch works.
     
    #2
  3. GGZiron

    GGZiron Veteran Veteran

    Messages:
    73
    Likes Received:
    18
    Location:
    Bulgaria
    First Language:
    Bulgarian
    Primarily Uses:
    RMVXA
    Try with this snippet:
    Code:
    #Napoleon Minimap Player_Sprite fix.
    #Place Under Napoleon Minimap Scripts.
    
    module Nap
    # ======================================================================
    #                           Options
    # ======================================================================
      RESET_CURSOR_LOCATION = false
      # For what I seen, it works better with that disabled, so the player in
      # minimap doesn't go center first, then real location, but directly to real
      # location. Still, you can set it to true, so it would work as in original
      # Minimap Script.
     
    # =========================== End of Options ===========================
    
      class Minimap
     
        alias_method :refresh_old34, :refresh
        alias_method :reset_cursor_location_old34, :reset_cursor_location
       
        def refresh
          refresh_old34
          @player_sprite.visible = @enabled
        end
       
        #Overwrite method
        def reset_cursor_location
          reset_cursor_location_old34 if RESET_CURSOR_LOCATION
        end
    
      end
    
    end
    You have to put it bellow Napoleon Minimap Scripts, recomended with no other scripts in between.
    Also I disable one method from the original script that first center the player on minimap, then put it on
    the original position. If that cause problems, just set the value of the option I give to true.

    Would like to know if it works for you, if you test it.
     
    Last edited: Aug 24, 2019 at 12:40 AM
    #3

Share This Page