- Joined
- Oct 10, 2017
- Messages
- 92
- Reaction score
- 85
- First Language
- French
- Primarily Uses
- RMMV
Free to Use for both Commercial and Non-Commercial projects.
Credits not required but highly appreciated: do not hesitate to also credit Level No Matter (aka Sebastián Cámara).
You can find a more in-depth version of the TOS here.
Introduction
Seeing from the old post that the plugin had some bugs that needed to be solved and the original author seems to have abandoned it, I decided to continue it and share it with you.
This is a plugin that implements a Time System and a Lighting Editor (in game or with events).
You can make a lot of incredible light places with this plugin, and it can give a new dimension to your game!
Features
- Possibility to enable or disable the Time System.
- Possibility to change time whenever you want with simple commands.
- Possibility to set a specific Tint into a map by putting a single line in the Notes: the Time System will be ignored.
- Possibility to add lights by using the editor in game or with events.
Screenshots
This video has not been updated: it is the same than the one on the original post:
How to Use
To install the plugin:
- Download the plugin on the given link and click the "Clone or Download" button, then simply click "Download ZIP".
- Extract the contents of the img folder into the img folder of your project.
- Extract the contents of the js folder into the js folder of your project.
- The file ".gitattributes" is not useful for you, you can delete it.
- Enable the plugins using this order:
- LNM_GameEditorCore.js
- LNM_GameTime.js
- LNM_LightingTool.js
Using the In Game Editor:
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 default lights from events:You can create default lights by simply typing Torch, Bonfire or Ambient in the field “Note”.
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)
Examples:
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%, ...)
- 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:
Light(default, 5.0, 28, 1.0) - These are the settings used for Ambient lights.
Light(default, 1.0,15, 1.0).addPulse(0.98, 1.02, 7).addFlick(1, 3) - These are the settings used for Torch lights.
Light(default, 1.3, 28, 1.0).addPulse(1.1, 1.3, 15).addFlick(1, 3) - These are the settings used for Bonfire lights.
Light(default, 1.0,15, 1.0).addPulse(0.98, 1.02, 7).addFlick(1, 3) - These are the settings used for Torch lights.
Light(default, 1.3, 28, 1.0).addPulse(1.1, 1.3, 15).addFlick(1, 3) - These are the settings used for Bonfire lights.
Adding custom lights to enemies:
For battles, you may want enemies to hold a light. Simply do so by writing in the notes part <Light:yourLight>. Just replace yourLight with the same pattern than for event lights.
Examples:
Examples:
<Light:Bonfire>
<Light:Light(default, 5.0, 28, 1.0).addFlick(1, 3)>
<Light:Light(default, 5.0, 28, 1.0).addFlick(1, 3)>
Using the Player Torch:
You can activate or deactivate it using the switch set in the Plugin Manager. Default switch is #0001.
You can also change it to use 4 different directions, like so:
Light System commands:You can also change it to use 4 different directions, like so:
- From the Plugin Manager, set the "Player Torch 4 Directions" parameter to true.
- Note the value of the "Player Torch Filename" parameter.
- Create 4 different files, all starting with the name set in the "Player Torch Filename" parameter, each followed by either "_2", "_4", "_6" or "_8". These will be for respectively Down, Left, Right and Up directions (same as the arrows on a numpad, if it can help).
- All these files must have the .png extension and should be located in the img/lights/ folder.
For the following commands, light_id is the id of the light. It can be found in the In-Game editor on the top right corner of the screen. For event lights, the id starts with an e and is followed by the id of the event (without the first 0). For example, the light for event 0042 will have id e42.
You can also select multiple ids. Specifying a-b as an id with a and b being integers will select all lights from a to b, inclusive. To select a range of event lights, just specify ea-b, with a and b being integers. Non-existing lights ids will be ignored without any warning.
You can specify a list of ids with [id1, id2, id3], and you can use ranges in that list.
For example, you can select 1-5 for lights from 1 to 5, e4-9 for event lights from 4 to 9 and [1, 4, e6, 9-13, e8-10] to select lights with id 1, 4, 9 to 13 and event lights with id 6 and 8 to 10.
You can also select multiple ids. Specifying a-b as an id with a and b being integers will select all lights from a to b, inclusive. To select a range of event lights, just specify ea-b, with a and b being integers. Non-existing lights ids will be ignored without any warning.
You can specify a list of ids with [id1, id2, id3], and you can use ranges in that list.
For example, you can select 1-5 for lights from 1 to 5, e4-9 for event lights from 4 to 9 and [1, 4, e6, 9-13, e8-10] to select lights with id 1, 4, 9 to 13 and event lights with id 6 and 8 to 10.
Light ON light_id
Turns on the specified light. The id can be found while creating or editing a light with the editor, on the top of the screen.
eg: Light ON 1 will turn on the light with id number 1.
Light OFF light_id
Turns off the specified light. The id can be found while creating or editing a light with the editor, on the top of the screen.
eg: Light OFF 10 will turn off the light with id number 10.
Light LIMIT time_begin time_end light_id
Turns on the specified light automatically during the set time.
eg: Light LIMIT 22:30 5:30 1 will turn on the light with id number 1 between 10:30pm and 5:30am. May be useful for city lights, for example.
Light HUE hue_value light_id
Changes the color of the light with the corresponding id temporarily (just in the current save) to the one specified by the hue.
eg: Light HUE 120 4 will make the light with id 4 green
Light HUE RESET light_id
Removes the temporary color of the light with the corresponding id and use the default light color again.
N.B.: REMOVE can be used instead of RESET.
eg: Light HUE RESET 2 will remove the temporary color of the light with id 2
Time System commands:Turns on the specified light. The id can be found while creating or editing a light with the editor, on the top of the screen.
eg: Light ON 1 will turn on the light with id number 1.
Light OFF light_id
Turns off the specified light. The id can be found while creating or editing a light with the editor, on the top of the screen.
eg: Light OFF 10 will turn off the light with id number 10.
Light LIMIT time_begin time_end light_id
Turns on the specified light automatically during the set time.
eg: Light LIMIT 22:30 5:30 1 will turn on the light with id number 1 between 10:30pm and 5:30am. May be useful for city lights, for example.
Light HUE hue_value light_id
Changes the color of the light with the corresponding id temporarily (just in the current save) to the one specified by the hue.
eg: Light HUE 120 4 will make the light with id 4 green
Light HUE RESET light_id
Removes the temporary color of the light with the corresponding id and use the default light color again.
N.B.: REMOVE can be used instead of RESET.
eg: Light HUE RESET 2 will remove the temporary color of the light with id 2
Time PAUSE
Stops the time. Useful for cutscenes, for example.
Time PLAY
Reactivates the time.
Time SET time
Sets the game's time to a specific time.
eg: Time SET 15:00 will set the time to 3pm.
For retro-compatibility, Time SET 15 0 still works.
Time ADD hours minutes
Advances time.
eg: Time ADD 2 15 will advance the time by 2 hours 15 minutes.
Time SAVE hour_var minutes_var
Saves the current time in the specified variables.
eg: Time SAVE 2 3 will save the hours in the variable #0002 and the minutes in the variable #0003.
Time LIMIT time_begin time_end self_switch
Activates the specified switch only between time_begin and time_end.
eg: Time LIMIT 6:00 13:40 A will activate the self switch A of the event calling the plugin command between 6am and 1:40pm.
eg: Time LIMIT 22:30 5:15 C will activate the self switch C of the event calling the plugin command between 10:30pm and 5:15am.
Tint SET red green blue
Sets the tint of the map to the specified colour.
eg: Tint SET 255 0 0 will set the tint red.
Tint SET tint_number
Sets the tint of the map with a tint from the configuration.
eg: Tint SET 3 will set the tint with the 3rd tint in config.
Tint REMOVE
Resets the tint to the time tint, or removes the tint if the time plugin is disabled.
Clock MOVE x y
Moves the clock window to coordinates (x,y).
A negative coordinate will keep the window at the same position on the axis.
eg: Clock MOVE 0 700 will move the clock window to (0,700)
Clock MOVE 200 -1 will change the horizontal position of the clock window to x=200
Clock REL_MOVE x y
Adds x and y values to the current position.
eg : Clock REL_MOVE 50 0 will move the clock window from 50px to the right.
Clock SHOW [map/menu]
Shows the clock window in the menu or the map.
If you don't specify which window to show, it will show the map window by default.
Clock HIDE [map/menu]
Hides the clock window of the menu or the map.
If you don't specify which window to hide, it will hide the map window by default.
Clock TOGGLE [map/menu]
Toggles the visibility of the clock window in the menu or the map.
If you don't specify which window to toggle, it will toggle the map window by default.
Time System Notetags:Stops the time. Useful for cutscenes, for example.
Time PLAY
Reactivates the time.
Time SET time
Sets the game's time to a specific time.
eg: Time SET 15:00 will set the time to 3pm.
For retro-compatibility, Time SET 15 0 still works.
Time ADD hours minutes
Advances time.
eg: Time ADD 2 15 will advance the time by 2 hours 15 minutes.
Time SAVE hour_var minutes_var
Saves the current time in the specified variables.
eg: Time SAVE 2 3 will save the hours in the variable #0002 and the minutes in the variable #0003.
Time LIMIT time_begin time_end self_switch
Activates the specified switch only between time_begin and time_end.
eg: Time LIMIT 6:00 13:40 A will activate the self switch A of the event calling the plugin command between 6am and 1:40pm.
eg: Time LIMIT 22:30 5:15 C will activate the self switch C of the event calling the plugin command between 10:30pm and 5:15am.
Tint SET red green blue
Sets the tint of the map to the specified colour.
eg: Tint SET 255 0 0 will set the tint red.
Tint SET tint_number
Sets the tint of the map with a tint from the configuration.
eg: Tint SET 3 will set the tint with the 3rd tint in config.
Tint REMOVE
Resets the tint to the time tint, or removes the tint if the time plugin is disabled.
Clock MOVE x y
Moves the clock window to coordinates (x,y).
A negative coordinate will keep the window at the same position on the axis.
eg: Clock MOVE 0 700 will move the clock window to (0,700)
Clock MOVE 200 -1 will change the horizontal position of the clock window to x=200
Clock REL_MOVE x y
Adds x and y values to the current position.
eg : Clock REL_MOVE 50 0 will move the clock window from 50px to the right.
Clock SHOW [map/menu]
Shows the clock window in the menu or the map.
If you don't specify which window to show, it will show the map window by default.
Clock HIDE [map/menu]
Hides the clock window of the menu or the map.
If you don't specify which window to hide, it will hide the map window by default.
Clock TOGGLE [map/menu]
Toggles the visibility of the clock window in the menu or the map.
If you don't specify which window to toggle, it will toggle the map window by default.
Your must use these tags in the Note part of the map you want to change.
<Tint: Red, Green, Blue>
Ignores the time and sets the map's tint to the specified RGB color (Red, Green Blue). This is useful for darker dungeons where light is not time dependent, or houses, for example.
eg: <Tint: 0, 0, 0> will set the tone totally black, ignoring the time.
<Tint: CustomTintID>
Ignores the time and sets the map's tint to the specified custom tint, defined in the Plugin Manager.
eg: <Tint: 7> will set the screen tone with the Custom Tone 7's value.
Setting Default Time:<Tint: Red, Green, Blue>
Ignores the time and sets the map's tint to the specified RGB color (Red, Green Blue). This is useful for darker dungeons where light is not time dependent, or houses, for example.
eg: <Tint: 0, 0, 0> will set the tone totally black, ignoring the time.
<Tint: CustomTintID>
Ignores the time and sets the map's tint to the specified custom tint, defined in the Plugin Manager.
eg: <Tint: 7> will set the screen tone with the Custom Tone 7's value.
To set a default time when the player starts a new game, change the "Default Time" parameter in the Plugin Manager to the time you want.
eg: Setting the parameter "Default Time" to 15:30 will make the game start at 3:30pm.
eg: Setting the parameter "Default Time" to 15:30 will make the game start at 3:30pm.
Demo
Demo made with RMMV 1.5.2 with plugin v.1.4.1
Script
You can download all the files here.
FAQ
No FAQ yet.
Changelog
Version 1.7.4:
* Correct a bug where the lights cannot be loaded in a deployed game.
Version 1.7.3:
* Correct a bug where the Light limits are global to all the maps.
* Correct a bug where opening and closing the Game Editor resets the tint.
* Correct a bug where using Time PAUSE and then Time PLAY resets the tint.
Version 1.7.2:
* Correct a bug where temporary status are applied to all lights with same id, no matter what map they are on.
* Move the buttons on top left of the screen during battle.
Version 1.7.1:
* Correct a bug where CTRL + Z crashes the game.
Version 1.7.0:
+ Add the possibility to select multiple lights in Light commands.
+ Add random flick effect: flick doesn't happen at a specified interval.
+ Add the possibility to create lights in battle.
+ Add the possibility to create lights that are turned off by default.
* Correct a bug that corrupt save file if a light limit is set on a light and that light is deleted.
* Correct a bug that causes all the event lights to have id eundefined.
* Correct a bug that causes all the editor lights to have the same id.
Version 1.6.0:
+ Add the possibility to undo (CTRL + Z) and redo (CTRL + Y) actions in editor.
+ Automatically selects the light when created.
+ Automatically selects the pasted light for edition.
+ Allow number entering when clicking on values while editing light properties.
+ Pulse and Flicker enable setting now loops between true and false, instead of resetting the properties.
+ Support ⌘ in addition to control for Mac users.
* Paste lights next to the player, instead of the position of the copied light.
* Correct a bug where pasting without copying anything crashes.
* Light dragging no longer start if the mouse didn't move
Version 1.5.0:
+ Add the possibility to use Time SET xx:xx instead of Time SET xx xx
+ Add the possibility to keep the tint during battle (can be disabled in configuration).
* Corrected a bug where required assets weren't taken in account.
* Changed the ids of lights so they don't change when another light is deleted.
Version 1.4.1:
* Correct a bug where parameters would not be taken in account.
Version 1.4.0:
+ Add the possibility to use commands on event lights.
+ Add the possibility to set a temporary hue to lights.
* Correct a bug where turned off lights would turn on again after going in the menu.
GameTime version 1.4.1:
* Correct bug with "Add" plugin command
GameTime version 1.4.0:
+ Add possibility to move Clock window with configuration
+ Add possibility to move Clock window with plugin commands
GameTime version 1.3.0
+ Added tint command to set tint through command plugin
+ Added tint command to reset tint to time's tint, or remove tint if time is disabled
Version 1.3.4
* Solved a bug where Light LIMIT would turn on lights again after a battle, even if they aren't supposed to be turned on.
Version 1.3.3
+ Added an "Incompatibility" mode for those using, for example, "TDDP Bind Pictures To Map" plugin. This plugin has to be below the problematic plugin in order to function correctly.
Version 1.3.2
+ Added required assets.
* Corrected a bug where copy/pasting a light would not show flick / pulse animations until game restart.
* Corrected a bug where browser version would crash while loading.
CAREFUL: THE BROWSER VERSION DOES NOT SUPPORT LIGHT CREATION, IT MAY CRASH
* Corrected a bug where using the "Used with MV" plugin would make the game crash. Corrected the same bug for all other "splash screen" plugins.
Version 1.3.1
+ Added the possibility to activate the time window on the map.
* Modified the parameter that shows the time clock into the menu.
* Some performance improvements.
Version 1.3.0
+ Now lights linked to events follow them if they move.
+ Added the possibility to turn on and off lights created by the editor.
+ Added the possibility to automatically turn on and off lights created by the editor depending on the time.
* Corrected a bug where null lights wouldn't be loaded correctly at start.
* Corrected a bug where dragging a light on the buttons would change its properties.
* Fixed a bug where deactivating time would make a black screen.
* Fixed a bug where spaces in the <Tint> note were mandatory.
Version 1.2.0:
+ Added the possibility to store current time into variables.
+ Added a default time value when starting a new game.
+ Added the possibility to change an event's self switch based on time.
+ Added the possibility to Copy and Paste selected light with CTRL + C and CTRL + V
+ Added the possibility to Delete the selected light with the DELETE and the BACKSPACE key.
* Corrected a bug where if two lights were at the same place, dragging one would drag the other.
Version 1.1.0:
-- FeelZoR continues the project.
+ Added the possibility to make the player torch follow the player's direction.
+ Added the possibility to disable the time system.
* Corrected a bug where the custom tint set to the map would reset after closing a menu.
Version 1.00:
-- Plugin published.
Credits and Thanks
- FeelZoR for continuing the plugin.
- Level No Matter for making the plugin.
- Xelion for helping Level No Matter translating everything.
Author's Notes
This plugin wasn't created by me: I only continue it after seeing such a beauty wasn't used because of some bugs. I'll try to make it better and correct all the bugs I find, implement new features and so on. Though I'll need some time to understand all the parts of the code written by Level No Matter.
Do not hesitate to report to me any bug you find!
Incompatibilities
- This plugin may work with TDDP Bind Pictures To Map if, and only if you put the Lighting Tool below TDDP's plugin and you set the "Incompatibility Mode" to true. To do so, open the plugin manager, double click on LNM_LightingTool and change the parameter "Incompatibility Mode" to true.
Last edited: