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.
MPP Map Light - MPP_MapLight.js
Plugin desc : Allows you to set the brightness of the map.
License : MIT License
Author : Mokusei Penguin
Website : http://woodpenguin.blog.fc2.com/
Desc page : https://woodpenguin.web.fc2.com/MV_Plugin/MapLight.html
File name : MPP_MapLight.js
Help of plugin :
* @target MV MZ
* @plugindesc Allows you to set the brightness of the map.
* @author Mokusei Penguin
* @url
*
* @help [version 4.0.3]
* - This plugin is for RPG Maker MV and MZ.
*
* ▼ Specification
* - Only one CharLight and one FrontLight can be added to each character.
* - Lights created on events and maps will be reset by changing the map.
* - The player’s lights will remain even if the map is changed.
* - Event lights whose Priority is set to [Above characters]
* will be displayed above other lights.
*
* ▼ Plugin command
* - In MV, the variable N is referred to by writing v [N] in the item for
* inputting a numerical value.
* - In MZ, in the item to enter a numerical value, select the text and
* write v [N] to refer to the variable N.
* - For the color index (c), specify the one set in the plug-in parameter
* [Light Colors].
*
* 〇 MV / MZ
*
* 〇 SetCharLight evId r c a / setCharLight
* evId : -1:Player, 0:This event, 1..:EventID
* r : radius(1 = 1 tile)
* c : color index(Erase with 0)
* a : amplitude(Specify from 0-100 / No blinking at 0 / Not set is 0)
* - The light is displayed around the character.
*
* 〇 SetPosLight x y r c a / setPosLight
* x : X coordinate
* y : Y coordinate
* r : radius(1 = 1 tile)
* c : color index(Erase with 0)
* a : amplitude(Specify from 0-100 / No blinking at 0 / Not set is 0)
* - Lights up at the specified coordinates (x, y).
*
* 〇 SetFrontLight evId c a / setFrontLight
* evId : -1:Player, 0:This event, 1..:EventID
* c : color index(Erase with 0)
* a : amplitude(Specify from 0-100 / No blinking at 0 / Not set is 0)
* - A light is displayed in front of the character.
*
* 〇 SetCharLightOffset evId x y / setCharLightOffset
* evId : -1:Player, 0:This event, 1..:EventID
* x : X coordinate(1 = 1px)
* y : Y coordinate(1 = 1px)
* - Shift the center position of CharLight.
*
* 〇 EraseCharLight evId / eraseCharLight
* evId : -1:Player, 0:This event, 1..:EventID
* - Turns off the lights centered on the character.
*
* 〇 ErasePosLight x y / erasePosLight
* x : X coordinate
* y : Y coordinate
* - Turns off the light at the specified coordinates (x, y).
*
* 〇 EraseFrontLight evId / eraseFrontLight
* evId : -1:Player, 0:This event, 1..:EventID
* - Turns off the light that illuminates the front of the character.
*
* 〇 SetMapDarkness d / setDarkness
* d : Map darkness(Specify from 0-100)
* - Change the darkness of the map.
*
* 〇 MoveMapDarkness d t / moveDarkness
* d : Map darkness(Specify from 0-100)
* t : duration
* - Gradually change the darkness of the map.
*
* 〇 SetMapDarknessColor r g b / setDarknessColor
* - Change the darkness color of the map.
* - Colors are processed by multiplication. (White cannot be used)
*
* ▼ Map notes
* 〇 <Darkness:n>
* n : Map darkness(Specify from 0-100)
* - Specifies the darkness of the map.
* - By writing v[n], the value of the nth variable is referenced.
* - However, it is only referenced when you switch maps.
*
* 〇 <DarknessColor:r,g,b>
* - Specifies the darkness color of the map.
* - Colors are processed by multiplication. (White cannot be used)
*
* 〇 <PosLight X,Y:r,c,a>
* X : X coordinate
* Y : Y coordinate
* r : radius(1 = 1 tile)
* c : color index
* a : amplitude(Specify from 0-100 / No blinking at 0 / Not set is 0)
* - Places the light at the specified coordinates (x, y).
*
* ▼ Annotation of event execution content
* 〇 CharLight r c a
* r : radius(1 = 1 tile)
* c : color index
* a : amplitude(Specify from 0-100 / No blinking at 0 / Not set is 0)
* - Lights are displayed around this event.
* - This command applies only to the first annotation of the execution.
*
* 〇 FrontLight c a
* c : color index
* a : amplitude(Specify from 0-100 / No blinking at 0 / Not set is 0)
* - Shows the lights that illuminate the front of this event.
* - This command applies only to the first annotation of the execution.
*
* 〇 LightOffset x y
* x : X coordinate(1 = 1px)
* Y : Y coordinate(1 = 1px)
* - Displays the light position shifted by the specified coordinates.
*
* ================================
* Mail : wood_penguin@yahoo.co.jp (@ is half-width)
* Blog : http://woodpenguin.blog.fc2.com/
* License : MIT license
*
* @command setCharLight
* @desc
* @arg character
* @desc -1:Player, 0:This event, 1..:EventID
* @type number
* @min -1
* @max 999
* @default 0
* @arg radius
* @desc 1 = 1 tile
* @type number
* @min 0
* @max 99
* @default 1
* @arg colorIndex
* @desc Specified by plug-in parameter [Light Colors] / 0:erase
* @type number
* @min 0
* @max 99
* @default 1
* @arg amplitude
* @desc 0-100
* @type number
* @min 0
* @max 100
* @default 0
*
* @command setPosLight
* @desc
* @arg x
* @desc
* @type number
* @min -9999
* @max 9999
* @default 0
* @arg y
* @desc
* @type number
* @min -9999
* @max 9999
* @default 0
* @arg radius
* @desc 1 = 1 tile
* @type number
* @min 0
* @max 99
* @default 1
* @arg colorIndex
* @desc Specified by plug-in parameter [Light Colors] / 0:erase
* @type number
* @min 0
* @max 99
* @default 1
* @arg amplitude
* @desc 0-100
* @type number
* @min 0
* @max 100
* @default 0
*
* @command setFrontLight
* @desc
* @arg character
* @desc -1:Player, 0:This event, 1..:EventID
* @type number
* @min -1
* @max 999
* @default 0
* @arg colorIndex
* @desc Specified by plug-in parameter [Light Colors] / 0:erase
* @type number
* @min 0
* @max 99
* @default 1
* @arg amplitude
* @desc 0-100
* @type number
* @min 0
* @max 100
* @default 0
*
* @command setCharLightOffset
* @desc
* @arg character
* @desc -1:Player, 0:This event, 1..:EventID
* @type number
* @min -1
* @max 999
* @default 0
* @arg offsetX
* @desc 1 = 1px
* @type number
* @min -9999
* @max 9999
* @default 0
* @arg offsetY
* @desc 1 = 1px
* @type number
* @min -9999
* @max 9999
* @default 0
*
* @command eraseCharLight
* @desc
* @arg character
* @desc -1:Player, 0:This event, 1..:EventID
* @type number
* @min -1
* @max 999
* @default 0
*
* @command erasePosLight
* @desc
* @arg x
* @desc
* @type number
* @min -9999
* @max 9999
* @default 0
* @arg y
* @desc
* @type number
* @min -9999
* @max 9999
* @default 0
*
* @command eraseFrontLight
* @desc
* @arg character
* @desc -1:Player, 0:This event, 1..:EventID
* @type number
* @min -1
* @max 999
* @default 0
*
* @command setDarkness
* @desc
* @arg darkness
* @desc
* @type number
* @min 0
* @max 100
* @default 100
*
* @command moveDarkness
* @desc
* @arg darkness
* @desc
* @type number
* @min 0
* @max 100
* @default 100
* @arg duration
* @desc
* @type number
* @min 1
* @max 999
* @default 60
*
* @command setDarknessColor
* @desc Colors are processed by multiplication. (White cannot be used)
* @arg rgb
* @desc
* @default 0,0,0
*
*
* @param Light Colors
* @desc
* @type string[]
* @default [”255,255,255”,”192,128,64”,”32,32,32”,”192,192,192”]
*
* @param Front Light
* @desc
* @type struct<FrontLight>
* @default {”Radius”:”6”,”Angle”:”90”,”Oy”:”4”,”Turn Duration”:”24”}
*
* @param Darkness Size
* @desc Resolution per tile
* @type number
* @min 1
* @max 48
* @default 3
*
* @param Additive Alpha
* @desc The opacity of the layer that displays the color of the light in addition. 0:none, 100:max
* @type number
* @min 0
* @max 100
* @default 50
*
* @param Darkness Priority
* @desc
* @type select
* @option below characters
* @value 2
* @option above characters
* @value 7
* @option above animation
* @value 9
* @default 9
*