Lighting and Time Editor v1.00
Level No Matter
Due I haven't had time, Feelzor has offered to continue the plugin adding new features and fixing bugs.
Download here
Introduction
I started making this plugin with the intention of giving a more professional look to my game, and the result was a lighting editor with night and day cycle, and some time control functions. Then I decided that it was good enough to share it
Installation
- Put the plugins in this order:
- LNM_GameEditorCore.js
- LNM_GameTime.js
- LNM_LightingTool.js
- Insert the folders “editor” and “lights” in the "img" directory. That’s it.
Lighting Tool (LNM_LightingTool.js)
How to use
You can add lights in two ways:
Adding lights in-game
Press TAB and then press over the lamp icon. Then select the type of light you want to add. You can drag and edit your properties at any time.
Adding custom lights from events
Simply create an event and then in the field “Note” add the following line:
Light(filename, scale, hue, alpha).addPulse(pulseMin, pulseMax, pulseSpeed).addFlick(flickIntensity, flickSpeed)
- Filename: (string) Sprite used for the light, located in /img/lights/
- Scale: (float) Scales the sprite (1.0 = 100%, 0.5 = 50%, etc)
- Hue: (integer) Tint scale for colors from 0 to 359. For more information visit https://en.wikipedia.org/wiki/File:HueScale.svg
- Alpha: (float) Transparency of the light, from 0.1 to 1.0
- pulseMin: (float) Minimum scaling for pulse animation
- pulseMax: (float) Maximum scaling for pulse animation
- pulseSpeed: (integer) Speed for pulse animation
- flickIntensity: (integer) Intensity for flick animation
- flickSpeed: (integer) Speed for flick animation
Examples:
Ambient
Light(default, 5.0, 28, 1.0)
Torch
Light(default, 15, 1.0, 1.0).addPulse(0.98, 1.02, 7).addFlick(1, 3)
Bonfire
Light(default, 28, 1.3, 1.0).addPulse(1.1, 1.3, 15).addFlick(1, 3)
Adding default lights from events
You can also create default lights by simply typing Torch, Bonfire or Ambient in the field “Note”.
Player torch
You can activate or deactivate the player’s torch by simply activating or deactivating the corresponding switch. By default it is #0001, but you can change it from the Plugin Manager.
Game Time (LNM_GameTime.js)
Plugin commands
Time PAUSE
Stops time. This is useful for cutscenes.
Time PLAY
Reactivates time.
Time SET hour minutes
Sets game’s time to a specific time.
Example:
Time SET 15 0
Sets game’s time to three in the afternoon.
Time ADD hours minutes
Advances time.
Example:
Time ADD 2 15
Advances time by two hours and fifteen minutes.
Notetags
These must be set in the field Note in Map Properties.
<Tint: R, G, B>
Ignores time and sets the screen tone specified in RGB color (Red, Green, Blue). This is useful for darker dungeons or zones in which lighting is not time dependant.
Example:
<Tint: 0, 0, 0>
Ignores time and sets the screen tone to black.
<Tint: CustomTintID>
Ignores time and sets the screen tone to a Custom Tint from the Plugin Manager.
Example:
<Tint: 8>
Sets the screen tone of Custom Tint 8.
Terms of use
Free to use for both commercial and non-commercial games. You can credit me if you want as Sebastián Cámara or as Level No Matter.
Special thanks to
Xelion for helping me with the translations.
Hope you find this useful or fun
本贴来自国际rpgmaker官方论坛作者:LevelNoMatter处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/lighting-and-time-editor.77169/