Advertisement
TheSixth

Encrypted Project Fix for Yami's Overlay Mapping

Mar 28th, 2017
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.09 KB | None | 0 0
  1. =begin
  2.  
  3. Fix for Yami's Overlay Mapping script
  4. Made by: Sixth
  5.  
  6. This is a fix for Yami's Overlay script.
  7. Using this, the overlay images will work even in encrypted projects.
  8.  
  9. Note that this requires you to setup the layer settings for your maps!
  10. So, before you test it, you must add a layer setting for all of your maps in
  11. the setting area! Maps without a setting here will NOT show ANY overlay images!
  12.  
  13. Also, there will be no check for missing files anymore, so if you miss an
  14. image file for a map, your game WILL crash if the player enters that map!
  15. The check for missing files was the reason it didn't work in encrypted projects,
  16. so it had to be removed. The setting area of this script is made to allow
  17. control of which maps should use which overlay images, and your settings alone
  18. will be the substitutes for the removed file checks.
  19.  
  20. Bottom line:
  21. Make sure to set your settings up correctly!
  22.  
  23. Installation:
  24. This huge script (:D) goes below Yami's Overlay Mapping script!
  25.  
  26. =end
  27.  
  28. module OLFix
  29.  
  30.   # Setting format:
  31.   #
  32.   #   map_id => ["layerX","layerY",...],
  33.   #
  34.   # The "layerX", "layerY", etc can be replaced by any of the followings:
  35.   #
  36.   # - "ground" # Enables the ground overlay image for the map.
  37.   # - "light"  # Enables the light overlay image for the map.
  38.   # - "shadow" # Enables the shadow overlay image for the map.
  39.   # - "par"    # Enables the... I don't really know, but you should, if you use
  40.   #              Yami's Overlay script, right? :D
  41.   #
  42.   # So, add these into the array settings for your maps to enable the specified
  43.   # overlay images for your maps.
  44.   # Only the included overlay images will show up for the maps!
  45.   #
  46.   Setup = {
  47.   # map_id => ["layerX","layerY",...],
  48.        1   => ["ground","light","shadow","par"],
  49.        2   => ["ground","shadow"],
  50.     # <-- Add more map settings here!
  51.   }
  52.  
  53. end
  54.  
  55. # End of settings! O_O
  56.  
  57. class Spriteset_Map
  58.  
  59.   def check_file(type)
  60.     return false unless OLFix::Setup[$game_map.map_id]
  61.     return OLFix::Setup[$game_map.map_id].include?(type)
  62.   end
  63.  
  64. end
  65.  
  66. # End of script! I know, it was huge! :D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement