PH Sprite Reflection

PH Sprite Reflection

Publish Date: June 06, 2016

Introduction

  • This plugin allows you to reflect any character on the water.

License

Download

Parameters

  • Distance
    Default distance in pixels between the reflection in the water and the actual character
     
  • Scale Factor
    Default scale factor of the reflections (%) (resize the reflection)
     
  • Opacity
    Default opacity value for the reflections (From 0 to 255)
     
  • Blend Mode
    Default blend more for the reflections (0: Normal, 1: Additive)
     
  • Small Water Tile
    Switch this option to choose whether or not you want the reflections in small water tiles appear (0: No, 1: Yes)
     
  • Add to Window_Options
    Adds an option for the player to turn on/off the reflections in all maps in the Options Menu (0: No, 1: Yes)
     
  • Vocabulary Window_Options
    Text that will appear in the Window_Options

Configuration

  • Download the JS file and include it into the /plugins folder of your project.
  • Open the Plugin Manager, select the file PH_SpriteReflection.js, and turn it on.
  • You may create some rules in the tilesets using the Terrain Tag to specify the properties of the reflection for each water tileset.
  • You are allowed to create some rules for bridges as well.

Plugin Commands

  • PHSpriteReflection global on
    Turns on the reflection of everything
     
  • PHSpriteReflection player on
    Turns on the reflection of the player
     
  • PHSpriteReflection followers on
    Turns on the reflection of the followers
     
  • PHSpriteReflection event on Name of the Event
    Turns on the reflection of a specific event
     
  • PHSpriteReflection global off
    Turns off the reflection of everything
     
  • PHSpriteReflection player off
    Turns off the reflection of the player
     
  • PHSpriteReflection followers off
    Turns off the reflection of the followers
     
  • PHSpriteReflection event off Name of the Event
    Turns off the reflection of a specific event

Rules for Tilesets

  • Basically, you are allowed to set rules for water (A1 tileset) and bridge (B, C, D, E tilesets) based on the Terrain Tag
  • The idea of creating separated rules for bridge and water tiles can be explained in this image:
  • Here, you can see some red rectangles. They represent the distance between the character and its reflection on the water. Usually, there are some tiles where you need to set a bigger distance between them, but when your character is placed in a bridge, you can modify this distance, making the reflection closer to the character. Also, you can modify the scale of the reflection, opacity, and blend mode (In the example above, I changed the blend mode and the opacity).
     
  • In order to set the rule for a tileset, you have to open the database and go to Tilesets and click in the section Terrain Tag (right side).
  • After that, use the Terrain Tag option to set a numeric tag (greater than 0) for the tiles you want to make a rule.
  • You are allowed to make 7 rules for tiles which are in the section A1 (Animation) and 7 rules for tiles in the sections B through E.
  • In the Note section, you should follow the pattern below:
<PH>
[commands]
</PH>
 
  • You must replace [commands] using the following commands (one on each line of the note):
    • WaterN={distance:scale:opacity:blend}: Sets a rule for a specific water tile (A1 tileset)
    • BridgeN={distance:scale:opacity:blend}: Sets a rule for a bridge tile (B, C, D, E tilesets)
  • Change the following parameters for the actual numbers you want to set:
    • N = Terrain Tag number (From 1 to 7).
    • distance = The distance between the reflection in the water and the actual character
    • scale = Scale factor of the reflections (%) (resize the reflection)
    • opacity = Opacity value for the reflections (From 0 to 255)
    • blend = Blend more for the reflections (0: Normal, 1: Additive)
  • You DO NOT NEED to state all those parameters when making a rule! Only the terrain tag and distance are necessary for the rules.
  • If you do not specify a complete rule for a water tile, it will get the default value that is set in the plugin.
  • If you do not specify a complete rule for a bridge tile, it will get the default value of the water tile under the bridge. If it is still not set, it will get the default.
  • There are some examples of valid rules below:
    • Water1={30} : Sets the terrain tag for a water tile and its distance
    • Water2={30:100} : Sets the terrain tag for a water tile, its distance and its scale
    • Water3={30:100:127} : Sets the terrain tag for a water tile, its distance, its scale and its opacity
    • Water4={30:100:127:1} : Sets the terrain tag for a water tile, its distance, its scale, its opacity and its blend mode
    • Bridge1={13} : Sets the terrain tag for a bridge tile and its distance
    • Bridge2={13:80} : Sets the terrain tag for a bridge tile, its distance and its scale
    • Bridge3={13:80:70} : Sets the terrain tag for a bridge tile, its distance, its scale and its opacity
    • Bridge4={13:80:70:0} : Sets the terrain tag for a bridge tile, its distance, its scale, its opacity and its blend mode.
  • Here is an image that shows my actual configuration for some water tiles and bridge tiles:

Screenshots

Changelog

  • 11/25/2015: Version 1.1 (Added option for the Player to turn on/off the reflections via Options Menu; Added parameter for choosing whether or not the reflections in small water tiles will appear).
  • 11/24/2015: Version 1.0

Social Links

Copyright © 2018 - Gustavo Fernandes - All rights reserved

Cookies and Privacy Policy