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

Joined
Feb 18, 2015
Messages
441
Reaction score
191
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)
 

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
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)
 
Joined
Feb 18, 2015
Messages
441
Reaction score
191
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.
 

peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
472
Reaction score
283
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

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

peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
472
Reaction score
283
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

Veteran
Veteran
Joined
Oct 25, 2015
Messages
194
Reaction score
14
First Language
English
would like to have the shadow effect with parallax.
 

Arise

Veteran
Veteran
Joined
Aug 31, 2016
Messages
131
Reaction score
18
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

Veteran
Veteran
Joined
Apr 24, 2016
Messages
120
Reaction score
53
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).
 

Kneeshaw

Kneeshaw Developments
Member
Joined
Dec 2, 2015
Messages
20
Reaction score
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.
 

Lunesis

Veteran
Veteran
Joined
Oct 4, 2015
Messages
34
Reaction score
6
First Language
English
Primarily Uses
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

Veteran
Veteran
Joined
Aug 14, 2014
Messages
81
Reaction score
49
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
Veteran
Joined
Aug 6, 2012
Messages
2,294
Reaction score
1,270
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
153
First Language
Italy
Primarily Uses
RM2k
This plugin not work with the picture?
Because the images remain above the lights.
 

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,294
Reaction score
1,270
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
Veteran
Joined
Sep 13, 2014
Messages
590
Reaction score
187
First Language
Vietnamese
Primarily Uses
RMMV
I doubt Yanfly will do. Gotta wait for an official fix from Khas.
 

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,294
Reaction score
1,270
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

-_- Now we have punishments for skipping meals, specially breakfast. At least let me sleep on Fridays -_-
colorize an old sketch
Welp... with numerous plugins and a bit of Javascript help, I've simulated an AP system in battle. Proud of myself honestly.
Why most of games like to give a horrible control to an aircraft vehicle? can I get a simplified control that does not require me to roll first just to change my direction?
Homie, this so amazing! Old but Gold :)

Forum statistics

Threads
93,430
Messages
912,285
Members
122,938
Latest member
pafell2
Top