MV - Community Lighting MV & MZ

● ARCHIVED · READ-ONLY
Started by ImaginaryVillain 1279 posts Page 10 of 64 View original ↗
  1. It took time, but I got it.
    Here is why the battle tinting bitmap wasn't updating:

    Capture.PNG

    Between MV and MZ there was a little change about how Bitmap is implemented:

    MVMZ.PNG

    Since the updating part of FillRect wasn't present in the MZ version, the battle tint remained the same.
    I guess it may be a hint of interest for the cycle color bug.

    In any case, overwriting Bitmap.FillRect seems a total overkill for just an offset.
    I would want your advice about using the official making the shift manually in each call.

    Also commenting all the this._setDirty of the MZ code may have other undiscovered consequences.

    EDIT: I made a pull request with the fix.
  2. Hello! I tried using the plugin for MZ, and it works wonders! <3 Thanks so much for this! :) The only problem I have is that the plugin command to activate/deactivate light from an event ID is not working. >.<

    As you can see here:
    ZPxoASu.png
    I set a plugin command in a light switch event that should de-activate the light from ID 5.

    And as you see here:
    hxUzM60.png
    I have the light event its note-tag as well as the ID 5, and if that's not enough, the event ID itself is even 5... x(

    Unfortunately, the light still won't deactivate despite the plugin command to disable that light from the ID. :( X(

    Thanks so much for any help! :D
  3. Normally a conditional light is disable by default,
    so you shouldn't see any light coming from this
    event unless you use the plugin command to light it on.

    That's definitively weird, I will take a look at it this evening.
  4. Yes it is indeed weird. >.< Though tbh, I actually did not on the light via plugin command, as all I did to achieve the dark lighting was do the <CL: Daynight> note tag to have it. :o And when I do the <CL: Daynight> note tag, it immediately turns on every even on the map that has a lighting set on. So I wonder if I did something wrong in that regard as well. x( Thanks so much!

    EDIT:

    I tried doing this: Use the plugin command to turn a light ID on, so I can turn it off again via the same plugin command... It still didn't work and the light remained on. >.<

    Or maybe I'm just stupid and there's a difference between <CL: Daynight> and <Daynight> and stuff like that I have missed? :o (but yeah, CL lights are always on by default.)
  5. I got it, while parsing the light ID, the first character of it is dropped in the code.
    So "l15" becomes "15", and in your case "5" becomes an empty string,
    which translates into no conditional light.

    From my point of view, what is put in the notetag and what is put in the plugin command
    should be the same, otherwise it is quite confusing.

    @Aesica , is it what you wanted to implement or is it an error?

    FirstLetter.PNG
  6. Ohh! So you mean I should've put "l5" instead of "5" on both the note-tags on the events and the plugin command? :o so I can also do "05" or "04" right? Since it drops the first digit.
  7. Starmage said:
    Ohh! So you mean I should've put "l5" instead of "5" on both the note-tags on the events and the plugin command? :o so I can also do "05" or "04" right? Since it drops the first digit.

    Only the notetag will be missing its first letter, not the plugin command.
    So in your case, it will be "05" for the notetag and "5" for the command.

    As I said, it is quite confusing, for me switching back to "5" and "5" would make way more sense.
    As such it is likely to change soon.
  8. Ahh alright! I tried just that, 05 on the note-tag and 5 on the plugin command, and everything works as intended! :D Thanks so much! ^_^ <3
  9. Alexandre said:
    I got it, while parsing the light ID, the first character of it is dropped in the code.
    So "l15" becomes "15", and in your case "5" becomes an empty string,
    which translates into no conditional light.

    From my point of view, what is put in the notetag and what is put in the plugin command
    should be the same, otherwise it is quite confusing.

    @Aesica , is it what you wanted to implement or is it an error?

    View attachment 159299
    Oops, I guess I was getting a bit tired or something. The first letter should only be getting dropped if its the letter i, but it looks like I don't even have a check for the letter i in there at all. It's probably best to just drop the substr shenanigans and have it set the id exactly as is.

    I was hoping to make things less confusing with the prefixes, but I guess in that case, it only made things more confusing. Oops! I'll fix that in a bit. :D

    Edit: Pull request with fixes has been sent. Stand by!
  10. How does one use brightness with this? I tried something like

    <CL: Light 150 #A4C9E4 B25>
    But it didn't work. Is it the order or do I need to go higher instead of lower?
  11. MerlinCross said:
    How does one use brightness with this? I tried something like

    <CL: Light 150 #A4C9E4 B25>
    But it didn't work. Is it the order or do I need to go higher instead of lower?
    No you've got it right, although note that brightness is a lot more visible when applied to weaker lighting (lower #rrggbb value) than stronger lighting.
  12. I'll have to do some testing then. One other thing while I'm here, trying to get the Flash Light to work on the player character. How do I set that up? On an event they interact with, just an event somewhere off to the side? I was going to search the topic but if someone can answer me faster than my own reading skills that'd be helpful(and sorry for the 2 questions in a row)
  13. There's a plugin command to turn the player flashlight on and off. You're using MZ right?
  14. Aesica said:
    There's a plugin command to turn the player flashlight on and off. You're using MZ right?

    MZ yes. Oh right, it's under Script command. I assume I would put the command in there then.
  15. Sorry if this seems fairly obvious to the people using this/working on it, but how would one go about using this to make a room/dungeon extremely dark, then have specific light sources throughout that illuminate it? I can figure how to do the localized lighting in my head, but I don't even know where to start on having map-wide base lighting/darkness.
  16. When I want to set the overall map brightness, I use a self-terminating parallel process event that sets the room tint (use the plugin command, not RM's built in tinting) then you just have to arrange light source events/regions/whatever you want to use wherever you want the light sources to be.
  17. Using MZ, the 'Set Tint' plugin command doesn't seem to be doing anything at all. I set up a parallel process with 'Set Tint' (color 000000, fade 0 for instant result as a test) and then an 'erase event' process, nothing. I even tried setting it up in the auto-run upon entering the room as the first thing that happens, nada.

    I've even set it up as an 'action button' with text popup. Text works, no change in tint. I've taken a screenshot, maybe you can see what I've done wrong here: screenshot
  18. Thats probably because you don't have any light sources in the map yet.
    The lighting script is only "active" when you have a light source somewhere on the map

    Try creating a new event and put
    <CL: Light 0 #ffffff>
    in its notebox
  19. Just to note, even if that light source self-destructs, it still counts towards having a light source on the map. This means your autorunning, self erasing set tint event is the perfect place to put an empty light tag like the one mentioned above.
  20. That did the trick, thank you. It'd be real helpful if more of this stuff was properly documented, but at least I have an idea.

    All I need now is to figure out how to shut off/turn on a light source on touch event and I'll be golden. Currently, this does nothing at all except play the text. This function is very important for me as conditional lights are a must. I have the most recent version on GitHub, though it appears the pull request with fixes has yet to be approved as Aesica's fix is only a day old and GitHub for MZ is 3 days old. Hopefully it comes through soon as my problem may already be solved.

    Edit: Quick question: I'm noticing now that I have an empty invis light event on the map that it's defaulting to tinting everything black (max darkness). Is this normal? Not a complaint, just curious if this is the reason everything is black without a Set Tint command.