[ Luna Engine and Khas Awesome Light Effects ] Problem with full screen effect compatibility

Let me say that this is my first Luna based script ever posted.

So I got Khas awesome light effects script and putted it into the Etrian demo (I build upon this).

Did some RGSS3 modifications to make my menu look almost as I wanted it to be.

Later on I will change the pictures to make my own GUI.

Incredible engine.

Now look. I wanna play with the light in my game.

Khas script does exactly what I want, but the screen is about 30% bigger from the default to the right. 🙁

So here is the question: 

Best solution I ask:

Can this be fixed, so the light effect would be be applied to the whole screen?

It is not a functional compatibility issue in other words.

The script runs excellent except that the effect occupies less space than the whole screen.

[SIZE=14.4444446563721px]Thanks in advance.[/SIZE]

The script Khas Awesome Light Effects can be found here:

http://arcthunder.blogspot.com.br/p/rpg-maker.html
I never used this engine so I'm afraid I can't help there.
I never used this engine so I'm afraid I can't help there.
I didn't implemented the whole SAS.

I used just the script of the light effects I mentioned above if that helps.
I think I know what your talking about. Can you supply a screenshot so I can be sure its the problem I found? If it is that problem, I know what changes to the script needs to be made to get it functioning properly.
Here:

https://www.dropbox.com/s/mxyhrmlkif6g9zy/khas_comp.png?dl=0
Lol yup. I think I can help you. Mind telling me what resolution you are trying to use?
Lol yup. I think I can help you. Mind telling me what resolution you are trying to use?
Where do I find this info?

Oh well if that helps you I build on the Etrian demo of Luna Engine. 

Where can I find this info?

Do you set the resolution in RGSS3?

I imagine the width is 3x32 wider, as it looks... 🙂
The default is 544 X 416. check your scripts. One of them has to be changing it.
The default is 544 X 416. check your scripts. One of them has to be changing it.
Where do you change it from?

RGSS3 or Luna?
I don't think it was included in luna. check for other scripts like yanfly.
It's in Yanfly Core Engine. By Default I think we're either 640x416 or 640x480.
I select @boldpaste's reply as the best answer cause it helped me find out what to do.

SOLUTION:

Put Khas script on a text editor.

Apply search for 544.

There are several.

Replace with the correct resolution.

It's done.

Thank you both of you [SIZE=14.4444446563721px] @boldpaste and @Archeia! :3[/SIZE]

[SIZE=14.4444446563721px]640 X 416[/SIZE]
I select @boldpaste's reply as the best answer cause it helped me find out what to do.

SOLUTION:

Put Khas script on a text editor.

Apply search for 544.

There are several.

Replace with the correct resolution.

It's done.

Thank you both of you [SIZE=14.4444446563721px] @boldpaste and @Archeia! :3[/SIZE]
That is what I was going to tell you to do. Congrats. xD

As a reference for everyone else having issue, here are the lines that have to be changed. (note that increasing it bricks performance).

Line 640  return if sx > 544 && sy > 416 && sx + w < 0 && sy + h < 0

Line 937  $game_map.light_surface.bitmap.fill_rect(0,0,544,416,$game_map.effect_surface.color)

Line 955  $game_map.light_surface.bitmap = Bitmap.new(544,416)

Line 956  $game_map.light_surface.bitmap.fill_rect(0,0,544,416,$game_map.effect_surface.color)
Just a thought, but you might be better off setting anything like that to graphics.width or graphics.height. By doing that you make it so the game automatically adapts itself to whatever resolution automatically without having to change everything manually. This is also a invaluable trick with a little math when programming anything in Luna. 
Yes you are right. Most scripts do the graphics.width and graphics.height on windows (e.g. Yanfly scripts do this). I was wondering why his doesn't do this.
I think a lot of scripters didn't think it was much of an issue before due to the built in cap of 640 by 480. With the HD dll out a lot more people are using non standard sizes.
But if your screen resolution is 640x480 then that script will break because it's only at 544x416.
But if your screen resolution is 640x480 then that script will break because it's only at 544x416.
Correct.

Maybe these scripts were meant for parallax mapping or just simple mapping with small maps.

As Khas says, large maps with many events will cause lag.

The Khas script works best with the smallest possible map.

That's why I believe he didn't really care about the resolution.

Also he stated somewhere that no support is provided and he is through with it.
@Dread - large maps and large resolution does not always coexist... In normal Ace, you can have large maps but the resolution is still 544x416... Map size is determined by number of tiles, not screen resolution. Larger resolution would mean you need a larger map, but a larger map doesn't mean you need a larger resolution. 🙂


I think a simple explanation was simply he chose to do that because it's the default resolution, and his script is pretty old too. Or maybe he just didn't know about Graphics.width and Graphics.height.


PS: This isn't really Luna related, and also a problem that has already been encountered, posted and solved a lot of times in this forums. Sometimes a simple search can do wonders. 🙂
@Dread - large maps and large resolution does not always coexist... In normal Ace, you can have large maps but the resolution is still 544x416... Map size is determined by number of tiles, not screen resolution. Larger resolution would mean you need a larger map, but a larger map doesn't mean you need a larger resolution. 🙂

I think a simple explanation was simply he chose to do that because it's the default resolution, and his script is pretty old too. 

PS: This isn't really Luna related, and also a problem that has already been encountered, posted and solved a lot of times in this forums. Sometimes a simple search can do wonders. 🙂
Well Since Yami's script change the resolution, and since it is in Luna Engine, I thought I could relate this.

Khas would really know about such variables. You are right though. The script is old indeed.

Thanks for clarifying this, you are absolutely right I guess. Please accept my ignorance about RGSS3 functinality. I still study Ruby. The good thing is that I can now tweak some script without being like "I have no idea what I am doing".

Cheers mate!

Original thread: https://forums.rpgmakerweb.com/threads/luna-engine-and-khas-awesome-light-effects-problem-with-full-screen-effect-compatibility.35333/