Project1

标题: MV怎么限制存档次数 [打印本页]

作者: gaohanzaici    时间: 2024-8-12 20:40
标题: MV怎么限制存档次数
如题,简而言之,比如游戏只允许存档3次,满了之后就不允许存档了,有相关的插件吗?
作者: 小秋橙    时间: 2024-8-12 21:51
Scene_Save.prototype.onSavefileOk = function() {
    Scene_File.prototype.onSavefileOk.call(this);
    $gameSystem.onBeforeSave();
    var count = $gameVariables.value(1);
    $gameVariables.setValue(1, ++count); // 位于 rpg_scenes.js 第 1707 行,上一行和本行为新增内容,变量1的值表示已存档次数,下一行的 count<=3&& 也为新增内容,表示只能存3次。
    if (count <= 3 && DataManager.saveGame(this.savefileId())) {
        this.onSaveSuccess();
    } else {
        this.onSaveFailure();
    }
};
作者: 雷影    时间: 2024-8-12 22:13
是指存档数量还是存档次数?
后者的话做个存档道具之类的?使用道具后才能打开存档界面!类似生化危机里的色带
作者: gaohanzaici    时间: 2024-8-13 19:04
小秋橙 发表于 2024-8-12 21:51
Scene_Save.prototype.onSavefileOk = function() {
    Scene_File.prototype.onSavefileOk.call(this);
  ...

感谢大佬




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