MZ [MZ & MV v1.9.7] Shora Lighting & Shadow System

Version 1.51 are out! Including synchronize development with MV, now both the MV and MZ demo are up-to-date. Anyone using MV feel free to try it out! Also updated the plugin command `light status set` for MV, check it in the MV Plugin Commands section.
than I download the MV version once updated 🙂

keep up the amazing work though, I got a suggestion, which I might need in my
main, but more usefull on my side game, which is also nice if it works nicely.

like, if X of region 1 (if 1 hight) or than no light can pass through it. unless already possible.
if tileset is X (unpassable) it should block the light too + range?

if already possible, I try it later for my side project.
I don't quite understand what you mean. Do you mean the shadow automatically recognize unpassable tile as a wall block? That would be useful in 2D game, but since my light is 2.5D, the plugin would have no idea whether a tile is a top tile, or a wall tile. I maybe will add it in the future though, if lots of people only use the 2D shadow effect. Did I get your point right?
Oh that offset is going to be so, so handy.

(also wrt to my previous question, i didn't get the notif for your answer and already found a work-around. overpass regions are always just going to be problematique)
- Fulfilled all the default parameters. Now you can easily install the plugin to your project without having weird bug cause by the blank parameters. Also add error throwing when you don't have the image file needed.
This Is going to be super useful!
Version 1.5 is released. Check it out! Itch.io dev-log.

Change-logs:
- Now preserve various parameters when the game is saved/loaded, i.e. map's ambient, light's status/offset/color. Will add more in the future.

- Add a new parameters to lighting: Status. Control the status allow you to turn on/off the light anywhere you want without need to removing/adding the light repeatedly.

- Add a new parameters to shadow: Offset. Give you control over the shadow source cast position. The shadow offset will be addition with the light offset, i.e. if you set the light offset to 48 and shadow offset to 4, then the shadow source will be calculated at 52.

- Fulfilled all the default parameters. Now you can easily install the plugin to your project without having weird bug cause by the blank parameters. Also add error throwing when you don't have the image file needed.

- Fix minor bugs.

View attachment 213352

Can you explain a bit more detail about shadow offset and how it work please? Does that mean I can offset the shadow casting to a few pixel above if I have rounded corner in my map like this?

1XPbS7Y.jpg
Can you explain a bit more detail about shadow offset and how it work please? Does that mean I can offset the shadow casting to a few pixel above if I have rounded corner in my map like this?

1XPbS7Y.jpg
You can understand that the shadow offset is the light offset, but will not move the light. In other mean, just the light origin will be modified in shadow calculating. This will be convenient in case you use a lighting image that doesn't symmetrical, and will give you more flexibility in creating complex light.
Yea I can understand what you mean when you want to fix those too-rectangle shadow shape. The ability to add custom shadow polygon, which allow you to manually adding shadow caster polygon with any height will come in future update, so keep an eye on it! 👋
it looks very nice i like it
Hi again @Shora

Is it possible to implement some of your features (like the corner lights or the lights behind the walls) on the other tiles or even doodads? In my mind it sounds awesome yet difficult but it would be really awesome to have it on trees, bushes or similar.

Thanks again for your time.
hi.

I'm having this error.

Spoiler: Error image
3245rf.png

i have a lot of plugins, but I hope you could tell me what's going on here.

That error would be line 672.



I just found the solution.
Apparently is some kind of incompatibility with the Galv_Imagecache plugin.
Hi again @Shora

Is it possible to implement some of your features (like the corner lights or the lights behind the walls) on the other tiles or even doodads? In my mind it sounds awesome yet difficult but it would be really awesome to have it on trees, bushes or similar.

Thanks again for your time.
What do you mean by "corner light" and "other tiles"? As for the doodads, the ability to manually create polygon and automatically create shadow caster from sprite will come in the future, so stay tuned! The problem here is not that create the shadow caster is hard, but rather manage how user can easily identify each caster's height, like the height of the tree etc. Creating 2.5D shadow is always harder than the simple 2D shadow 😐 .
hi.

I'm having this error.

Spoiler: Error image

i have a lot of plugins, but I hope you could tell me what's going on here.

That error would be line 672.



I just found the solution.
Apparently is some kind of incompatibility with the Galv_Imagecache plugin.
I haven't take a look into the Galv plugin myself, but the lighting plugin is already have its image/texture cache for it own resources. Though the loading error seems really weird as it was trying to load my lowerBound function @@. If I have time, I will take a loot at the Galv plugin in the future, now just simply disable that plugin 😢.

Screenshot_2022-01-20-16_469x253.png
What do you mean by "corner light" and "other tiles"?

What I mean about "corner lights" is the dinamic lights of the walls (sorry if my english is not that accurate, I'm kinda rusty). For "other tiles" I mean trees, lamps or whatever ^^'.

And, yeah, I can see 2,5D lights are really complicated. Anyways, if u are going to implement that feature and it works with doodads... that's gonna be legendary imo.

Thanks for your time and keep on rockin'.
[removed]
Very happy to see the progress you are making. 1.5 performance is drastically improved in MV versus when I was tinkering around with 1.3. I look forward to more updates!
I am trying to redo my hud ui as a light image as mentioned earlier in the thread. How do I show a static light as a hud? I don't see any options/can't figure out how to fix a light image to the screen.
It doesn't seem to be working for me, I installed it and put a default light image in the light folder but the ambient doesn't even seem to be working and i'm not sure why. any suggestions would be appreciated. @Shora
[removed]



Have you registered the light in the Custom Lights parameter page? If you move an image in to the "lights" folder you must then go to the plugin manager and manually register it.
View attachment 213902
In the Ref box you will simply write the name of your light. While in the Image box you must double click it and then find the image you wish to connect the name to. If there currently is no ambient light set then you may set it in the Map Default page or you can always use a plugin command/parallel event to set the light in game.​
The ambient light is set in Map Default, but its not showing or applying to any of my maps, and I can't see if the lights are working if the shadows aren't.
[removed]
RPGMV_zB3YLY9rPh.png

That’s Strange. Can you post an image of the Plugin's parameters? Perhaps one of them didn’t get appropriately set. To fix this problem I wrote out a lengthy and detailed post about this problem on page 6 of this thread. You can check it out and see if it fixes the plugin [The section was about gameshadow not being defined].
It may not exactly be your problem but the section could fix your problem if you follow the steps.

Also can you be more specific about what version of RPG maker you’re using? If there is a problem in the code knowing which version has the bug would help out @Shora in fixing the problem.​
here is the picture of the parameters after trying the copy paste solution from your post. It still isn't working. The shadows do have color assigned to them but the maps dont get the shadows or ambient 'darkness'. To be clear neither shadows with region tiles, nor ambient shadows are working. Also I am using MV.
View attachment 213907

here is the picture of the parameters after trying the copy paste solution from your post. It still isn't working. The shadows do have color assigned to them but the maps dont get the shadows or ambient 'darkness'. To be clear neither shadows with region tiles, nor ambient shadows are working. Also I am using MV.
My problem has been resolved, thanks for the help Enigma!
I am trying to redo my hud ui as a light image as mentioned earlier in the thread. How do I show a static light as a hud? I don't see any options/can't figure out how to fix a light image to the screen.
Actually "light as a hud" is rather simple, because it just a fixed picture drawn above the lighting layer, since it don't allowed to have shadow anyway. So maybe let the light draw below the picture layer, and you are done! I'm currently developing on giving the user flexibility to choose their light to be drawn below or above picture layer. Static light on the screen not really suitable since it will also blend with normal light and causing confusion.
My problem has been resolved, thanks for the help Enigma!
Nice to hear your problem solved! Though I still curious what exactly the problem since there aren't any images @@. Thanks Enigma for the help though!

Original thread: https://forums.rpgmakerweb.com/threads/mz-mv-v1-9-7-shora-lighting-shadow-system.131410/