Cumulative tinting? Possible, or nah?

Good morning!

I see tint as an option within RPG Maker's built-in features. Is there a way to tint the screen cumulatively? As in, "Hey, each time X occurs, tint the screen (-1, -1, 0, 1)? Or is tint more of a static "do once, tint in totality" sort of deal? Is there any known way around this, if the latter is the case?

Any help provided would be appreciated!
simplest way around it would be to have a variable count and then do a sequence of conditional branches with different tint screen based on the variables value.

however please keep in mind that there is a technical limitation: color values are only between 0 and 255, never higher or lower.
so if the value of "base color plus tint" goes lower than 0 or higher than 255, the methematical result will be limited to those numbers for practical reasons.
simplest way around it would be to have a variable count and then do a sequence of conditional branches with different tint screen based on the variables value.

however please keep in mind that there is a technical limitation: color values are only between 0 and 255, never higher or lower.
so if the value of "base color plus tint" goes lower than 0 or higher than 255, the methematical result will be limited to those numbers for practical reasons.

Okay! That makes sense. And I appreciate the forewarning about the upper and lower limits of color values. Gotta have a catch-clause in there to make certain my own artificial limit hasn't been breached. 👍
I only own MV, so I couldn't check if it actually works the same in MZ. But the two are similar enough, that I figure it is at least worth trying.

In the editor directly, you can only give a command to change the tint to an absolute number that you hard code through your input. However all commands in the editor call some javascript function at the end of the day. So let's take a look at the handy javscript equivalents to event commands spreadsheet.

We see that to tint the screen we need to call a function
JavaScript:
$gameScreen.startTint([red, green, blue, grey], frames);

At least in MV you can also get the current [red, green, blue, grey] array with the function
JavaScript:
$gameScreen.tone()

So let's put all of that together (and factor in @Andar 's advice that every color value needs to be between 0 and 255):
JavaScript:
var tone = $gameScreen.tone();
tone[0] -= 1;
tone[1] -= 1;
//we can skip tone[2] as you didn't want to change that
tone[3] += 1;

for(let i = 0; i < tone.length; i++) {
    tone[i] = tone[i].clamp(0,255);
}

$gameScreen.startTint(tone, frames);
In the above example you still need to replace frames with the number of frames you want the tinting to take.
I only own MV, so I couldn't check if it actually works the same in MZ. But the two are similar enough, that I figure it is at least worth trying.

In the editor directly, you can only give a command to change the tint to an absolute number that you hard code through your input. However all commands in the editor call some javascript function at the end of the day. So let's take a look at the handy javscript equivalents to event commands spreadsheet.

We see that to tint the screen we need to call a function
JavaScript:
$gameScreen.startTint([red, green, blue, grey], frames);

At least in MV you can also get the current [red, green, blue, grey] array with the function
JavaScript:
$gameScreen.tone()

So let's put all of that together (and factor in @Andar 's advice that every color value needs to be between 0 and 255):
JavaScript:
var tone = $gameScreen.tone();
tone[0] -= 1;
tone[1] -= 1;
//we can skip tone[2] as you didn't want to change that
tone[3] += 1;

for(let i = 0; i < tone.length; i++) {
    tone[i] = tone[i].clamp(0,255);
}

$gameScreen.startTint(tone, frames);
In the above example you still need to replace frames with the number of frames you want the tinting to take.

That is indeed a very handy spreadsheet! And I appreciate the javascript sample. :LZSexcite: It's been a minute since I last even thought about touching legitimate scripting, so this is going to be an enjoyable memory lane walk.

Thank you so much for all of the help!

/* == EDIT || UPDATE == */
H'okay, I worked out how to make the shade a lovely sunset-y kind of color (my numbers were wrong to begin with) and using your suggestions, I now have a slow fade into sunset each at each step.

I think I'm going to change it from steps to interactions, but the basic principle is the same. And it works! Thank you, all.

Original thread: https://forums.rpgmakerweb.com/threads/cumulative-tinting-possible-or-nah.143537/