设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
搜索附件  
同能RPG制作大师 › 附件中心 › 同能RM技术讨论区 › RPG Maker MZ 讨论区 › [MZ/MV] KC_Mirrors - Add reflections to your map characters-3.jpg

[MZ/MV] KC_Mirrors - Add reflections to your map characters-3.jpg

 

[MZ/MV] KC_Mirrors - Add reflections to your map characters:
KC_Mirrors 1.5.1
by Kelly Chavez
​


Introduction
This is a plugin that adds reflections to your actors, events, and vehicles. 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 actually show 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.

If you own MZ, you can also find RTP tileset graphics where water has reduced opacity in the <RPG Maker MZ Folder>/dlc/BasicResources/tilesets folder.

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
Spoiler: 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+):




This plugin is even backwards compatible with RPG Maker MV (available in versions 1.4.0+)


How to Use
To use, download and place this plugin into your plugin manager and enable it. From there, follow the instructions in the help section of the plugin and the descriptions of each command.

If you're using any of the following plugins, KC_Mirrors should be BELOW them in the plugin manager:
Spoiler: Plugins KC_Mirrors Should be below

  • PluginCommonBase
  • GALV_DiagonalMovement
  • GALV_DiagonalMovementMZ
  • GALV_CharacterFrames
  • GALV_CharacterFramesMZ
  • GALV_EventSpawner
  • GALV_EventSpawnerMZ
  • QMovement
  • QSprite

Plugin Commands / Script Calls
Spoiler: MZ Plugin Commands

  • 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.

  • Change Vehicle Reflection

    • Change the reflection parameters of a specified vehicle. These changes are persistent and are included in the save file.

  • Match Vehicle Reflection

    • Sets this vehicle's reflection graphic to its normal top view graphic.

  • Set Wall Reflection Variable

    • 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.

Spoiler: MV Plugin Commands
                Code:       

Spoiler: Script calls
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 functions 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, floor_angle, wall_angle)

    • Same as Change Actor Reflection command

  • resetActorReflectImage(actor_id)

    • Same as Match Actor Reflection command

  • setVehicleReflect(vehicle_name, reflection_filename, reflection_index, floor_enabled, wall_enabled, floor_opacity, wall_opacity, floor_x_offset, floor_y_offset, wall_x_offset, wall_y_offset, floor_angle, wall_angle)

    • Same as Change Vehicle Reflection command

  • resetVehicleReflectImage(actor_id)

    • Same as Match Vehicle Reflection command

  • setWallReflectMode(mode)

    • Same as Set Wall Reflection Mode command

  • refreshReflectWallCache()

    • Same as Refresh Wall Reflections command

Demo
Grab one of the demo zip files from this GitHub release

Download
Grab KC_Mirrors.js from this GitHub release

Old Versions & Demos
GitHub Releases

Changelog
Spoiler: Changelog

  • 2025/04/24 - v1.5.1

    • Fix incompatibility with QSprite
    • Fix bug in MV parameter parsing for wall reflections

      • Affected commands: setReflectOpacity, setReflectVisible, setReflectAngle

    • Removed JsonEx parsing cleanup
    • General code cleanup and light optimization

  • 2024/11/24 - v1.5.0

    • Added support for vehicles
    • Added rotation property to reflections

  • 2024/09/18 - v1.4.3

    • Fixed crash that occurred when using this plugin and Galv's Character Frames in projects created with older versions of MV

  • 2024/08/18 - v1.4.2

    • Fixed incompatibility with plugins that create characters without metadata (e.g. QABS)
    • Fixed wall reflections not appearing if a character's x and y properties are not integers, which occurs with some pixel movement plugins
    • Note metadata is now parsed again (e.g. \v[1] resolves to whatever value is stored in game variable 1)

  • 2024/08/18 - v1.4.1

    • MV

      • Updated demo
      • Made compatible with Galv's Character Frames plugin
      • Made compatible with Galv's Event Spawner plugin

    • MZ

      • Added workaround for a performance issue that occurred when using this plugin and Galv's Character Frames and loading a map with a lot of events
      • Fixed incorrect argument handling when using plugin commands without PluginCommonBase

    • Both

      • Miscellaneous code cleanup
      • Fixed using "Load Game" on a save file without KC_Mirrors causing the game to crash


  • 2024/08/16 - v1.4.0

    • PluginCommonBase is still supported but is now OPTIONAL
    • Added support for RPG Maker MV
    • Minor bug fixes and code restructuring

  • 2024/04/25 - v1.3.7

    • Fix issue where events unspawned by Galv_EventSpawnerMZ do not have their reflections removed

  • 2024/03/09 - v1.3.6

    • Initialize Sprite_Reflection properly for compatibility with other plugins
    • Consolidated internal classes Sprite_Reflect and Sprite_Reflect_Wall into single class
    • Optimized y coordinate lookup for walls to perform faster and create less garbage

  • 2024/03/07 - v.1.3.5

    • Change how character frames are handled for reflections internally
    • Made this plugin compatible with Galv's Character Frames, Diagonal Movement, and Character Animation
    • Miscellaneous bug fixes and stability improvements

  • 2024/02/17 - v1.3.4

    • Updated plugin url to point to current Github repo

  • 2023/12/01 - v1.3.3

    • Fixed a bug that caused a crash when launching without FilterControllerMZ

  • 2022/12/20 - v1.3.2

    • Fixed bugs that caused incorrect scaling on the x axis to be applied to reflections of events using tileset sprites

  • 2022/10/26 - v1.3.1

    • Quick fix to CharReflections Filter Controller target

  • 2022/10/26 - 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


  • 2022/08/05 - 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

  • 2022/07/19 - v1.1.4

    • Adjusted how reflections are handled internally for compatibility with KC_MoveRouteTF

  • 2022/07/16 - 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

  • 2022/07/14 - 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

  • 2022/07/14 - 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)

  • 2022/07/12 - 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

  • 2022/07/11 - 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.


本贴来自国际rpgmaker官方论坛作者:Kelly-inactive处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/mz-mv-kc_mirrors-add-reflections-to-your-map-characters.149397/
[MZ/MV] KC_Mirrors - Add reflections to your map characters-3.jpg
         同一主题附件:
    [MZ/MV] KC_Mirrors - Add reflections to your map characters-1.jpg
    [MZ/MV] KC_Mirrors - Add reflections to your map characters-2.jpg
    [MZ/MV] KC_Mirrors - Add reflections to your map characters-3.jpg
    [MZ/MV] KC_Mirrors - Add reflections to your map characters-4.jpg
    [MZ/MV] KC_Mirrors - Add reflections to your map characters-5.jpg
简体中文
繁體中文
English(英语)
日本語(日语)
Deutsch(德语)
Русский язык(俄语)
بالعربية(阿拉伯语)
Türkçe(土耳其语)
Português(葡萄牙语)
ภาษาไทย(泰国语)
한어(朝鲜语/韩语)
Français(法语)
关闭

幸运抽奖

社区每日抽奖来袭,快来试试你是欧皇还是非酋~

立即查看

Loading...

QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

GMT+8, 2026-10-5 23:03 , Processed in 0.174973 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部