josephdevelops

Creator of Familia
Veteran
Joined
Jan 21, 2020
Messages
45
Reaction score
20
First Language
English
Primarily Uses
RMMZ
I made a plugin that reduces all flashes to 1 frame but I can't figure out how to do this with tints. If I could do this it would make my mobile deployments run super fast. Help! :D
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,452
Reaction score
14,815
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.



It might help if you show us what you did for flashes, and how you're trying to do it for tints.
 

josephdevelops

Creator of Familia
Veteran
Joined
Jan 21, 2020
Messages
45
Reaction score
20
First Language
English
Primarily Uses
RMMZ
Here is my flashes plugin:

(function () { var params = PluginManager.parameter = "JOE_RemoveFlashes.js"; Sprite_Animation.prototype.updateFlash = function() { if (this._flashDuration > 0) { //completely removes flash effects var d = this._flashDuration--; this._flashColor[3] *= (d - 1) / d; this._target.setBlendColor(this._flashColor); } }; })();
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,452
Reaction score
14,815
First Language
English
Primarily Uses
RMMV
Well, a flash changes the screen, then changes it back again. A tint just changes the screen. You have to tell it to tint again if you want to change it back.

Other than that, the Tint Screen event command lets you specify how many frames you want it to take, so you can control whether it's a gradual tint or an immediate one.

If this doesn't help, you might have to explain a bit more to make it clear what's happening, and what you want to happen instead.
 

josephdevelops

Creator of Familia
Veteran
Joined
Jan 21, 2020
Messages
45
Reaction score
20
First Language
English
Primarily Uses
RMMZ
I want to reduce the duration of all tints so that the color transition happens in a single frame. I want to make a plugin that does this for me globally (on the entire game).

I would use this plugin for mobile deployments without having to take all of my tints off of my windows/mac versions of my game.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,452
Reaction score
14,815
First Language
English
Primarily Uses
RMMV
Are all your tints done by event commands?

I would either override the Game_Interpreter command??? method that changes tint, or the method that it calls, to ignore the 'duration' parameter that's passed in and use 0 instead. The Game_Interpreter method would be if ALL your tint changes are done by event command. The method that it calls would be if there is any other way that your tints get changed (like a plugin). Only do one, not both.
 

josephdevelops

Creator of Familia
Veteran
Joined
Jan 21, 2020
Messages
45
Reaction score
20
First Language
English
Primarily Uses
RMMZ
My friend helped me figure it out.

Code:
var _diableTints_Permanent = Game_Screen.prototype.startTint;
Game_Screen.prototype.startTint = function(tone, duration) {
    if (Familia.isMobile)
    {
        this._toneTarget = tone.clone();
        this._toneDuration = 0;
        if (this._toneDuration === 0) {
            this._tone = this._toneTarget.clone();
        }
    } else
        _diableTints_Permanent.call(this, tone, duration);
    
};
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Sometimes you Just need to realise someone is beyond help... Still hard to walk away tho :(
100 Horror/Tragedy Sample Maps, Penguin Mech Sprite, & TileD Templates | RPG Maker News #70

Continuing working on abs. So far I have done the workout twice. I am excited to see the results after a couple of weeks. How is everyone doing? :)
MZ: oh boy imma work today
Me, excited: Really?
MZ, doesn't do what I tell It too
Me: I Thought-
MZ: I am Working!
Oof, this "side project" of mine is starting to get as complex as a VS plugin, at least as far as plugin parameters are concerned. I think I now understand why a plugin like this doesn't already exist(that I know of). Learning a lot while trying to make it work though!

Forum statistics

Threads
112,216
Messages
1,066,605
Members
145,821
Latest member
Adra
Top