Controlling the speed at which the message screen opens

JDevain

Veteran
Veteran
Joined
Oct 21, 2018
Messages
121
Reaction score
46
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,248
Reaction score
1,250
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,087
Reaction score
1,508
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
121
Reaction score
46
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.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top