查看: 6738|回复: 10

[已经过期] 请问一下mv如何实现自动存读档呢

[复制链接]
梦石
0
星屑
74
在线时间
117 小时
注册时间
2007-8-5
回帖
430
发表于 2017-2-23 15:37:48 来自手机 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
就是可以在某个事件执行完后自动存档,还有进入游戏选择读档直接读取进度进行游戏
梦石
2
星屑
4033
在线时间
400 小时
注册时间
2016-7-16
回帖
166

开拓者

发表于 2017-2-23 16:19:17 | 显示全部楼层
一声不响地存档个人觉得不太好吧
不过这里给你两条脚本吧!希望能帮到你
调出读档界面:SceneManager.push(Scene_Load);
调出存档界面:SceneManager.push(Scene_Save);

点评

不好意思手机抽风了回了两条  发表于 2017-2-23 17:05
@sonicdonggua 不用那条脚本就行了呗:)读档总有用吧  发表于 2017-2-23 16:44
那这样还不如直接事件打开存档界面  发表于 2017-2-23 16:39
那这样还不如直接事件打开存档界面  发表于 2017-2-23 16:37
Pixiv:https://www.pixiv.net/member.php?id=3623760
新浪微博:http://weibo.com/2907816685/profile?topnav=1&wvr=6
回复

使用道具 举报

梦石
0
星屑
74
在线时间
117 小时
注册时间
2007-8-5
回帖
430
 楼主| 发表于 2017-2-23 16:45:42 来自手机 | 显示全部楼层
青鸫 发表于 2017-2-23 16:19
一声不响地存档个人觉得不太好吧
不过这里给你两条脚本吧!希望能帮到你
调出读档界面:SceneMana ...

因为游戏需要,想只用一个存档……
回复

使用道具 举报

梦石
0
星屑
440
在线时间
679 小时
注册时间
2014-3-15
回帖
239

开拓者

发表于 2017-2-23 17:07:05 | 显示全部楼层
本帖最后由 sonicdonggua 于 2017-2-23 17:08 编辑

DataManager.saveGame(fileID);fileID换成你想存档的位置,未测试
建议后面附加一条提示,提示已经自动保存过
回复

使用道具 举报

梦石
0
星屑
22879
在线时间
8598 小时
注册时间
2011-12-31
回帖
3270
发表于 2017-2-23 18:30:34 | 显示全部楼层
本帖最后由 tseyik 于 2017-2-23 18:55 编辑

http://torigoya.hatenadiary.jp/entry/save_command_mv

* Plugin Command:
*   SaveCommand save 1       # save to slot 1
*   SaveCommand save [1]     # save to slot variables[1]
*   SaveCommand save last    # save to last accessed file
*   SaveCommand load 1       # load from slot 1
*   SaveCommand load [1]     # load from slot variables[1]
*   SaveCommand load last    # load from last accessed file
*   SaveCommand remove 1     # remove save file of slot 1
*   SaveCommand remove [1]   # remove save file of slot variables[1]
*   SaveCommand remove last  # remove last accessed file
Torigoya_SaveCommand.js
  1. //=============================================================================
  2. // Torigoya_SaveCommand.js
  3. //=============================================================================

  4. /*:
  5. * @plugindesc Add save command in Plugin Command
  6. * @author ru_shalm
  7. *
  8. * @help
  9. *
  10. * Plugin Command:
  11. *   SaveCommand save 1       # save to slot 1
  12. *   SaveCommand save [1]     # save to slot variables[1]
  13. *   SaveCommand save last    # save to last accessed file
  14. *   SaveCommand load 1       # load from slot 1
  15. *   SaveCommand load [1]     # load from slot variables[1]
  16. *   SaveCommand load last    # load from last accessed file
  17. *   SaveCommand remove 1     # remove save file of slot 1
  18. *   SaveCommand remove [1]   # remove save file of slot variables[1]
  19. *   SaveCommand remove last  # remove last accessed file
  20. *
  21. * (default last accessed file: 1)
  22. */

  23. /*:ja
  24. * @plugindesc プラグインコマンドからセーブを実行できるようにします。
  25. * @author ru_shalm
  26. *
  27. * @help
  28. *
  29. * プラグインコマンド:
  30. *   SaveCommand save 1       # スロット1にセーブを実行します。
  31. *   SaveCommand save [1]     # 変数[1]番のスロットにセーブを実行します。
  32. *   SaveCommand save last    # 前回ロード/セーブしたスロットにセーブを実行します。
  33. *   SaveCommand load 1       # スロット1からロードを実行します。
  34. *   SaveCommand load [1]     # 変数[1]番のスロットからロードを実行します。
  35. *   SaveCommand load last    # 前回ロード/セーブしたスロットからロードを実行します。
  36. *   SaveCommand remove 1     # スロット1のセーブデータを削除します。
  37. *   SaveCommand remove [1]   # 変数[1]番のスロットのセーブデータを削除します。
  38. *   SaveCommand save last    # 前回ロード/セーブしたスロットのセーブデータを削除します。
  39. *
  40. * ※ 前回保存したスロットのデフォルト値は 1 です。
  41. */

  42. (function (global) {
  43.     var SaveCommand = {};

  44.     SaveCommand.parseSlotId = function (str) {
  45.         var slotId, matches;
  46.         if (matches = str.match(/^\[(\d+)\]$/)) {
  47.             slotId = $gameVariables.value(~~matches[1]);
  48.         } else if (str.match(/^\d+$/)) {
  49.             slotId = ~~str;
  50.         } else {
  51.             switch (str) {
  52.                 case 'last':
  53.                     slotId = DataManager.lastAccessedSavefileId();
  54.                     break;
  55.                 case 'latest':
  56.                     slotId = DataManager.latestSavefileId();
  57.                     break;
  58.             }
  59.         }

  60.         if (~~slotId <= 0) {
  61.             throw '[Torigoya_SaveCommand.js] invalid SlotId: ' + slotId;
  62.         }

  63.         return slotId;
  64.     };

  65.     SaveCommand.runCommand = function (gameInterpreter, type, slotId) {
  66.         switch (type) {
  67.             case 'load':
  68.                 this.runCommandLoad(gameInterpreter, slotId);
  69.                 break;
  70.             case 'save':
  71.                 this.runCommandSave(gameInterpreter, slotId);
  72.                 break;
  73.             case 'remove':
  74.                 this.runCommandRemove(gameInterpreter, slotId);
  75.                 break;
  76.         }
  77.     };

  78.     // 無理やり感ある
  79.     SaveCommand.runCommandLoad = function (gameInterpreter, slotId) {
  80.         if (!DataManager.isThisGameFile(slotId)) return;

  81.         var scene = SceneManager._scene;
  82.         scene.fadeOutAll();
  83.         DataManager.loadGame(slotId);
  84.         gameInterpreter.command115(); // 今のイベントが継続しないように中断コマンドを実行する
  85.         Scene_Load.prototype.reloadMapIfUpdated.apply(scene);
  86.         SceneManager.goto(Scene_Map);
  87.         $gameSystem.onAfterLoad();
  88.     };

  89.     SaveCommand.runCommandSave = function (_, slotId) {
  90.         $gameSystem.onBeforeSave();
  91.         if (DataManager.saveGame(slotId)) {
  92.             StorageManager.cleanBackup(slotId);
  93.         }
  94.     };

  95.     SaveCommand.runCommandRemove = function (_, slotId) {
  96.         StorageManager.remove(slotId);
  97.     };

  98.     var upstream_Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
  99.     Game_Interpreter.prototype.pluginCommand = function (command, args) {
  100.         if (command === 'SaveCommand') {
  101.             var type = (args[0] || '').trim();
  102.             var slotId = SaveCommand.parseSlotId((args[1] || '').trim());
  103.             SaveCommand.runCommand(this, type, slotId);
  104.             return;
  105.         }
  106.         upstream_Game_Interpreter_pluginCommand.apply(this, arguments);
  107.     };

  108.     // -------------------------------------------------------------------------
  109.     global.Torigoya = (global.Torigoya || {});
  110.     global.Torigoya.SaveCommand = SaveCommand;
  111. })(this);
复制代码
回复

使用道具 举报

梦石
0
星屑
74
在线时间
117 小时
注册时间
2007-8-5
回帖
430
 楼主| 发表于 2017-2-24 08:48:16 来自手机 | 显示全部楼层
tseyik 发表于 2017-2-23 18:30
http://torigoya.hatenadiary.jp/entry/save_command_mv

* Plugin Command:

谢谢
回复

使用道具 举报

梦石
0
星屑
50
在线时间
10 小时
注册时间
2017-1-18
回帖
11
发表于 2017-5-15 15:07:14 | 显示全部楼层
{:2_248:}以前ace的时候我也弄过自动存档,在有随机的地方自动存档免得别人一直刷,但是感觉没什么必要,因为到时候到重要的地方别人可以手动操作把存档先复制一份,你这只是加大了别人刷的时间让人觉得游戏更费时。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部