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

KelIy

JS Plugin Writer
Member
Joined
Jul 8, 2022
Messages
28
Reaction score
46
First Language
English
Primarily Uses
RMMZ
KC_Mirrors 1.3.2
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

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

An example of characters having their floor reflections offset by an arbitrary amount (available in version 1.3.0+):
reflection_offset.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, 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
  • 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
136
Reaction score
58
First Language
English
Primarily Uses
RMMV
Does it work for MV?
 

KelIy

JS Plugin Writer
Member
Joined
Jul 8, 2022
Messages
28
Reaction score
46
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
136
Reaction score
58
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
287
Reaction score
84
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
136
Reaction score
58
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

JS Plugin Writer
Member
Joined
Jul 8, 2022
Messages
28
Reaction score
46
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
136
Reaction score
58
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

JS Plugin Writer
Member
Joined
Jul 8, 2022
Messages
28
Reaction score
46
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,333
Reaction score
323
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,333
Reaction score
323
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

JS Plugin Writer
Member
Joined
Jul 8, 2022
Messages
28
Reaction score
46
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,333
Reaction score
323
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

JS Plugin Writer
Member
Joined
Jul 8, 2022
Messages
28
Reaction score
46
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
60
Reaction score
107
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!
 

KelIy

JS Plugin Writer
Member
Joined
Jul 8, 2022
Messages
28
Reaction score
46
First Language
English
Primarily Uses
RMMZ
Been a while since I gave this plugin an update proper, so I spent the better part of today adding a couple new features. The first was adding Screen Effect Filter MZ support to reflections and the second was allowing the developer to offset the reflections by arbitrary amounts of pixels.

But a picture's worth a thousand words, so here's a little gif showing both of those features in action!
mz_reflect_test.gif
In the previous version of this plugin, this wouldn't be possible since the floor reflection was more or less glued to each character's feet, and the wave effect is there to help sell that it's a "water" reflection.

That's the gist of the 1.3.0 version of KC_Mirrors. I hope it's useful, and if you find any bugs, don't hesitate to let me know!
 
Last edited:

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,333
Reaction score
323
First Language
English
Primarily Uses
N/A
Hey again, i'm certain i'm getting it wrong with this update but at my current stage i'm after simply testing out the water ripple effect you've got in the new version here.

So far I have KC Mirror 1.3.1 and that filter control below in the parameters, It crashes immediately so I might have to ask for a little more specific instructions on how to test this effect for floor puddle reflections.
 

KelIy

JS Plugin Writer
Member
Joined
Jul 8, 2022
Messages
28
Reaction score
46
First Language
English
Primarily Uses
RMMZ
Hey again, i'm certain i'm getting it wrong with this update but at my current stage i'm after simply testing out the water ripple effect you've got in the new version here.

So far I have KC Mirror 1.3.1 and that filter control below in the parameters, It crashes immediately so I might have to ask for a little more specific instructions on how to test this effect for floor puddle reflections.
Good to hear from you again! Though, that definitely shouldn't be happening. The demo itself just has PluginCommonBase, DevToolsManage (this is just a testing plugin), FilterControllerMZ, and KC_Mirrors in order from top to bottom. The preview GIF shown in the original post uses these note tags in the map file:
Code:
<Filter:REFLECT#1,reflection-w,CharReflectionsFloor>
<SetFilter:REFLECT#1,0,0,5,30,100,1,1>
If those settings cause an issue, could you perhaps upload a project that consistently reproduces the crashing issue so I can look into why it's occurring?
 
Last edited:

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,333
Reaction score
323
First Language
English
Primarily Uses
N/A
Hmm I'm not sure if the same demo i have is the same you're referring to, I can only see in the list:

  • Visustella events move route core
  • Button picture
  • Text picture
  • Filter controller MZ.
As a side note I wasn't sure if it was possible to have the ripple effect added to the plugin parameters themselves instead of having to copy the map note tags for every relevant map..
I was also just thinking too, it would be kinda cool if the reflections remained the same as before but when rain occurs the rippling begins.
 

KelIy

JS Plugin Writer
Member
Joined
Jul 8, 2022
Messages
28
Reaction score
46
First Language
English
Primarily Uses
RMMZ
Hmm I'm not sure if the same demo i have is the same you're referring to, I can only see in the list:

  • Visustella events move route core
  • Button picture
  • Text picture
  • Filter controller MZ.
As a side note I wasn't sure if it was possible to have the ripple effect added to the plugin parameters themselves instead of having to copy the map note tags for every relevant map..
I was also just thinking too, it would be kinda cool if the reflections remained the same as before but when rain occurs the rippling begins.
I was referring to the demo of this plugin, not the FilterController demo, which I believe is the one you're describing. That aside, I'll take your other suggestions into consideration for the next update.
 

Latest Threads

Latest Profile Posts

Has it really been 50 streams? At this point it's just guilting me into pushing out a prototype. :kaoswt:



I should probably just bite the bullet and send it out, then go with my original plan to provide weekly updates.
I know it's just other small RM devs, but it still always feels legitimizing to have folks email me in private with a steam key, requesting a review of their game.:kaoluv: Look ma, I've made it to the big leagues. small edit: another email just came in. :kaoback:
time and time again I enjoy dramatic remarks on how I should find a better job.
As it stands, I go to work for 10-14 days a month. At work, I have time for my private projects. I arrive home, my mind is clear.
So yes, the pay sucks. But I have what so many lose after graduation. Freedom.
Came back cuz of the sale. Got MZ. The System 2 advanced settings for UI are so frustrating, and I see we still hate pixel fonts. Marvelous.
Did another YouTube short. This one has like 1k views (or maybe 380? Analytics is being weird). Getting them zoomer views, yo!

Forum statistics

Threads
129,720
Messages
1,204,651
Members
170,803
Latest member
JimGTz
Top