The code has been rewritten from scratch. Therefore, you must delete the old folder or its files before installing.
Dynamic Overworld Shadows 2.0.0 still features three modes, but they are now called BASIC, STANDARD, and ENHANCED.
BASIC: Static shadow, which animates only when jumping.
STANDARD: The same shadow as BASIC, but with idle/movement animations and auto-sizing for each event.
ENHANCED: Real-time animated silhouette.
The need for shadow graphics, previously found in Graphics\Characters\Shadows, has been removed. Shadows are now procedurally generated.
Performance has been greatly improved. The issue that caused load times to increase with the number of events has been fixed. Performance remains optimal even in unrealistic scenarios with more than 200 events with erratic behavior.
FPS drops in these cases are due to the large number of moving events, rather than the script itself. Note that performance also depends on the hardware.
A script is included to run a stress test and check the performance yourself.
Instructions:
Create a map.
Place the desired number of events to test (no configuration needed, they can be empty).
Call zbox_stress_test on the map.
zbox_stress_test to modify all events.
zbox_stress_test(n) to modify only the specified amount.
While the original script allowed for custom shadow configuration via event name tags, this has been modified. Additionally, new settings have been added (see 000_Settings). Some of these include:
BLACKLIST_NAMES: Any word within this array will disable the shadow if the event's name includes it.
CHARACTER_FIX: A hash to set rules for specific files in Graphics\Characters. Any event using a graphic listed here will automatically apply the set rules.
BLACKLIST_TERRAIN_TAGS: Array to define on which TerrainTags shadows should be disabled.
MAP_OVERRIDES: A hash to set rules for shadows on specific maps. Example: Set shadows of a specific color on map(x) or disable them completely.
AUTOSIZE_FIX: a hash to adjust the shadow radius in case AutoSize generates one that is too large or too small for specific sprites.
TILES_TO_FIX: Array to place tile IDs from a specific tileset and give them dynamic priority. This fixes a major issue from v1.0.0 where shadows would appear over non-priority tiles that should, in theory, cover them. These tiles can now appear in front of an event while another simultaneously covers them.
Events accept the following tags in their name for custom configuration:
(sr: n): Shadow radius in BASIC / STANDARD modes.
(sx: n): Moves the shadow along the X-axis.
(sy: n): Moves the shadow along the Y-axis.
(up): Forces both the event and shadow to appear above everything else.
(fly: n): Simulates shadow height. It gets smaller and its opacity decreases.
(stop): disables the shadow's idle animation.
(angle: n): Modifies the shadow's angle.
(rgb: R, G, B): changes the shadow's color.
Note that the priority for shadow generation is set as follows:
Event Tags > Hashes/Arrays > Global Settings.
Improved animations for STANDARD and ENHANCED shadows, as well as their interactions on the map. This includes synchronization between dynamic shadow sizes and reflections, and a subtle fade-in/out animation when interacting with blocked TerrainTags.
Introduced Dynamic Z-Sorting. This script manages the creation of tiles with dynamic priority. Basically, based on the TILES_TO_FIX array, it scans the map for those tiles, hides the content of layers 1 and 2 at those coordinates, and generates sprites containing it to replace them. NOTE: Overusing this feature may cause a performance decrease. Use it sparingly.
An HTML file is included to quickly generate arrays for TILES_TO_FIX.
Finally:
It should be noted that this is the final update for Dynamic Overworld Shadows, as this script will be integrated into a larger project I am working on. Updates will only be released if a critical conflict arises or if the next script has not yet been released.