MV - Community Lighting MV & MZ

● ARCHIVED · READ-ONLY
Started by ImaginaryVillain 1279 posts Page 8 of 64 View original ↗
  1. DarkSearinox92 said:
    I will test it!
    I've another question. Now, the script, works better and it's more anti-lag friendly?
    Lights beyond the screen will always working, or they are more intelligent and they popup only if they are near the edges of the screen?
    Because with Terrax all lights are always ruinning, they said.

    And i think that is crazy that lights run even if they are out of the screen...
    Yeah, it's less laggy than the original, although I'm not sure about offscreen lights. I haven't touched that part, so unless one of the other contributors worked on it, assume it still does.
  2. Mh, i understand... i have not lag on my pc but if i think to play it with a computer not strong or a phone, lag will have fun.

    I think that the best thing is to work on that function and, in general, make it softer and increase performance without lose quality.
  3. Oh, it leaves the lights on. Though the script does have a way to turn lights off based on a number you assign to each. Personally I just spawn the lights in when the player is close to them and despawn them when they're too far away. So I didn't bother to fix that.

    Honestly the current script is super far away from what it was when I last looked at it. Then again 1.16 was the last version I truly did a lot of work on. Ever since then I've just been cutting pieces out of a variant of it... I literally only ever use Tint and the Light note tag. I suspect I can get the script down to sub 500 lines that do just that.... it's only 760 lines at the moment. And it's sooooooooooo fast. :LZSwink:

    At some point when I get some time to familiar myself with the changes people have made, I can take a look at making it more efficient. It's probably possible to add a distance calculation to the lightmask to auto turn off lights that are too far away.
  4. ImaginaryVillain said:
    Oh, it leaves the lights on. Though the script does have a way to turn lights off based on a number you assign to each. Personally I just spawn the lights in when the player is close to them and despawn them when they're too far away. So I didn't bother to fix that.

    Honestly the current script is super far away from what it was when I last looked at it. Then again 1.16 was the last version I truly did a lot of work on. Ever since then I've just been cutting pieces out of a variant of it... I literally only ever use Tint and the Light note tag. I suspect I can get the script down to sub 500 lines that do just that.... it's only 760 lines at the moment. And it's sooooooooooo fast. :LZSwink:

    At some point when I get some time to familiar myself with the changes people have made, I can take a look at making it more efficient. It's probably possible to add a distance calculation to the lightmask to auto turn off lights that are too far away.

    I know that there is that kind of way for Light on 1 / Light off 1, but it's a lot of work todo, every time, in every map... I think that a build-in function that do this automatically is the best of the best.

    I read that now it's a lot more softer than the original, that's why i wrote that i've not tested it yet. But i remember that this kind of light process, take "a lot" of cpu and if you use it on a phone, maybe it's very hard have lot of lights on the same map, all turned on without any intelligent function that automatically turns them off if you are very far from them.

    My words are only just an advice to improve the script more and more :) Just like i said, you've done an amazing work and i love this kind of collaborations.
  5. Let me just say that this is super tedious. Just finished adding ALL of the plugin commands in the comment metadata and I'll tie them into the code (the easy part, thankfully) tomorrow.

    In the meantime, just look at how much easier this is to understand. TileLight, TileFire, RegionFire, RegionBlock, and all of those are all consolidated into one command with easy-to-change parameters. This should make using the thing a lot less cryptic.

    f9hUHsO.png

    ...Just looking at it makes me realize the two player light commands should also be consolidated.
    ImaginaryVillain said:
    At some point when I get some time to familiar myself with the changes people have made, I can take a look at making it more efficient. It's probably possible to add a distance calculation to the lightmask to auto turn off lights that are too far away.
    I can take a look at that tomorrow too. Unless you beat me to it. :)
  6. Reminds me of a my personal text plugin.... almost 300 lines of parameters so it could have ALL the PIXI text options and build fonts within it. The new plugin system is almost identical at least in that part of it. The other half creating the actual command is new. But yeah the MZ stuff is all you, I don't own a copy.

    Also I'll add this update to whatever you add later. But for those who want to test it, this MV update should cause a sizable speed increase. It doesn't include the whole distance calculation idea yet though. I'll look into that later.
  7. Yay! As much as I appreciate the possible MZ port on the horizon, by all means keep the MV updates coming as I don't intend to fully migrate any time soon. All perfomance improvements are highly welcome.

    Thank you for your efforts!
  8. I don't know why I told myself this would be the "easy" part. I guess I forgot what code i was working with. ;)

    Anyway, I found a completely undocumented feature: You can specify the speed of the player light radius change when using radiusgrow. Neat. I wonder what other buried treasures I'll find as I really dig into this stuff.
  9. It really is the "Oak Island" of plugins.
  10. Aesica said:
    I don't know why I told myself this would be the "easy" part. I guess I forgot what code i was working with. ;)

    Anyway, I found a completely undocumented feature: You can specify the speed of the player light radius change when using radiusgrow. Neat. I wonder what other buried treasures I'll find as I really dig into this stuff.

    AHAHAHAHA, Amazing Terrax! Who knows where it ended up... I just hope he's fine!
  11. So doing this and trying out each thing has also made me realize just how much of this plugin is barely working or broken entirely. This is going to take longer than I thought, and I'm done for tonight.

    Also, were the battle tint plugin commands ever actually implemented, or did somebody accidentally revert them? I can't seem to find anything that actually invokes them, yet I can see merit in their existence.

    Edit: Checklist time!
    Things that are verified to work:
    • Master plugin on/off switch
    • SetFire (the flicker adjustment thing)
    • Set Tint (map only) including fades and daylight
    • Region and Terrain Tag lighting (although shapes either don't work or I'm doing it wrong. did they ever work?)
    • Player light radius/color adjustment
    Things that probably work, but haven't been verified:
    • Player fleshlight (the "it doesn't work if player light is radius 0" bug is fixed too!)
    • Set/add time (added a way to subtract as well as add
    • Set total hours in day
    • Set hour color
    • Set time speed
    Things that probably or definitely don't:
    • Light colors by ID. I have half a mind to make this key off event id + map id, not whatever the it uses now.
    • Reset light switches. Dunno, maybe it does?
    • Battle tint mainpulation via plugin commands. Battles still tint normally though
    • effect_on_event and effect_on_xy: These are part of the bizzare ABS thing that got removed. Somehow, they're still there. The idea of placing an effect on an XY coord is intriguing and I might make it an actual thing. No promises though, and otherwise these are gone completely.
  12. Huh... And here I just thought you tested it all for the demo. Honestly I could have easily broken them during the first pass when I removed all that extra support for weird plugins. Entirely possible, half the options I didn't even know existed.

    Which I think kind of illuminates a problem with this plugin. Up until now people haven't really mentioned anything not working. Which means they're not even using the stuff that was broken. Kind of seems like it's not really necessary to keep it.

    Aesica said:
    • Player fleshlight (the "it doesn't work if player light is radius 0" bug is fixed too!)

    The function we never knew it had? :LZSwink:
  13. ImaginaryVillain said:
    Huh... And here I just thought you tested it all for the demo. Honestly I could have easily broken them during the first pass when I removed all that extra support for weird plugins. Entirely possible, half the options I didn't even know existed.

    Which I think kind of illuminates a problem with this plugin. Up until now people haven't really mentioned anything not working. Which means they're not even using the stuff that was broken. Kind of seems like it's not really necessary to keep it.



    The function we never knew it had? :LZSwink:
    Ha! I think a few use the flashlight (oh god, I typed fleshlight! screw it, gonna leave that typo in) mostly for horror games, but yeah some of the other things are...less useful. I think (working) plugin commands to switch lights on and off by map/event id, rather than by juggling a kill switch or using the wtf-non-intuitive id system currently (barely) in place would actually be pretty useful. I only settled on killswitches for my project because they're what worked at the time.

    I think in a lot of cases, people won't bring up bugs unless specifically asked to report problems or unless they really want that feature and have no other choices. In most cases, I think they just let the bug pass and find another approach.
  14. Huh, usually I find people with a problem are the first to complain. It's the people who don't have problems that tend to never voice their appreciation.

    I do think the ability to turn a particular light on/off based on event ID would make a lot of sense. The current ID system is well, weird. Not so sure they need to do it by map ID plus event ID though, after all who cares about a light on another map?

    Since I have a system in place in my game that adds/removes events based on proximity to the player, I'll likely add something similar to that to this plugin. Though it will only disable/enable lights that are just too far for the player to see. I haven't added it to the plugins so far since my version for my game is all encompassing, so it serves no purpose for me.

    I'll look into that whenever you're done messing with it. Currently I'm working on the "Ultra Mini" version. It's now under 600 lines. And it runs 60FPS at 1920x1080. :LZSexcite:
  15. ImaginaryVillain said:
    I do think the ability to turn a particular light on/off based on event ID would make a lot of sense. The current ID system is well, weird. Not so sure they need to do it by map ID plus event ID though, after all who cares about a light on another map?
    It'd mainly be because that's the easiest way to store the light IDs (taking a page out of the self switch playbook, as they're stored like {"map,evt,type": true}. Per-event light states would be similar: {"map,evt": true}.

    I suppose it's reasonable though to allow the user to omit the map id if desired and have it default to the current map.
  16. Mostly it just seems like we could use $gameMap.mapId(); as the map in question, and never bother to let the user mess with it. To me it just seems really unlikely/unusual that someone is going to want to turn a map off on a different map. But as is always the case, I'll leave it to whoever builds it to decide how they want it done. :LZSwink:

    And now for the Ultra Mini Community Lighting variant. This little variant is built for speed, it comes in at a scrappy 596 lines of code. And really just supports 3 things... On/Off, Tint and Light event note tags. So what's the trade off for less options? It's insanely faster than the main script. Like 60fps at 1920x1080 fast (that's my game's resolution which I test at), I also get as many as 80 lights on a map..... On top of the gross amount of particles I use. So chances are it should work "probably okay" for the rest of you. :LZSwink:

    The script uses no plugin commands, as a result the second version is 100% compatible with MZ. The script also defaults off so you will need to execute the umc.Lighting.on(true) script to turn it on (it's in the help file).

    The first is the MV version, the second is the MZ version. Let me know how it goes. :LZSexcite:
  17. ImaginaryVillain said:
    Mostly it just seems like we could use $gameMap.mapId(); as the map in question, and never bother to let the user mess with it. To me it just seems really unlikely/unusual that someone is going to want to turn a map off on a different map. But as is always the case, I'll leave it to whoever builds it to decide how they want it done. :LZSwink:

    And now for the Ultra Mini Community Lighting variant. This little variant is built for speed, it comes in at a scrappy 596 lines of code. And really just supports 3 things... On/Off, Tint and Light event note tags. So what's the trade off for less options? It's insanely faster than the main script. Like 60fps at 1920x1080 fast (that's my game's resolution which I test at), I also get as many as 80 lights on a map..... On top of the gross amount of particles I use. So chances are it should work "probably okay" for the rest of you. :LZSwink:

    The script uses no plugin commands, as a result the second version is 100% compatible with MZ. The script also defaults off so you will need to execute the umc.Lighting.on(true) script to turn it on (it's in the help file).

    The first is the MV version, the second is the MZ version. Let me know how it goes. :LZSexcite:

    amazing, if someone need a very very tiny plugin! :) I need other things so i will remain on the big one <_>
  18. Aesica said:
    So doing this and trying out each thing has also made me realize just how much of this plugin is barely working or broken entirely. This is going to take longer than I thought, and I'm done for tonight.

    Also, were the battle tint plugin commands ever actually implemented, or did somebody accidentally revert them? I can't seem to find anything that actually invokes them, yet I can see merit in their existence.

    Edit: Checklist time!
    Things that are verified to work:
    • Master plugin on/off switch
    • SetFire (the flicker adjustment thing)
    • Set Tint (map only) including fades and daylight
    • Region and Terrain Tag lighting (although shapes either don't work or I'm doing it wrong. did they ever work?)
    • Player light radius/color adjustment
    Things that probably work, but haven't been verified:
    • Player fleshlight (the "it doesn't work if player light is radius 0" bug is fixed too!)
    • Set/add time (added a way to subtract as well as add
    • Set total hours in day
    • Set hour color
    • Set time speed
    Things that probably or definitely don't:
    • Light colors by ID. I have half a mind to make this key off event id + map id, not whatever the **** it uses now.
    • Reset light switches. Dunno, maybe it does?
    • Battle tint mainpulation via plugin commands. Battles still tint normally though
    • effect_on_event and effect_on_xy: These are part of the bizzare ABS thing that got removed. Somehow, they're still there. The idea of placing an effect on an XY coord is intriguing and I might make it an actual thing. No promises though, and otherwise these are gone completely.

    Just to be sure we are speaking about the same things, this checklist is about the 1.026 MV version, or its MZ counterpart?

    Aesica said:
    It'd mainly be because that's the easiest way to store the light IDs (taking a page out of the self switch playbook, as they're stored like {"map,evt,type": true}. Per-event light states would be similar: {"map,evt": true}.

    I suppose it's reasonable though to allow the user to omit the map id if desired and have it default to the current map.

    Why not, more useful features is rarely a bad thing.
    I personally have a big preference for the current id system who is more flexible and isn't affected by events' ids changes, although I will easily admit there is room for improvements, notably about how light ids are named inside the notetags (name your id d1, and it will be interpreted as a light direction for example), but I didn't found yet a way to do it without messing up with already existing notetags.

    ImaginaryVillain said:
    Mostly it just seems like we could use $gameMap.mapId(); as the map in question, and never bother to let the user mess with it. To me it just seems really unlikely/unusual that someone is going to want to turn a map off on a different map. But as is always the case, I'll leave it to whoever builds it to decide how they want it done. :LZSwink:

    And now for the Ultra Mini Community Lighting variant. This little variant is built for speed, it comes in at a scrappy 596 lines of code. And really just supports 3 things... On/Off, Tint and Light event note tags. So what's the trade off for less options? It's insanely faster than the main script. Like 60fps at 1920x1080 fast (that's my game's resolution which I test at), I also get as many as 80 lights on a map..... On top of the gross amount of particles I use. So chances are it should work "probably okay" for the rest of you. :LZSwink:

    The script uses no plugin commands, as a result the second version is 100% compatible with MZ. The script also defaults off so you will need to execute the umc.Lighting.on(true) script to turn it on (it's in the help file).

    The first is the MV version, the second is the MZ version. Let me know how it goes. :LZSexcite:

    Nice initiative, I like how clean the code is compared with the original.
  19. Alexandre said:
    Just to be sure we are speaking about the same things, this checklist is about the 1.026 MV version, or its MZ counterpart?
    I'm talking about the MZ version, which is built off v 1.026. @ImaginaryVillain posted the version I've been adapting the plugin commands for. Given how different the plugin command system in MZ is (args = ["hello", "world"] vs args = {"name":"hello", "someOtherParam":"world"}) they were all 100% not working when I started on it. All of the note tag based stuff, however, seems fine.
    Alexandre said:
    Why not, more useful features is rarely a bad thing.
    I personally have a big preference for the current id system who is more flexible and isn't affected by events' ids changes, although I will easily admit there is room for improvements, notably about how light ids are named inside the notetags (name your id d1, and it will be interpreted as a light direction for example), but I didn't found yet a way to do it without messing up with already existing notetags.
    Oh wait, so the current ID system actually does work? I've never gotten it to, so chances are I was doing it wrong. If it does work, then yeah there's no reason for me to change it into what I was going to. As for naming the ID something like D1 and having it cause problems, thankfully that's absolutely impossible in MZ's system. If I can get the ID system to work, you'll be able to name it whatever you want. D2, B15, on, whatever. :)
  20. Glad to see the ID system works, it will be interesting to see how the changes I made for 1.26 pan out. As it was stated it's a "ghetto fix". I didn't extensively test it. Then again I don't think a lot of updates get extensively tested given how much the plugin can do.

    @Alexandre Thanks, I've been beating up the code since 1.17 to get that. Also, no anonymous function... It's a thing of beauty! :LZSexcite: