Project1

标题: 几个小小的修改 [打印本页]

作者: sonicdonggua    时间: 2017-2-25 23:26
标题: 几个小小的修改
有人私信我如何调用公共事件,正好我在制作时也需要用
BattleManager.updateBattleEnd = function() {
    if (this.isBattleTest()) {
        AudioManager.stopBgm();
        SceneManager.exit();
    } else if (!this._escaped && $gameParty.isAllDead()) {
        if (this._canLose) {
            SceneManager.pop();
            $gameParty.reviveBattleMembers();
        } else if (!$gameSwitches.value(36)){ //36号开关控制
            SceneManager.pop();
            $gameTemp.reserveCommonEvent(1); //运行1号公共事件
        } else {
            SceneManager.goto(Scene_Gameover);
        }
    } else {
        SceneManager.pop();
    }
    this._phase = null;
};
新建一个JS后复制代码扔进去。不过有几个问题:
1.$gameParty.reviveBattleMembers();可以加在else if ,但是会看到比较奇葩的战斗失败后倒地队员立即站起来的动作。所以我没有加,这样的话你必须在公共事件的第一件事制定移除队员死亡状态,否则会直接Game Over!
2.退出战斗之后的第一件事就是淡入地图,别问我为什么,我也想把这破动作给删掉TT

用Yanfly。BEC不想调用partycommand:就是那个战斗、逃跑的玩意
Scene_Battle.prototype.createActorCommandWindow = function() {
    this._actorCommandWindow = new Window_ActorCommand();
    this._actorCommandWindow.setHandler('attack', this.commandAttack.bind(this));
    this._actorCommandWindow.setHandler('skill',  this.commandSkill.bind(this));
    this._actorCommandWindow.setHandler('guard',  this.commandGuard.bind(this));
    this._actorCommandWindow.setHandler('item',   this.commandItem.bind(this));
    this.addWindow(this._actorCommandWindow);
};至于逃跑么,可以创建一个“烟雾弹”,也可以仿照月响的“恐怖邪眼”制作一个技能

不用插件换字体:
Window_Base.prototype.standardFontFace = function() {
    return '宋体';
};
如果你直接改了rpg_window,连fonts文件夹都可以直接删掉
放弃Scene_gameend
Scene_Menu.prototype.commandGameEnd = function() {
    this.fadeOutAll();
    SceneManager.push(Scene_Title);
};

仿月响在特定战斗失败导致gameover的景象(只播放gameover的音乐,取消战败提示)
Scene_Battle.prototype.needsSlowFadeOut = function() {
    return (SceneManager.isNextScene(Scene_Title) ||
            SceneManager.isNextScene(Scene_Gameover) || $gameParty.isAllDead());
};

Scene_Battle.prototype.terminate = function() {
    Scene_Base.prototype.terminate.call(this);
    $gameParty.onBattleEnd();
    $gameTroop.onBattleEnd();   
};

Scene_Battle.prototype.stop = function() {
    Scene_Base.prototype.stop.call(this);
    if (this.needsSlowFadeOut()) {
        this.startFadeOut(this.slowFadeSpeed() * 4, false);
    } else {
        this.startFadeOut(this.fadeSpeed(), false);
    }
    this._statusWindow.close();
    this._partyCommandWindow.close();
    this._actorCommandWindow.close();
};

Scene_Gameover.prototype.playGameoverMusic = function() {
    AudioManager.stopBgm();
    AudioManager.stopBgs();
    if (!$gameSwitches.value(36)) AudioManager.playMe($dataSystem.gameoverMe);//用36开关
};

Scene_Gameover.prototype.start = function() {
    Scene_Base.prototype.start.call(this);
    this.startFadeIn(this.slowFadeSpeed() * 4, false); //*几代表你想放慢淡出的多少速度
};

当开关开启时,系统不播放gameover,只播放defeat的ME,所以在战斗中defeat的ME才是你真正的gameover的音乐。
具体效果,除了场景缩放,还是高度还原月响的。(没错我就是月夜响荡曲的fans,一周目我就能做到全部Brave clear!)





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1