Kill Autoshadows Version: 2.0b Author: modern algebra & Abt Plouton Date: May 11, 2009 Version History
<Version 2.0b> 05.13.2009 - fixed a nasty bug that would appear whenever placing autoshadow producing tiles along the East and South edges of the map <Version 2.0> 05.11.2009 - Made it more precisely target only autoshadow producing tiles, thus rectifying issues with table legs and allows for greater compatibility with any scripts that use the second layer <Version 1.0> 01.28.2008 - Original Release Description
This allows you to disable the appearance of autotiles and also to re-enable them if you want them to appear for certain maps.
Features
Allows you to get rid of annoying autoshadows Easy to turn on and off in-game precise targetting that allows for greater compatibility with scripts that make use of the second layer Screenshots Instructions Place this script above Main and below Materials.
To disable autoshadows, use this code in a call script:
$game_map.autoshadows = false
To enable them, use this code:
$game_map.autoshadows = true
Script
#============================================================================== # Kill Autoshadows # Version: 2.0b # Author: modern algebra (rmrk.net) & Abt Plouton # Date: May 13, 2009 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Description: # # This script allows you to disable or re-enable autoshadows at any time. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Instructions: # # Place this script above Main and below Materials. # # To disable autoshadows, use this code in a call script: # # $game_map.autoshadows = false # # To enable them, use this code: # # $game_map.autoshadows = true #============================================================================== #============================================================================== # ** Game Map #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # aliased method - setup # new writer instance variable - autoshadows # new method - autoshadows #============================================================================== class Game_Map #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Public Instance Variables #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ attr_writer :autoshadows #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Get Autoshadows #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def autoshadows return @autoshadows unless @autoshadows.nil? @autoshadows = false return false end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Setup #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias ma_remove_auto_shadows_on_setup setup def setup (map_id) ma_remove_auto_shadows_on_setup (map_id) # Rather than repeatedly call a method, set a local variable to have it's data ma_data = data return if autoshadows # For all squares on the map for x in 0...(ma_data.xsize - 1) for y in 0...(ma_data.ysize - 1) # If house autotile if ma_data[x, y, 0] >= 4352 && ma_data[x, y + 1 ,0] >= 4352 && ma_data[x + 1, y + 1, 0] < 4352 # Delete auto Shadow ma_data[x, y, 1] = ma_data[x,y,0] ma_data[x, y, 0] = 0 end end end end end
Credit
modern algebra Abt Plouton, for original code upon which I built Thanks
Zeriab, for his Table Printing script, without which I could not have updated this script Dainreth, for the request Anaxim, for reporting a bug in 2.0 Support
Please post here at rmrk.net for the swiftest response
Known Compatibility Issues
Spoiler for Wall Extension Incompatibility Fix :
There was a major compatibility problem that allowed you to walk on to the right hand side of any autotiled ceiling or wall. The code below ought to fix it.
Replace the Kill Autoshadows Script with the following and make sure it is below the Wall Extension Script:
#============================================================================== # Kill Autoshadows # Version: 2.0b (Wall Extension Compatibility) # Author: modern algebra (rmrk.net) & Abt Plouton # & some code borrowed from Moon Man to make the scripts compatible # Date: May 13, 2009 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Description: # # This script allows you to disable or re-enable autoshadows at any time. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Instructions: # # Place this script above Main and below Materials. # # To disable autoshadows, use this code in a call script: # # $game_map.autoshadows = false # # To enable them, use this code: # # $game_map.autoshadows = true #============================================================================== #============================================================================== # ** Game Map #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # aliased method - setup # new writer instance variable - autoshadows # new method - autoshadows #============================================================================== class Game_Map #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Public Instance Variables #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ attr_writer :autoshadows #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Get Autoshadows #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def autoshadows return @autoshadows unless @autoshadows.nil? @autoshadows = false return false end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Setup #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias ma_remove_auto_shadows_on_setup setup def setup (map_id) ma_remove_auto_shadows_on_setup (map_id) # Rather than repeatedly call a method, set a local variable to have it's data ma_data = data return if autoshadows # For all squares on the map for x in 0...(ma_data.xsize - 1) for y in 0...(ma_data.ysize - 1) if ma_data[x, y, 0] >= 4352 && ma_data[x, y + 1 ,0] >= 4352 && ma_data[x + 1, y + 1, 0] < 4352 tile_id = ma_data[x, y, 0] if (4352...5888).include?(tile_id) or (6272...6656).include?(tile_id) or (7040...7424).include?(tile_id) or (7808...8192).include?(tile_id) dummy_tile_id = 2000 + auto_(tile_id) else dummy_tile_id = 1952 + auto_(tile_id) end ma_data[x, y, 1] = ma_data[x, y, 0] ma_data[x, y, 0] = dummy_tile_id end end end end end
Otherwise, no currently known compatibility problems.
Demo
Not required. Just plug the script in and see it work.
Author's Notes
On another forum, somebody was
complaining about autoshadows so I wrote a little script to get rid of them if you so wish.
Also, I should mention that the main part of the script was written (apparently) by some guy named Abt Plouton for single maps. All I did was make it globally applicable and fix a few bug issues with bush and table tiles
This script by
modern algebra is licensed under a
Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License .