- Joined
- Jul 8, 2022
- Messages
- 28
- Reaction score
- 46
- First Language
- English
- Primarily Uses
- RMMZ
KC_Mirrors 1.3.2
by Kelly Chavez
by Kelly Chavez
Introduction
Hello. Today, I'd like to finally release something I've been writing, documenting, and debugging for the past two or three weeks.
This is a plugin that adds reflections to your actors and events. This is done by placing tiles with transparency on your map wherever you want to show reflections. Floor reflections are drawn at the characters' feet and wall reflections are drawn on areas of the map with certain region ID(s).
This plugin was inspired by the reflection portion of Galv's Character Effects script for VX Ace. So, credits are due there for the original idea.
Features
This is a plugin that allows the developer to add reflections to actors and events. This is done by drawing sprites below the map but above the parallax layer. So, to get full usage out of this plugin, you must be using tilesets that actuallyshow the parallax layer (i.e. tilesets with transparency). The demo uses a tileset with reduced opacity on the water tiles to achieve the water reflection effect, for example.
Character reflections can be controlled with note tags, script calls, and plugin commands! On a per-actor and a per-event basis, the developer can control whether wall reflections are enabled, whether floor reflections are enabled, and the character graphic actually used in the reflection.
Screenshots
A room with the wall reflections in pseudo-perspective mode:

A room with the wall reflections in event-like mode (available in version 1.1.0+):

A room with a filter applied to the floor reflections (available in version 1.3.0+):

An example of characters having their floor reflections offset by an arbitrary amount (available in version 1.3.0+):


A room with the wall reflections in event-like mode (available in version 1.1.0+):

A room with a filter applied to the floor reflections (available in version 1.3.0+):

An example of characters having their floor reflections offset by an arbitrary amount (available in version 1.3.0+):

How to Use
To use, download and place this plugin below PluginCommonBase in your plugin manager and enable it. From there, follow the instructions in the help section of the plugin and the descriptions of each command.
Plugin Commands / Script Calls
- Change Event Reflection
- Change the reflection parameters of a specified event. These changes are reset on map reload.
- Match Event Reflection
- Sets this event's reflection graphic to their normal top view graphic.
- Change Actor Reflection
- Change the reflection parameters of a specified actor. These changes are persistent and are included in the save file.
- Match Actor Reflection
- Sets this actor's reflection graphic to their normal top view graphic.
- Set Wall Reflection Mode
- Sets the wall reflection mode by changing the wall reflection mode variable defined in the plugin parameters. Does nothing if that parameter is 0.
- Refresh Wall Reflections
- Refreshes the wall reflection positions on the current map. Useful if tiles on the current map have their regions updated.
- Override Map Settings
- Overrides reflection settings for the current map. This can be used to quickly disable all reflections or change the perspective mode temporarily. All changes are lost upon leaving and re-entering the map.
The script calls for this plugin are as follows.
Format your script commands as KCDev.Mirrors.<function name>
Example: KCDev.Mirrors.setEventReflect(1, 'Actor1', 0, true, false)
The commands are as follows:
Format your script commands as KCDev.Mirrors.<function name>
Example: KCDev.Mirrors.setEventReflect(1, 'Actor1', 0, true, false)
The commands are as follows:
- setEventReflect(event_id, reflection_filename, reflection_index, floor_enabled, wall_enabled, floor_opacity, wall_opacity, floor_x_offset, floor_y_offset, wall_x_offset, wall_y_offset)
- Same as Change Event Reflection command
- resetEventReflectImage(event_id)
- Same as Match Event Reflection
- setActorReflect(actor_id, reflection_filename, reflection_index, floor_enabled, wall_enabled, floor_opacity, wall_opacity, floor_x_offset, floor_y_offset, wall_x_offset, wall_y_offset)
- Same as Change Actor Reflection command
- resetActorReflectImage(actor_id)
- Same as Match Actor Reflection command
- setWallReflectMode(mode)
- Same as Set Wall Reflection Mode command
- refreshReflectWallCache()
- Same as Refresh Wall Reflections command
Demo
Current Version (1.3.2) - Google Drive
Old Version (1.3.1) - N/A
Old Version (1.3.0) - Google Drive
Old Version (1.2.0) - Google Drive
Old Version (1.1.4) - Google Drive
Old Version (1.1.3) - Google Drive
Old Version (1.1.2) - N/A
Old Version (1.1.1) - N/A
Old Version (1.1.0) - Google Drive
Old Version (1.0.0) - Google Drive
Download
GitHub (Right-click 'Raw' and select 'Save link as...')
Changelog
- 12/20/2022 - v1.3.2
- Fixed bugs that caused incorrect scaling on the x axis to be applied to reflections of events using tileset sprites
- 10/26/2022 - v1.3.1
- Quick fix to CharReflections Filter Controller target
- 10/26/2022 - v1.3.0
- Added FilterControllerMZ targets
- CharReflectionsFloor - Applies filter to all floor reflections
- CharReflectionsWall - Applies filter to all wall reflections
- CharReflections - Applies filter to all character reflections
- Added new note tags to actors, characters, and maps:
- <REFLECT_FLOOR_OFFSETS:[x],[y]>
- <REFLECT_WALL_OFFSETS:[x],[y]>
- See newly updated plugin help section for details
- Added an option to fix Z-fighting under certain conditions on wall reflections in 'perspective' mode
- You probably don't need this fix unless you're using a pixel movement plugin
- Fixed a bug in the Change Event Reflect plugin command that caused the wrong event to be used as reference for unchanged parameters
- Internal code refactor
- All plugin parameters are exposed on the KCDev.Mirrors object
- Added FilterControllerMZ targets
- 8/5/2022 - v1.2.0
- Reflections of each type can now be separately toggled on and off for the entire map through note tags and a new plugin command
- New command: Override Map Settings
- New map note tag: <REFLECT_TYPE:[ALL/FLOOR/WALL]>
- The reflection mode the map uses can be changed via the map notes and the aforementioned new command
- New map note tag: <REFLECT_MODE:[PERSPECTIVE/EVENT]>
- The developer can now set the opacity of each reflection type through the updated plugin command and via new note tags
- New event and actor tags: <REFLECT_FLOOR_OPACITY:[x]>, <REFLECT_WALL_OPACITY:[x]>
- Characters that are made transparent via move route commands now also have their reflections disappear if those reflections are not using custom opacities
- For specifics on new features, see the updated 'help' section of the plugin
- Reflections of each type can now be separately toggled on and off for the entire map through note tags and a new plugin command
- 7/19/2022 - v1.1.4
- Adjusted how reflections are handled internally for compatibility with KC_MoveRouteTF
- 7/16/2022 - v1.1.3
- Fixed issue where characters using a sprite from the tileset and with a priority other than 'Below Characters' would never have reflections
- 7/14/2022 - v1.1.2
- Fixed a typo that caused incorrect behavior when setting event reflection properties via plugin command and manually selecting 'Unchanged' from the dropdown box
- 7/14/2022 - v1.1.1
- Added a few safety checks to avoid a game crash when trying to access characters that do not exist (e.g. trying to change the reflection of the third follower when the player has two followers)
- 7/12/2022 - v1.1.0
- Fixed bug where characters standing out of the maximum wall reflection range would appear on the mirror with incorrect scaling
- Added the 'event-like' wall reflection mode and renamed the mode featured in the previous version to 'pseudo-perspective' mode
- Removed restriction that caused events using tile IDs to not appear in wall reflections
- 7/11/2022 - v1.0.0
- Initial release
Terms and Credits
I've released this plugin under the MIT license. So, you can include this plugin in any project as long as you include the license with your distribution. For most projects, this requirement is fulfilled as long as you keep the license text that is at the top of the plugin's js file intact.
Also, though not strictly required, I would appreciate being credited as K. Chavez or Kelly Chavez in your games' credits.
Last edited: