A great gift to start the day with!
Thank YOU!
Terrax Lighting system
● ARCHIVED · READ-ONLY
-
-
Hi Terrax--
Really excited to see the radiusgrow effect taking shape. Thanks for the ultra-fast turnaround! For whatever reason, I'm running into an issue where the shrinking radius is taking place at an almost imperceptible rate. I'm currently trying to reduce from 2500 to 500. Is there anyway to control how fast/slow it happens? ie. How many frames it takes? Not sure of the math currently used to determine its speed. -
I don't know if it's me but the effects don't seem to work on Android.
-
I have a similar question to JohnnyR.
During a part of my game, you walk through a military outpost at nighttime. There's a lit campfire in the camp, and I want to turn that campfire into a light source.

The screen uses the "Night" tint, but the Terrax plugin makes the entire screen black with the exception of the campfire. Is there a way to remove the entire black overlay, so I can only have the light source? I know that creating a global light in a parallel event was named as a solution, but it completely changes the colour of the screen. I want the screen to just keep the default Night tint without being discoloured by another light.
Is this possible?
EDIT: I've figured it out!
The black overlay is made in the "PLAYER LIGHTGLOBE" section, with the following code:
this._maskBitmap.globalAlpha=0.2; this._maskBitmap.fillRect(0, 0, 2500, 1500, 'black');By commenting out these two lines, the plugin will no longer draw out the overlay. This leaves the gradient with a black box surrounding it, which can be erased in the following line in "OTHER LIGHTSOURCES" section:
this._maskBitmap.radialgradientFillRect(lx1,ly1, 0, light_radius , colorvalue, 'black', objectflicker);By changing the colour from 'black' to 'white', you can make the black box surrounding the gradient completely invisible.
The result is as follows:

-
I can make the radius grow effect relative to the amount it has to grow.. how much time (in seconds) did youHi Terrax--
Really excited to see the radiusgrow effect taking shape. Thanks for the ultra-fast turnaround! For whatever reason, I'm running into an issue where the shrinking radius is taking place at an almost imperceptible rate. I'm currently trying to reduce from 2500 to 500. Is there anyway to control how fast/slow it happens? ie. How many frames it takes? Not sure of the math currently used to determine its speed.
have in mind for the growth/shrink to complete?
It depends on the browser your using, some of the canvas and blending used in the scipt, are only supportedI don't know if it's me but the effects don't seem to work on Android.
by the more recent versions of the common browsers.
Thats a nice find, i will see if i can reproduce the effect and include it as a option in the script.I have a similar question to JohnnyR.
During a part of my game, you walk through a military outpost at nighttime. There's a lit campfire in the camp, and I want to turn that campfire into a light source.
The screen uses the "Night" tint, but the Terrax plugin makes the entire screen black with the exception of the campfire. Is there a way to remove the entire black overlay, so I can only have the light source? I know that creating a global light in a parallel event was named as a solution, but it completely changes the colour of the screen. I want the screen to just keep the default Night tint without being discoloured by another light.
Is this possible?
EDIT: I've figured it out!
The black overlay is made in the "PLAYER LIGHTGLOBE" section, with the following code:
this._maskBitmap.globalAlpha=0.2; this._maskBitmap.fillRect(0, 0, 2500, 1500, 'black');By commenting out these two lines, the plugin will no longer draw out the overlay. This leaves the gradient with a black box surrounding it, which can be erased in the following line in "OTHER LIGHTSOURCES" section:
this._maskBitmap.radialgradientFillRect(lx1,ly1, 0, light_radius , colorvalue, 'black', objectflicker);By changing the colour from 'black' to 'white', you can make the black box surrounding the gradient completely invisible.
The result is as follows:
I noticed that your solutions only changes the color of the layer, but doesn't make it lighter around the fire.
Because it has been asked before i will see if i can include a shaded layer that looks the same
as the default night layer but does show a increase in light around the fire. -
Re: the radius change, I was thinking that about 4 seconds would feel realistic. You're the best!
-
Hello Terrax!
Thank you for a very useful plugin! I fully support the request for a global light for day and night. Personally, I would have sufficed parameters: change the color of the light source and the speed of change.
Or even simply: speed activation and deactivation of the plugin - It'll be cool twilight) -
I am using the crosswalk method described in the help file to build the apk.It depends on the browser your using, some of the canvas and blending used in the scipt, are only supported
by the more recent versions of the common browsers. -
New version (1.0.8) now available
http://mvplugins.com...Lighting System
Version 1.0.8
Fixed: Growing/shrinking lightsources now grow relative (about 5 seconds).
New:
Day and Night cycle.
On the map put a trigger with 'Daynight' to activate a day-night cycle on the map
Plugin command : Daynight speed 5 : change the speed of the cycle
0 = stop cycle
1 = very fast (about 24 hours in 12 seconds)
2 = fast (about 24 hours in 24 seconds)
etc.. find the value you like by testing.
Plugin command : Daynight hour 16 : change the hour of the cycle to 16:00 hours
Each hour has its own color, from hour 0 to hour 23. Each can be defined with its own color.
You can change the color of each hour with a plugin command. However, it might be
easier to edit the script itself. You will find the color array at the start of the script : daynightcolors
Plugin command : Daynight color 0 #222222 : change the color of 0:00 hours to almost black
Plugin command: Daynight color 1 #222222 : change the color of 1:00 hours to almost black
So the change all color from the default you have to do 24 plugin commands.
(but then again, you probably have to set it only once).
See the demo for the effect and speed options.
Sorry, i don't have any clue about all the different browsers, apps and other stuff used.. i'm justI am using the crosswalk method described in the help file to build the apk.
a old coder. -
Hey Terrax i'm trying out your plugin and is very nice! But it lack a little thing that i need for my game :)
I have some wasp floating around the map and i put your script on them for make them flicker like a little fire and it work!
But....when they move the light will stand in their start position and don't stand over them! I'm missing something? Is a bug or issomething still in developing? -
At this time i have not found a way to get the x and y coordinates of characters that are walking around, i've postedHey Terrax i'm trying out your plugin and is very nice! But it lack a little thing that i need for my game :)
I have some wasp floating around the map and i put your script on them for make them flicker like a little fire and it work!
But....when they move the light will stand in their start position and don't stand over them! I'm missing something? Is a bug or issomething still in developing?
a question about it in the scripting help forums, but no answers so far. -
Hmm. Doesn't the regular $dataMap.events[iD].x and $dataMap.events[iD] do the trick? I mean, if it works for the player who also walks around, shouldn't that work for the various events as well? :distrust:At this time i have not found a way to get the x and y coordinates of characters that are walking around, i've posted
a question about it in the scripting help forums, but no answers so far. -
Hey!
First of all, i rly like your script!
Thanks for making this :rock-left: BD :rock-right:
I have a question,
is it possible to save the state of the day night cycle?
Because now, when i save at nighttime and load it later, its daytime again ;_; -
Thanks for the update and the option Day and Night cycle!
However, the adjustment seems rather difficult, because the cycles of control is much more difficult than simply a trigger to set fade-out and fade-in.
For example, I use the plugin OrangeTimeSystem and I want to from 8 to 20 was light, from 20 to 22, the light fades, from 22 to 5, it was dark, and from 6 to 8 was the dawn.
How best realize such an idea? -
@Partypowered
Please put that script inside spoiler tags. It makes scrolling the page difficult at the moment.
Thanks -
I wish it were that simple, the system only reads those $dataMap events when the map is loaded, once they start walking around those variables aren't updated anymore (thats why my lights currently stay at the starting position). I'm still looking for a way to get the CharacterBase._realX and _realy some way.Hmm. Doesn't the regular $dataMap.events[iD].x and $dataMap.events[iD] do the trick? I mean, if it works for the player who also walks around, shouldn't that work for the various events as well? :distrust:
Yes, that should be no problem, ill include it next update.Hey!
First of all, i rly like your script!
Thanks for making this :rock-left: BD :rock-right:
I have a question,
is it possible to save the state of the day night cycle?
Because now, when i save at nighttime and load it later, its daytime again ;_;
It can be done pretty easy, it just takes some typing. What you would need is 24 seperate plugin command calls like this.Thanks for the update and the option Day and Night cycle!
However, the adjustment seems rather difficult, because the cycles of control is much more difficult than simply a trigger to set fade-out and fade-in.
For example, I use the plugin OrangeTimeSystem and I want to from 8 to 20 was light, from 20 to 22, the light fades, from 22 to 5, it was dark, and from 6 to 8 was the dawn.
How best realize such an idea?
Just put them all in one event and disable or destroy the event after its run once.
Plugin command : Daynight color 0 #000000 (at 00.00 it will be dark)Plugin command : Daynight color 1 #000000 (at 01.00 it will be dark)Plugin command : Daynight color 2 #000000 (at 02.00 it will be dark)Plugin command : Daynight color 3 #000000 (at 03.00 it will be dark)Plugin command : Daynight color 4 #000000 (at 04.00 it will be dark)Plugin command : Daynight color 5 #000000 (at 05.00 it will be dark)Plugin command : Daynight color 6 #000000 (at 06.00 it will be dark)Plugin command : Daynight color 7 #555555 (at 07.00 it will be dawn)Plugin command : Daynight color 8 #AAAAAA (at 08.00 it will be more dawn)Plugin command : Daynight color 9 #FFFFFF (at 09.00 it will be light)Plugin command : Daynight color 10 #FFFFFF (at 10.00 it will be light)Repeat until Plugin command : Daynight color 20 #FFFFFF (at 20.00 it will be light)Plugin command : Daynight color 21 #AAAAAA (at 21.00 it will be starting to get dark)Plugin command : Daynight color 22 #555555 (at 22.00 it will be darker)Plugin command : Daynight color 23 #000000 (at 23.00 it will be dark)Yes i know.. a lot of copy paste, but it gives a lot of control and options in color variations. (red dawns etc)
and you only have to set it once. -
@Terrax: So it just doesn't update the coordinates? I was going to suggest something along the lines of updating the coordinates of the lightsources everytime the x and y of the events changed but I wasn't sure about it so I left that bit out.
Since the x and y always reset to the same position you have them on the map and they never actually update, I guess you'd have to inject movement of the lightsources to happen alongside the movement of the events if x and y aren't dynamically updated. :unsure:
Or you can add some code to track the x and y of those special events only and update the lightsources accordingly. -
It is possible in update to add the ability to change speed of full cycle? (12, 24...)
I can not synchronize my time with your1 = very fast (about 24 hours in 12 seconds)
2 = fast (about 24 hours in 24 seconds) -
New version (1.0.9) now available
http://mvplugins.com...Lighting System
Version 1.0.9
Fixed: Moving events now with moving lightsources *thanks Vengarus, you made me see the light*
Fixed: Daynight cycle now keeps running even when your in maps without the cycle.
New:
You can save the day-night cycle to a game variable so the state will be saved when you save a game
Plugin command : 'Daynight save 5' will save it to game variable 5 (make sure you reserve it)
Ps. For the moving lightsources i needed to overwrite another core function, this could give problems
if other plugins overwrite this function as well, let me know if your moving lightsources don't move.
The overwritten function is : Game_CharacterBase.prototype.updateMove.
Thanks for the reply, it sorta hit me after reading it i could save the realX and realY in another function and restore it@Terrax: So it just doesn't update the coordinates? I was going to suggest something along the lines of updating the coordinates of the lightsources everytime the x and y of the events changed but I wasn't sure about it so I left that bit out.
Since the x and y always reset to the same position you have them on the map and they never actually update, I guess you'd have to inject movement of the lightsources to happen alongside the movement of the events if x and y aren't dynamically updated. :unsure:
Or you can add some code to track the x and y of those special events only and update the lightsources accordingly.
in the lighting script.
You just have to test and see what value works best for your game, you can set it to any value you like.It is possible in update to add the ability to change speed of full cycle? (12, 24...)
1 and 2 are much to fast for any decent game, but could be usefull to mimic your player going to bed and waking
up the next day. -
Oh, you're welcome Terrax! I had some ideas about generating some sort of array that only included the coordinates of the moving lightsources from the current map but since I'm no code junkie I wasn't too confident in sharing my thoughts. I wonder if the MV Commons script could tackle this issue for future plugin writers.Thanks for the reply, it sorta hit me after reading it i could save the realX and realY in another function and restore it
in the lighting script.