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

● ARCHIVED · READ-ONLY
Started by Shora 656 posts Page 25 of 33 View original ↗
  1. I really need some help with the light commands? I got the plugin working as far as i know but i have no idea how to add the damn lights- if anyone has the time to walk me through it please dm me over discord?

    chaotic_man_named_oliver
  2. Enigma_Productions said:
    Fixing Errors and a short tutorial
    So I've been seeing a few people get errors while trying to use this plugin. And seeing as I have had these errors myself but managed to find a solution, I figured I'd share that solution. I also wouldn't mind helping a few others learn how to understand the plugin a bit better. Seeing as it's going to be a good amount of text I'll separate the text using spoiler tags so that this post doesn't become annoying to others who just want to scroll by quick.
    Forgive me for any typos my cat was beginning to get lonely so I didnt go back to recheck my spelling

    For those getting $GameShadow is not defined
    $GameShadow is not defined
    This problem I believe occurs because the JavaScript file that you downloaded weirdly enough came without its proper parameters being set. To fix this issue you must download the latest Lighting Demo MZ.rar along with your ShoraLighting.js
    View attachment 212652

    Once downloaded, place your 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 MZ.rar and also open the game project file.

    From YOUR game project open the plugin manager and simply 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 parameters from the Demo Plugin to your Game Plugin
    View attachment 212655
    So for example: You'll copy the Lights: Default parameter [from the demo] as is and then hover over to [your games'] Lights: Default and simply right click and press paste. Do this for both Light: Default and Lights: Custom and hit apply. Once you do so the problem should be resolved.
    When you boot up the game it should work appropriately

    Understanding how to use the plugin
    Understanding how to use the plugin
    One of the reasons I love this plugin so much is because of the amount of freedom the game creator has to modify their shadows or light in the plugin! I applaud the script writer insanely :kaopride:

    Though the lack of a [help page] does make things a bit intimidating, however I'll try and help you learn the way I learned [which is trial by error].

    Question: Is it possible to make the Picture layer excluded from being shadowed?

    The answer is yes. However you must change a few words in your js file.
    Open the Shoralighting.js file with whatever 3rd party application you prefer, and click Ctrl and F at the same time.
    This should bring up a find search engine. In the find what box type createUpperLayer and it hit next. This should bring you to a line of code that reads out like this
    View attachment 212662
    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.
    View attachment 212663
    As you can see all I did was simply change createUpperLayer to createLowerLayer within those three lines of text. Once you do this save and close the file and run your game. If you have an image that was originally darkened it should now not be affected.

    When you open up the plugin page You'll notice 4 settings
    [Game Settings] [Map Default] [Lights: Default] [Lights: Custom]
    For now I will only talk about the first two. As I feel like I spent too much time on this post already lol.

    [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.
    Is there anyway someone can show how to make the light follow the player character?

    Ryan Howse said:
    Hey everyone, this might be something obvious I've overlooked, but how do you assign the player to have its own light?

    Nevermind, I figured it out! For anyone stuck, you have to have an item in your inventory that has the [light] tag in the comments. You can then add or remove the item to control if the light is on or off, and you can make it a Hidden Item in the item options so the player doesn't see that it's there.
    how can i find out how to put things in the player character's starting inventory? I'm very new to this
  3. @Shebo light follow the player is best with the X and Y variables, both
    for player and the light, than set the light to the player X and Y and if needed
    a direction they face with -x/-y or +x/+y offset.

    for player invertory, make an simple event on the map they start on, and set
    items in there what you want to give with a SelfSwitch A ON and set this
    event in parallel with the next [age SS A as condition. (action button.

    make sure both event pages are either above or below player.
  4. ShadowDragon said:
    @Shebo light follow the player is best with the X and Y variables, both
    for player and the light, than set the light to the player X and Y and if needed
    a direction they face with -x/-y or +x/+y offset.

    for player invertory, make an simple event on the map they start on, and set
    items in there what you want to give with a SelfSwitch A ON and set this
    event in parallel with the next [age SS A as condition. (action button.

    make sure both event pages are either above or below player.
    Thank you so much!
  5. Hi, I've been playing around with this plugin. Seems great for night scenes. I was wondering if I could get it to cast shadows like the sun during day scenes. I started by darkening the map slightly on an even. I'm trying to cast shadow below and to right on a building. This does work with one light placed at the top left of the map. It's obviously darker to the right of the light. So I thought I could try putting another light to simulate sunlight also at the top, but further to the right. However the second light causes a second shadow on the building in the other direction. This is obviously correct, but it doesn't simulate daytime shadows. Does anyone know if it would be possible to simulate daylight shadows, and if so what's the best way to achieve this?
  6. Good day, people of Earth,

    (Please forgive me if this is not the right place to ask for help)
    (I am using RPGmakerMV)
    I am having some trouble with this plugin, I am unsure if I have found a bug or not...
    I can load a new game or an old save, however, I cannot load an old save or start a new game following that without closing it and opening it again. It reads as the following:


    error with shoras lighting plugin overstack limit.png


    Perhaps it is my method of implementing the ambient lights through a common event placed on doors(MY first thought). Or it is incompatible with the plugins I am using...
    I managed to find the optimum place for the plugin to make it actually run the game once.

    I have all the lights in the places I desire and it looks beautiful... I just cannot work out why loading or starting a game again requires closing and opening the test or deployed-game again.

    When I turn off this plugin I lose the awesome lights but this error does not occur.
  7. Dear community, I need your help :|

    I really like this plugin but for some reason I can't get a map to be completely dark. Like pitch black.

    In the screen below I have a map with no lights, but the playerLight that's attached to the player.
    • I set all ambient colors to #000000
    • I set the tint of the playerLight to white
    • I checked that the image it uses (under.png) is completely desaturated
    Untitled-1.jpg

    I expect the map to pitch black, except a small circle around the player. But it's always some shade of dark green or blue. It's even different every time I start the game which is very confusing.

    Does anyone know what the issue might be?
  8. @Dust, I made it pitch black ad its quite it though.
    as black color #000000 dont work, you need to set the color to #000001-#000005
    to make it work, not sure what I got there, but you need between 1-5 to take effect.
    if not, try 10, but that should be the minimum though :)

    I need to check my side game for the settings I used (if you still have troubles).
  9. ShadowDragon said:
    @Dust, I made it pitch black ad its quite it though.
    as black color #000000 dont work, you need to set the color to #000001-#000005
    to make it work, not sure what I got there, but you need between 1-5 to take effect.
    if not, try 10, but that should be the minimum though :)

    I need to check my side game for the settings I used (if you still have troubles).
    Oh I see, thank you so much. It works good enough with something around #000005 :smile:
  10. Awesome plugin! As soon as I learn it properly it will be real nice in my game.

    I have the plugin activated so it is daytime when the game starts. But as soon as I change it with $gameLighting.setMapAmbient('night', 120); I cant change it back by using $gameLighting.setMapAmbient('afternoon', 120);
    What am I doing wrong here? It is between different maps if that is of any issue.
  11. johan_ahlqvist said:
    Awesome plugin! As soon as I learn it properly it will be real nice in my game.

    I have the plugin activated so it is daytime when the game starts. But as soon as I change it with $gameLighting.setMapAmbient('night', 120); I cant change it back by using $gameLighting.setMapAmbient('afternoon', 120);
    What am I doing wrong here? It is between different maps if that is of any issue.
    Are you using MV or MZ?
  12. untamedeventuality said:
    Are you using MV or MZ?
    oh I´m using MV

    And questions for everyone. Is there any good tutorial for this? Or a list of commands or something? Because right now I´m just looking in this thread and the demo to try and figure things out. If I´m going to buy this in the future it would be nice to actually know how to use it
  13. @johan_ahlqvist
    check the demo, thats where you get the most answers from.
    in your case, it should work, but it depends how the event is set.

    if you use a parallel that worked, but failed on the other, maybe because
    it is set to "action trigger" or "event/player" touch. which is the cause by than.

    but it's hard to know without knowing the event or mechanic itself.
  14. ShadowDragon said:
    @johan_ahlqvist
    check the demo, thats where you get the most answers from.
    in your case, it should work, but it depends how the event is set.

    if you use a parallel that worked, but failed on the other, maybe because
    it is set to "action trigger" or "event/player" touch. which is the cause by than.

    but it's hard to know without knowing the event or mechanic itself.

    It´s parallel events in each map, only the first one works. I have tried making two press events to change manually but same there, only first change works then its locked in.
  15. dont use it on each map on parallel which is kinda useless.

    if it change from day to afternoon n a period of frames,
    create a common event, set to parallel and set the start switch or
    day switch on it to activate.

    use variable counter or whatever that increase the time, and use the
    conditional branch to check this value, and change the day to afternoon
    scriptcall accordantly.

    and it will work, if you miss a switch or not use a global switch on them,
    it will lock out (specially if none is set).

    another protentional issue with this, if something break, it require you
    to change each events manually, and you can use "spawnEvent" plugin
    so you can spawn an event from a template map, so change it there,
    will change it on each map you call it for.
  16. Hi everybody,
    I'm in need of some help as I'm also experiencing the same problem @JBo is facing.

    Im using the MV version of Shora's Lighting together with Yanfy's Item Core Plugin which appears to be incompatible.
    Every time i try to start a new game from the Title Menu, i get a Maximum call stack size exceeded error, while loading a save file causes the game to freeze; The problem does not occour if i bypass the title screen and load the game immediatly or if i disable Shora's Lighting Plugin.

    Apparently the error is caused by Item Core using gainItem during initialization before the actor has been added to $gameActors, causing an infinite loop and thus the Maximum call stack exceed error (as described in this post).
    Im not a programmer so I'm unable to find a proper solution, has anyone been able to patch this error somehow?

    Note: I managed a workaround, by removing all the entries in the "Starting Party" section of the database and adding the Actors with an event later, I'm now able to both start a new game aswell as loading save files.
  17. Shebo said:
    Is there anyway someone can show how to make the light follow the player character?


    how can i find out how to put things in the player character's starting inventory? I'm very new to this
    In order to give players items at the start of the game, you just need to run a common event on whatever map the player starts on. I believe visustella also has an option to run a common event on new game if you're using that!
  18. Im just using it on my worldmap and my dungeons. Most dungeons will use night and worldmap/towns/whatever afternoon. No timer required. So its not like I use a parallel event in every map to do this.

    I will try a common event then, never used those but Ill figure it out.

    edit: Same thing with common events. I can only change the time once, it´s extremely annoying. I have tried using autorun events(which erase themselves) and parallel events. All I do is call the function to change time, nothing else, no special events or codes. Could it be incompatibility with the fullscreen plugin? I´ll have to try out an entirely new project and see if the same occurs there.

    edit2: Had the same problem with a new project. But now I got it working. I have to set ambient at the same time, should have figured that one out earlier.
    ShadowDragon said:
    dont use it on each map on parallel which is kinda useless.

    if it change from day to afternoon n a period of frames,
    create a common event, set to parallel and set the start switch or
    day switch on it to activate.

    use variable counter or whatever that increase the time, and use the
    conditional branch to check this value, and change the day to afternoon
    scriptcall accordantly.

    and it will work, if you miss a switch or not use a global switch on them,
    it will lock out (specially if none is set).

    another protentional issue with this, if something break, it require you
    to change each events manually, and you can use "spawnEvent" plugin
    so you can spawn an event from a template map, so change it there,
    will change it on each map you call it for.
  19. Update v.1.9.2 / v.1.8.5 (19/10/2023):
    Download from itch.io page: https://shoraaa.itch.io/shora-lighting-plugin
    - Fix a bug that cause light to sometime disappear after player teleporting to the same map, and only reappear when they moved.
    - Fix a crashing bug ("Cannot read property '0' of null at Layer.updateIntensityFilter")

    This is a pretty simple update, but I see a lot of people are struggling with the first bug, so I hope this will help :D. I'm still try to have some time for continue refactoring the code, so stay tuned!

    P/S: And my commission are opened again! Feel free to send a P/M if you have any plugin/scripting related commission!
  20. Magic_Turtle said:
    Hi everybody,
    I'm in need of some help as I'm also experiencing the same problem @JBo is facing.

    Im using the MV version of Shora's Lighting together with Yanfy's Item Core Plugin which appears to be incompatible.
    Every time i try to start a new game from the Title Menu, i get a Maximum call stack size exceeded error, while loading a save file causes the game to freeze; The problem does not occour if i bypass the title screen and load the game immediatly or if i disable Shora's Lighting Plugin.

    Apparently the error is caused by Item Core using gainItem during initialization before the actor has been added to $gameActors, causing an infinite loop and thus the Maximum call stack exceed error (as described in this post).
    Im not a programmer so I'm unable to find a proper solution, has anyone been able to patch this error somehow?

    Note: I managed a workaround, by removing all the entries in the "Starting Party" section of the database and adding the Actors with an event later, I'm now able to both start a new game aswell as loading save files.
    I tried your work around but as soon as I changed the party max to 3. It stopped working. I had hope for a moment.
    Perhaps, the fact that this plugin command stops the lighting system allowing the player to load will assist the designer who has made this beautiful lighting plugin.
    I hope that this issue is fixed in time. I really want to use this wonderful plugin. I purchased it for $29.99 and it will be worth it when this issue is fixed. I cannot really remove the Yanfly engine from my games as I have invested 3 years in utilising them for this game.
    Game dev is on pause for a while...