Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # RAFAEL_SOL_MAKER's RGSS2 TO RGSS3 FIXES(Work-in-Progress) v0.2
- #_______________________________________________________________________________
- # Description | Some fixes if you plan to put your Ace game to run on RGSS3.
- # | It was proven it's not hard at all, and there are some
- # | advantages, like a faster and better Ruby, improved Audio
- # | classes, creation of bitmaps with more than 2048x2048 pixels,
- # | using a exclusive (and coding flexible) layer to autoshadows,
- # | and some other cool features.
- #________________|______________________________________________________________
- # Usage | Plug it above any custom scripts, below default engine ones.
- #________________|______________________________________________________________
- # Specifications | Difficulty to Use:
- # | * (almost none at all)
- # | Scripting Difficulty:
- # | * * ½ (I particularly don't recommend to edit it)
- # | Compatibility:
- # | ??? (it's already made to create compatibility!)
- # | New Methods:
- # | - Tilemap.passages
- # | Overwritten Methods:
- # | - (none)
- # | Aliased Methods:
- # | - Game_Map.setup
- # | - Window_Base.initialize
- # | - Spriteset_Map.create_tilemap
- #________________|______________________________________________________________
- # Known Issues | This is a W.I.P. version, so, it's expected to be incomplete.
- # | Probably with more tests some problems and bugs can appear...
- #________________|______________________________________________________________
- # Special Thanks | Migetman12
- #________________|______________________________________________________________
- #===============================================================================
- #===============================================================================
- # Tilemap Fix | Well, it's surprising that only it's needed to fix Tilemap!
- #________________|______________________________________________________________
- #===============================================================================
- class Tilemap
- def passages=(value)
- @passages = value
- end
- end
- #===============================================================================
- # Autoshadow Fix | Here let's use the RGSS3 fourth Tilemap layer to do it
- #________________|______________________________________________________________
- #===============================================================================
- class Game_Map
- alias __setup setup
- def setup(map_id)
- __setup(map_id)
- __data = data
- __data.resize(__data.xsize, __data.xsize, 4)
- for x in 0...(__data.xsize - 1)
- for y in 0...(__data.ysize - 1)
- if __data[x, y, 0] >= 4352 && __data[x, y + 1 ,0] >= 4352 &&
- __data[x + 1, y + 1, 0] < 4352
- # If you dont want to use autoshadows, change the 5 below to 0
- __data[x + 1, y + 1, 3] = 5
- end
- end
- end
- end
- end
- #===============================================================================
- # Window Padding | Only changing its default from 12 to 16
- #________________|______________________________________________________________
- #===============================================================================
- class Window_Base < Window
- alias __initialize initialize
- def initialize(x, y, width, height)
- __initialize(x, y, width, height)
- self.padding = 16
- end
- end
- #===============================================================================
- # Tile Priority | To show some tiles above the hero correctly
- #________________|______________________________________________________________
- #===============================================================================
- class Spriteset_Map
- alias __create_tilemap create_tilemap
- def create_tilemap
- __create_tilemap
- @tilemap.flags = $game_map.passages # $data_system.passages
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement