MV - Community Lighting MV & MZ

● ARCHIVED · READ-ONLY
Started by ImaginaryVillain 1279 posts Page 50 of 64 View original ↗
  1. Fortunastreet said:
    Terraxlighting was made with 4-direction movement in mind, but implementing 8-direction is theoretically possible from what I saw on the code.
    That would be so cool if not too difficult! I think enough people would use this to make it worthwhile. Is there an official way to request this or is that what I just did?

    Oh, one more: When setting up a color cycle on a light how hard would be to implement a "flag" to have the next color fade in rather than change instantaneously?
    i.e. "cycle #ff0000 10 #0000ff 10" goes red 10 seconds, blue 10 second, repeat. But, "cycle #ff0000 f10 #0000ff f10 #ff0000" would fade from red to blue in 10 seconds and fade from blue to red in ten seconds, repeat.
    You could combine holds and fades without having to do much else, so for 10 seconds of red, fade to blue over 10 seconds, hold blue for 10 seconds, then fade back to red over ten seconds would be:
    "cycle #ff0000 10 f10 #0000ff 10 f10 #ff0000"
    Fading like this is easy to do with the daynight cycles, would this be difficult to do with event lights?This would expand light customization a ton while not being overly convoluted.

    Thanks for the consideration!
  2. there are probably 1 problem with 8 directional movements as it require
    more code to make it work correctly.

    problem:
    it is made for 4-dir movement, so moving UP+RIGHT will work diagonally
    if 4-dir is working, making it 8dir, it needs or must check the 8-dir plugin.

    why?
    if moving UP+RIGHT and flash light shine diagonall will moving UP looks weird,
    also RIGHT+UP while you dont have a diagonal sprite active!

    this needs to check if a 8-dir SPRITE is drawn somehow and probably not
    added to the original.

    so I'm curious how it could be done nicely though to reconize them correctly.
  3. Hi everyone, I'm moving from MV to MZ and this is fantastic.
    At the time I'm not using the tag option, sure I'll implement as long as I'll see this is the plugin I'm looking for.
    And this is the question: does this work with plugin commands, too? Or only note tags? I need to modify player light radius in game, is it possible with this plugin? The original MV plugin commands do not seem to work, nor the Light radiusgrow command, that I need in my project.
    I tried to find the answer in the thread, but did not find it...
  4. For the MZDemo (probably the mv demo too) I click the CommunityLightingMZDemo and from this link I don't see a download button anywhere. I am now going to try getting the JS thinking this is a plugin for MZ and maybe I can figure it out from there. If someone could tell me where the Download button is or in general what I do to get it to work.
  5. I really wish I could figure out how to DL the Demo, so again please help me with how to DL this demo. There seems to be no Download button off the link.

    Anyhow I just wanted to know how to adjust day and night time intervals right now I'm guessing it's for a 24 hours like animal crossing. I do not want this. I want tinting to say have each day (Day+Night) be every 2 hours (240 minutes). If this plugin doesn't work this way could you point me to a plugin that can. Or maybe I'll use the rigid default since I want darkness for night. Edit: Actually I assume this is done by changing the initial speed for day and night which I assume 10 is actually not hours connected to my computer but some random amount of time for each minute. How can I test how fast this is going at?
  6. now when I run it just says syntax error <
  7. SpritesOnInstinct said:
    I really wish I could figure out how to DL the Demo, so again please help me with how to DL this demo. There seems to be no Download button off the link.

    Anyhow I just wanted to know how to adjust day and night time intervals right now I'm guessing it's for a 24 hours like animal crossing. I do not want this. I want tinting to say have each day (Day+Night) be every 2 hours (240 minutes). If this plugin doesn't work this way could you point me to a plugin that can. Or maybe I'll use the rigid default since I want darkness for night. Edit: Actually I assume this is done by changing the initial speed for day and night which I assume 10 is actually not hours connected to my computer but some random amount of time for each minute. How can I test how fast this is going at?
    That link is kinda off, at least as far as I can tell. Here: https://github.com/ImaginaryVillain/community_lights

    The JS is there. And see on the right, click on "Releases" and you can DL the demo there for both MV and MZ.

    Daynight cycle speed is how many minutes for an entire cycle/day. So for a 2 hour day it would be set to 120.

    SpritesOnInstinct:​

    How can I test how fast this is going at?

    You could have set it to 1 and timed how long it took for a day to pass. (1 minute.)

    ---

    Syntax error - You probably changed plugin order or added a new one since it last worked.

  8. ephesus said:
    That would be so cool if not too difficult! I think enough people would use this to make it worthwhile. Is there an official way to request this or is that what I just did?

    Oh, one more: When setting up a color cycle on a light how hard would be to implement a "flag" to have the next color fade in rather than change instantaneously?
    i.e. "cycle #ff0000 10 #0000ff 10" goes red 10 seconds, blue 10 second, repeat. But, "cycle #ff0000 f10 #0000ff f10 #ff0000" would fade from red to blue in 10 seconds and fade from blue to red in ten seconds, repeat.
    You could combine holds and fades without having to do much else, so for 10 seconds of red, fade to blue over 10 seconds, hold blue for 10 seconds, then fade back to red over ten seconds would be:
    "cycle #ff0000 10 f10 #0000ff 10 f10 #ff0000"
    Fading like this is easy to do with the daynight cycles, would this be difficult to do with event lights?This would expand light customization a ton while not being overly convoluted.

    Thanks for the consideration!

    Since I've been modifying the code heavily in order to add features I needed, I'll look into adding your request for the cycle fade to the code. Shouldn't be difficult.

    Regarding the 8-directional support, I implemented 360-degree flashlight in a PR the other day and it was merged. It works by specifying angles as directions (check the updated readme). 8-directional movement also works automatically assuming the 8-directional plugin correctly utilizes the internal rpgmaker 8-directions correctly (e.g. visustella movement core).

    Flashlight enhancements by snaphat · Pull Request #76 · ImaginaryVillain/community_lights
    Semi-relatedly I just PR'd support for additive lighting (volumetric minus non-linear dropoff) which just got merged an hour ago. It works by specifying 'a' in front of colors. Check the readme for how to use that as well.

    Volumetric lighting & Triangular flashlight beam improvements by snaphat · Pull Request #80 · ImaginaryVillain/community_lights
    Fufi_Saintz said:
    Hi everyone, I'm moving from MV to MZ and this is fantastic.
    At the time I'm not using the tag option, sure I'll implement as long as I'll see this is the plugin I'm looking for.
    And this is the question: does this work with plugin commands, too? Or only note tags? I need to modify player light radius in game, is it possible with this plugin? The original MV plugin commands do not seem to work, nor the Light radiusgrow command, that I need in my project.
    I tried to find the answer in the thread, but did not find it...
    All the features of the MV plugin should be in the MZ plugin. I migrated much of the MV version code into the MZ version a couple of weeks ago since the MV version had many changes and updates missing from the MZ version. The issue with the radiusgrow command is that I broke it for MZ while migrating the code. Grab an updated copy and it should work now with one of the PRs that got merged today.
  9. @snaphat you should add it in the demo of those changes.
    as alot are visual learner (like me), but nice job though.
  10. figured it out. Thank you Snaphat.
  11. I want the day and night cycle to go really fast. Is this possible? Day and night cycle don't seem to work. what's the deal? I can't get the daynight to cycle it has the ability, it claims, for speed 4999. I use MZ in case that's needed to decide an answer. I just want to know how exactly to set the daynight cycle speed to its fastest and get it to work and I would like to know how fast the tints should be changing.
  12. SpritesOnInstinct said:
    I want the day and night cycle to go really fast. Is this possible? Day and night cycle don't seem to work. what's the deal? I can't get the daynight to cycle it has the ability, it claims, for speed 4999. I use MZ in case that's needed to decide an answer. I just want to know how exactly to set the daynight cycle speed to its fastest and get it to work and I would like to know how fast the tints should be changing.
    whoops... smaller numbers are fast
  13. I know I'm probably doing something very wrong but I just can't figure out what, so no matter how stupid a question this is I must ask it. So, I have 2 maps with the note <cl: Tint set #2f765f> to give the map a darker bluish glow. I also have torches set up on the map as such: (in the event note tags) <cl: light 500 #ffa431 B150>. These work well together on their own, but the issue is when I try to give battles that occur within the map a different tint. The map tint always takes over the battle tint, no matter if I use TintBattle or not. On the other hand, I've noticed that if I only have TintBattle set in the map notes, that tint will take over the entire map whether or not I'm in battle. BUT there's another thing: tints in battles absolutely do nothing (default to ffffff) UNLESS I have at least 1 light source event placed on the map. But map tints will still work in this case. I have also tried using TintBattle as an autorun command or even a battle event, and it makes no difference. Is this some strange interference with some other plugin I have (I can't even begin to guess which), or is this normal behavior and I'm just doing something very wrong? Hoping it's the latter. Hopefully I'm just being very dumb and missing something obvious. Hopefully anything I just said made any sense, but feel free to ask for as much clarification as needed. Deeply appreciate any help.
  14. SageDerby said:
    I know I'm probably doing something very wrong but I just can't figure out what, so no matter how stupid a question this is I must ask it. So, I have 2 maps with the note <cl: Tint set #2f765f> to give the map a darker bluish glow. I also have torches set up on the map as such: (in the event note tags) <cl: light 500 #ffa431 B150>. These work well together on their own, but the issue is when I try to give battles that occur within the map a different tint. The map tint always takes over the battle tint, no matter if I use TintBattle or not. On the other hand, I've noticed that if I only have TintBattle set in the map notes, that tint will take over the entire map whether or not I'm in battle. BUT there's another thing: tints in battles absolutely do nothing (default to ffffff) UNLESS I have at least 1 light source event placed on the map. But map tints will still work in this case. I have also tried using TintBattle as an autorun command or even a battle event, and it makes no difference. Is this some strange interference with some other plugin I have (I can't even begin to guess which), or is this normal behavior and I'm just doing something very wrong? Hoping it's the latter. Hopefully I'm just being very dumb and missing something obvious. Hopefully anything I just said made any sense, but feel free to ask for as much clarification as needed. Deeply appreciate any help.

    So there's a number of different incorrect behaviors going on here.

    1) This isn't an incorrect behavior, but In the settings for the plugin there is an option for 'Light events required", flip that to false if you haven't. Pretty sure you have based off of the map lights working without an event light.

    2) The tint you are getting in the map when you make a mapnote with 'battletint' isn't actually a battletint. It's just incorrectly parsing the 'tint' part of the command and applying it to the map. Battles just inherit map tints as long as the 'Battle tint' option is enabled in the settings.

    Most commands aren't actually supported in map notes. Only a 'DayNight [speed]', TileLight, RegionFire, RegionGlow, RegionBlock, defaultbrightness, 'tint set', and 'tint daylight' are supported via map notes. It's not clearest in the documentation but there's a section named 'Maps' that shows the commands.

    3) The reason that you don't see any battletint without a light source on the map is because there's an unconditional check for whether there's an object with a light attached on the map for battles. This is a bug. In your case, what you were seeing WITH a light source was just the inherited tint from the map, and without it, the bug causing that inherited tint to not appear.

    4) And now, for the main issue. The way the battletint command actually works in practice is that it is only applicable during battle. Basically, if the command is issued outside of battle, it is ignored. If in battle, on the other hand, the specified tint will be applied. So what you need to do to apply a tint is edit the troops section of combat and add a command to set the tint from there. Unfortunately, there's a drawback to this, the tint you specify only gets applied after hitting enter to start the first turn.

    I've been working on a number enhancements for the plugin (currently in the works). I'll see if I can spin up something today to fix the bug in (3) and something to specify the tint at the start of battle.
  15. snaphat said:
    So there's a number of different incorrect behaviors going on here.

    1) This isn't an incorrect behavior, but In the settings for the plugin there is an option for 'Light events required", flip that to false if you haven't. Pretty sure you have based off of the map lights working without an event light.

    2) The tint you are getting in the map when you make a mapnote with 'battletint' isn't actually a battletint. It's just incorrectly parsing the 'tint' part of the command and applying it to the map. Battles just inherit map tints as long as the 'Battle tint' option is enabled in the settings.

    Most commands aren't actually supported in map notes. Only a 'DayNight [speed]', TileLight, RegionFire, RegionGlow, RegionBlock, defaultbrightness, 'tint set', and 'tint daylight' are supported via map notes. It's not clearest in the documentation but there's a section named 'Maps' that shows the commands.

    3) The reason that you don't see any battletint without a light source on the map is because there's an unconditional check for whether there's an object with a light attached on the map for battles. This is a bug. In your case, what you were seeing WITH a light source was just the inherited tint from the map, and without it, the bug causing that inherited tint to not appear.

    4) And now, for the main issue. The way the battletint command actually works in practice is that it is only applicable during battle. Basically, if the command is issued outside of battle, it is ignored. If in battle, on the other hand, the specified tint will be applied. So what you need to do to apply a tint is edit the troops section of combat and add a command to set the tint from there. Unfortunately, there's a drawback to this, the tint you specify only gets applied after hitting enter to start the first turn.

    I've been working on a number enhancements for the plugin (currently in the works). I'll see if I can spin up something today to fix the bug in (3) and something to specify the tint at the start of battle.
    Can't thank you enough. I'm completely new to not only RPG Maker, but programming in general. Weirdly, "light events required" was set to false, but when I turned it on and off again, it seemed to work. At least that's the situation as far as I can tell. Good luck with the enhancements!
  16. SageDerby said:
    Can't thank you enough. I'm completely new to not only RPG Maker, but programming in general. Weirdly, "light events required" was set to false, but when I turned it on and off again, it seemed to work. At least that's the situation as far as I can tell. Good luck with the enhancements!
    No problem. Here are the fixes for the above issues + support for setting battle tint prior to the first turn:
    Tintbattle by snaphat · Pull Request #83 · ImaginaryVillain/community_lights
    Basically with that you can add a '<cl: tintbattle #ff00ff>' tag as the first comment of a battle event (under troops) for the specific troop and that troop will always have the given tint at the start of battle
  17. I know this has been asked multiple times before (I searched them), but I have an issue with the overlay cutting off on the side of the screen. I changed the screensize x/y in the parameters, but it doesn't seem to affect it. I even tried going to very small and very large numbers, and the cutoff still doesn't move. Any ideas on this? 1664402680768.png
    1664402760050.png
  18. GamerDraux said:
    I know this has been asked multiple times before (I searched them), but I have an issue with the overlay cutting off on the side of the screen. I changed the screensize x/y in the parameters, but it doesn't seem to affect it. I even tried going to very small and very large numbers, and the cutoff still doesn't move. Any ideas on this?View attachment 241547
    View attachment 241548
    What does the following show when pasted into the DevTools console (F8 or F12)?
    [SceneManager._scene._spriteset._lightmask._maskBitmaps.multiply._canvas.width, Community.Lighting.parameters["Lightmask Padding"], Community.Lighting.parameters["Screensize X"]]
  19. Hi all,

    I've added support for light transitions in CL. These can be used to make cycling lights of any kind or command driven lighting. I updated the demos with a couple of examples using the light transitions.

    summary of features
    - the following properties are now all dynamically changeable over time (fade): color, radius, x, y, beam width, beam height, brightness, flashlight angle.
    - new syntax for light cycling to support all of the above properties
    - new 'light cond' command for dynamically changing all of the above properties
    - new 'light wait' command to wait for light transitions to finish before continuing an event script
    - new 'daynight on|off' command with fade support
    - extended support for fading with 'daynight hour, add, subtract, hoursinday'
    - ~10 bug fixes

    See the PR here with a link to a demo video using some of the transition features:
    Cycle and Conditional light Transitions by snaphat · Pull Request #89 · ImaginaryVillain/community_lights
  20. Checked out the demo.. noticed that the lighting effect disappears if my character is standing 10-12 blocks away from it. Is there a way to increase this draw distance?