KC_Mirrors - Add Floor and Wall Reflections to your Actors and Events

KelIy

Villager
Member
Joined
Jul 8, 2022
Messages
20
Reaction score
32
First Language
English
Primarily Uses
RMMZ
KC_Mirrors 1.2.0
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:
mirror_screenshot.png

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

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:
  • setEventReflect(event_id, reflection_filename, reflection_index, floor_enabled, wall_enabled, floor_opacity, wall_opacity)
    • 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)
    • 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.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
  • 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
  • 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:

DestroyDX

Guy trying his best
Veteran
Joined
Aug 18, 2020
Messages
112
Reaction score
50
First Language
English
Primarily Uses
RMMV
Does it work for MV?
 

KelIy

Villager
Member
Joined
Jul 8, 2022
Messages
20
Reaction score
32
First Language
English
Primarily Uses
RMMZ
Does it work for MV?
I wrote this plugin with only MZ in mind. This is my first publicly-released plugin, so to be honest, I am not sure about how I would go about implementing MV support since I am still new to RM plugin dev and don’t know enough about the differences between MV and MZ.

So, MV is not officially supported at this time.
 
Last edited:

DestroyDX

Guy trying his best
Veteran
Joined
Aug 18, 2020
Messages
112
Reaction score
50
First Language
English
Primarily Uses
RMMV
I wrote this plugin with only MZ in mind. This is my first publicly-released plugin, so to be honest, I am not sure about how I would go about implementing MV support since I am still new to RM plugin dev and don’t know enough about the differences between MV and MZ.

Basically, MV is not officially supported at this time.
Thanks for the info, just wanted to make sure.
 

STARFALL

Core of the Stars
Veteran
Joined
Jul 6, 2020
Messages
286
Reaction score
83
First Language
spanish
Primarily Uses
RMMV
A year ago I was looking for something like this, I'm really amazed!! I'm going to try it right away!!, by the way, is there a possibility to make it usable in battle, like to battle in a submerged cavern or drains?
 

DestroyDX

Guy trying his best
Veteran
Joined
Aug 18, 2020
Messages
112
Reaction score
50
First Language
English
Primarily Uses
RMMV
Hey is it possible to have a certain mirror reflect a different Sprite. Like let's say you're in a room of mirrors that reflect the actor and guest except for one which reflects a ghost... I plan one using this in a haunted house.
 

KelIy

Villager
Member
Joined
Jul 8, 2022
Messages
20
Reaction score
32
First Language
English
Primarily Uses
RMMZ
A year ago I was looking for something like this, I'm really amazed!! I'm going to try it right away!!, by the way, is there a possibility to make it usable in battle, like to battle in a submerged cavern or drains?
Now there's an idea I hadn't considered at all. I don't see why it wouldn't be possible, but I'd definitely need to look into the differences between the battle and the map spritesets, mainly to see how transparency in the battle background is handled and whether it looks good. Putting this suggestion in the "maybe" category.

Hey is it possible to have a certain mirror reflect a different Sprite. Like let's say you're in a room of mirrors that reflect the actor and guest except for one which reflects a ghost... I plan one using this in a haunted house.
I'm not sure about what exactly you're trying to accomplish. Are you asking for a specific mirror that reflects a different sprite for certain characters? If so, I would suggest using some clever eventing and mapping to get the effect you are going for.
 

DestroyDX

Guy trying his best
Veteran
Joined
Aug 18, 2020
Messages
112
Reaction score
50
First Language
English
Primarily Uses
RMMV
Now there's an idea I hadn't considered at all. I don't see why it wouldn't be possible, but I'd definitely need to look into the differences between the battle and the map spritesets, mainly to see how transparency in the battle background is handled and whether it looks good. Putting this suggestion in the "maybe" category.


I'm not sure about what exactly you're trying to accomplish. Are you asking for a specific mirror that reflects a different sprite for certain characters? If so, I would suggest using some clever eventing and mapping to get the effect you are going for.
Yep I am going for a specific large mirror that reflects a different sprite. In what I'm doing there r only two party members in a room with 5 mirrors but all of which show both as they r but only one shows the leader followed by a ghostly figure.
 

KelIy

Villager
Member
Joined
Jul 8, 2022
Messages
20
Reaction score
32
First Language
English
Primarily Uses
RMMZ
Yep I am going for a specific large mirror that reflects a different sprite. In what I'm doing there r only two party members in a room with 5 mirrors but all of which show both as they r but only one shows the leader followed by a ghostly figure.
If that's the case, wouldn't a setup like this also work?Screenshot 2022-07-14 100833.png

So, we have touch events with the inner ones marked with A and the outer with B. Basically, when the player steps on the events in the A columns, you switch the first follower's sprite to the ghost sprite you want, and when the player steps on a tile in the B column, you switch the reflection back to whatever it was before.
 

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,300
Reaction score
310
First Language
English
Primarily Uses
N/A
Happened to look for reflection plugins for MZ today and came across this one, it seems very well optimized and easy to use.

I'll be conducting tests with it along with more graphic demanding plugins to see how it fairs!
 

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,300
Reaction score
310
First Language
English
Primarily Uses
N/A
I'm a little confused and just wanted to clarify, what commands do you use to disable an event's reflection by commanding itself as an ID.
 

KelIy

Villager
Member
Joined
Jul 8, 2022
Messages
20
Reaction score
32
First Language
English
Primarily Uses
RMMZ
I'm a little confused and just wanted to clarify, what commands do you use to disable an event's reflection by commanding itself as an ID.
If you want to have an event turn its own reflections off, then you would use the 'Change Event Reflection' command and set the 'Enable Wall Reflection' and 'Enable Floor Reflection' arguments to false---false is the value set if you select 'Disable' in the drop down box that appears. You would use the event ID 0 to target itself and can leave the other boxes untouched.
 

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,300
Reaction score
310
First Language
English
Primarily Uses
N/A
I have some things to report and suggestt that might interest you to revise some of the plugins aspects.

First of all the plugin feels very well optimized, I use quite alot of spawning events and I haven't once experienced lag from this plugin considering it essentially doubles the graphics displayed.

Back on subject:
  • I have noticed when teleporting into new maps there is sometimes (rare occasions) random event graphics fixated on the parallax, I'm not entirely sure what causes it but one play test I noticed it and forgot to screen cap it, I tried to recreate the very same path with several play tests but didn't experience it. I'll let you know if I see any more glitches regarding this.
  • Unfortunately event reflections don't seem to follow there opacity/transparency counterparts, I'm aware you have options for actors to remove them entirely, also considering spawn events which some plugins are capable off, I wasn't sure if there was the option to have them passively follow through, perhaps in an update.
  • I'm also wondering if it's possible to implement an opacity parameter? for instance to adding more variety on different levels of opacity, modes etc. It could open up to more visual bonuses!
  • I was also wondering if there was plans for map note tags that can disable effects for specific rooms.
 

KelIy

Villager
Member
Joined
Jul 8, 2022
Messages
20
Reaction score
32
First Language
English
Primarily Uses
RMMZ
I have some things to report and suggestt that might interest you to revise some of the plugins aspects.

First of all the plugin feels very well optimized, I use quite alot of spawning events and I haven't once experienced lag from this plugin considering it essentially doubles the graphics displayed.
Thank you for taking the time to test my plugin. I'm glad to hear my implementation has not caused a major performance hit in your tests.

  • I have noticed when teleporting into new maps there is sometimes (rare occasions) random event graphics fixated on the parallax, I'm not entirely sure what causes it but one play test I noticed it and forgot to screen cap it, I tried to recreate the very same path with several play tests but didn't experience it. I'll let you know if I see any more glitches regarding this.
I have not encountered this bug at all when testing, and I am unsure of what circumstances might cause it to occur. If you can figure out a consistent way to reproduce it or upload a demo where this issue regularly appears, I would be happy to look into the cause and hopefully fix it.

  • Unfortunately event reflections don't seem to follow there opacity/transparency counterparts, I'm aware you have options for actors to remove them entirely, also considering spawn events which some plugins are capable off, I wasn't sure if there was the option to have them passively follow through, perhaps in an update.
I'm not sure what you mean. The reflections do follow the parent character's opacity. In fact, here is a screenshot demonstrating that on both the party and an event. Though, they do not follow the transparency flag of the character, which is separate. I suppose I can make it a point to have reflections follow the character's transparency setting in the next version.
opatest.png

  • I'm also wondering if it's possible to implement an opacity parameter? for instance to adding more variety on different levels of opacity, modes etc. It could open up to more visual bonuses!
This seems simple enough to implement. I'll allow the developer to set an opacity separate from the parent in a future version.

  • I was also wondering if there was plans for map note tags that can disable effects for specific rooms.
No plans at the moment. I don't think it would be too hard to implement though! I will look into adding it to a future version.

I can't give a timeline on when I'll update this plugin since I am currently making good progress on two as-of-now-unreleased plugins, but I hope it shouldn't take too long.
 
Last edited:

LyraVultur

Non-binary Catbat
Veteran
Joined
Apr 24, 2021
Messages
57
Reaction score
102
First Language
English
Primarily Uses
RMMZ
Incredible work! It also plays nicely with VisuStella Region Parallexes underneath it, which wasn't the case with some older MV mirror plugins I was trying to get working in MZ. Thanks for this!
 

Latest Threads

Latest Profile Posts

Tried something. Little sneak peak of Unity AD.
M42S7Us.gif

It's the little things. Lengthened the time the bar fades in and out to be a bit more comfortable.
3 days until release!

Forum statistics

Threads
125,736
Messages
1,173,114
Members
164,883
Latest member
rayli1107
Top