Terrax Lighting system

● ARCHIVED · READ-ONLY
Started by Terrax 1467 posts Page 10 of 74 View original ↗
  1. Kilitar said:
    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 >.<
  2. *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?
  3. 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.
  4. 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 :)
  5. 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

    Makeratore said:
    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.

    RogdagoR said:
    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

    Spoiler
    https://gist.github.com/quasixi/b8061d2df1b3346a9ad7
    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.

    Eisenwain 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.

    Seleroan said:
    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

    Skurge said:
    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 :)
  6. 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.
  7. Eisenwain, on 18 Nov 2015 - 03:16 AM, said:

    Eisenwain 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". 
  8. InBlast said:
    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. 
  9. Congratulation and thank you for writing this code.
  10. 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
  11. Dallas Robinson said:
    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.
  12. Terrax said:
    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 :)
  13. 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.
  14. Terrax, concerning the fire effect:

    Terrax said:
    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)
  15. Terrax said:
    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?
  16. 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
  17. 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.

    Schlangan said:
    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

    Dallas Robinson said:
    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.

    Dallas Robinson said:
    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)
  18. Terrax said:
    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!
  19. 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. 
  20. 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.