Terrax Lighting system

Novacalico

Also known as Mikeneto
Member
Joined
Oct 26, 2015
Messages
10
Reaction score
7
First Language
English
Primarily Uses
RMMV
1582345702119.png

1582345903425.png
Running into this when using Terrax lighting with Yanfly core. Any suggestions?
Tried placing script above and below Yanfly's stuff. Set resolution parameters to match what currently set.

Thanks in advance.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,133
Reaction score
1,045
First Language
English
Primarily Uses
RMMV
It works fine with yanfly's stuff, including his core engine. I'm betting the problem is Foreground.js, whatever that is.
 

Novacalico

Also known as Mikeneto
Member
Joined
Oct 26, 2015
Messages
10
Reaction score
7
First Language
English
Primarily Uses
RMMV
It works fine with yanfly's stuff, including his core engine. I'm betting the problem is Foreground.js, whatever that is.
Thank you for the quick reply.
I read that so many were using Terrax with Yanly without issue which is why I was confused that anything Yanfly was even in the bug report.

Foreground is one of the super early free scripts that was released when the MV first came out.

"Author: Sasuke Kannazuki (thanks to YojiOjima)
'foreground' is like a parallax that displays over the map.

put bitmap file at img/parallaxes."


I'll disable that and run some tests. That did it!
Thanks again!
 
Last edited:

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
303
Reaction score
37
First Language
Italian
Primarily Uses
Hi guys, i'm having a little problem.

I want to set a radius on player, with "Fire radius 50 #E2B822"

But, when i set a tint on the screen with the command "Tint set #333333", the flickering effect of the fire, around the player, stops... and i must replay the command "Fire radius 50 #E2B822" for play the flickering effect around radius player.

I noticed that every single time you use a "plugin call", the flickering stop. For example, even if you use the yanfly quest journal and use the call script "Quest add 1", the flickering stop.

I really don't understand why and what to do.

Is it a bug? Can you help me guys? :(
 
Last edited:

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
303
Reaction score
37
First Language
Italian
Primarily Uses
Guys? Nobody is able to take this script and support it? :(
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,133
Reaction score
1,045
First Language
English
Primarily Uses
RMMV
Looking at it, I think I found the problem. In this line in his override of Game_Interpreter.prototype.pluginCommand, he's basically saying "if the plugin command (regardless of which plugin it targets) isn't "fire" then turn off flickering which is...horrible to say the least

Code:
            // ******************* FIRE *******************
            if (command === 'fire') {
                $gameVariables.SetFire(true);
            } else {
                $gameVariables.SetFire(false);
            }
You can fix it (maybe, no promises it'll work or won't break other things) by replacing the else statement with this:

Code:
            } else if (command === "light" || command === "flashlight") {
So:

Code:
            // ******************* FIRE *******************
            if (command === 'fire') {
                $gameVariables.SetFire(true);
            } else if (command === "light" || command === "flashlight") {
                $gameVariables.SetFire(false);
            }
 

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
303
Reaction score
37
First Language
Italian
Primarily Uses
Looking at it, I think I found the problem. In this line in his override of Game_Interpreter.prototype.pluginCommand, he's basically saying "if the plugin command (regardless of which plugin it targets) isn't "fire" then turn off flickering which is...horrible to say the least

Code:
            // ******************* FIRE *******************
            if (command === 'fire') {
                $gameVariables.SetFire(true);
            } else {
                $gameVariables.SetFire(false);
            }
You can fix it (maybe, no promises it'll work or won't break other things) by replacing the else statement with this:

Code:
            } else if (command === "light" || command === "flashlight") {
So:

Code:
            // ******************* FIRE *******************
            if (command === 'fire') {
                $gameVariables.SetFire(true);
            } else if (command === "light" || command === "flashlight") {
                $gameVariables.SetFire(false);
            }
@Aesica

My good, it seems that you have fixed it!! You are incredible, really.
I didn't noticed that this fix break other things, it's perfect! T_T

EDIT: That error is fixed, but i found another thing that break the flickering. T_T A simple plugin call "Light on 1" or the off one, break the flickering of the radius. If i call a "fire radius 0..." and another "fire radius 50..." (off and on), the flickering return.



why don't you try taking this plugin and cleaning it? i think that you are really amazing and this project could become much cooler! I tried to write to Terrax on email that is written in the plugin.
I wonder if it is still reachable or not ...


I take this opportunity to ask you something. I asked terrax a while ago to implement an item in the options menu, to give the player the possibility to disable the script, if he doesn't want the lighting effects. (i found it, i think that it's the part in the very bottom of the plugin.

The fact is that with the new options of yanfly, this entry is gone, probably the code is not compatible with the yanfly script. Would you be able to make it compatible and make it appear? T_T
 
Last edited:

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,133
Reaction score
1,045
First Language
English
Primarily Uses
RMMV
I don't know, I've considered taking it up multiple times to fix various things, but every time I look at the code, I find myself running in the opposite direction. Maybe after I finish my current game, but that's not a promise. It really is a messy script and again, I mean no disrespect to Terrax when I say that. (This issue you've seen with fire flickering is a great example of what I mean)

Anyway, you actually can switch the script on or off via plugin command:
to turn it on:
Code:
script activate
-or-
light activate
to turn it off:
Code:
script deactivate
-or-
light deactivate
Now a little insight into the fix I added to the flickering: Before, it was basically saying "if the plugin command is 'fire' then turn on flickering. If the plugin command is anything else, no matter what, turn off flickering." The fix I made was "if the plugin command is 'fire' turn on flickering, otherwise, if the plugin command is 'light' or 'flashlight' then turn flickering off.

While it wasn't an ideal fix, it was a fix that would be easiest to share via these forums. This might work a little better:

Just below what we changed, there should be the following line:

Code:
            // ******************** MAIN PLAYER SETTINGS ***************
            if (command === 'light' || command === 'fire') {

                //******************* Light radius 100 #FFFFFF ************************
                if (args[0] == 'radius') {
And a bit lower down:

Code:
                //******************* Light radiusgrow 100 #FFFFFF ************************
                if (args[0] === 'radiusgrow') {
Right after those two, insert the following:

Code:
                    if (command === 'fire') $gameVariables.SetFire(true);
                    else $gameVariables.SetFire(false);
So each should look like this, respectively:

Code:
                //******************* Light radius 100 #FFFFFF ************************
                if (args[0] == 'radius') {
                    if (command === 'fire') $gameVariables.SetFire(true);
                    else $gameVariables.SetFire(false);
Code:
                //******************* Light radiusgrow 100 #FFFFFF ************************
                if (args[0] === 'radiusgrow') {
                    if (command === 'fire') $gameVariables.SetFire(true);
                    else $gameVariables.SetFire(false);
Finally, locate this line:

Code:
            // ************* FLASHLIGHT *******************
            if (command === 'flashlight') {
And right below it, add

Code:
$gameVariables.SetFire(false);
So:

Code:
            // ************* FLASHLIGHT *******************
            if (command === 'flashlight') {
                $gameVariables.SetFire(false);
You may want to back the plugin up before applying these changes, first. I haven't tested them, but they should work
 

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
303
Reaction score
37
First Language
Italian
Primarily Uses
I don't know, I've considered taking it up multiple times to fix various things, but every time I look at the code, I find myself running in the opposite direction. Maybe after I finish my current game, but that's not a promise. It really is a messy script and again, I mean no disrespect to Terrax when I say that. (This issue you've seen with fire flickering is a great example of what I mean)

Anyway, you actually can switch the script on or off via plugin command:
to turn it on:
Code:
script activate
-or-
light activate
to turn it off:
Code:
script deactivate
-or-
light deactivate
Now a little insight into the fix I added to the flickering: Before, it was basically saying "if the plugin command is 'fire' then turn on flickering. If the plugin command is anything else, no matter what, turn off flickering." The fix I made was "if the plugin command is 'fire' turn on flickering, otherwise, if the plugin command is 'light' or 'flashlight' then turn flickering off.

While it wasn't an ideal fix, it was a fix that would be easiest to share via these forums. This might work a little better:

Just below what we changed, there should be the following line:

Code:
            // ******************** MAIN PLAYER SETTINGS ***************
            if (command === 'light' || command === 'fire') {

                //******************* Light radius 100 #FFFFFF ************************
                if (args[0] == 'radius') {
And a bit lower down:

Code:
                //******************* Light radiusgrow 100 #FFFFFF ************************
                if (args[0] === 'radiusgrow') {
Right after those two, insert the following:

Code:
                    if (command === 'fire') $gameVariables.SetFire(true);
                    else $gameVariables.SetFire(false);
So each should look like this, respectively:

Code:
                //******************* Light radius 100 #FFFFFF ************************
                if (args[0] == 'radius') {
                    if (command === 'fire') $gameVariables.SetFire(true);
                    else $gameVariables.SetFire(false);
Code:
                //******************* Light radiusgrow 100 #FFFFFF ************************
                if (args[0] === 'radiusgrow') {
                    if (command === 'fire') $gameVariables.SetFire(true);
                    else $gameVariables.SetFire(false);
Finally, locate this line:

Code:
            // ************* FLASHLIGHT *******************
            if (command === 'flashlight') {
And right below it, add

Code:
$gameVariables.SetFire(false);
So:

Code:
            // ************* FLASHLIGHT *******************
            if (command === 'flashlight') {
                $gameVariables.SetFire(false);
You may want to back the plugin up before applying these changes, first. I haven't tested them, but they should work
@Aesica

I tried. Unfortunately, the problem is not fixed T_T When i activate/deactivate a light with "Light on 1" or "Light off 1", the flickering of player radius stop... (and the flickering of the fire that i've activate works, of course, without problem). i really don't understand what is the connection. (i attach my script, but i think that it's correct, i follow your instruction...

About the option menu, unfortunately, the Yanfly Options Core have a part that explain how to set up a new option, but it's too difficult for me. Terrax made that final part of code for have it in option menu standard, but with Yanfly Option Core, the thing change... Maybe you can understand better how to set up that specific function in the Yanfly Option Core... (I know that there are two call plugin that disable the light, but i think that it's better that function in the option menu...).

Let me know T_T Thank you very much in advance...
 

Attachments

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,133
Reaction score
1,045
First Language
English
Primarily Uses
RMMV
Oh right, you should delete the part we initially added--the one that was working sort of, but not really:

Code:
            // ******************* FIRE *******************
            // ******************* FIRE *******************
            if (command === 'fire') {
                $gameVariables.SetFire(true);
            } else if (command === "light" || command === "flashlight") {
                $gameVariables.SetFire(false);
            }
Those lines. You can soft delete them by adding /* to the start and */ to the end, like so:

Code:
            // ******************* FIRE *******************
            // ******************* FIRE *******************
/*
            if (command === 'fire') {
                $gameVariables.SetFire(true);
            } else if (command === "light" || command === "flashlight") {
                $gameVariables.SetFire(false);
            }
*/
As for the options menu, I really don't have a lot of experience with yanfly's options menu since I don't use it, so not much I can do there.
 

Kovos_Datch

Potatomancer
Veteran
Joined
Jun 6, 2015
Messages
84
Reaction score
39
First Language
English
Primarily Uses
RMMV
I just started using the plugin no problem. Thank you to the creator of this and thank you for those who run tech support for others.

Top notch plugin and easy to use.
 

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
303
Reaction score
37
First Language
Italian
Primarily Uses
@Aesica

OH YEAH!! OH YEEEAH! IT WORKS NOW!! You are the best! Thank you so much for your help! T_T

For the option part, i will open a topic, maybe someone is able to help me in that way.

However, thank you so much... really. Now the effect is perfect. I hope that no other things will crash the flickering effect. I found only this problems...
 

Manjini

Dummy
Member
Joined
Jan 6, 2019
Messages
26
Reaction score
22
First Language
German
Primarily Uses
RMMV
I am not sure if this has been asked before or not. But my question would be, if there is any way to have multiple instances of ''tint fade'' happening. Tinting the entire screen for day and night cycle is obvious but in addition I would like to tint a specific instance parallel to it(I sadly had to use terrax tint system because moghunter's doesn't seem to be working as I intended to use it and Terrax script seems to have stuff about moghunters tint system to begin with, so I managed to use it almost identical anyways).

I am using light sources for windows inside a building to emit sunlight coming in and I wish to slowly tint those light sources parallel to the normal day night tint system so that at night the screen tint is something like #222222 and the window light tint would be for example #444444 for possible moonlight or whatever coming in from outside.

I was kind of thinking of something as simple as ''Tint fade #XXXXXX D1 100 5'' in which D1 is for direction of the light source, 5 indicates the switch to turn this specific fade on or off in it's respective event note-tag similar to ''Light on 5 / Light off 5''.
This would probably be the perfect outcome for my needs.

The only working way I found was to just turn off the light at a specific hour. But this totally breaks the immersion and looks wrong.

If there is anybody who has an idea or perhaps solution I couldn't think of myself, I would gladly appreciate it.
 

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
93
Reaction score
14
First Language
french
Primarily Uses
RMMV
Hey, didn't read all of the 71 pages, but has the compatibility fix with Mog's Time System updated yet ?

My maps goes dark in maps with the tag <Disable Tint Screen> applied
 

Kkool05

Warper
Member
Joined
Jan 27, 2019
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi, just wondering how to use the flashlight effect. It tells me the code in the description but I don't know if it's supposed to be in an event or what.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I based this on the armor of Actor 1_7 of the RTP. Hair is from Derex and Sythian Bard.
Stream will be live shortly! Going to do another art stream tonight so that I can finish my Fauna Focus piece~ Feel free to drop by!
Humans are fallible creatures, we all know that. It's when we're forced to look at ourselves that we start to disagree. :p
Expectation: Working on boss battle.
Reality: "Look at how awful are these code and database organization. Let me clean this mess", *yet, casually adding more modules that I have no idea if I would use it later*
Trying to learn to read Japanese so I read my manga. I like to buy them without all the edits made during translation.

Forum statistics

Threads
97,864
Messages
947,448
Members
129,087
Latest member
jubacard
Top