Mod RPGM Fixing shits in RPG Maker MV games

SimplePie

Newbie
Feb 1, 2018
15
5
Let's reinvent the wheels!

Code:
/******************************************************************************************************************************

Fixes shits in RPG Maker MV games.

Put that script in www\js\plugins\shitty_fix.js and write that code at the end of $plugins (before "];") in www\js\plugins.js:

, {"name":"shitty_fix", "status":true, "description":"fixes shits", "parameters":{
    stopBeatingDeadHorses: true // don't waste attacks on dead enemies
  , noSlowpokeText: true        // slow typing in dialogues; not stops AutopauseAtPunctuation
  , noSlowpokeWindows: true     // slow closing and opening
  , noSlowpokeSceneSwitch: true // fading between locations
  , noBlurryCrap: true          // image stretching; don't want to press F3
  , letThereBeMute: 77          // 77 for the 'm' key; google "javascript keycode"
  , alwaysDash: true            // WTF do I have to do even THIS shit?!
}}

******************************************************************************************************************************/

/*
version 2
works with old nw.js 0.12.3
mute in old RPGMMV

*/

(function(shits,dungs,poo) {

    shits.stopBeatingDeadHorses = function(){ // modify showNormalAnimation if you want to fix animation
        var old = BattleManager.invokeAction;
        BattleManager.invokeAction = function(subject, target) {
            if (target && target._enemyId && (target.hp <= 0 || target.isDead())) {
                $gameTroop.aliveMembers().some(function(horse){
                    if (horse.hp>0 && !horse.isDead()) return target = horse;
                });
            }
            old.call(this, subject, target);
        }
    }

    shits.noSlowpokeText = function(){
        var old = Window_Message.prototype.clearFlags;
        Window_Message.prototype.clearFlags = function() {
            old.call(this);
            this._showFast = true;
            this._lineShowFast = true;
        };
    }

    shits.noSlowpokeWindows = function(){
        Window_Base.prototype.updateOpen = function() {
            if (this._opening) {
                this.openness = 255;
                this._opening = false;
            }
        };
        Window_Base.prototype.updateClose = function() {
            if (this._closing) {
                this.openness = 0;
                this._closing = false;
            }
        };
    }

    shits.noSlowpokeSceneSwitch = function(){
        Scene_Base.prototype.startFadeIn = Scene_Base.prototype.startFadeOut = function(duration, white) {};
    }

    shits.noBlurryCrap = function(){
        Graphics._defaultStretchMode = function() { return false };
        Graphics._updateRealScale = function() { this._realScale = this._scale = 1 };
    }

    shits.letThereBeMute = function(keycode) {
        keycode = parseInt(keycode) || 77;
        var muted, bgm, bgs, me, se;
        document.addEventListener('keydown', function(e){
            if (e.keyCode==keycode) {
                if (AudioManager.masterVolume!=undefined) {
                    AudioManager.masterVolume = AudioManager.masterVolume?0:1;
                } else {    // old RPGMMV
                    if (muted) {
                         AudioManager.bgmVolume = bgm
                         AudioManager.bgsVolume = bgm
                         AudioManager.meVolume  = me
                         AudioManager.seVolume  = se
                    } else {
                        bgm = AudioManager.bgmVolume;
                        bgm = AudioManager.bgsVolume;
                        me  = AudioManager.meVolume;
                        se  = AudioManager.seVolume;
                        AudioManager.bgmVolume = AudioManager.bgsVolume = AudioManager.meVolume = AudioManager.seVolume = 0
                    }
                    muted = !muted;
                }
            }
        });
    }

    shits.alwaysDash = function(){
        ConfigManager.alwaysDash = true;
        var old = ConfigManager.applyData;
        ConfigManager.applyData = function(config) {
            config.alwaysDash = true;
            old.call(this, config);
            config.alwaysDash = true;
        };
    }

    for(poo of Object.keys(dungs))!~[[].l,!1,![]+[]].indexOf(dungs[poo])&&shits[poo]&&shits[poo](dungs[poo]);})
({},PluginManager.parameters([1496931449,19038].map(function(a){return a.toString(35)}).join('_')));
 
Last edited: