Welcome to PGMZ! My goal is to make it easy for everyone to find and share great plugins for creating amazing games. As a plugin developer myself, I'm excited to grow this community with all of you.
Tile Mask - TileMask.js
Plugin desc : Mask the map according to the region.
License : MIT License
Author : あわやまたな (Awaya_Matana)
Website : https://awaya3ji.seesaa.net/
Desc page : https://awaya3ji.seesaa.net/article/509947274.html
File name : TileMask.js
Help of plugin :
* @target MZ
* @plugindesc Mask the map according to the region.
* @author あわやまたな (Awaya_Matana)
* @url https://awaya3ji.seesaa.net/article/509947274.html
* @help Ver.1.1.0
* [Paste]
* You can use it when you want to partially change the mask or fill.
*
* Overwrites the mask and fill settings for the specified area.
* It is possible to paste different settings to the upper and lower layers.
* The layer with -1 pasted on it will revert to its original state.
*
* Pasting only changes the mask and fill settings.
* The region ID obtained from event commands etc. will not change.
* This allows you to mask or fill the map without affecting encounters or overpasses in any way.
*
* [Replace]
* Specify the conditions and paste.
* Pasting will only occur if the mask and fill of a specific area meet the conditions.
*
* [Region ID]
* Region IDs 0-255 correspond to map regions.
* Values 256 and above can be used as settings specifically for masking and filling.
* Just like 0 to 255, values from 256 onwards can also be reflected in the map by pasting or replacing.
*
* [Note(for Events)]
* <tileMask> //Apply local opacity based on priority.
* <tileMask:upper> //Applies the opacity of the local upper tile.
* <tileMask:lower> //Applies the opacity of the local lower tile.
* <tileMask:n> //Applies region opacity based on priority (n=Region ID).
* <tileMask:n,upper> //Applies the opacity of the upper tile of the region (n:Region ID).
* <tileMask:n,lower> //Applies the opacity of the lower tile of the region (n:Region ID).
* <tileMask:false> //Does not apply tile opacity.
* <tileMaskRatio:n> //Specify the applied opacity ratio (n=0 to 1).
*
* @param upperLayer
* @text Upper Layer Settings
* @desc Default setting.
* @type struct<settings>
* @default {"fillColor":"0,0,0","fillBlendMode":"0","maskSmooth":"false","fillSmooth":"true"}
*
* @param lowerLayer
* @text Lower Layer Settings
* @desc Default setting.
* @type struct<settings>
* @default {"fillColor":"0,0,0","fillBlendMode":"0","maskSmooth":"false","fillSmooth":"true"}
*
* @param maskCharacter
* @text Mask Character
* @desc Applies tile opacity to the character initially.
* *Same as <tileMask>
* @type boolean
* @default false
*
* @param maskBalloon
* @text Mask Balloon
* @desc Link the tile opacity of the character and the opacity of the balloon.
* @type boolean
* @default false
*
* @command setMaskOpacity
* @text Set Mask Opacity
* @desc Changes the opacity of the tiles in the specified region.
* @arg regionId
* @text Region ID
* @desc Specify multiple entries separated by commas, or specify a range separated by hyphens. Example: 0,2,8-16,24
* @default 0
* @arg layer
* @text Layer
* @default Upper
* @type select
* @option All
* @value All
* @option Upper Layer
* @value Upper
* @option Lower Layer
* @value Lower
* @arg opacity
* @text Opacity
* @desc
* @default 255
* @arg duration
* @text Duration
* @desc Instantly applied at 0
* @default 0
* @arg wait
* @text Wait for Completion
* @default false
* @type boolean
*
* @command setMaskSmooth
* @text Set Mask Smooth
* @desc Changes the smoothing of the mask.
* @arg layer
* @text Layer
* @default Upper
* @type select
* @option All
* @value All
* @option Upper Layer
* @value Upper
* @option Lower Layer
* @value Lower
* @arg smooth
* @text Smooth
* @type boolean
* @default false
*
* @command setFillOpacity
* @text Set Fill Opacity
* @desc Changes the fill opacity of the specified region.
* @arg regionId
* @text Region ID
* @desc Specify multiple entries separated by commas, or specify a range separated by hyphens. Example: 0,2,8-16,24
* @default 0
* @arg layer
* @text Layer
* @default Upper
* @type select
* @option All
* @value All
* @option Upper Layer
* @value Upper
* @option Lower Layer
* @value Lower
* @arg opacity
* @text Opacity
* @desc
* @default 255
* @arg duration
* @text Duration
* @desc Instantly applied at 0
* @default 0
* @arg wait
* @text Wait for Completion
* @default false
* @type boolean
*
* @command setFillColor
* @text Set Fill Color
* @desc Changes the fill color for the specified region.
* @arg regionId
* @text Region ID
* @desc Specify multiple entries separated by commas, or specify a range separated by hyphens. Example: 0,2,8-16,24
* @default 0
* @arg layer
* @text Layer
* @default Upper
* @type select
* @option All
* @value All
* @option Upper Layer
* @value Upper
* @option Lower Layer
* @value Lower
* @arg color
* @text Color
* @desc Set R,G,B values separated by commas.
* @type combo
* @option Default
* @default Default
*
* @command setFillBlendMode
* @text Set Fill Blend Mode
* @desc Changes the fill blend mode for the specified region.
* @arg layer
* @text Layer
* @default Upper
* @type select
* @option All
* @value All
* @option Upper Layer
* @value Upper
* @option Lower Layer
* @value Lower
* @arg blendMode
* @text Blend Mode
* @type select
* @option Normal
* @value 0
* @option Additive
* @value 1
* @option Multiply
* @value 2
* @option Screen
* @value 3
* @default 0
*
* @command setFillSmooth
* @text Set Fill Smooth
* @desc Changes the smoothing of the fill.
* @arg layer
* @text Layer
* @default Upper
* @type select
* @option All
* @value All
* @option Upper Layer
* @value Upper
* @option Lower Layer
* @value Lower
* @arg smooth
* @text Smooth
* @type boolean
* @default true
*
* @command pasteMaskSettings
* @text Paste Mask Settings
* @desc Makes the specified coordinates the same mask as the region.
* @arg regionId
* @text Region ID
* @desc Reset to -1.
* @default -1
* @arg layer
* @text Layer
* @default Upper
* @type select
* @option All
* @value All
* @option Upper Layer
* @value Upper
* @option Lower Layer
* @value Lower
* @arg coords
* @text Coordinates
* @desc Set the X-coord,Y-coord,Width,Height, separated by commas.
* Width and height are set to 1 if not entered.
* @type combo
* @option All
* @default All
*
* @command replaceMaskSettings
* @text Replace Mask Settings
* @desc Replaces the region settings for coordinates that match the conditions.
* @arg target
* @text Search Target
* @desc Refers to the specified target.
* @default Tile
* @type select
* @option Current Settings
* @value Current
* @option Tile Settings
* @value Tile
* @option Region Settings
* @value Region
* @arg regionId
* @text Region ID
* @desc ID to replace
* -1 is the initial value for the tile.
* @default -1
* @arg replaceId
* @text Replace ID
* @desc ID of replacement destination
* -1 is the initial value for the tile.
* @default -1
* @arg layer
* @text Layer
* @desc Search and replace in the specified layer. If you select "All", the replacement will be performed on both layers.
* @default Upper
* @type select
* @option All
* @value All
* @option Upper Layer
* @value Upper
* @option Lower Layer
* @value Lower
* @arg coords
* @text Coordinates
* @desc Set the X-coord,Y-coord,Width,Height, separated by commas.
* Width and height are set to 1 if not entered.
* @type combo
* @option All
* @default All
*
* @command pasteFillSettings
* @text Paste Fill Settings
* @desc Gives the specified coordinates the same fill as the region.
* @arg regionId
* @text Region ID
* @desc Reset to -1.
* @default -1
* @arg layer
* @text Layer
* @default Upper
* @type select
* @option All
* @value All
* @option Upper Layer
* @value Upper
* @option Lower Layer
* @value Lower
* @arg coords
* @text Coordinates
* @desc Set the X-coord,Y-coord,Width,Height, separated by commas.
* Width and height are set to 1 if not entered.
* @type combo
* @option All
* @default All
*
* @command replaceFillSettings
* @text Replace Fill Settings
* @desc Replaces the region settings for coordinates that match the conditions.
* @arg target
* @text Search Target
* @desc Refers to the specified target.
* @default Tile
* @type select
* @option Current Settings
* @value Current
* @option Tile Settings
* @value Tile
* @option Region Settings
* @value Region
* @arg regionId
* @text Region ID
* @desc ID to replace
* -1 is the initial value for the tile.
* @default -1
* @arg replaceId
* @text Replace ID
* @desc ID of replacement destination
* -1 is the initial value for the tile.
* @default -1
* @arg layer
* @text Layer
* @desc Search and replace in the specified layer. If you select "All", the replacement will be performed on both layers.
* @default Upper
* @type select
* @option All
* @value All
* @option Upper Layer
* @value Upper
* @option Lower Layer
* @value Lower
* @arg coords
* @text Coordinates
* @desc Set the X-coord,Y-coord,Width,Height, separated by commas.
* Width and height are set to 1 if not entered.
* @type combo
* @option All
* @default All
*
* @command setCharacterMask
* @text Set Character Mask
* @desc Apply tile opacity to the character.
* @arg characterId
* @text Character ID
* @desc Player: -1 This Event: 0
* @default -1
* @arg mode
* @text Mode
* @default -1
* @type select
* @option Upper Opacity
* @value 1
* @option Lower Opacity
* @value 0
* @option Auto
* @value -1
* @option Disabled
* @value -2
* @arg regionId
* @text Region ID
* @desc -1 is the local region ID.
* @default -1
* @arg ratio
* @text Ratio
* @desc The opacity ratio.
* @default 1
*