terrorchan

Literally a Gloop
Veteran
Joined
Mar 17, 2014
Messages
249
Reaction score
180
First Language
English
Primarily Uses
If I understand you well - you mean DayNight system.  It is included (try demo) - you can set how "deep" is night for each day hour and individually for each map (or even by event) - so I have forest city with soft green nights, but when game progressed and it is attacked by enemies and fire emerges the ambient night is red. 
Ah! Thanks so much! I pretty much ignored the DayNigh function as that's not in my game, but I didn't know that is where the individual map tint changing was! 

EDIT: DUH! I'M SUCH AN IDIOT! It was such an obvious function. ToT I'm so used to VX Ace where doing anything with the lights was beyond beginner knowledge and doing something so simple never crosses my mind when it comes to lights >.>

Anyway, I love MV! SO MUCH! I think it must be the ruby v Javascript thing that makes the plugin work so much more simple :) Like there was sooo much to do with all the scripts in VX Ace it was a daunting task >.<
 
Last edited by a moderator:

Eisenwain

Veteran
Veteran
Joined
Oct 12, 2015
Messages
78
Reaction score
19
First Language
Spanish
Primarily Uses
*Hi, awesome plugin, however i have a  question, how i can event in a way that all the doors of the town closes at 8:00pm?
 

Seleroan

Villager
Member
Joined
Oct 30, 2015
Messages
18
Reaction score
5
First Language
English
Hi, I'm having a pretty big problem with this script, and it has to do with saved games.

I have a zone where I deactivate the script because it is daytime, but later, I have a camp scene where I need the script, so I turn it on again.

If the player saves on this map and reloads the game, the deactivation is forgotten and the screen is black.

Further, torches that were lit in previous saves via the "Light on x" command do not persist through saves.  Switch D is still active, and the torch appears lit, but the light radius is not there.  This means that the torch is now broken for the player.
 

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,231
Reaction score
283
First Language
English
Primarily Uses
N/A
Just had a thought that could reduce the amount of events used.

For example I have street lights in a big city, they will project a white light, to save myself time from using events could I have note tags/ or terrain tags associated on the tile set up OR maybe even a note tag specifically for the map co-ordinating light colours associated with terrain tags?

So say the light source tile has a terrain tag of 2- which could result in a white light hand out? Would this be possible? If so I would very much recommend it :)
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
227
First Language
English
New version (1.1.3) now available

http://mvplugins.com...Lighting System

Version 1.1.3

Fixed

A number of variables (flashlight,fire) and arrays (switches and daynight settings) get saved to the save-game

and restored on load

I would like to see an integration with Vlue's plugin, and also with Hudell's plugin if it's possible.
I might take a look at integration with other plugins after the bug reports die out.

It will at most be the display of the time of day. Most other day/night systems work with darken filters,

this is not compatible with my script, so using my daynight system will remain the same.

Hey Terrax! i've got some incompatibility between your plugin and quasi movement plugin, he help me fixing the incompatibility with this code, maybe is useful also for you?

It replace the part from line 777 and 818

I have to figure out how to detect the other plugins are installed, after i figure that out it shouldn't be to hard.

Ill start on dealing with compatibily problems when most of the bugs are out of my own plugin.

*Hi, awesome plugin, however i have a  question, how i can event in a way that all the doors of the town closes at 8:00pm?
I've included a demo of such an event in the demo that comes with this update. If you enter the day/night area in the demo the lights on the castle will go on at 20:00 and go out at 7:00 in the morning. This should be about the same as what your trying to achieve with the doors.

Hi, I'm having a pretty big problem with this script, and it has to do with saved games.

I have a zone where I deactivate the script because it is daytime, but later, I have a camp scene where I need the script, so I turn it on again.

If the player saves on this map and reloads the game, the deactivation is forgotten and the screen is black.

Further, torches that were lit in previous saves via the "Light on x" command do not persist through saves.  Switch D is still active, and the torch appears lit, but the light radius is not there.  This means that the torch is now broken for the player.
Thanks for the bug report, this should be fixed with this update

Just had a thought that could reduce the amount of events used.

For example I have street lights in a big city, they will project a white light, to save myself time from using events could I have note tags/ or terrain tags associated on the tile set up OR maybe even a note tag specifically for the map co-ordinating light colours associated with terrain tags?

So say the light source tile has a terrain tag of 2- which could result in a white light hand out? Would this be possible? If so I would very much recommend it :)
Not at this time :)
 

InBlast

The Mad Hamster
Veteran
Joined
Nov 2, 2015
Messages
287
Reaction score
89
First Language
French
Hi ! Thanks  for this awesome plugin !

Could you add a switch or a plugin command to stop the timer of the hours ? In my game, the is some minigames, and it would be nice if the time could stop during these. 

I tried to store the value of the timer in a variable when i change map, and to give the timer his previous value when i leave the minigame, but it don't work.
 

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
44
First Language
czech
Primarily Uses
RMMV
Eisenwain, on 18 Nov 2015 - 03:16 AM, said:

*Hi, awesome plugin, however i have a  question, how i can event in a way that all the doors of the town closes at 8:00pm?
I've included a demo of such an event in the demo that comes with this update. If you enter the day/night area in the demo the lights on the castle will go on at 20:00 and go out at 7:00 in the morning. This should be about the same as what your trying to achieve with the doors.

-------------------------------------------------------------------------

You also can define Daytime switch (its probably simplest way)  by event using paralell process with conditional branch  for example

IF DayNightCycle (based on Terrax variable in plugin) >20

    Daytime switch = OFF

    Exit event processing

END

IF DayNightCycle (based on Terrax variable in plugin) < 8

    Daytime switch = OFF

    Exit event processing

END

Daytime switch = ON

Based on this 8-20 is DAY     21-7 is NIGHT, easy way if you wanna it simple. 

Then  you can easily define DAY routines and NIGHT routines for any events just by checking "if Daytime ON/OF". 
 

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
44
First Language
czech
Primarily Uses
RMMV
Hi ! Thanks  for this awesome plugin !

Could you add a switch or a plugin command to stop the timer of the hours ? In my game, the is some minigames, and it would be nice if the time could stop during these. 

I tried to store the value of the timer in a variable when i change map, and to give the timer his previous value when i leave the minigame, but it don't work.
It is included just set , I am using it (cos I have own time script suits me better (minutes/hours/days/months...etc)  

Use:  Plugin command 'Daynight speed 0'

It means Daynight wont progress as long as you wont set another speed 1-10. 
 
Last edited by a moderator:

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
267
Reaction score
485
First Language
French
Primarily Uses
N/A
Congratulation and thank you for writing this code.
 

Dallas Robinson

Villager
Member
Joined
Oct 29, 2015
Messages
45
Reaction score
1
First Language
English
oh WOW! alot of work has been done on this script since the last time i used it. it was great before and now it's just awesome. I do have  some questions though. Is there a way to give events the flashlight? so that say i could have a patrolling guard with a flashlight? also are there settings for each radius of the circles that make up the flashlight? that way you can adjust the fall off and how far out the light goes from the source. i want to use the flashlight as a visual representation of line of sight for some stealth maps
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
227
First Language
English
oh WOW! alot of work has been done on this script since the last time i used it. it was great before and now it's just awesome. I do have  some questions though. Is there a way to give events the flashlight? so that say i could have a patrolling guard with a flashlight? also are there settings for each radius of the circles that make up the flashlight? that way you can adjust the fall off and how far out the light goes from the source. i want to use the flashlight as a visual representation of line of sight for some stealth maps
This can be done, but it will only work for moving events and it require some processing power.. So it will work on windows or apple computers, but mobile phones  could have problems, if thats alright with you ill start on it.
 

Dallas Robinson

Villager
Member
Joined
Oct 29, 2015
Messages
45
Reaction score
1
First Language
English
This can be done, but it will only work for moving events and it require some processing power.. So it will work on windows or apple computers, but mobile phones  could have problems, if thats alright with you ill start on it.
yup, i'm cool with that. my game won't be on mobile. :) and thanks for this it really helps me out :)
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
227
First Language
English
New version (1.1.4) now available

http://mvplugins.com...Lighting System

Version 1.1.4

Added: Flashlight enhancements.

To use a flashlight effect use 'Flashlight on 8 12 #FFFFFF' and 'Flashlight off'

(the last 3 numbers are optional, the default will be used if ommited)
Moving events can also use the flashlight effect. Use 'Flashlight 8 12 #888888' in the note-tag.
Where 8 is the length of the flashlights beam and 12 is the width of the beam. The last value is the color of the beam, use grey values to create a dimmer beam.
 

Schlangan

A madman with a computer
Veteran
Joined
May 20, 2015
Messages
1,440
Reaction score
1,731
First Language
French
Primarily Uses
RMMV
Terrax, concerning the fire effect:

In lines 649 and 650 of the script you will find

            var gradrnd = Math.floor((Math.random()*7)+1);            var colorrnd = Math.floor((Math.random()*10)-5);if you adjust the 7 in the first line and make it bigger, the flicker radius will increaseif you adjust the 10 and -5 in the second line it will increase the color shift from red to yellow.
Could you somehow make these as plugin parameters or optional command of the Fire notetag ? Because I don't want to change that in your code as it will be overwritten each time I update your plugin :D

(For now I'll alias it in another plugin but well, I think it would be useful)
 
Last edited by a moderator:

Dallas Robinson

Villager
Member
Joined
Oct 29, 2015
Messages
45
Reaction score
1
First Language
English
New version (1.1.4) now available

http://mvplugins.com...Lighting System

Version 1.1.4

Added: Flashlight enhancements.

To use a flashlight effect use 'Flashlight on 8 12 #FFFFFF' and 'Flashlight off'

(the last 3 numbers are optional, the default will be used if ommited)

Moving events can also use the flashlight effect. Use 'Flashlight 8 12 #888888' in the note-tag.

Where 8 is the length of the flashlights beam and 12 is the width of the beam. The last value is the color of the beam, use grey values to create a dimmer beam.
oh! thanks so much for this. I tried it out and it seems to work great. i do have two questions though. I can't seem to get the flashlight to turn off of an event like i can with a standard light on an event. is this a bug or am i just doing it wrong? also, i remeber you saying that the flashlight won't work on an event standing still but i forgot to ask why is this the case? is it a technical thing?
 

Dallas Robinson

Villager
Member
Joined
Oct 29, 2015
Messages
45
Reaction score
1
First Language
English
oh sorry, two other things. have you messed around with other blending modes for the light? like the blending modes in photoshop?  The one i'm thinking off is 'overlay' but others do some interesting things as well. the actual math for photoshop blending effects is noted here.

http://www.deepskycolors.com/archive/2010/04/21/formulas-for-Photoshop-blending-modes.html

also, i remeber somewhere in this thead someone talked about having an otion of the surrounding area not being black and being able to set the color. Is this possible? if so where is this option. I can't seem to find it on the thread or in the notes
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
227
First Language
English
New version (1.1.5) now available

http://mvplugins.com...Lighting System

Version 1.1.5

Minor update

Included compatibilty with a soon to be released new script.

Included configure fire-effect.

 * You can configure the fire effect with the plugin command 'SetFire 7 10'
 * Where 7 is the radius change and 10 is the shift in color from red to yellow.

Terrax, concerning the fire effect:
 


Could you somehow make these as plugin parameters or optional command of the Fire notetag ? Because I don't want to change that in your code as it will be overwritten each time I update your plugin :D

(For now I'll alias it in another plugin but well, I think it would be useful)
Included in this update

oh! thanks so much for this. I tried it out and it seems to work great. i do have two questions though. I can't seem to get the flashlight to turn off of an event like i can with a standard light on an event. is this a bug or am i just doing it wrong? also, i remeber you saying that the flashlight won't work on an event standing still but i forgot to ask why is this the case? is it a technical thing?
I've not included the option to turn of or on flashlights, but ill take a look. I could put flashlights on still objects, but i don't have the direction they are facing available, so you would have to set the direction as well.

oh sorry, two other things. have you messed around with other blending modes for the light? like the blending modes in photoshop?  The one i'm thinking off is 'overlay' but others do some interesting things as well. the actual math for photoshop blending effects is noted here.

http://www.deepskycolors.com/archive/2010/04/21/formulas-for-Photoshop-blending-modes.html

also, i remeber somewhere in this thead someone talked about having an otion of the surrounding area not being black and being able to set the color. Is this possible? if so where is this option. I can't seem to find it on the thread or in the notes
I've started this plugin by testing the available blendmodes to get the desired effect.

http://codepen.io/adobe/pen/nmfic

The 'lighter' blendmode gave the best effect, 'lighten' was decent as wel.

If you want the surrounding area to be a little lighter the easiest option is putting a event in the center of you map with a huge radius (800+) and a grey value. (the demo has an example)
 
Last edited by a moderator:

Makeratore

Veteran
Veteran
Joined
Feb 9, 2014
Messages
241
Reaction score
88
First Language
Italian
Primarily Uses
RMMV
I've not included the option to turn of or on flashlights, but ill take a look. I could put flashlights on still objects, but i don't have the direction they are facing available, so you would have to set the direction as well.
Well, turning on or off flashlights is very useful!
 

Dallas Robinson

Villager
Member
Joined
Oct 29, 2015
Messages
45
Reaction score
1
First Language
English
Hmmm, well for me personally setting the direction on a still event manually is fine but other scripts deal with it differently. like my line of sight script that i use called 'Sensor_selfswitch' uses the direction of the actor sprite that you pick under image in the event to tell where the 'front' is. I have never used it, say, on a tileset piece so i dunno what it would do in that scenario but it works perfectly for your usual actor art. 
 

Black Noise

Veteran
Veteran
Joined
Aug 23, 2012
Messages
94
Reaction score
20
First Language
English
Primarily Uses
RMMV
Nice! Yesterday, I watched this tutorial on how to create a Day/Night cycle entirely with a Common Event controlling variables!




You would basically use the Wait event command to pass seconds, minutes, etc. every 60 frames and pass hours and such for every minute that passes.

It's great!

And then I thought about adding your lighting plug-in to enhance the system by making it all gradually dark and claustrophobic as the night encroaches,

thanks to the DayNight setting on it. It's just perfect for a 24 hour system!

Although, what I'm working on is rather ambitious. It's a sort of space exploration RPG, along the lines of Mass Effect, where you undoubtedly visit various planets

and they each have their own orbital periods, that is different number of hours in the day and even how quickly Day turns to Night and vice versa - Unlike Earth which gradually shifts between night and day, the Moon blinks instantly between the two phases because of its lack of atmosphere (Am I right?).

So far, your plug-in only allows you to set the Day/Night cycle feature to  certain hours of the day between 0 and 23 and, as far as I know, it doesn't even include minutes or seconds (Yes! That's how far I'm taking my Day/Night system!).

Are you still at work on the lighting system? Will we, in the future, have more flexibility in controlling the plug-in's Day/Night system?

Thanks.
 

Latest Threads

Latest Profile Posts

It is a curse getting better at javascript after each plugin... Now I am considering changing two previous plugins completely, and they're not small plugins either -.-' Not to mention that I'll add more features... This is why I never manage to release a game, I just keep updating everything I've already done :p
I have done nothing for my game in the last hours but look and modify my spreadsheets. lmao
A quarter of century ago, one astute frog man was born. :ninja:
All new MZ Weather & Title updates are also RETRO'able for MV! Updated RETRO project will be released on same day I'll release updated MZ demo -project!

retro.png
Just lost about half a day's worth of work because rpg maker crashed during playtesting and corrupted my file :kaolivid:

Forum statistics

Threads
117,025
Messages
1,103,915
Members
152,936
Latest member
Trollolol
Top