MV - Community Lighting MV & MZ

● ARCHIVED · READ-ONLY
Started by ImaginaryVillain 1279 posts Page 64 of 64 View original ↗
  1. Hello, got a couple of questions, and if someone could be bothered to answer them It would be appreciated.

    This plugin pretty much does everything I wanted, so for that, thank you, so on to my questions: Is it possible to link the day night cycle of this plugin to the cycle showcased here by lvl up design?
    [embedded media]

    And if so, how? Yes I am a beginner at rpg maker, so please explain step by step.
  2. Hello everyone, hope you guys are okey.

    There is a behaviour I am trying to do with the plugin, and would appreciate your help.

    TL;DR: invert the day-night vision radius, allowing to see fully at night and limited during the day.

    I want to change the sight reduction to appear during the day hours, and during the night have full vision of the map. Also, during the day, change the color from black to white, to simulate a fog.

    I have been trying to make this behaviour work with just the plugin commands and it's variables, but it has been unsuccessfull.

    From my understanding, it seems I'll need to change the plugin itself, modifying things like:
    1. Community_tint_target
    2. _maskBitmap
    3. this._maskBitmap.radialgradientFillRect
    Thanks for the help in advance!

    1752702546146.png
  3. GoDie910 said:
    Hello everyone, hope you guys are okey.

    There is a behaviour I am trying to do with the plugin, and would appreciate your help.

    TL;DR: invert the day-night vision radius, allowing to see fully at night and limited during the day.

    I want to change the sight reduction to appear during the day hours, and during the night have full vision of the map. Also, during the day, change the color from black to white, to simulate a fog.

    I have been trying to make this behaviour work with just the plugin commands and it's variables, but it has been unsuccessfull.

    From my understanding, it seems I'll need to change the plugin itself, modifying things like:
    1. Community_tint_target
    2. _maskBitmap
    3. this._maskBitmap.radialgradientFillRect
    Thanks for the help in advance!

    View attachment 345234
    Why not just edit the daynight colors in the plugin parameters?
  4. Hello, is there any way to change the light offset? My game is zoomed 2x by using SynRec Tilezoom. offset.jpg
  5. Thanks for the plugin. What I'd like to do is if you enter the map before earning a "torch", the map is pitch black. Once you obtain the torch, you enter the cave and use the torch, which turns on the light. I'd also like this to require magic points. If that's not needy enough, I'd love it if each use only lasted for "x" number of steps or time. Is this possible and if so, how difficult? Could anyone get me started? Thanks in advance.
  6. bretcollins74 said:
    Thanks for the plugin. What I'd like to do is if you enter the map before earning a "torch", the map is pitch black. Once you obtain the torch, you enter the cave and use the torch, which turns on the light. I'd also like this to require magic points. If that's not needy enough, I'd love it if each use only lasted for "x" number of steps or time. Is this possible and if so, how difficult? Could anyone get me started? Thanks in advance.
    there is a demo if you haven't check it out.

    it is possible to start a pitch black map, and when you turn on a torch,
    it lights up around the player.

    if you want the entire map to be pitch black, you can make a condition
    of a switch or player has item if you want it automatically.
  7. Thank you! The lightless tower is awesome. I have the story and the plot for game, I've had the concept for years but never did anything with it. Now I'm jumping in and it is going to take me some time but I love the community support!
  8. Yeah, community lighting does a ton if you are willing to do the work. If you need to change the flashlight settings I have a post like 10 pages back about where the typo in the codebase is and how to fix it.
  9. Hello again, got another question.

    Is it possible to change the "Default Tint" Value midgame or something like that?

    I wanted to make something like a Snowstorm where you can see a little bit around you and in front of you with the flashlight but everything else is just about completely white. Thing is, setting the tint to completely white aka. #FFFFFF just makes it... well bright,default tint as its intended to work.

    I do understand that a similiar effect could be reached with using pictures and semi transparency, though you would notice that there isn't real light coming off the actor.

    Is there any way for this to work? :p
  10. Hi, I'm testing the plugin and want to create an event for a lamp to turn on and off.
    I've created two pages for that event. The first one has the light on, and the second has a switch called "Night Time" activated. But when I test it, the light effect stays on because the notes are on. Is there a way to remove those notes?

    hola estoy probando el plugin, y quiero hacer un evento de una lampara se encienda y se apague.
    he hecho dos paginas en ese evento, la primera esta la luz encendida y en la segunda, esta activado un interruptor llamado: noche tiempo. pero al probarlo el efecto de luz se queda porque esta lo de la notas puestas. ¿hay alguna manera de quitar esas notas?
  11. darco said:
    Hi, I'm testing the plugin and want to create an event for a lamp to turn on and off.
    I've created two pages for that event. The first one has the light on, and the second has a switch called "Night Time" activated. But when I test it, the light effect stays on because the notes are on. Is there a way to remove those notes?

    hola estoy probando el plugin, y quiero hacer un evento de una lampara se encienda y se apague.
    he hecho dos paginas en ese evento, la primera esta la luz encendida y en la segunda, esta activado un interruptor llamado: noche tiempo. pero al probarlo el efecto de luz se queda porque esta lo de la notas puestas. ¿hay alguna manera de quitar esas notas?
    Use this in the Notetag for the Event:

    <cl: fire 180 #FEE978 300>
    CL is my unique tag I made in the Plugins Options

    Page 1 of the Event:
    Page 1.png

    Page 2 of Event:
    Page 2.png

    It works for me
  12. Hi there -- is this a good place to post about potential incompatibilities?

    I've got a REALLY odd one. I've been toying with incorporating the UFC Tower Defense plugin mechanism into my game, and for whatever reason, it appears to conflict with Community Lightning (even if no lights are being used on the map in question). Whenever I go to set a tower down, I get the following TypeError: "events.event is not a function"

    Through process of elimination, I traced this function down to Community lightning, where it appears in the following section:

    Code:
        //**********************fill up new map-array *************************
        eventObjId = [];
        event_id = [];
        events = $gameMap.events(); // cache because events() API calls filter for each call
        event_stacknumber = [];
        event_eventcount = events.length;
    
        if (GameLoaded) $$.ReconstructTypes($gameVariables, true); // on game loaded, we need to reconstruct the stored types
    
        for (let i = 0; i < event_eventcount; i++) {
          if (events[i]) {
            if (events[i].event() && !events[i]._erased) {
              let note = events[i].getCLTag();
    
              let note_args = note.split(" ");
              let note_command = LightType[note_args.shift().toLowerCase()];
              if (note_command) {
                eventObjId.push(i);
                event_id.push(events[i]._eventId);
                event_stacknumber.push(i);
    
              }
            }
    
            // on game loaded, restore light event data
            if (GameLoaded && $gameVariables._cl && $gameVariables._cl[events[i]._eventId]) {
              events[i]._cl = $gameVariables._cl[events[i]._eventId];
            }
          }
        }
        
        // Mark game as not loaded
        GameLoaded = false;


    Any idea how I might remedy these two? UFC Tower Defense is here
  13. orgint said:
    Hi there -- is this a good place to post about potential incompatibilities?

    I've got a REALLY odd one. I've been toying with incorporating the UFC Tower Defense plugin mechanism into my game, and for whatever reason, it appears to conflict with Community Lightning (even if no lights are being used on the map in question). Whenever I go to set a tower down, I get the following TypeError: "events.event is not a function"

    Through process of elimination, I traced this function down to Community lightning, where it appears in the following section:

    Code:
        //**********************fill up new map-array *************************
        eventObjId = [];
        event_id = [];
        events = $gameMap.events(); // cache because events() API calls filter for each call
        event_stacknumber = [];
        event_eventcount = events.length;
    
        if (GameLoaded) $$.ReconstructTypes($gameVariables, true); // on game loaded, we need to reconstruct the stored types
    
        for (let i = 0; i < event_eventcount; i++) {
          if (events[i]) {
            if (events[i].event() && !events[i]._erased) {
              let note = events[i].getCLTag();
    
              let note_args = note.split(" ");
              let note_command = LightType[note_args.shift().toLowerCase()];
              if (note_command) {
                eventObjId.push(i);
                event_id.push(events[i]._eventId);
                event_stacknumber.push(i);
    
              }
            }
    
            // on game loaded, restore light event data
            if (GameLoaded && $gameVariables._cl && $gameVariables._cl[events[i]._eventId]) {
              events[i]._cl = $gameVariables._cl[events[i]._eventId];
            }
          }
        }
       
        // Mark game as not loaded
        GameLoaded = false;


    Any idea how I might remedy these two? UFC Tower Defense is here
    Just a quick question.... Does the error occur when you try to load a previous save? Or when you start a new game?
  14. i am sorry for the question, but how do I turn off the default lighting around character?
  15. yyukina said:
    i am sorry for the question, but how do I turn off the default lighting around character?
    Make the default number for the player a 0
  16. Hi there!

    Not sure if this is still being updated, but, manage to do a compatibility with my EliMZ_DiagonalCharacters to make the flashlight works on diagonal directions, as long the character has a diagonal sprite.

    Changes done on this version > CommunityLighting version 4.6

    Need to be done four changes on the code:

    1 - Lightmask.prototype._updateMask - Line 1749
    Change this
    let pd = $gamePlayer._direction
    to
    let pd = $gamePlayer.diagDir || $gamePlayer._direction;

    2 - Lightmask.prototype._updateMask - Line 1928
    Change this
    ldir = $gameMap.events()[event_stacknumber[i]]._direction;
    to
    ldir = $gameMap.events()[event_stacknumber[i]].diagDir || $gameMap.events()[event_stacknumber[i]]._direction;

    3 - On Bitmap.prototype.radialgradientFillRect2 - Line 2842
    Changed the switch statement to include diagonal directions. Basically, change this
    JavaScript:
    switch (direction) {
        case 6:
            x1 = x1 + cone * 6;
            break;
        case 4:
            x1 = x1 - cone * 6;
            break;
        case 2:
            y1 = y1 + cone * 6;
            break;
        case 8:
            y1 = y1 - cone * 6;
            break;
    }
    To
    JavaScript:
    switch (direction) {
        case 1:
            x1 = x1 - cone * 6;
            y1 = y1 + cone * 6;
            break;
        case 3:
            x1 = x1 + cone * 6;
            y1 = y1 + cone * 6;
            break;
        case 7:
            x1 = x1 - cone * 6;
            y1 = y1 - cone * 6;
        case 9:
            x1 = x1 + cone * 6;
            y1 = y1 - cone * 6;
            break;
        case 6:
            x1 = x1 + cone * 6;
            break;
        case 4:
            x1 = x1 - cone * 6;
            break;
        case 2:
            y1 = y1 + cone * 6;
            break;
        case 8:
            y1 = y1 - cone * 6;
            break;
    }

    4 - on $$.ReloadMapEvents - Line 3136
    Change this
    event_dir.push($gameMap.events()[i]._direction);
    to
    event_dir.push($gameMap.events()[i].diagDir || $gameMap.events()[i]._direction);

    OBS_1: I'm flattered that my name is among the plugin authors. Honestly, I don't think I've made a significant enough contribution to warrant my name being there. Thank you for your kindness.

    OBS_2: Only tested with the flashlight static. Don't know if it will have any other issues.
  17. I recently tried upgrading my game to NW.js 0.94, and now I am getting massive lag on some maps with light (that previously worked ok). Anyone got experience using this addon with upgraded nw.js versions?
  18. Firstly, thank you for a wonderful plugin.

    I seem to have found a feature that you might not be aware of. The automatic shading of battles at night on maps that have the <cl: Daynight> notetag only works if if the "Light event required" parameter is set to true. (This is with MZ version v4.6.)

    This isn't a biggie; I can always put an unobtrusive light source on each map that doesn't already have one.

    To investigate this issue, I created a new project with the Community Light plugin as the only plugin, and also took a look at the Demo. I tried various things such as using sideview battles instead of front view, but the only thing that mattered was setting "Light event required" to true (with a light source on the map). Random encounters and battles called by event worked in the same way for each test.
  19. Can anyone help me get the light around the player to flicker? I want it to look as if the player is holding a lamp or lantern. There are no flashlights in my game as that's too modern. I can create events with the <cl: fire 180 code and that works.. but I can't seem to get the light around the PLAYER to act like fire.

    HELP! <3