Controlling the speed at which the message screen opens

JDevain

Veteran
Veteran
Joined
Oct 21, 2018
Messages
163
Reaction score
77
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,422
Reaction score
1,436
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,635
Reaction score
2,007
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
77
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 Profile Posts

:kaoswt2: Steam seems down again... oh nevermind, it's up now
After so long, my random sprites set is complete! I wonder who could guess them all? :kaothx:
2COlHup.png

And yes, I'm doing more.
I'm thinking of devouring some tutorials for RPG Maker MV. Just all kinds: mapping, spriting, programming, ect. the whole works! :)

Maybe videos, my brother and I can sit down and watch them during one of our weekly business meetings.
Ami
trying to make a Dialogue Script in Indonesian,first. then translate into English.

this is the reason why i'm terrible at this section beside making the enemies :stare:

Forum statistics

Threads
113,928
Messages
1,078,459
Members
148,035
Latest member
Resticon
Top