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

Nat0327

Regular
Regular
Joined
Feb 18, 2015
Messages
662
Reaction score
378
First Language
English
Primarily Uses
RMMZ
@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)
 

Kilitar

Regular
Regular
Joined
Jul 28, 2015
Messages
145
Reaction score
47
First Language
czech
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)

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)
 

Nat0327

Regular
Regular
Joined
Feb 18, 2015
Messages
662
Reaction score
378
First Language
English
Primarily Uses
RMMZ
@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.
 

peq42_

Yeet
Regular
Joined
Feb 5, 2016
Messages
566
Reaction score
363
First Language
Portuguese(BR)
Primarily Uses
RMMV
@Khas Found ANOTHER bug:
If you use "Lighting Off" command and move to another map, everything turns totally black

(All these bugs are found in 4.2 version)
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 solved it removing "? this._heightMap[x][y] : null" in the part "
Game_Map.prototype.getHeight = function(x, y)"
(I wrote it 1 page before that, so i just want to double post that for those who didn't see)
 

lonewolph

Regular
Regular
Joined
Oct 25, 2015
Messages
215
Reaction score
15
First Language
English
could you make this plugin work with orange overlay and parallax mapping?
 

peq42_

Yeet
Regular
Joined
Feb 5, 2016
Messages
566
Reaction score
363
First Language
Portuguese(BR)
Primarily Uses
RMMV
could you make this plugin work with orange overlay and parallax mapping?
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.
 

lonewolph

Regular
Regular
Joined
Oct 25, 2015
Messages
215
Reaction score
15
First Language
English
would like to have the shadow effect with parallax.
 

Arise

Regular
Regular
Joined
Aug 31, 2016
Messages
134
Reaction score
19
Primarily Uses
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.
 

Espilonarge

Regular
Regular
Joined
Apr 24, 2016
Messages
145
Reaction score
69
First Language
English
Primarily Uses
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).
 

cyrro

Warper
Member
Joined
Apr 8, 2018
Messages
2
Reaction score
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?
 

Attachments

  • Captura de pantalla 2018-04-08 a les 14.54.23.jpg
    Captura de pantalla 2018-04-08 a les 14.54.23.jpg
    64.3 KB · Views: 16

Kneeshaw

Kneeshaw Developments
Regular
Joined
Dec 2, 2015
Messages
60
Reaction score
51
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.
 

Lunesis

Regular
Regular
Joined
Oct 4, 2015
Messages
255
Reaction score
219
First Language
English
Primarily Uses
RMMZ
I've been trying to use this plugin but it keeps me giving error. Can someone help me please?

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:

cyrro

Warper
Member
Joined
Apr 8, 2018
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
I am getting the same error. Ambient lighting works fine but point lights crash the game.

If you find out how to solve this problem please answer or contact me. Thank you in advance.
 

Mesajia

Regular
Regular
Joined
Aug 14, 2014
Messages
81
Reaction score
51
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?
 

Tuomo L

Oldbie
Regular
Joined
Aug 6, 2012
Messages
2,505
Reaction score
1,418
First Language
Finnish
Primarily Uses
RMMV
The new Yep_options core causes crashes with KhasCore.
 

Ally

Linked Rooms Games Founder - Fleshforward
Member
Joined
Mar 17, 2012
Messages
332
Reaction score
154
First Language
Italy
Primarily Uses
RM2k
This plugin not work with the picture?
Because the images remain above the lights.
 

Tuomo L

Oldbie
Regular
Joined
Aug 6, 2012
Messages
2,505
Reaction score
1,418
First Language
Finnish
Primarily Uses
RMMV
You sure? I'm about to install YEP Option Core and this makes me nervous...

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?
 

JamesRyan

Game Designer
Regular
Joined
Sep 13, 2014
Messages
754
Reaction score
267
First Language
Vietnamese
Primarily Uses
RMMV
I doubt Yanfly will do. Gotta wait for an official fix from Khas.
 

Tuomo L

Oldbie
Regular
Joined
Aug 6, 2012
Messages
2,505
Reaction score
1,418
First Language
Finnish
Primarily Uses
RMMV
I doubt Yanfly will do. Gotta wait for an official fix from Khas.

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.
 

Latest Threads

Latest Profile Posts

Proper localization into several languages on a commercial rpg project might be one of the best signs that the developer is super invested into making the game something high effort, because it ain't cheap to hire good translators.
6 hour drive back from Florida and I was able to plan out 6 mini game Common Events for my Game Jam entry, including a new one I hadn't thought of before. Also had some new ideas to improve what I already have and the post game options to continuing playing the mini games that you liked or didn't get to try. Pretty productive drive.
Christmas decorations! !! :kaojoy:
20231209_114754.jpg
Sophie is already helping dismantle the tree...a month early, of course. Such a helpful kitten!
making horse character for game :D at the end it will have 8 directions puling wagon

2p8jdax

Forum statistics

Threads
136,878
Messages
1,270,972
Members
180,647
Latest member
jucarave
Top