Khas Advanced Lighting v4.2 Ultra (now with real-time shadows!)

Discussion in 'JS Plugin Releases (RMMV)' started by Khas, Apr 22, 2017.

    Tags:
  1. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    426
    Likes Received:
    185
    First Language:
    English
    Primarily Uses:
    RMMV
    @Kilitar That may work for random weather events, but I don't think it'd work quite as well for a scripted cutscene with a specific time everything is supposed to happen. The cutscene event shows animations on events that are not the cutscene event itself, one of which being the player. Besides this, I'm trying to be very cautious about where and when I use switches, in case I need switches for something else later in the game (since there is the hardcoded limit of 5,000 switches)
     
  2. Kilitar

    Kilitar Veteran Veteran

    Messages:
    141
    Likes Received:
    40
    First Language:
    czech
    Primarily Uses:
    RMMV
    In fact - I have cutscenes with animations and light as well. Specific time might be tricky - but I am synchronizing event using paralel event counting seconds/minutes/hours/days so it is well doable.

    About switch limit - You can increase event switches into virtually unlimited amount using Yanfly engine (plugin http://yanfly.moe/2016/08/06/yep-113-self-switches-variables-rpg-maker-mv/ ). Basic use requires no scripting knowledge and instead of standard "self switch" you can control them remotely directly using plugin command.
    I personally using them alot and it makes my work much easier (especially due remote control even between different maps)
     
  3. Sleepy Kitten Games

    Sleepy Kitten Games Veteran Veteran

    Messages:
    426
    Likes Received:
    185
    First Language:
    English
    Primarily Uses:
    RMMV
    @Kilitar I'm trying to avoid using parallel processing events as much as I can, since my computer isn't the strongest thing in the world, and I've heard several times that parallel processing events can really make a game laggy.
    And yes, I'm aware of that plugin, though at the moment I'm saving that for if/when I actually do run over the 5,000 switch limit.
     
  4. peq42_

    peq42_ Yeet Veteran

    Messages:
    456
    Likes Received:
    269
    Location:
    Brazil
    First Language:
    Portuguese(BR)
    Primarily Uses:
    RMMV
    I SOLVED IT! GADAMNYES! (Or at least... a quickFix)
    For those who want to creat something like a option like "Shadows On/Off"(in a Menu or something), there's a way to allow turning Light On/Off without blackscreen:

    Code:
    Scene_Map.prototype.onMapLoaded = function() {
        if (this._transfer) {
            $gameMap._interpreter.pluginCommand("Lighting", [ "ON" ]);
            $gamePlayer.performTransfer();
    
        }
        this.createDisplayObjects();
    };
    
    Scene_Map.prototype.start = function() {
        Scene_Base.prototype.start.call(this);
        SceneManager.clearStack();
        if (this._transfer) {
            this.fadeInForTransfer();
            this._mapNameWindow.open();
            $gameMap.autoplay();
        } else if (this.needsFadeIn()) {
            this.startFadeIn(this.fadeSpeed(), false);
        }
        this.menuCalling = false;
    if($gameVariables.value(VARIABLENUMBER) ===1) {
    
    }
    else{
     $gameMap._interpreter.pluginCommand("Lighting", [ "OFF" ]);
    }
    };
    
    
    Using thi]s, you can controll when light will be On or Off, using a variable(Just change "VARIABLENUMBER" by...well the ID number of the variable). When it's 1, shadow's are always on. When it's 2, shadows turn ON on map transfer and then OFF on map start,turning lights off without causing bugs on map transfer!


    God i've been trying to solve this problem so hard, and it was so easy to quick fix.

    Also, for those who have problems with diagonal movement, here's also my quick fix:
    (I wrote it 1 page before that, so i just want to double post that for those who didn't see)
     
    Kike likes this.
  5. lonewolph

    lonewolph Veteran Veteran

    Messages:
    191
    Likes Received:
    14
    First Language:
    English
    could you make this plugin work with orange overlay and parallax mapping?
     
  6. peq42_

    peq42_ Yeet Veteran

    Messages:
    456
    Likes Received:
    269
    Location:
    Brazil
    First Language:
    Portuguese(BR)
    Primarily Uses:
    RMMV
    Well i think that's tough, because those plugins will work with many layers of images. Maybe if someone code khas' plugin to apply light always over everything, it could work, but then the custom lights "colisions" may not(Most real time shadows in this plugin)

    Probably you should search a more simple light plugin, which let you do everything hand-made like Lighting and Time editor and that has light showing above everything else.
     
  7. lonewolph

    lonewolph Veteran Veteran

    Messages:
    191
    Likes Received:
    14
    First Language:
    English
    would like to have the shadow effect with parallax.
     
  8. Arise

    Arise Veteran Veteran

    Messages:
    131
    Likes Received:
    18
    Is it possible to have diagonal movement?
    There are multiple plugins that gives diagonal movement, but the Flashlight light goes only in 4 directions.

    Also the offsets are mentioned only for 4 original directions.
    Code:
    offset_x: {2: -12, 4: -72, 6: 72, 8: 16 }, // A Javascript object containing the x offset for each direction.
        offset_y: {2: 72, 4: 0, 6: 16, 8: -72 },   // A Javascript object containing the y offset for each direction.
        syncWithDirection: true                    // If you want the light's rotation to sync with the character's, use this as true.
    
     
  9. Espilonarge

    Espilonarge Veteran Veteran

    Messages:
    116
    Likes Received:
    49
    Location:
    Australia
    First Language:
    English
    Is there something that can be changed to make "smooth_light" transition a bit more slowly using decimal points values?

    The lowest value possible is 1 but in some cases it's still transitioning too fast (using 0.9 or less won't work because as I just stated, the plugin doesn't understand what a "decimal" value is). I was hoping to make calmer-transitioning lights, like crystals in a cave that change their glow gradually over time or lights in an abandoned building that have just regained power after turning a generator back on that are warming up (as in "separate" lights that have different values, not simply the ambientlight command being adjusted).
     
  10. cyrro

    cyrro Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    I've been trying to use this plugin but it keeps me giving error. Can someone help me please?
     

    Attached Files:

  11. Kneeshaw

    Kneeshaw Kneeshaw Developments Member

    Messages:
    19
    Likes Received:
    25
    First Language:
    French
    Primarily Uses:
    RMMV
    Anyone getting a black screen when using this plugin. After a battle sometime the screen goes black. if I turn the plugin off it doesn't go black.
     
  12. Lunesis

    Lunesis Veteran Veteran

    Messages:
    34
    Likes Received:
    6
    First Language:
    English
    I am getting the same error. Ambient lighting works fine but point lights crash the game.

    The demo of the plugin seems to work fine, but even when I copy and paste from there or start a brand new project with just the three plugins and try point lights it gives the error.
     
    Last edited: Apr 12, 2018
  13. cyrro

    cyrro Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    If you find out how to solve this problem please answer or contact me. Thank you in advance.
     
  14. Mesajia

    Mesajia Veteran Veteran

    Messages:
    80
    Likes Received:
    48
    First Language:
    German
    Primarily Uses:
    RMMV
    Hey guys,
    I have an odd issue and didn't saw it in this thread yet. So I guess it's better reporting it and getting some help...

    The ambient light intensity won't work for me. I copied [ambient_light 10] from the demo to tint my own cave darker, but nothing happens. If I try to use an colored light like [ambient_light 906090] it works great. Was there a change between 4.0 and 4.2, so that the intensity won't work anymore or could I have missed something?
     
  15. Tuomo L

    Tuomo L Oldbie Veteran

    Messages:
    2,291
    Likes Received:
    1,262
    Location:
    Finland!
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    The new Yep_options core causes crashes with KhasCore.
     
    JamesRyan likes this.
  16. Ally

    Ally Linked Rooms Games Founder - Fleshforward Member

    Messages:
    334
    Likes Received:
    153
    Location:
    Italy
    First Language:
    Italy
    Primarily Uses:
    RM2k
    This plugin not work with the picture?
    Because the images remain above the lights.
     
  17. JamesRyan

    JamesRyan Game Designer Veteran

    Messages:
    588
    Likes Received:
    186
    Location:
    Vietnam
    First Language:
    Vietnamese
    Primarily Uses:
    RMMV
    You sure? I'm about to install YEP Option Core and this makes me nervous...
     
  18. Tuomo L

    Tuomo L Oldbie Veteran

    Messages:
    2,291
    Likes Received:
    1,262
    Location:
    Finland!
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Positive. Which is a shame, YEP Option Core is super good plugin that should be in pretty much every game from now on. Can't someone help fix this incompability?
     
  19. JamesRyan

    JamesRyan Game Designer Veteran

    Messages:
    588
    Likes Received:
    186
    Location:
    Vietnam
    First Language:
    Vietnamese
    Primarily Uses:
    RMMV
    I doubt Yanfly will do. Gotta wait for an official fix from Khas.
     
  20. Tuomo L

    Tuomo L Oldbie Veteran

    Messages:
    2,291
    Likes Received:
    1,262
    Location:
    Finland!
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    I hope @Khas makes one but I don't have high hopes for that either, considering he has stopped making plugins. Some fan on this topic is our best bet to be honest.
     

Share This Page