Disable 'Fast Forward' during movies?

Discussion in 'RPG Maker MV' started by AdamSakuru, Jun 9, 2017.

  1. AdamSakuru

    AdamSakuru [Null_Value] Veteran

    Messages:
    314
    Likes Received:
    168
    First Language:
    English
    Primarily Uses:
    N/A
    A couple of days ago I discovered the 'fast forward' feature that would speed up the game/events if you held down the space-bar/'accept' key (even during move routes/etc. without messages)

    But there is a problem. If you play a movie file and set the appropriate wait time in frames, you can still hold space to fast forward through the wait frames. I don't want to disable the feature entirely, but is there a way to disable it while a movie is playing? Holding down the space key allows the player to throw the wait time off and continue through the post movie events while the movie is still playing.
     
    #1
    JoelMarler likes this.
  2. AdamSakuru

    AdamSakuru [Null_Value] Veteran

    Messages:
    314
    Likes Received:
    168
    First Language:
    English
    Primarily Uses:
    N/A
    *le bump*
     
    #2
  3. Kyo Panda

    Kyo Panda Veteran Veteran

    Messages:
    34
    Likes Received:
    24
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Looks like the internal Game_Interpreter's wait count gets messed up with the double update per tick of Scene_Map's fast forward. This causes the wait to end twice as fast as it should, prematurely progressing with Game_Interpreter's command list.

    That being said, the problem isn't only with videos, but with anything that sets a wait timer on Interpreter, like transitions or the wait command.

    Code:
    /*:
     * @plugindesc
     * Fix the Game_Interpreter's internal wait count when the map is in
     * fast forward mode.
     *
     * @help
     *
     * MIT License
     *
     * Copyright (c) 2017 Kyo Panda
     *
     * Permission is hereby granted, free of charge, to any person obtaining
     * a copy of this software and associated documentation files (the
     * "Software"), to deal in the Software without restriction, including
     * without limitation the rights to use, copy, modify, merge, publish,
     * distribute, sublicense, and/or sell copies of the Software, and to
     * permit persons to whom the Software is furnished to do so, subject to
     * the following conditions:
     *
     * The above copyright notice and this permission notice shall be
     * included in all copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
     * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
     * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
     * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
     * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
     * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     */
    
    /*:pt
     * @plugindesc
     * Corrige o contador interno do Game_Interpreter quando o mapa está em
     * modo de velocidade rápida.
     *
     * @author Kyo Panda
     *
     * @help
     *
     * MIT License
     *
     * Copyright (c) 2017 Kyo Panda
     *
     * Permission is hereby granted, free of charge, to any person obtaining
     * a copy of this software and associated documentation files (the
     * "Software"), to deal in the Software without restriction, including
     * without limitation the rights to use, copy, modify, merge, publish,
     * distribute, sublicense, and/or sell copies of the Software, and to
     * permit persons to whom the Software is furnished to do so, subject to
     * the following conditions:
     *
     * The above copyright notice and this permission notice shall be
     * included in all copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
     * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
     * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
     * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
     * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
     * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     */
    
    (function() {
        'use strict';
      
        Game_Map.prototype.updateFastForward = function() {
            this._interpreter.incrementWaitCount();
        };
    
        Game_Interpreter.prototype.incrementWaitCount = function() {
            if (this._waitCount > 0) {
                this._waitCount++;
            }
        };
    
        var _Scene_Map_updateMainMultiply = Scene_Map.prototype.updateMainMultiply;
    
        Scene_Map.prototype.updateMainMultiply = function() {
            if (this.isFastForward()) {
                $gameMap.updateFastForward();
            };
          
            _Scene_Map_updateMainMultiply.apply(this, arguments);
        };
    }());
    
    Here is tiny fix.
     
    #3
    Tyruswoo and AdamSakuru like this.

Share This Page