(MV Version only) Do you think canvas fall-back for this plugin is neccesary?


  • Total voters
    38
  • Poll closed .
Joined
Apr 26, 2017
Messages
156
Reaction score
264
First Language
English
Primarily Uses
RMMV
I'm not sure if anyone else is having this occur for them but lets say I playtest a part for my game and then save. After I change or add a light then continue from my save file the plugin will not recognize the light and instead say that I must register it despite having already done so.

I basically have to hit new game each time I want a light to register and appear in the game. It's not too much of an inconvenience since I'm at the beginning of recreating my game, however once I get in pretty deep I feel like its going to become a bigger problem.

I know I could just set my players starting position to the current map I want to see the light in and hit new game. But whenever I want to test the light in my game that have specific switches that led to that event, It would be a bit tedious having to wait till I get to that part of the game to see it play out.

For now every time I hit continue I get this notification for any new light I add.

New game.png
I tested this out on a new clean project with only shora being the plugin. It would be nice to have the lights register even after I press continue.
 

Dark_Ansem

Veteran
Veteran
Joined
Jun 16, 2020
Messages
251
Reaction score
93
First Language
English
Primarily Uses
RMMZ
Did you ever get my project, Shora?
 

Shora

Veteran
Veteran
Joined
Apr 12, 2020
Messages
82
Reaction score
195
First Language
Vietnamese
Primarily Uses
RMMZ
Version 1.6 are released! A pretty big update including quality, performance, and flexibility! Try it out on itch :kaoluv: .
Change-logs:
- Now you can draw static lighting using plugin command/ script, by provide it light type and positions. Currently you can't modify, or even change it status, but in exchange it allow you to draw hundreds, or even thousands of static lighting on the map! Note: MV Version blending mode is NORMAL instead of ADD for technical reason (PIXIJS), and I'm gonna patch it in the future if needed.
- Added soft shadow customisation. Allow you to customize soft shadow status/strength/quality. The prefer strength/quality params is 2/1; 1/1; 1/2. All old previous version used 1/2.
- Added customizable color matrix filter to map, which allow you to higher the lights intensity and make lighting blend nicely into map. Currently only 'brightness' is visible in the plugin params, but you can use $shoraLayer.colorFilter to use all the other methods (see http://filters.pixijs.download/dev/demo/index.html)
- Change lighting registering phase. Now the new lighting type will be registered not only when you create a new game, but when the game boot up (Thanks to @Enigma_Productions ).
- Fix a pretty serious memory leak when update from v1.4 to v1.5. Now it should work fine (test this by repeatingly switch between complex map).
- Fix some others minor bugs.
- Change all both demo's plugin command to use script call instead, for synchronizing easier. You can still use each's plugin commands normally.

Gallery:
Soft shadow and color filters.
unknown.png
Anyone want their lights to be completely symmetrical? Just set its shadow offset y to -18!
1643284093174.png
Adding 100 static lights at once randomly using script... 1000 just made the map fully bright lul.
1643284135610.png
 
Joined
Apr 26, 2017
Messages
156
Reaction score
264
First Language
English
Primarily Uses
RMMV
A short tutorial and Q&A for Update1.6

A while back I made a short tutorial for Shora Lighting but since then a few updates have come out and I feel the tutorial should be updated. Again I'll use spoiler tags for each subject so it's easier for people to find what they're looking for. And it makes it easier for people to scroll by.

To elaborate. The Shora Lighting Demo comes with it's very own set of light images along with custom parameters. If you don't have any premade lights and would like the default ones to start off with please follow these sets of instructions.
Plugin Settings.png
Download the latest -ShoraLighting-.js plugin along with the demo that matches your engine.
if you have the MV Engine download the MV demo
if you have the MZ Engine download the MZ demo

Once downloaded, place the js file in the proper folder in your game. [for those who don't know that would be the js/plugins folder]
Now open your game project using either MV or MZ
Afterwards extract the Lighting Demo and also open the game project file.

Copy.png
Paste.png
From YOUR game project open the plugin manager and add ShoraLighting to the list however do not close the plugin manager yet because we are not done configuring the parameters on the ShoraLighting plugin.
From the DEMO game project open the plugin manager and double click the ShoraLighting plugin to bring up the parameters page.

You're going to want to copy the Lights: Custom parameter from the Demo Plugin Settings to your Game Plugin Settings. If you view the image beneath you'll see the Demo is on the left and your project would be on the right. Forgive me if that sounded confusing. Hopefully the image above clears up any confusion:kaocry:

Once done. Click OK and Apply

Transfer Lights folder.png
For the next step what we're going to want to do is similar to what we did above. From your game project folders navigate to your img folder. Do the same for the Demo project folder.
Now simply copy the lights folder from the demo to your project folder.
See below image to better understand. Ignore the black bars I just wanted to cover my username :kaoswt2:

You should now have the Shora Lighting's Custom Lights!

The answer is yes. However in the newest Shora update [1.6] you must change a few lines of code in the js file.
I'll do my best to make it easy to follow this step by step.

Open the Shoralighting.js file with whatever 3rd party application you prefer [you may even use Notepad], and click Ctrl and F at the same time.
Search box.png
This should bring up a find search engine. In the find what box type createUpperLayer and hit next. This should bring you to a line of code that reads out like this
Screenshot_2022-01-11-32_340x113.png
From here simply change all "createUpperLayer" to "createLowerLayer" in this area of code.
*Please make sure the L is capital as js takes that level of precision very seriously.
Now you should have something like this by the end of it.
CreateLower.png
As you can see all I did was simply change createUpperLayer to createLowerLayer within those three lines of text.
Now from the Find What box [type] or [copy and paste] in to the box
if (this._spriteset.filters[1])
ifspriteset.png
Now hit search.
You should be taken to your next line of code that we must change.
From this line of code merely replace the selected code with this line of code
if (this._spriteset.filters && this._spriteset.filters[1])
[This line of code was given to me by Shora and will soon itself be implemented in a future update.]
Now again save your js file and run your game.
If you have an image that was originally darkened it should now not be unaffected.

This feature has not yet been made available in the plugin however there is a round-a-bout solution to this.
If you wish to get a top corner block you must place the lowest Region ID that you have on the corner you wish to have a shadow. In my case it's 1. If you have not changed this parameter then it should also be 1. To better understand and see what I mean I will present a few images to show you.

Map Region ID.png
In game test.png
As can be seen from the image, the top of the wall [on the bottom right of the image] is now emitting it's own shadow. The only draw back is that the light can sometimes bleed through the wall. If you use big lights this problem will be instantly noticeable. To solve that problem simply add an extra layer of wall. If you use small lights then no bleeding should occur.

When you open up the plugin page You'll notice 4 settings
[Game Settings] [Map Default] [Lights: Default] [Lights: Custom]
Like in my previous post I'll only talk about the first two as I am too tired to continue this tutorial however perhaps in the future I will elaborate more on the others.

[Game Settings]
The parameters are pretty easy to understand. You set the range of your preferred Region ID numbers and if you have the latest version of Shora Lighting you can also place roof Region ID's or Ignore Shadow Region ID's.

[Map Default]
Default Ambient
is as the name suggests the default Ambient shade the plugin will show as you start the game. It uses hex numbers so if you don't know any hex numbers by heart simply go to this website https://www.color-hex.com/ and use their cursor controlled color chart. Any color you would want is broken down in hex numbers so you can apply it to your game. If you want your game to start off with no shading I recommend changing this parameter to #ffffff

Default Shadow Ambient This allows you to adjust the shadow itself. For example if you feel like a shadow in a certain map should be darker than usual [Let's say you wish to hide a monster in a corner] Then this setting will adjust that. Or if You wish the shadows wouldnt be so dramatically dark then you can also brighten them. Its an incredibly hand feature that can benefit the game creator quite a bit.
Default Top Block Ambient If you understand Default shadow ambient then this should also make sense to you. This parameter allows you to adjust the level of intensity of the shadow on the top of your wall. Again very useful for many creative ideas.

 

ZenMarx

Warper
Member
Joined
Feb 4, 2022
Messages
2
Reaction score
1
First Language
English
Primarily Uses
RMMZ
Hi, I'm pretty new to RMMZ so I'm sure this is a simple error that is easily fixed, but I've gone through everything I can think of and can't figure it out. When I try to add a test light into my game project I get this when I test-play:

Screen Shot 2022-02-05 at 12.50.48 pm.png

Apologies if this has been covered, and as I mentioned I'm pretty new to RMMZ so apologies if its something obvious. Any help would be appreciated!
 

Shora

Veteran
Veteran
Joined
Apr 12, 2020
Messages
82
Reaction score
195
First Language
Vietnamese
Primarily Uses
RMMZ
Hi, I'm pretty new to RMMZ so I'm sure this is a simple error that is easily fixed, but I've gone through everything I can think of and can't figure it out. When I try to add a test light into my game project I get this when I test-play:

View attachment 215229

Apologies if this has been covered, and as I mentioned I'm pretty new to RMMZ so apologies if its something obvious. Any help would be appreciated!
It is a weird bugs... Properly because of plugins incompatibility. Can you provide the image of console log (press f12 when the bugs occur), and list of using plugins? I will try to guess what cause the error.
 

ZenMarx

Warper
Member
Joined
Feb 4, 2022
Messages
2
Reaction score
1
First Language
English
Primarily Uses
RMMZ
It is a weird bugs... Properly because of plugins incompatibility. Can you provide the image of console log (press f12 when the bugs occur), and list of using plugins? I will try to guess what cause the error.
Thanks! Here's the console log and the only plugin is the lighting one.Screen Shot 2022-02-05 at 10.25.41 pm.pngScreen Shot 2022-02-05 at 10.26.08 pm.png
 

Shora

Veteran
Veteran
Joined
Apr 12, 2020
Messages
82
Reaction score
195
First Language
Vietnamese
Primarily Uses
RMMZ
Thanks! Here's the console log and the only plugin is the lighting one.View attachment 215287View attachment 215288
That really weird... I just created a new empty project and it still worked fine. Did you try follow the instructions from the wiki? For some reason, when your light created, the "$gameLighting" haven't created (which it should when a new game is created for loaded). If the instructions still not work, please DM/PMs me though forums/Discord, I will try to help resolving the problem.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
5,995
Reaction score
2,345
First Language
Dutch
Primarily Uses
RMMV
@Shora I think he/she is using MZ at the looks of his/her database with
the checks and MV is it visible if its ON/OFF, as it might not work in MZ
if you read the bottom of it :)

unless mac have the same view with checks? but I doubt that though.
 

Ariyana

Villager
Member
Joined
Sep 19, 2021
Messages
7
Reaction score
6
First Language
german
Primarily Uses
RMMZ
Hi @Shora,
i have the same issue as @ZenMarx, but it only occurs when i load a save where the plugin was previously inactive. If I restart the game, then everything works.

It is now possible to turn the lightning system on/off?
 

Shora

Veteran
Veteran
Joined
Apr 12, 2020
Messages
82
Reaction score
195
First Language
Vietnamese
Primarily Uses
RMMZ
I like this plugin. :)
Thanks! More dynamic features and optimization are coming next update, hope you will like it!
Hi @Shora,
i have the same issue as @ZenMarx, but it only occurs when i load a save where the plugin was previously inactive. If I restart the game, then everything works.

It is now possible to turn the lightning system on/off?
Thanks for that information! Now I know why the bug occur: It tried to load $gameLighting from a save that don't have that, because the plugin was off when the save was created. @ZenMarx Is this the same as your? If this is it then I can fix this the next update.
Yes, the dynamic state of lighting (even shadow too) is coming in the next update :). Then you can implement it into your settings or something like that.
 

Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
562
Reaction score
568
First Language
Swedish
Primarily Uses
RMMZ
Great! A quick question about light position.

Is it possible to have the same light effect on different events with different x/y position? I know there is a offset command but that change the whole light so all events uses the same x and y position.

Would be great if there was a command for like forcing different x and y position for the light effect when you create it. Like a comment.

Maybe like so:
[light ambient_orange]
[light_offsetX -48]
[light_offsetY 48]

Then the light ambient_orange would use a different x and y position for that event only.
 

Ariyana

Villager
Member
Joined
Sep 19, 2021
Messages
7
Reaction score
6
First Language
german
Primarily Uses
RMMZ
Yes, the dynamic state of lighting (even shadow too) is coming in the next update :). Then you can implement it into your settings or something like that.
:thumbsup-right:
 

Latest Threads

Latest Profile Posts

For those with up to 9 elements of magic; how do you structure your database. By element? Or by what is offensive vs supportive spells?
would anyone here be interested in rough concept art for the main protagonist of my game that might get changed later? :kaoswt2:
I guess I have no idea how to properly upload a custom font lmao. The menu fonts are too damn small.

Font_Size.PNG
Dev be like: "I'll make the character goes amnesia so I could explain the world and the lore better and immersive to the players"

Forum statistics

Threads
124,435
Messages
1,163,638
Members
163,250
Latest member
Ramadhinata
Top