There's probably a way to link it to a button press via a passive Event. Or you can just step on an Event that'll reverse the switch to turn it off at a certain point or points (such as entering a lit building or having it shut off for a "spooky" moment).
Khas Awesome Light Effects
RGSS3 Scripts (RMVX Ace)@darkvalnar
You can do it by using common events - make a skill call one and do some switch conditions!
You can do it by using common events - make a skill call one and do some switch conditions!
I've just stumbled across an issue, and I have no idea what's caused it.
I've got and event that sets the map tone so it's dark, no problem what so ever, I even tested it a couple of days ago, but a second playthrough and the screen won't stay dark. It darkens, then goes straight back to normal colour/tone, and it keeps repeating, giving it a flashing sort of effect. I haven't changed anything, and as far as I know, my other scripts aren't causing a problem.
I don't know what to do.
I've got and event that sets the map tone so it's dark, no problem what so ever, I even tested it a couple of days ago, but a second playthrough and the screen won't stay dark. It darkens, then goes straight back to normal colour/tone, and it keeps repeating, giving it a flashing sort of effect. I haven't changed anything, and as far as I know, my other scripts aren't causing a problem.
I don't know what to do.
Okay so i figured everything out and i can use it just as i would like to use it now, nice!
Only one question remains: i'm using rather big maps for major cities, towns, etc. and of course these cities got streetlamps going on.
Now my question is, am i able to reduce the lag that starts happening as soon as there are a bunch of events on the map? The map im working on right now is 250x250 big and has lots of streets with lamps and i get a pretty big amount of lag. So are there any workarounds or should i just reduce the amount of light events to a minimum?
Only one question remains: i'm using rather big maps for major cities, towns, etc. and of course these cities got streetlamps going on.
Now my question is, am i able to reduce the lag that starts happening as soon as there are a bunch of events on the map? The map im working on right now is 250x250 big and has lots of streets with lamps and i get a pretty big amount of lag. So are there any workarounds or should i just reduce the amount of light events to a minimum?
My testing shows that the smaller light sources are less intensive (I.E. light 2 vs light 0), however this becomes muddled if you've added your own light images. Other than that, the best you can hope to do is reduce the light events. I suggest breaking the map into smaller maps, however, as large maps do NOT run well with any moderate amount of decoration.
Well i think i will just break it up in different districts and then do map transitions without fading between them. I'm always using light 1 as the "source" for streetlamps and it seems the fps drops happen even if there is only 6 of those events in a radius of 8 tiles. And thats on a map with only those 6 events. But oh well, maybe someone is using a super lightweight light source image that looks cool and runs well if there is like 30-40 light events on a map and wants to share it? :3
So are huge maps in general a performance issue in vx ace?
So are huge maps in general a performance issue in vx ace?
Hello Khas,
I am using your script and when I have set the effects to pitch black on the screen the game crashes once half way through the map with the error line 402.
Here is a picture of it.
[IMG]http://i289.photobucket.com/albums/ll232/GhunB00MB0X/error%20402_zpsxnkfmaly.png[/IMG]
I am using your script and when I have set the effects to pitch black on the screen the game crashes once half way through the map with the error line 402.
Here is a picture of it.
[IMG]http://i289.photobucket.com/albums/ll232/GhunB00MB0X/error%20402_zpsxnkfmaly.png[/IMG]
@LNicol90
You may have left an event to adjust the dark tone on parallel process, which would do this flash loop.
Please review your events 😀
@darkvalnar
The awesome light effects isn't optimized to run with big maps, so you can't do much about it. I suggest you to try my next lighting script (Khas Ultra Lighting), which is a great improvement and it is currently waiting for release on the official RM channels. The release will be widely announced.
@zserv
True, although RPG Maker does support these big maps, they doesn't always run with good framerates.
@ghun
Can you copy the contents of the faulty line, please?
You may have left an event to adjust the dark tone on parallel process, which would do this flash loop.
Please review your events 😀
@darkvalnar
The awesome light effects isn't optimized to run with big maps, so you can't do much about it. I suggest you to try my next lighting script (Khas Ultra Lighting), which is a great improvement and it is currently waiting for release on the official RM channels. The release will be widely announced.
@zserv
True, although RPG Maker does support these big maps, they doesn't always run with good framerates.
@ghun
Can you copy the contents of the faulty line, please?
This is awesome~!
Good work!
Good work!
Weird thing is, I've always had it as a parallel process, and it's never kicked up a fuss before. When I made it a work once then stop, the screen would darken then go back to bright lighting. So something was forcing the screen to brighten.
I had wondered if I'd screwed up the script somehow, so I recopied it, loaded my buggy save and I kept having the same issue. I start a new game, however, and I've got no issues at all. No flashing, nothing. Everything behaves as it should. And the event is still a parallel process.
Now I'm confused about what went wrong on that one save.
@LNicol90
Does this event delete itself after darkening the screen?
Does this event delete itself after darkening the screen?
So I'm a total noob with scripts, and I read through this thread and the common consensus is that there's no "on/off switch" for this kind of script. Basically, I just want it on for some maps, and off for others so I can use the normal built-in RPG Maker VX Ace screen tint eventing without any light sources. I want this on for certain maps with like a camp fire or maybe a torch here and there, but off on all the other maps.
Is that feasible? I know Shin posted earlier with the script $game_map.effect_surface.set_alpha(0) which does turn it off, but it also must constantly be running on every single map and makes it hard to tint the screen to certain colors/effects with the RPG Maker VX Ace built in screen tint event.
How should I go about making it that way? So that it's on/off based on what maps I want it on/off with, rather than being on by default for every single map.
I think my solution is related to this in the script on line 216 and 217:
# Enable Effect's Surface control by "Screen Tone" command?
Surface_UE = false
How do I turn that True and False for each map individually? Like if I could change line 217 from "false" to "true" when I want it on, and then back to "false" when switching to a map I want it off?
Is that feasible? I know Shin posted earlier with the script $game_map.effect_surface.set_alpha(0) which does turn it off, but it also must constantly be running on every single map and makes it hard to tint the screen to certain colors/effects with the RPG Maker VX Ace built in screen tint event.
How should I go about making it that way? So that it's on/off based on what maps I want it on/off with, rather than being on by default for every single map.
I think my solution is related to this in the script on line 216 and 217:
# Enable Effect's Surface control by "Screen Tone" command?
Surface_UE = false
How do I turn that True and False for each map individually? Like if I could change line 217 from "false" to "true" when I want it on, and then back to "false" when switching to a map I want it off?
Not originally, it was a parallel process that carried on and on. For some weird reason, the event just went haywire during one playtest. I started a new game and everything had fixed itself, no effort on my part.
@SOC
You can think of my light effects as a state machine: it can be on (opacity > 0) or off (opacity < 0). Thus, you just need to darken the maps you need using the commands (you may put an event as parallel process, deleting it after setting the correct shade). Also, if you want to use the default tone commands, set Surface_UE = false. Then, use the call script command to run the light effect commands.
@LNicol90
Really weird. But it's fixed at least.
Let me know if you have any more problems.
You can think of my light effects as a state machine: it can be on (opacity > 0) or off (opacity < 0). Thus, you just need to darken the maps you need using the commands (you may put an event as parallel process, deleting it after setting the correct shade). Also, if you want to use the default tone commands, set Surface_UE = false. Then, use the call script command to run the light effect commands.
@LNicol90
Really weird. But it's fixed at least.
Let me know if you have any more problems.
Hey Khas, I was wondering if it was possible to speed up the time it takes for the screen to tint.
Because when I am leaving an area to go into another it stays dark or light for a little too long.
I apologize if this question has been asked already.
Because when I am leaving an area to go into another it stays dark or light for a little too long.
I apologize if this question has been asked already.
@Teivel
You can always adjust the time the transition takes. But if it's still too slow, you may fade out the screen, perform the tinting, teleport with no transition and then fade in.
You can always adjust the time the transition takes. But if it's still too slow, you may fade out the screen, perform the tinting, teleport with no transition and then fade in.
And somehow I didn't even think of that, thanks! I guess the answer can simply stare us in the face sometimes.
Hello Khas, how are you? I have an small issue with the script,
If I use the "Shake Screen" command, the lights don't shake with the screen, they stay in their initial position. I thought it was an incompatibility issue, but I tested in the demo project of Khas Awesome Light, and the result is the same, the lights don't move when the screen is shaking >.<
Please could you help me?
Thanks in advance 🙂
If I use the "Shake Screen" command, the lights don't shake with the screen, they stay in their initial position. I thought it was an incompatibility issue, but I tested in the demo project of Khas Awesome Light, and the result is the same, the lights don't move when the screen is shaking >.<
Please could you help me?
Thanks in advance 🙂
@Kizami
Hi there!
Please copy this small fix after Awesome Light Effects. It will make the lights shake with the map.
class Light_SSource def sx return $game_map.adjust_x(@real_x)*32-@mr - $game_map.screen.shake endendclass Light_DSource < Light_SSource def sx return $game_map.adjust_x(@char.real_x)*32-@mr - $game_map.screen.shake endend
This problem is already fixed in the new version of my light effects.
Hi there!
Please copy this small fix after Awesome Light Effects. It will make the lights shake with the map.
class Light_SSource def sx return $game_map.adjust_x(@real_x)*32-@mr - $game_map.screen.shake endendclass Light_DSource < Light_SSource def sx return $game_map.adjust_x(@char.real_x)*32-@mr - $game_map.screen.shake endend
This problem is already fixed in the new version of my light effects.
@Kizami
Hi there!
Please copy this small fix after Awesome Light Effects. It will make the lights shake with the map.
class Light_SSource def sx return $game_map.adjust_x(@real_x)*32-@mr - $game_map.screen.shake endendclass Light_DSource < Light_SSource def sx return $game_map.adjust_x(@char.real_x)*32-@mr - $game_map.screen.shake endend
This problem is already fixed on the new version of my light effects.
Hi there!
Please copy this small fix after Awesome Light Effects. It will make the lights shake with the map.
class Light_SSource def sx return $game_map.adjust_x(@real_x)*32-@mr - $game_map.screen.shake endendclass Light_DSource < Light_SSource def sx return $game_map.adjust_x(@char.real_x)*32-@mr - $game_map.screen.shake endend
This problem is already fixed on the new version of my light effects.
Original thread: https://forums.rpgmakerweb.com/threads/khas-awesome-light-effects.4917/