查看: 2687|回复: 7

[有事请教] 请问有没有在事件中可以进行保存的插件?

[复制链接]
梦石
0
星屑
178
在线时间
12 小时
注册时间
2021-6-22
回帖
10
发表于 2022-8-8 22:44:22 | 显示全部楼层 |阅读模式

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

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

×
想做一个文字类的游戏,游戏中基本都是事件对话,有没有在对话的时候可以保存游戏的插件?谢谢大佬们了
梦石
0
星屑
2429
在线时间
363 小时
注册时间
2021-2-8
回帖
137
发表于 2022-8-8 23:22:25 | 显示全部楼层
本帖最后由 Heiko 于 2022-8-8 23:35 编辑

https://rpg.blue/thread-490078-1-1.html

用这段脚本也可以保存,下面的脚本丢进公共事件,做个对话时显示的按钮/图片,点击调用公共事件酱紫
[pre lang="ruby"]$gameSystem.onBeforeSave();
DataManager.saveGame(1);//1号档位[/pre]
如果是对话中自动存档,就丢进对话中自己执行就可以
回复

使用道具 举报

梦石
0
星屑
22879
在线时间
8598 小时
注册时间
2011-12-31
回帖
3270
发表于 2022-8-9 15:05:11 | 显示全部楼层
回复

使用道具 举报

梦石
0
星屑
178
在线时间
12 小时
注册时间
2021-6-22
回帖
10
 楼主| 发表于 2022-8-10 15:17:00 | 显示全部楼层
Heiko 发表于 2022-8-8 23:22
https://rpg.blue/thread-490078-1-1.html

用这段脚本也可以保存,下面的脚本丢进公共事件,做个对话时显 ...

非常感谢大佬,下班回去试试
回复

使用道具 举报

梦石
0
星屑
178
在线时间
12 小时
注册时间
2021-6-22
回帖
10
 楼主| 发表于 2022-8-10 21:17:52 | 显示全部楼层
tseyik 发表于 2022-8-9 15:05
用這個撻巴

https://rpg.blue/thread-490526-1-1.html

已经下好了,可是发现不知道怎么用有没有比较详细的教程,我比较小白
回复

使用道具 举报

梦石
20
星屑
13965
在线时间
1744 小时
注册时间
2017-1-12
回帖
1667

MZ评测员开拓者

发表于 2022-8-11 08:06:41 | 显示全部楼层
本帖最后由 火锅深处 于 2022-8-11 08:08 编辑

1.最简单但非即时的方法
事件页第3页【场景控制】,有个【打开存档画面】。你可以每当对话进行一段就弹出一次存档画面。

2.即时,但要花银子的方法。
这个插件有这个功能(15美金)
https://visustellamz.itch.io/extended-message-functionality
用的时候需要配合samplegame里的VisuMZ_0_CoreEngine,VisuMZ_1_MessageCore以及VisuMZ_1_SaveCore(免费)
https://visustella.itch.io/visumz-sample
↑虽然列了一堆东西但基本都能即插即用,操作并不复杂,主要是要花钱。

3.3楼的方法
与2的功能类似,但是设置会麻烦一点

4.对话中呼出菜单
这段代码复制粘贴到txt上,然后把文件类型改成js,丢到plugin文件夹。
效果是你在对话的时候按esc会弹出主菜单。
虽然是MV版本的但是MZ应该也能用。
缺点是没测试有没有其他BUG。
[fold=代码]
  1. /*=============================================================================
  2. *  CallMenu.js
  3. *=============================================================================*/

  4. var Imported = Imported || {};
  5. Imported.CallMenu = true;

  6. /*:=============================================================================
  7. * @plugindesc v1.4.6 Call menu during messages\choices on map by pressing one of the standard menu keys ESC, X, Insert, NUM 0.
  8. * @author Krimer
  9. * @help
  10. * If you want call menu during choices just disallow cancel in choice command.
  11. * Place this plugin below non-standard message systems or choice windows in
  12. * plugin manager for better compatibility.

  13. * =============================================================================*/

  14. /*=============================================================================*/
  15. /* Alias */
  16. var _Game_Temp_initialize_Alias = Game_Temp.prototype.initialize;
  17. Game_Temp.prototype.initialize = function() {
  18.         _Game_Temp_initialize_Alias.call(this)
  19.         this._savedInterpreter = null;
  20.         this._lastSelectedChoice = null;
  21. };
  22. /* NEW */
  23. Game_Temp.prototype.saveInterpreter = function(f) {
  24.     this._savedInterpreter = f
  25. };
  26. /* NEW */
  27. Game_Temp.prototype.getSavedInterpreter = function() {
  28.         return this._savedInterpreter
  29. };
  30. /* NEW */
  31. Game_Temp.prototype.setLastSelectedChoice = function(f) {
  32.     this._lastSelectedChoice = f
  33. };
  34. /* NEW */
  35. Game_Temp.prototype.getLastSelectedChoice = function() {
  36.         return this._lastSelectedChoice
  37. };
  38. /* Alias */
  39. var _Window_ChoiceList_callOkHandler = Window_ChoiceList.prototype.callOkHandler
  40. Window_ChoiceList.prototype.callOkHandler = function() {
  41.         $gameTemp.setLastSelectedChoice(null)
  42.         _Window_ChoiceList_callOkHandler.call(this);
  43. };
  44. /* Alias */
  45. var _Window_ChoiceList_callCancelHandler = Window_ChoiceList.prototype.callCancelHandler
  46. Window_ChoiceList.prototype.callCancelHandler = function() {
  47.         $gameTemp.setLastSelectedChoice(null)
  48.         _Window_ChoiceList_callCancelHandler.call(this);
  49. };
  50. /* Alias */
  51. var _Window_ChoiceList_selectDefault = Window_ChoiceList.prototype.selectDefault
  52. Window_ChoiceList.prototype.selectDefault = function() {
  53.         if ($gameTemp.getLastSelectedChoice() !== null){
  54.                 this.select($gameTemp.getLastSelectedChoice());
  55.         } else {
  56.                 _Window_ChoiceList_selectDefault.call(this);
  57.         }  
  58. };
  59. /* Alias*/
  60. var _Window_ChoiceList_update = Window_ChoiceList.prototype.update
  61. Window_ChoiceList.prototype.update = function() {
  62.         _Window_ChoiceList_update.call(this);
  63.          if ((Input.isTriggered('escape') || Input.isTriggered('menu') || TouchInput.isCancelled()) && $gameMessage.isBusy() && $gameSystem.isMenuEnabled()) {
  64.                 $gameTemp.setLastSelectedChoice(this._index)
  65.     }

  66. };

  67. /* Alias */
  68. var _Game_Interpreter_setupChoices_Alias = Game_Interpreter.prototype.setupChoices;
  69. Game_Interpreter.prototype.setupChoices = function(params) {
  70.         _Game_Interpreter_setupChoices_Alias.call(this, params);
  71.         $gameTemp.saveInterpreter(this)
  72. };
  73. /* Alias */
  74. var _DataManager_makeSaveContents_Alias = DataManager.makeSaveContents;
  75. DataManager.makeSaveContents = function () {
  76.     var contents = _DataManager_makeSaveContents_Alias.call(this);
  77.     contents.message = $gameMessage;
  78.         if ($gameMessage._choices.length !== 0) {
  79.            contents.interpreter = $gameTemp.getSavedInterpreter()
  80.         }
  81.     return contents;
  82. };
  83. /* Alias */
  84. var _DataManager_extractSaveContents_Alias = DataManager.extractSaveContents;
  85. DataManager.extractSaveContents = function (contents) {
  86.     _DataManager_extractSaveContents_Alias.call(this, contents);
  87.     $gameMessage = contents.message;
  88.         if ($gameMessage._choices.length !== 0) {
  89.                 var gameInterpreter = contents.interpreter
  90.                 $gameTemp.saveInterpreter(gameInterpreter)
  91.                 $gameMessage.setChoiceCallback(function(n) {
  92.                         gameInterpreter._branch[gameInterpreter._indent] = n;
  93.                 }.bind(this));
  94.         }
  95. };
  96. /* Alias */
  97. var _Scene_Map_update_Alias = Scene_Map.prototype.update;
  98. Scene_Map.prototype.update = function () {
  99.     _Scene_Map_update_Alias.call(this);
  100.     if ((Input.isTriggered('escape') || Input.isTriggered('menu') || TouchInput.isCancelled()) && $gameMessage.isBusy() && $gameSystem.isMenuEnabled()) {
  101.         this.callMenu();
  102.     }
  103. };
  104. /* OVERWRITE */
  105. Window_Message.prototype.isTriggered = function () {
  106.     return (Input.isRepeated('ok') || TouchInput.isRepeated());
  107. };
  108. /* Alias */
  109. var _Window_ChoiceList_WidthEx_Alias = Window_ChoiceList.prototype.textWidthEx;
  110. Window_ChoiceList.prototype.textWidthEx = function (text) {
  111.         if(!SceneManager._scene.isActive()) return;
  112.         return _Window_ChoiceList_WidthEx_Alias.call(this, text);
  113. };
  114. /* HIME_HiddenChoiceConditions Compatibility */
  115. var _Window_ChoiceList_makeCommandList_Alias = Window_ChoiceList.prototype.makeCommandList
  116. Window_ChoiceList.prototype.makeCommandList = function() {
  117.         if(!SceneManager._scene.isActive()) return;
  118.         _Window_ChoiceList_makeCommandList_Alias.call(this);
  119. }
  120. /* Galv_VisualNovelChoices Compatibility */
  121. if (Imported.Galv_VisualNovelChoices) {
  122.         var _Window_ChoiceList_drawItem_Alias = Window_ChoiceList.prototype.drawItem
  123.         Window_ChoiceList.prototype.drawItem = function(index) {
  124.         if(typeof this.choice_background === 'undefined'){
  125.                 this.choice_background = [];
  126.         };
  127.                 _Window_ChoiceList_drawItem_Alias.call(this, index);
  128.         };
  129. }
  130. /* SRD_TitleCommandCustomizer Compatibility */
  131. if (Imported["SumRndmDde Title Command Customizer"]) {
  132.         var _Scene_Title_createMessageWindow_Alias = Scene_Title.prototype.createMessageWindow
  133.         Scene_Title.prototype.createMessageWindow = function() {
  134.                 $gameMessage.clear();
  135.                 _Scene_Title_createMessageWindow_Alias.call(this)

  136.         };
  137. }

  138. /* End of File */
  139. /*=============================================================================*/
复制代码
[/fold]
回复

使用道具 举报

梦石
0
星屑
178
在线时间
12 小时
注册时间
2021-6-22
回帖
10
 楼主| 发表于 2022-8-11 15:04:08 | 显示全部楼层
火锅深处 发表于 2022-8-11 08:06
1.最简单但非即时的方法
事件页第3页【场景控制】,有个【打开存档画面】。你可以每当对话进行一段就弹出一 ...

非常感谢大佬,我回去试试第四个方法。实在不行第一个方法对我来说也够用了
回复

使用道具 举报

梦石
0
星屑
22879
在线时间
8598 小时
注册时间
2011-12-31
回帖
3270
发表于 2022-8-11 22:36:49 | 显示全部楼层
liu7liu 发表于 2022-8-10 21:17
已经下好了,可是发现不知道怎么用有没有比较详细的教程,我比较小白 ...

先加入插件(2個)和必要圖象
220421151726352bc49c6cc74e.jpg
aaa.jpg
設個對話事件
6cc74e.jpg
game中進行對話事件
CharacterMake1.jpg
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部