Khas Awesome Light Effects

shaynec1981

Veteran
Veteran
Joined
Jun 10, 2014
Messages
88
Reaction score
21
First Language
English
Primarily Uses
@khas

I absolutely love this script. After the initial learning curve, it's actually pretty easy, for me anyway, to set things up just the way I need. However, the problem I was running into with one project I'm working on is that there are 5 lights all flashing different colors at different intervals. Getting it going was no problem and it ran fine in my system. However, on one of my partner's system, the scene with these lighting effects was unplayable due to lag. It was the same exact project files to the T that worked fine on my end. However when he disabled your lighting script it ran fine on his system too. So with that being said, I have two questions

1. Is the next iteration of this script going to be better on systems performance-wise?

2. Is there an ETA on the next release? Itching to try it out!
 
Last edited by a moderator:

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
@shaynec1981

Thank you! Well, lighting scripts have always been something heavy on RPG Maker, mainly because we can't use the GPU with it.

1. I've coded a custom dll to handle all the lighting processes, so performance is a lot better on the new version. Also, there's a settings menu in which the player can optimize the game for his machine ^^

2. I think mid april! I'm working on a last-minute ideas :D
 

BlackHyp3r

Warper
Member
Joined
Apr 6, 2015
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Hey Khas! I recently got the latest update and I get an error saying this:

Script 'Khas Awesome Light Effects' line 952: NoMethodError occured.

undefined method 'restore' for nil:NilClass

Is the latest update working fine or should I get an older version?
 

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
@blackhyp3r

What does this line contain?

Also, when does this error happen?
 

BlackHyp3r

Warper
Member
Joined
Apr 6, 2015
Messages
2
Reaction score
0
First Language
English
Primarily Uses
It happens whenever I try to load a save file.

Do I have to start the game from the beginning maybe?
 

TheManlyFairy

Villager
Member
Joined
Feb 28, 2015
Messages
5
Reaction score
0
First Language
English
Primarily Uses
Um, at the risk of sounding really stupid, I don't see the how-to-use instructions anywhere. I didn't see any instructions in the project or out of it. Where are they?
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,370
Reaction score
8,547
First Language
English
Primarily Uses
RMMV
They are in the script itself. In the project, open the script editor and click on the script.
 

Musty260

Villager
Member
Joined
Apr 11, 2015
Messages
9
Reaction score
1
First Language
English
Primarily Uses
N/A
[deleted]
 
Last edited:

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
@blackhyp3r

Yes, you'll need to start a new game.

@musty260 

You may use winrar to decompress it.
 
Last edited by a moderator:

lizardbite

Warper
Member
Joined
Apr 24, 2015
Messages
2
Reaction score
0
Primarily Uses
Hey, so I've been using this script and ran into a problem that I haven't been able to solve. My googling found this thread, and I registered to ask for help.

In my game, I'm using a Show Picture Parallel Process to indicate the player's health. The problem is that the lighting effects cause the picture in question to be difficult to make out. Earlier in the thread, it was suggested to make it a Light, but I need the image in the top-left corner at all times, and Lights can apparently only be attached to events, not the screen itself. How can fix this so that the picture I'm using for health doesn't change tones depending on the map's lighting?
 

ZServ

Veteran
Veteran
Joined
Jun 16, 2014
Messages
260
Reaction score
71
Primarily Uses
Hey, so I've been using this script and ran into a problem that I haven't been able to solve. My googling found this thread, and I registered to ask for help.

In my game, I'm using a Show Picture Parallel Process to indicate the player's health. The problem is that the lighting effects cause the picture in question to be difficult to make out. Earlier in the thread, it was suggested to make it a Light, but I need the image in the top-left corner at all times, and Lights can apparently only be attached to events, not the screen itself. How can fix this so that the picture I'm using for health doesn't change tones depending on the map's lighting?
I may be off here, but I'd imagine it has to do with the draw order (the Z co-ordinate). Khas' engine sits at 180, so make your picture sit above that. However, I have no idea if you can mess with the Z axis via events, so you may want to look into scripts that show pictures as they generally allow you to set the Z value. Hope this helps.
 

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
@lizardbite

Change Surface_Z to 50 (on the script settings). Let me know if this doesn't work :D
 

lizardbite

Warper
Member
Joined
Apr 24, 2015
Messages
2
Reaction score
0
Primarily Uses
Changing Surface_Z to 50 worked. I thought I'd tried that earlier, but I guess I didn't save before testing (d'oh!). Thank you very much!
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
535
First Language
English
Primarily Uses
N/A
Is it possible to make event's check if light is on them?

If not, I don't expect to see it. Just thought it could make for a interesting puzzle using lighting on events to solve it.

Is it possible with script calls and conditinal branches?
 

ZServ

Veteran
Veteran
Joined
Jun 16, 2014
Messages
260
Reaction score
71
Primarily Uses
Directly check? No, however you could determine the absolute value between the player and event to check if they're in a pre-determined radius that would match up with the lights' radius (or however you've setup the image).
 

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
@oddball

Yes, there is. Copy and paste this code below Awesome Light Effects:

module Light_Core    Lit_Pixel = 100    Pix_Min = 255 - Lit_Pixel # Don't change this!    def self.lit?(e)    return false unless $game_map.light_surface    ex = e.screen_x    ey = e.screen_y    return false if ex < 0 || ey < 0 || ex >= 544 || ey >= 416    pix = $game_map.light_surface.bitmap.get_pixel(ex, ey)    pix.red < Pix_Min || pix.green < Pix_Min || pix.blue < Pix_Min  end  endYou can change the Lit_Pixel constant to modify the sensitivity of the method.

Use Light_Core.lit?(character) for testing if a character is currently lit by some light.

character may be the $game_player, self_event or $game_map.events[x]

Let me know if you need more instructions!
 
Last edited by a moderator:

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
Probably on next month, there's some stuff that needs to be done before the release.
Apologies for the inconvenience =\
 

SquallStorm

Resident Persona 5 Hyper
Veteran
Joined
Feb 4, 2014
Messages
217
Reaction score
140
First Language
English
Primarily Uses
Darn someone just asked.  Khas take your time man.  I am eagerly awaiting the results.
 

Darkvalnar

Warper
Member
Joined
Feb 23, 2014
Messages
3
Reaction score
0
First Language
German
Primarily Uses
Hi!

So i got the script and it works like a charm! Nice work! 

Now my question is, is there a way to implement the lantern effect as skill so you can turn the lantern on or off? I already figured out how to turn it on but now how to turn it off.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

This is relevant so much I can't even!
Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect

Forum statistics

Threads
105,999
Messages
1,018,220
Members
137,778
Latest member
lifehoroscopee
Top