光源用のレイヤーを追加するプラグイン – TerraxLighting.js

タイトル
Creates an extra layer that darkens a map and adds lightsources!
作者名
ヘルプ
To activate the script in an area, do the following:
1. Put an event switch into the map.
2. In the 'Note' field (Next to the name) put the following text :
Light 250 #FFFFFF
- Light activates the script
- 250 is the lightradius of the object
- #FFFFFF is the lightcolor (white in this case)
3. You're done, its that simple.

To alter the player radius in game use the following plugin command :
Light radius 200 #FFFFFF (to change the radius and the color)
If you want to change the player radius slowly over time (like a dying torch)
use the command 'Light radiusgrow 200 #FFFFFF'

To turn on and off lightsources in the game, do the following:
Give the lightsource the normal def : Light 250 #FFFFFF and an extra number
so it becomes 'Light 250 #FFFFFF 1'
To turn on this light use plugin command : 'Light on 1'.
The plugin command will also trigger SelfSwitch 'D' on the targeted light(s).
To turn off the light use plugin command : 'Light off 1'.
You can reset the switches each map with the option or manualy by
the plugin command 'Light switch reset'

Replacing the 'Light' keyworld with 'Fire' will give the lights a subtle flicker

To completly turn off the script use : 'Light deactivate'
To turn it on again use the command: 'Light activate'

To activate a day-night cycle on a map, put in a trigger with 'DayNight' in the note.
Plugin command 'Daynight speed 10' changes the speed.
Speed 10 means it takes 10 seconds to to pass one hour in game (probably to fast)
Plugin command 'Daynight hour 16' sets the hour to 16:00 hours
Each hour has its own color value, you can define hours 0 to 23
Plugin command 'Daynight color 0 #222222' changes 0:00 hours to color value '#222222'

To use a flashlight effect use 'Flashlight on' and 'Flashlight off'

If you want to use the time of day to trigger effects (like turning on lights when it gets dark)
you can use the parameter 'Save DaynightCycle'. The default is 0, which means its off.
If you set it to a value,5 for example, it will store the daynight value (0-23) inside game variable 5.
You can then use that variable to trigger lights.

Released under the MIT license,
if used for commercial projects feel free to make a donation or
better yet, give me a free version of what you have created.
e-mail : fox(AT)caiw.nl / terraxz2 on steam.

Special thanks to everyone in the rpgmakerweb community for idea's, support and interest.
パラメータ
param Player radius
desc Adjust the light radius around the player
Default: 300
default 300

param Reset Lights
desc Resets the light switches each map
Default: No
default No

param Save DaynightCycle
desc Game variable the time of day (0-23) can be stored in
Default: 0
default 0

ライセンス表記
Released under the MIT license,
if used for commercial projects feel free to make a donation or
license: MIT

紹介ページ https://gist.github.com/liply/9f141a54e2997c2600a8925e2e05dbe6