Controlling the speed at which the message screen opens

JDevain

Veteran
Veteran
Joined
Oct 21, 2018
Messages
163
Reaction score
66
First Language
English
Primarily Uses
RMMV
To be clear, I'm not talking about the speed of the text inside the dialogue window, but the actual opening of window itself. It takes about, I dunno, 20 frames to open? I'd like to make it instant. Is there a way to do that?

(btw, wasn't sure if this should be in the javascript forum, because I don't know if there's a javascript way to do it.)

Thanks!
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,317
Reaction score
1,331
First Language
Spanish
Primarily Uses
RMVXA
Code:
Window_Base.prototype.updateOpen = function() {
    if (this._opening) {
        this.openness += 32;
        if (this.isOpen()) {
            this._opening = false;
        }
    }
};

Window_Base.prototype.updateClose = function() {
    if (this._closing) {
        this.openness -= 32;
        if (this.isClosed()) {
            this._closing = false;
        }
    }
};

rpg_windows, line 117
change the value of openness
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,272
Reaction score
1,681
First Language
EN
Primarily Uses
RMMZ
Like gstv87 says, it's openness that controls this. You can save the following as a .js file & import as a plugin:
Code:
// Instant open
(function(alias) {
  Window_Base.prototype.open = function() {
    alias.call(this);
    this._openness = 255;
  };
})(Window_Base.prototype.open);

// Instant close
(function(alias) {
  Window_Base.prototype.close = function() {
    alias.call(this);
    this._openness = 0;
  };
})(Window_Base.prototype.close);
Just remove the second part if you want to keep the "closing" animation~ :kaothx:

(Got this as one feature of many in one of my released plugins in case anyone's interested: Cae_MenuDisplayOpts.js)
 

JDevain

Veteran
Veteran
Joined
Oct 21, 2018
Messages
163
Reaction score
66
First Language
English
Primarily Uses
RMMV
Wow, that was fast, thanks!

At first I did put it in a .js file and import, but then decided that I want to toggle it on and off sometimes, so I instead put it in an event that runs it as a script, and it works perfectly.
 

Latest Threads

Latest Posts

Latest Profile Posts

I have an idea, I am making low polygon 3D resources for a package in itch. but it occurred to me that I could export these as images and make MV / MZ compatible tilesets. What do you think of this?
I hate seeing threads where less-experienced user's ask for an opinion of their project, and the thread is full of negative feedback by others who are clearly not the target audience. I feel bad for the OP, and I hope they understand that no game can appeal to everyone. :frown:
Hm, just found out I can't use loops, yay.
-Ele
I just wanna Covid to be over and I have my normal life back... Feeling so bad these days, what can I do?

Forum statistics

Threads
109,074
Messages
1,041,862
Members
141,570
Latest member
Pompeu
Top