设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 5386|回复: 8
打印 上一主题 下一主题

[已经解决] 【分享】[VA二周目]各方法整合討論&1個意譯二周目腳本

[复制链接]

Lv2.观梦者

梦石
0
星屑
284
在线时间
271 小时
注册时间
2013-4-23
帖子
143
跳转到指定楼层
1
发表于 2013-6-28 00:44:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 Sion 于 2014-4-8 18:10 编辑

有關VA的二周目方法我找了半天,沒幾個帖有中文介紹二周目的腳本或方法
太令人傷心吧

免得有好像有我一樣的事件廢,腳本廢,伸手黨,超級新手小白等等四處不停地問二周目的方法
我開一開帖把找到的分享和討論一下
(有錯出聲勿插,我只是分享下資料也不是偷別人的東西.....)
(原本是想開在[RPG Maker 技术讨论区]的可是那兒好想沒多少新人看....?所以發到這兒了)
先簡單,後複雜

方法一:关闭所有开关、独立开关,清理变量
(來源:http://rpg.blue/thread-289239-1-1.html   4樓)
通關後,问是否进入二周目
选是的话就关闭所有开关、独立开关还有清理变量
脚本:(在事件中使用)
RUBY 代码复制
  1. $game_self_switches.instance_eval { @data.clear }
  2. $game_switches.instance_eval { @data.clear }
  3. $game_variables.instance_eval { @data.clear }
可能遇到的問題請看:http://rpg.blue/thread-276636-1-1.html


之后场所移动到某空白地图,
打开存档页面让玩家存档,
之后结束游戏
然后那个空白地图就设置一个自动事件,场所移动到初始地图

效果&合適對象:
直接在同一個存檔繼承二周目的方法,最方便快捷的方法
可是並非真正開新遊戲的二周目,可以說是假的方法
適合一些對二周目需求不大的游戲,或是懶人



方法二:创建N周目判定文件
(原教程:http://tieba.baidu.com/p/2201253419#30136627140l       BY极光涵影)

首先把腳本中[DataManager][設定新游戲]部分改一改(約第99行)

原碼:
RUBY 代码复制
  1. def self.setup_new_game
  2.         create_game_objects
  3.         $game_party.setup_starting_members
  4.         $game_map.setup($data_system.start_map_id)
  5.         $game_player.moveto($data_system.start_x, $data_system.start_y)
  6.         $game_player.refresh
  7.         Graphics.frame_count = 0
  8.     end



改為:
RUBY 代码复制
  1. def self.setup_new_game
  2.     if FileTest.exist?("FinishedA.rvdata2") #如果多周目就按照A B的排序方式自己向下建
  3.       create_game_objects
  4.       $game_party.setup_starting_members
  5.       $game_map.setup(3)                    #括号内的事二周目初始位置地图ID
  6.       $game_player.moveto(8, 6)             #括号里面是新地图的初始位置XY坐标 自己调整
  7.       $game_player.refresh
  8.       Graphics.frame_count = 0
  9.     else
  10.       create_game_objects
  11.       $game_party.setup_starting_members
  12.       $game_map.setup($data_system.start_map_id)
  13.       $game_player.moveto($data_system.start_x, $data_system.start_y)
  14.       $game_player.refresh
  15.       Graphics.frame_count = 0
  16.     end
  17.   end



在通关时的事件中加插下方的脚本[*1]
RUBY 代码复制
  1. file = File.open("FinishedA.rvdata2", "wb")
  2. Marshal.dump($game_variables, file)     #變量
  3. file.close



效果&合適對象:
當你在通关时的事件用了[*1]的腳本後,
腳本運行會做出一個叫"Finished(X).rvdata2"的檔案    [(X)為你自己設定的第N周目]
之後開新游戏時,會判定是否有N周目的文件,若存在则更改主角初始位置
在新地圖设置开关开启,达到二周目隐藏事件的效果
適合需要到變量繼承的遊戲,如果是一些事件式標題可以乘機在二周目改變樣式


方法三:通关次數变量
這個嘛……小的事實其實對這個方法看了也是一知半解不是完全明白_(:3」 ∠)_
看官請自行到有關原帖了解
(http://rpg.blue/thread-286862-1-1.html   3樓)
不過原理大約和方法二差不多,只是它是記錄通关次數变量的


之後。。。。

放上懶人期待的  Yanfly  VA二周目腳本
對了其實這個是某VA整合版中的腳本
小的為了研究如何便用這東西把它意譯

觸發這個腳本的方法已經找到....
大家眼殘看少一句必要的腳本要一起使用
YEA - Ace Save Engine v1.01+(簡單來說他自家的VA存檔強化腳本)
可是用了這個便不能用截图存档了~



Yanfly  VA二周目原腳本:
RUBY 代码复制
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Save Engine Add-On: New Game+ v1.00
  4. # -- Last Updated: 2011.12.26
  5. # -- Level: Normal
  6. # -- Requires: YEA - Ace Save Engine v1.01+
  7. #
  8. #==============================================================================
  9.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-NewGame+"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2011.12.26 - Started Script and Finished.
  17. #
  18. #==============================================================================
  19. # ▼ Introduction
  20. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  21. # New Game+ is a great way to provide replay value for your game. It lets the
  22. # player re-experience the game in a different way with either carried over
  23. # items, to carried over party members, to carried over skills, switches, and
  24. # variables even. There exists many options to change how New Game+ will work
  25. # for your game.
  26. #
  27. #==============================================================================
  28. # ▼ Instructions
  29. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  30. # To install this script, open up your script editor and copy/paste this script
  31. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  32. #
  33. # -----------------------------------------------------------------------------
  34. # Item Notetags - These notetags go in the items notebox in the database.
  35. # -----------------------------------------------------------------------------
  36. # <no carry over>
  37. # This will cause this specific item to not carry over in New Game+ if the item
  38. # can be carried over. This does not affect any items that actors may have
  39. # equipped.
  40. #
  41. # -----------------------------------------------------------------------------
  42. # Weapon Notetags - These notetags go in the weapons notebox in the database.
  43. # -----------------------------------------------------------------------------
  44. # <no carry over>
  45. # This will cause this specific item to not carry over in New Game+ if the item
  46. # can be carried over. This does not affect any items that actors may have
  47. # equipped.
  48. #
  49. # -----------------------------------------------------------------------------
  50. # Armour Notetags - These notetags go in the armours notebox in the database.
  51. # -----------------------------------------------------------------------------
  52. # <no carry over>
  53. # This will cause this specific item to not carry over in New Game+ if the item
  54. # can be carried over. This does not affect any items that actors may have
  55. # equipped.
  56. #
  57. #==============================================================================
  58. # ▼ Compatibility
  59. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  60. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  61. # it will run with RPG Maker VX without adjusting.
  62. #
  63. # This script requires Yanfly Engine Ace - Ace Save Engine v1.01+ and the
  64. # script must be placed under Ace Save Engine in the script listing.
  65. #
  66. #==============================================================================
  67.  
  68. module YEA
  69.   module NEW_GAME_PLUS
  70.  
  71.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  72.     # - General Settings -
  73.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  74.     # Description
  75.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  76.     NGP_SWITCH = 203           # If Switch ON, the game file has NG+ flag.
  77.     NGP_TEXT   = "周目"   # Text used to show New Game+.
  78.  
  79.     # This is the help window text used for New Game+ when the New Game+
  80.     # option is highlighted.
  81.     NGP_HELP   = "继承新存档."
  82.  
  83.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  84.     # - Carry Over Settings -
  85.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  86.     # These settings adjust what carries over and what doesn't. These settings
  87.     # are very specific so adjust them carefully.
  88.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  89.     # This array contains all of the switches that you want carried over to
  90.     # be maintained. Any switches that aren't here will be set false.
  91.     CARRY_OVER_SWITCHES = [3, 6, 7,12,15,16,17,18]
  92.  
  93.     # This array contains all of the variables that you want carried over to
  94.     # be maintained. Any variables that aren't here will be set to 0.
  95.     CARRY_OVER_VARIABLES = [1,2,3,4,5]
  96.  
  97.     # If this is set to false, then actors will be completely reset back to
  98.     # their original starting states. If it's set to true, then actors will
  99.     # be kept exactly as they are.
  100.     CARRY_OVER_ACTORS = true
  101.  
  102.     # These settings are only used if actors will be carried over. With this,
  103.     # you can limit what specifics will be carried over for actors from levels
  104.     # to equips to skills.
  105.     CARRY_OVER_LEVELS = true
  106.     CARRY_OVER_EQUIPS = true
  107.     CARRY_OVER_SKILLS = true
  108.  
  109.     # If this is set to false, then the party members will revert back to the
  110.     # original starting party members. If it's true, then the party setup will
  111.     # remain exactly the same.
  112.     CARRY_OVER_PARTY_MEMBERS = true
  113.  
  114.     # If any of these are set to false, then no items, weapons, or armours will
  115.     # be carried over. If it's set to true, then the respective items will be
  116.     # carried over to the newer game.
  117.     CARRY_OVER_GOLD    = true
  118.     CARRY_OVER_ITEMS   = true
  119.     CARRY_OVER_WEAPONS = true
  120.     CARRY_OVER_ARMOURS = true
  121.  
  122.   end # NEW_GAME_PLUS
  123. end # YEA
  124.  
  125. #==============================================================================
  126. # ▼ Editting anything past this point may potentially result in causing
  127. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  128. # halitosis so edit at your own risk.
  129. #==============================================================================
  130.  
  131. if $imported["YEA-SaveEngine"]
  132.  
  133. module YEA
  134.   module NEW_GAME_PLUS
  135.     module_function
  136.     #--------------------------------------------------------------------------
  137.     # convert_integer_array
  138.     #--------------------------------------------------------------------------
  139.     def convert_integer_array(array)
  140.       result = []
  141.       array.each { |i|
  142.         case i
  143.         when Range; result |= i.to_a
  144.         when Integer; result |= [i]
  145.         end }
  146.       return result
  147.     end
  148.     #--------------------------------------------------------------------------
  149.     # converted_contants
  150.     #--------------------------------------------------------------------------
  151.     CARRY_OVER_SWITCHES = convert_integer_array(CARRY_OVER_SWITCHES)
  152.     CARRY_OVER_VARIABLES = convert_integer_array(CARRY_OVER_VARIABLES)
  153.   end # NEW_GAME_PLUS
  154.   module REGEXP
  155.   module BASEITEM
  156.  
  157.     NO_CARRY_OVER = /<(?:NO_CARRY_OVER|no carry over)>/i
  158.  
  159.   end # BASEITEM
  160.   end # REGEXP
  161. end # YEA
  162.  
  163. #==============================================================================
  164. # ■ DataManager
  165. #==============================================================================
  166.  
  167. module DataManager
  168.  
  169.   #--------------------------------------------------------------------------
  170.   # alias method: load_database
  171.   #--------------------------------------------------------------------------
  172.   class <<self; alias load_database_ngp load_database; end
  173.   def self.load_database
  174.     load_database_ngp
  175.     load_notetags_ngp
  176.   end
  177.  
  178.   #--------------------------------------------------------------------------
  179.   # new method: load_notetags_ngp
  180.   #--------------------------------------------------------------------------
  181.   def self.load_notetags_ngp
  182.     groups = [$data_items, $data_weapons, $data_armors]
  183.     for group in groups
  184.       for obj in group
  185.         next if obj.nil?
  186.         obj.load_notetags_ngp
  187.       end
  188.     end
  189.   end
  190.  
  191. end # DataManager
  192.  
  193. #==============================================================================
  194. # ■ RPG::BaseItem
  195. #==============================================================================
  196.  
  197. class RPG::BaseItem
  198.  
  199.   #--------------------------------------------------------------------------
  200.   # public instance variables
  201.   #--------------------------------------------------------------------------
  202.   attr_accessor :no_carry_over
  203.  
  204.   #--------------------------------------------------------------------------
  205.   # common cache: load_notetags_ngp
  206.   #--------------------------------------------------------------------------
  207.   def load_notetags_ngp
  208.     @no_carry_over = false
  209.     #---
  210.     self.note.split(/[\r\n]+/).each { |line|
  211.       case line
  212.       #---
  213.       when YEA::REGEXP::BASEITEM::NO_CARRY_OVER
  214.         @no_carry_over = true
  215.       end
  216.     } # self.note.split
  217.     #---
  218.   end
  219.  
  220. end # RPG::BaseItem
  221.  
  222. #==============================================================================
  223. # ■ Switch
  224. #==============================================================================
  225.  
  226. module Switch
  227.  
  228.   #--------------------------------------------------------------------------
  229.   # self.new_game_plus
  230.   #--------------------------------------------------------------------------
  231.   def self.new_game_plus
  232.     return $game_switches[YEA::NEW_GAME_PLUS::NGP_SWITCH]
  233.   end
  234.  
  235. end # Switch
  236.  
  237. #==============================================================================
  238. # ■ DataManager
  239. #==============================================================================
  240.  
  241. module DataManager
  242.  
  243.   #--------------------------------------------------------------------------
  244.   # new method: setup_new_game_plus
  245.   #--------------------------------------------------------------------------
  246.   def self.setup_new_game_plus(index)
  247.     create_new_game_plus_objects(index)
  248.     $game_map.setup($data_system.start_map_id)
  249.     $game_player.moveto($data_system.start_x, $data_system.start_y)
  250.     $game_player.refresh
  251.     Graphics.frame_count = 0
  252.   end
  253.  
  254.   #--------------------------------------------------------------------------
  255.   # new method: create_new_game_plus_objects
  256.   #--------------------------------------------------------------------------
  257.   def self.create_new_game_plus_objects(index)
  258.     load_game_without_rescue(index)
  259.     ngp_reset_switches
  260.     ngp_reset_variables
  261.     ngp_reset_self_switches
  262.     ngp_reset_actors
  263.     ngp_reset_party
  264.   end
  265.  
  266.   #--------------------------------------------------------------------------
  267.   # new method: ngp_reset_switches
  268.   #--------------------------------------------------------------------------
  269.   def self.ngp_reset_switches
  270.     for i in 0...$data_system.switches.size
  271.       next if i <= 0
  272.       next if YEA::NEW_GAME_PLUS::CARRY_OVER_SWITCHES.include?(i)
  273.       $game_switches[i] = false
  274.     end
  275.   end
  276.  
  277.   #--------------------------------------------------------------------------
  278.   # new method: ngp_reset_variables
  279.   #--------------------------------------------------------------------------
  280.   def self.ngp_reset_variables
  281.     for i in 0...$data_system.variables.size
  282.       next if i <= 0
  283.       next if YEA::NEW_GAME_PLUS::CARRY_OVER_VARIABLES.include?(i)
  284.       $game_variables[i] = 0
  285.     end
  286.   end
  287.  
  288.   #--------------------------------------------------------------------------
  289.   # new method: ngp_reset_self_switches
  290.   #--------------------------------------------------------------------------
  291.   def self.ngp_reset_self_switches
  292.     $game_self_switches = Game_SelfSwitches.new
  293.   end
  294.  
  295.   #--------------------------------------------------------------------------
  296.   # new method: ngp_reset_actors
  297.   #--------------------------------------------------------------------------
  298.   def self.ngp_reset_actors
  299.     unless YEA::NEW_GAME_PLUS::CARRY_OVER_ACTORS
  300.       $game_actors = Game_Actors.new
  301.     else
  302.       #---
  303.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_LEVELS
  304.         for i in 0...$data_actors.size
  305.           actor = $game_actors[i]
  306.           next if actor.nil?
  307.           actor.new_game_plus_levels
  308.         end
  309.       end
  310.       #---
  311.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_EQUIPS
  312.         for i in 0...$data_actors.size
  313.           actor = $game_actors[i]
  314.           next if actor.nil?
  315.           actor.new_game_plus_equips
  316.         end
  317.       end
  318.       #---
  319.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_SKILLS
  320.         for i in 0...$data_actors.size
  321.           actor = $game_actors[i]
  322.           next if actor.nil?
  323.           actor.new_game_plus_skills
  324.         end
  325.       end
  326.       #---
  327.     end
  328.   end
  329.  
  330.   #--------------------------------------------------------------------------
  331.   # new method: ngp_reset_party
  332.   #--------------------------------------------------------------------------
  333.   def self.ngp_reset_party
  334.     gold = 0
  335.     items = {}
  336.     members = []
  337.     #---
  338.     if YEA::NEW_GAME_PLUS::CARRY_OVER_PARTY_MEMBERS
  339.       for member in $game_party.members
  340.         members.push(member.id)
  341.       end
  342.     end
  343.     #---
  344.     gold = $game_party.gold if YEA::NEW_GAME_PLUS::CARRY_OVER_GOLD
  345.     #---
  346.     if YEA::NEW_GAME_PLUS::CARRY_OVER_ITEMS
  347.       for item in $data_items
  348.         next if item.nil?
  349.         next if item.no_carry_over
  350.         items[item] = $game_party.item_number(item)
  351.       end
  352.     end
  353.     #---
  354.     if YEA::NEW_GAME_PLUS::CARRY_OVER_WEAPONS
  355.       for item in $data_weapons
  356.         next if item.nil?
  357.         next if item.no_carry_over
  358.         items[item] = $game_party.item_number(item)
  359.       end
  360.     end
  361.     #---
  362.     if YEA::NEW_GAME_PLUS::CARRY_OVER_ARMOURS
  363.       for item in $data_armors
  364.         next if item.nil?
  365.         next if item.no_carry_over
  366.         items[item] = $game_party.item_number(item)
  367.       end
  368.     end
  369.     #---
  370.     $game_party = Game_Party.new
  371.     unless YEA::NEW_GAME_PLUS::CARRY_OVER_PARTY_MEMBERS
  372.       $game_party.setup_starting_members
  373.     end
  374.     #---
  375.     for member_id in members
  376.       $game_party.add_actor(member_id)
  377.     end
  378.     $game_party.gain_gold(gold)
  379.     for key in items
  380.       item = key[0]
  381.       next if item.nil?
  382.       $game_party.gain_item(item, key[1])
  383.     end
  384.   end
  385.  
  386. end # DataManager
  387.  
  388. #==============================================================================
  389. # ■ Game_Actor
  390. #==============================================================================
  391.  
  392. class Game_Actor < Game_Battler
  393.  
  394.   #--------------------------------------------------------------------------
  395.   # new method: new_game_plus_levels
  396.   #--------------------------------------------------------------------------
  397.   def new_game_plus_levels
  398.     @class_id = actor.class_id
  399.     [url=home.php?mod=space&uid=22147]@level[/url] = actor.initial_level
  400.     [url=home.php?mod=space&uid=13302]@exp[/url] = {}
  401.     if $imported["YEA-ClassSystem"]
  402.       init_unlocked_classes
  403.       init_subclass
  404.     end
  405.     clear_param_plus
  406.     init_exp
  407.     refresh
  408.   end
  409.  
  410.   #--------------------------------------------------------------------------
  411.   # new method: new_game_plus_equips
  412.   #--------------------------------------------------------------------------
  413.   def new_game_plus_equips
  414.     init_equips(actor.equips)
  415.   end
  416.  
  417.   #--------------------------------------------------------------------------
  418.   # new method: new_game_plus_skills
  419.   #--------------------------------------------------------------------------
  420.   def new_game_plus_skills
  421.     init_skills
  422.   end
  423.  
  424. end # Game_Actor
  425.  
  426. #==============================================================================
  427. # ■ Window_FileAction
  428. #==============================================================================
  429.  
  430. class Window_FileAction < Window_HorzCommand
  431.  
  432.   #--------------------------------------------------------------------------
  433.   # alias method: add_load_command
  434.   #--------------------------------------------------------------------------
  435.   alias add_load_command_ngp add_load_command
  436.   def add_load_command
  437.     if new_game_plus?
  438.       add_command(YEA::NEW_GAME_PLUS::NGP_TEXT, :new_game_plus)
  439.     else
  440.       add_load_command_ngp
  441.     end
  442.   end
  443.  
  444.   #--------------------------------------------------------------------------
  445.   # new method: new_game_plus?
  446.   #--------------------------------------------------------------------------
  447.   def new_game_plus?
  448.     return false if @header.nil?
  449.     return false if @header[:switches].nil?
  450.     return @header[:switches][YEA::NEW_GAME_PLUS::NGP_SWITCH]
  451.   end
  452.  
  453.   #--------------------------------------------------------------------------
  454.   # alias method: update_help
  455.   #--------------------------------------------------------------------------
  456.   alias update_help_ngp update_help
  457.   def update_help
  458.     case current_symbol
  459.     when :new_game_plus; @help_window.set_text(YEA::NEW_GAME_PLUS::NGP_HELP)
  460.     else; update_help_ngp
  461.     end
  462.   end
  463.  
  464. end # Window_FileAction
  465.  
  466. #==============================================================================
  467. # ■ Scene_File
  468. #==============================================================================
  469.  
  470. class Scene_File < Scene_MenuBase
  471.  
  472.   #--------------------------------------------------------------------------
  473.   # alias method: create_action_window
  474.   #--------------------------------------------------------------------------
  475.   alias create_action_window_ngp create_action_window
  476.   def create_action_window
  477.     create_action_window_ngp
  478.     @action_window.set_handler(:new_game_plus, method(:on_action_ngp))
  479.   end
  480.  
  481.   #--------------------------------------------------------------------------
  482.   # new method: on_action_ngp
  483.   #--------------------------------------------------------------------------
  484.   def on_action_ngp
  485.     Sound.play_load
  486.     DataManager.setup_new_game_plus(@file_window.index)
  487.     fadeout_all
  488.     $game_system.on_after_load
  489.     SceneManager.goto(Scene_Map)
  490.   end
  491.  
  492. end # Scene_File
  493.  
  494. end # $imported["YEA-SaveEngine"]
  495.  
  496. #==============================================================================
  497. #
  498. # ▼ End of File
  499. #
  500. #==============================================================================


意譯後:
RUBY 代码复制
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly引擎ACE - 附加儲存引擎:New Game+ V1.00
  4. # - 最後更新:2011.12.26
  5. # - 等級:普通
  6. # - 需要:YEA - Ace Save Engine v1.01+
  7. #==============================================================================
  8.  
  9. $imported = {} if $imported.nil?
  10. $imported["YEA-NewGame+"] = true
  11.  
  12. #==============================================================================
  13. # ▼ 更新
  14. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  15. # 2011.12.26 - 完成成品
  16. #
  17. #==============================================================================
  18. # ▼ 簡介
  19. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  20. # New Game+ 是一個很好的腳本為您的遊戲增加重玩的要素。它可以讓玩家以不同的方式
  21. # 重新體驗遊戲。功能為繼承物品,轉換成員,技能保留,保存變量,開關等。存在很多
  22. # 選項來改變你的遊戲。
  23. #
  24. #==============================================================================
  25. # ▼ 說明
  26. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  27. # 要使用此腳本,打開你的腳本編輯器和複製/粘貼此腳本
  28. # 低於▼場景 但在 ▼ Main 之上 ,記得保存。
  29. #
  30. # -----------------------------------------------------------------------------
  31. # 物品 Notetags - These notetags go in the items notebox in the database.
  32. # -----------------------------------------------------------------------------
  33. # <no carry over>
  34. # This will cause this specific item to not carry over in New Game+ if the item
  35. # can be carried over. This does not affect any items that actors may have
  36. # equipped.
  37. #
  38. # -----------------------------------------------------------------------------
  39. # 武器 Notetags - These notetags go in the weapons notebox in the database.
  40. # -----------------------------------------------------------------------------
  41. # <no carry over>
  42. # This will cause this specific item to not carry over in New Game+ if the item
  43. # can be carried over. This does not affect any items that actors may have
  44. # equipped.
  45. #
  46. # -----------------------------------------------------------------------------
  47. # 裝備 Notetags - These notetags go in the armours notebox in the database.
  48. # -----------------------------------------------------------------------------
  49. # <no carry over>
  50. # This will cause this specific item to not carry over in New Game+ if the item
  51. # can be carried over. This does not affect any items that actors may have
  52. # equipped.
  53. #
  54. #==============================================================================
  55. # ▼ 兼容性
  56. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  57. # 這個腳本是 RPG Maker VX Ace 專用.這是極不可能的用在 RPG Maker VX
  58. #
  59. #
  60. # 這個腳本需要 Yanfly Engine Ace - Ace Save Engine v1.01+
  61. # 腳本必須放在腳本列表中 Ace Save 引擎之下.
  62. #
  63. #==============================================================================
  64.  
  65. module YEA
  66.   module NEW_GAME_PLUS
  67.  
  68.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  69.     # -常規設置 -
  70.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  71.     # 說明
  72.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  73.     NGP_SWITCH = 203           # 如果開關ON,遊戲文件有NG +標誌。
  74.     NGP_TEXT   = "周目"   # Text 用來顯示新周目。
  75.  
  76.     # 這是幫助窗口(提示的字樣?)的字句用於新周目上當有新周目時
  77.     # 選項是突出。(?)
  78.     NGP_HELP   = "继承新存档."
  79.  
  80.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  81.     # - Carry Over 設置 -
  82.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  83.     # 這些設置調整是很關鍵的所以要仔細調整
  84.     #
  85.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  86.     # 這個數組包含了所有的開關都你要繼承的,任何開關在這裡都不會將被設置為 false(關閉)。
  87.     #
  88.     CARRY_OVER_SWITCHES = [3, 6, 7,12,15,16,17,18]
  89.  
  90.     # 這個數組包含了所有的變量都你要繼承的,任何開關在這裡都不會將被設置為0。
  91.     #
  92.     CARRY_OVER_VARIABLES = [1,2,3,4,5]
  93.  
  94.     # 如果此設置為false,那麼角色的能力便會初始化(完全復位)
  95.     # 如果設置為true,角色的能力便會保持
  96.     #
  97.     CARRY_OVER_ACTORS = true
  98.  
  99.     #如果你要繼承角色數值,可以限制或調整什麼樣的細節
  100.     #
  101.     #
  102.     CARRY_OVER_LEVELS = true
  103.     CARRY_OVER_EQUIPS = true
  104.     CARRY_OVER_SKILLS = true
  105.  
  106.     # 如果此設置為false,那麼將恢復本來的隊伍設定
  107.     # 如果此設置為true, 那麼將保留通關時的隊伍
  108.     #
  109.     CARRY_OVER_PARTY_MEMBERS = true
  110.  
  111.     # 如果其中任何一個設置為false,那麼相應的項目將不會被繼承
  112.     # 如果其中任何一個設置為true,那麼相應的項目將會被繼承
  113.     # (順序:金錢,物品,武器,裝備)
  114.     CARRY_OVER_GOLD    = true
  115.     CARRY_OVER_ITEMS   = true
  116.     CARRY_OVER_WEAPONS = true
  117.     CARRY_OVER_ARMOURS = true
  118.  
  119.   end # NEW_GAME_PLUS
  120. end # YEA
  121.  
  122. #==============================================================================
  123. # ▼編輯下面任何東西,
  124. # 可能會導致造成電腦受損,使用者大小便失禁,昏迷,爆炸的死亡,和/或口臭
  125. # 請自行評估風險
  126. #==============================================================================
  127.  
  128. if $imported["YEA-SaveEngine"]
  129.  
  130. module YEA
  131.   module NEW_GAME_PLUS
  132.     module_function
  133.     #--------------------------------------------------------------------------
  134.     # convert_integer_array
  135.     #--------------------------------------------------------------------------
  136.     def convert_integer_array(array)
  137.       result = []
  138.       array.each { |i|
  139.         case i
  140.         when Range; result |= i.to_a
  141.         when Integer; result |= [i]
  142.         end }
  143.       return result
  144.     end
  145.     #--------------------------------------------------------------------------
  146.     # converted_contants
  147.     #--------------------------------------------------------------------------
  148.     CARRY_OVER_SWITCHES = convert_integer_array(CARRY_OVER_SWITCHES)
  149.     CARRY_OVER_VARIABLES = convert_integer_array(CARRY_OVER_VARIABLES)
  150.   end # NEW_GAME_PLUS
  151.   module REGEXP
  152.   module BASEITEM
  153.  
  154.     NO_CARRY_OVER = /<(?:NO_CARRY_OVER|no carry over)>/i
  155.  
  156.   end # BASEITEM
  157.   end # REGEXP
  158. end # YEA
  159.  
  160. #==============================================================================
  161. # ■ DataManager
  162. #==============================================================================
  163.  
  164. module DataManager
  165.  
  166.   #--------------------------------------------------------------------------
  167.   # alias method: load_database
  168.   #--------------------------------------------------------------------------
  169.   class <<self; alias load_database_ngp load_database; end
  170.   def self.load_database
  171.     load_database_ngp
  172.     load_notetags_ngp
  173.   end
  174.  
  175.   #--------------------------------------------------------------------------
  176.   # new method: load_notetags_ngp
  177.   #--------------------------------------------------------------------------
  178.   def self.load_notetags_ngp
  179.     groups = [$data_items, $data_weapons, $data_armors]
  180.     for group in groups
  181.       for obj in group
  182.         next if obj.nil?
  183.         obj.load_notetags_ngp
  184.       end
  185.     end
  186.   end
  187.  
  188. end # DataManager
  189.  
  190. #==============================================================================
  191. # ■ RPG::BaseItem
  192. #==============================================================================
  193.  
  194. class RPG::BaseItem
  195.  
  196.   #--------------------------------------------------------------------------
  197.   # public instance variables
  198.   #--------------------------------------------------------------------------
  199.   attr_accessor :no_carry_over
  200.  
  201.   #--------------------------------------------------------------------------
  202.   # common cache: load_notetags_ngp
  203.   #--------------------------------------------------------------------------
  204.   def load_notetags_ngp
  205.     @no_carry_over = false
  206.     #---
  207.     self.note.split(/[\r\n]+/).each { |line|
  208.       case line
  209.       #---
  210.       when YEA::REGEXP::BASEITEM::NO_CARRY_OVER
  211.         @no_carry_over = true
  212.       end
  213.     } # self.note.split
  214.     #---
  215.   end
  216.  
  217. end # RPG::BaseItem
  218.  
  219. #==============================================================================
  220. # ■ Switch
  221. #==============================================================================
  222.  
  223. module Switch
  224.  
  225.   #--------------------------------------------------------------------------
  226.   # self.new_game_plus
  227.   #--------------------------------------------------------------------------
  228.   def self.new_game_plus
  229.     return $game_switches[YEA::NEW_GAME_PLUS::NGP_SWITCH]
  230.   end
  231.  
  232. end # Switch
  233.  
  234. #==============================================================================
  235. # ■ DataManager
  236. #==============================================================================
  237.  
  238. module DataManager
  239.  
  240.   #--------------------------------------------------------------------------
  241.   # new method: setup_new_game_plus
  242.   #--------------------------------------------------------------------------
  243.   def self.setup_new_game_plus(index)
  244.     create_new_game_plus_objects(index)
  245.     $game_map.setup($data_system.start_map_id)
  246.     $game_player.moveto($data_system.start_x, $data_system.start_y)
  247.     $game_player.refresh
  248.     Graphics.frame_count = 0
  249.   end
  250.  
  251.   #--------------------------------------------------------------------------
  252.   # new method: create_new_game_plus_objects
  253.   #--------------------------------------------------------------------------
  254.   def self.create_new_game_plus_objects(index)
  255.     load_game_without_rescue(index)
  256.     ngp_reset_switches
  257.     ngp_reset_variables
  258.     ngp_reset_self_switches
  259.     ngp_reset_actors
  260.     ngp_reset_party
  261.   end
  262.  
  263.   #--------------------------------------------------------------------------
  264.   # new method: ngp_reset_switches
  265.   #--------------------------------------------------------------------------
  266.   def self.ngp_reset_switches
  267.     for i in 0...$data_system.switches.size
  268.       next if i <= 0
  269.       next if YEA::NEW_GAME_PLUS::CARRY_OVER_SWITCHES.include?(i)
  270.       $game_switches[i] = false
  271.     end
  272.   end
  273.  
  274.   #--------------------------------------------------------------------------
  275.   # new method: ngp_reset_variables
  276.   #--------------------------------------------------------------------------
  277.   def self.ngp_reset_variables
  278.     for i in 0...$data_system.variables.size
  279.       next if i <= 0
  280.       next if YEA::NEW_GAME_PLUS::CARRY_OVER_VARIABLES.include?(i)
  281.       $game_variables[i] = 0
  282.     end
  283.   end
  284.  
  285.   #--------------------------------------------------------------------------
  286.   # new method: ngp_reset_self_switches
  287.   #--------------------------------------------------------------------------
  288.   def self.ngp_reset_self_switches
  289.     $game_self_switches = Game_SelfSwitches.new
  290.   end
  291.  
  292.   #--------------------------------------------------------------------------
  293.   # new method: ngp_reset_actors
  294.   #--------------------------------------------------------------------------
  295.   def self.ngp_reset_actors
  296.     unless YEA::NEW_GAME_PLUS::CARRY_OVER_ACTORS
  297.       $game_actors = Game_Actors.new
  298.     else
  299.       #---
  300.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_LEVELS
  301.         for i in 0...$data_actors.size
  302.           actor = $game_actors[i]
  303.           next if actor.nil?
  304.           actor.new_game_plus_levels
  305.         end
  306.       end
  307.       #---
  308.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_EQUIPS
  309.         for i in 0...$data_actors.size
  310.           actor = $game_actors[i]
  311.           next if actor.nil?
  312.           actor.new_game_plus_equips
  313.         end
  314.       end
  315.       #---
  316.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_SKILLS
  317.         for i in 0...$data_actors.size
  318.           actor = $game_actors[i]
  319.           next if actor.nil?
  320.           actor.new_game_plus_skills
  321.         end
  322.       end
  323.       #---
  324.     end
  325.   end
  326.  
  327.   #--------------------------------------------------------------------------
  328.   # new method: ngp_reset_party
  329.   #--------------------------------------------------------------------------
  330.   def self.ngp_reset_party
  331.     gold = 0
  332.     items = {}
  333.     members = []
  334.     #---
  335.     if YEA::NEW_GAME_PLUS::CARRY_OVER_PARTY_MEMBERS
  336.       for member in $game_party.members
  337.         members.push(member.id)
  338.       end
  339.     end
  340.     #---
  341.     gold = $game_party.gold if YEA::NEW_GAME_PLUS::CARRY_OVER_GOLD
  342.     #---
  343.     if YEA::NEW_GAME_PLUS::CARRY_OVER_ITEMS
  344.       for item in $data_items
  345.         next if item.nil?
  346.         next if item.no_carry_over
  347.         items[item] = $game_party.item_number(item)
  348.       end
  349.     end
  350.     #---
  351.     if YEA::NEW_GAME_PLUS::CARRY_OVER_WEAPONS
  352.       for item in $data_weapons
  353.         next if item.nil?
  354.         next if item.no_carry_over
  355.         items[item] = $game_party.item_number(item)
  356.       end
  357.     end
  358.     #---
  359.     if YEA::NEW_GAME_PLUS::CARRY_OVER_ARMOURS
  360.       for item in $data_armors
  361.         next if item.nil?
  362.         next if item.no_carry_over
  363.         items[item] = $game_party.item_number(item)
  364.       end
  365.     end
  366.     #---
  367.     $game_party = Game_Party.new
  368.     unless YEA::NEW_GAME_PLUS::CARRY_OVER_PARTY_MEMBERS
  369.       $game_party.setup_starting_members
  370.     end
  371.     #---
  372.     for member_id in members
  373.       $game_party.add_actor(member_id)
  374.     end
  375.     $game_party.gain_gold(gold)
  376.     for key in items
  377.       item = key[0]
  378.       next if item.nil?
  379.       $game_party.gain_item(item, key[1])
  380.     end
  381.   end
  382.  
  383. end # DataManager
  384.  
  385. #==============================================================================
  386. # ■ Game_Actor
  387. #==============================================================================
  388.  
  389. class Game_Actor < Game_Battler
  390.  
  391.   #--------------------------------------------------------------------------
  392.   # new method: new_game_plus_levels
  393.   #--------------------------------------------------------------------------
  394.   def new_game_plus_levels
  395.     @class_id = actor.class_id
  396.     [url=home.php?mod=space&uid=22147]@level[/url] = actor.initial_level
  397.     [url=home.php?mod=space&uid=13302]@exp[/url] = {}
  398.     if $imported["YEA-ClassSystem"]
  399.       init_unlocked_classes
  400.       init_subclass
  401.     end
  402.     clear_param_plus
  403.     init_exp
  404.     refresh
  405.   end
  406.  
  407.   #--------------------------------------------------------------------------
  408.   # new method: new_game_plus_equips
  409.   #--------------------------------------------------------------------------
  410.   def new_game_plus_equips
  411.     init_equips(actor.equips)
  412.   end
  413.  
  414.   #--------------------------------------------------------------------------
  415.   # new method: new_game_plus_skills
  416.   #--------------------------------------------------------------------------
  417.   def new_game_plus_skills
  418.     init_skills
  419.   end
  420.  
  421. end # Game_Actor
  422.  
  423. #==============================================================================
  424. # ■ Window_FileAction
  425. #==============================================================================
  426.  
  427. class Window_FileAction < Window_HorzCommand
  428.  
  429.   #--------------------------------------------------------------------------
  430.   # alias method: add_load_command
  431.   #--------------------------------------------------------------------------
  432.   alias add_load_command_ngp add_load_command
  433.   def add_load_command
  434.     if new_game_plus?
  435.       add_command(YEA::NEW_GAME_PLUS::NGP_TEXT, :new_game_plus)
  436.     else
  437.       add_load_command_ngp
  438.     end
  439.   end
  440.  
  441.   #--------------------------------------------------------------------------
  442.   # new method: new_game_plus?
  443.   #--------------------------------------------------------------------------
  444.   def new_game_plus?
  445.     return false if @header.nil?
  446.     return false if @header[:switches].nil?
  447.     return @header[:switches][YEA::NEW_GAME_PLUS::NGP_SWITCH]
  448.   end
  449.  
  450.   #--------------------------------------------------------------------------
  451.   # alias method: update_help
  452.   #--------------------------------------------------------------------------
  453.   alias update_help_ngp update_help
  454.   def update_help
  455.     case current_symbol
  456.     when :new_game_plus; @help_window.set_text(YEA::NEW_GAME_PLUS::NGP_HELP)
  457.     else; update_help_ngp
  458.     end
  459.   end
  460.  
  461. end # Window_FileAction
  462.  
  463. #==============================================================================
  464. # ■ Scene_File
  465. #==============================================================================
  466.  
  467. class Scene_File < Scene_MenuBase
  468.  
  469.   #--------------------------------------------------------------------------
  470.   # alias method: create_action_window
  471.   #--------------------------------------------------------------------------
  472.   alias create_action_window_ngp create_action_window
  473.   def create_action_window
  474.     create_action_window_ngp
  475.     @action_window.set_handler(:new_game_plus, method(:on_action_ngp))
  476.   end
  477.  
  478.   #--------------------------------------------------------------------------
  479.   # new method: on_action_ngp
  480.   #--------------------------------------------------------------------------
  481.   def on_action_ngp
  482.     Sound.play_load
  483.     DataManager.setup_new_game_plus(@file_window.index)
  484.     fadeout_all
  485.     $game_system.on_after_load
  486.     SceneManager.goto(Scene_Map)
  487.   end
  488.  
  489. end # Scene_File
  490.  
  491. end # $imported["YEA-SaveEngine"]
  492.  
  493. #==============================================================================
  494. #
  495. # ▼ End of File
  496. #
  497. #==============================================================================




YEA - Ace Save Engine v1.01+(存檔強化腳本):
(如果要用上上面的腳本一定要用上這一個)
RUBY 代码复制
  1. #==============================================================================
  2. #
  3. # ?\ Yanfly Engine Ace - Ace Save Engine v1.03
  4. # -- Last Updated: 2012.07.22
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================
  9.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-SaveEngine"] = true
  12.  
  13. #==============================================================================
  14. # ?\ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2012.07.22 - Fixed: Location Drawing.
  17. # 2012.01.23 - Anti-crash method added for removed maps.
  18. # 2011.12.26 - Compatibility Update: New Game+
  19. # 2011.12.26 - Started Script and Finished.
  20. #
  21. #==============================================================================
  22. # ?\ Introduction
  23. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  24. # This script provides a new save interface for the player. Along with a new
  25. # interface, the player can also load and delete saves straight from the menu
  26. # itself. This will in turn make the save command from the Main Menu always
  27. # available, but the save option within the new save menu will be enabled
  28. # depending on whether or not it is allowed or disallowed. From the interface,
  29. # the player is given more information regarding the save file including the
  30. # the location the player saved at, the amount of gold available, and any
  31. # variables that you want to show the player as well.
  32. #
  33. #==============================================================================
  34. # ?\ Instructions
  35. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  36. # To install this script, open up your script editor and copy/paste this script
  37. # to an open slot below ?\ Materials/ef?T but above ?\ Main. Remember to save.
  38. #
  39. # For first time installers, be warned that loading this script the first time
  40. # may not display all information in the status window for save files made
  41. # before the installation of this script. To remedy this, just load up the save
  42. # and save the file again.
  43. #
  44. #==============================================================================
  45. # ?\ Compatibility
  46. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  47. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  48. # it will run with RPG Maker VX without adjusting.
  49. #
  50. #==============================================================================
  51.  
  52. module YEA
  53.   module SAVE
  54.  
  55.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  56.     # - Slot Window Settings -
  57.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  58.     # This section adjusts how the slot window appears on the left side of the
  59.     # screen. This also adjusts the maximum number of saves a player can make,
  60.     # the way the slot names appear, and the icons used.
  61.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  62.     MAX_FILES = 24         # Maximum saves a player can make. Default: 16
  63.     SLOT_NAME = "File %s"  # How the file slots will be named.
  64.  
  65.     # These are the icons
  66.     SAVE_ICON  = 368       # Icon used to indicate a save is present.
  67.     EMPTY_ICON = 375       # Icon used to indicate an empty file.
  68.  
  69.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  70.     # - Action Window Settings -
  71.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  72.     # This section adjusts how the action window appears, the sound effect
  73.     # played when deleting files, and what appears in the help window above.
  74.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  75.     ACTION_LOAD   = "Load"           # Text used for loading games.
  76.     ACTION_SAVE   = "Save"           # Text used for saving games.
  77.     ACTION_DELETE = "Delete"         # Text used for deleting games.
  78.     DELETE_SOUND  = RPG::SE.new("Collapse3", 100, 100) # Sound for deleting.
  79.  
  80.     # These text settings adjust what displays in the help window.
  81.     SELECT_HELP = "Please select a file slot."
  82.     LOAD_HELP   = "Loads the data from the saved game."
  83.     SAVE_HELP   = "Saves the current progress in your game."
  84.     DELETE_HELP = "Deletes all data from this save file."
  85.  
  86.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  87.     # - Status Window Settings -
  88.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  89.     # This section adjusts how the status window appears in the middle of the
  90.     # screen (that displays the game's data) such as the total playtime, total
  91.     # times saved, total gold, the party's current location, and the variables
  92.     # to be displayed.
  93.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  94.     EMPTY_TEXT = "No Save Data"      # Text used when no save data is present.
  95.     PLAYTIME   = "Playtime"          # Text used for total playtime.
  96.     TOTAL_SAVE = "Total Saves: "     # Text used to indicate total saves.
  97.     TOTAL_GOLD = "Total Gold: "      # Text used to indicate total gold.
  98.     LOCATION   = "Location: "        # Text used to indicate current location.
  99.  
  100.     # These variables will be shown in each of the two columns for those who
  101.     # would want to display more information than just what's shown. Input the
  102.     # variables into the arrays below to designate what data will be shown.
  103.     COLUMN1_VARIABLES = [1, 2, 3]
  104.     COLUMN2_VARIABLES = [4, 5, 6]
  105.  
  106.   end # SAVE
  107. end # YEA
  108.  
  109. #==============================================================================
  110. # ?\ Editting anything past this point may potentially result in causing
  111. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  112. # halitosis so edit at your own risk.
  113. #==============================================================================
  114.  
  115. #==============================================================================
  116. # ?! Icon
  117. #==============================================================================
  118.  
  119. module Icon
  120.  
  121.   #--------------------------------------------------------------------------
  122.   # self.save_icon
  123.   #--------------------------------------------------------------------------
  124.   def self.save_icon; return YEA::SAVE::SAVE_ICON; end
  125.  
  126.   #--------------------------------------------------------------------------
  127.   # self.empty_icon
  128.   #--------------------------------------------------------------------------
  129.   def self.empty_icon; return YEA::SAVE::EMPTY_ICON; end
  130.  
  131. end # Icon
  132.  
  133. #==============================================================================
  134. # ?! Numeric
  135. #==============================================================================
  136.  
  137. class Numeric
  138.  
  139.   #--------------------------------------------------------------------------
  140.   # new method: group_digits
  141.   #--------------------------------------------------------------------------
  142.   unless $imported["YEA-CoreEngine"]
  143.   def group; return self.to_s; end
  144.   end # $imported["YEA-CoreEngine"]
  145.  
  146. end # Numeric
  147.  
  148. #==============================================================================
  149. # ?! DataManager
  150. #==============================================================================
  151.  
  152. module DataManager
  153.  
  154.   #--------------------------------------------------------------------------
  155.   # overwrite method: savefile_max
  156.   #--------------------------------------------------------------------------
  157.   def self.savefile_max
  158.     return YEA::SAVE::MAX_FILES
  159.   end
  160.  
  161.   #--------------------------------------------------------------------------
  162.   # overwrite method: self.make_save_header
  163.   #--------------------------------------------------------------------------
  164.   def self.make_save_header
  165.     header = {}
  166.     header[:characters]    = $game_party.characters_for_savefile
  167.     header[:playtime_s]    = $game_system.playtime_s
  168.     header[:system]        = Marshal.load(Marshal.dump($game_system))
  169.     header[:timer]         = Marshal.load(Marshal.dump($game_timer))
  170.     header[:message]       = Marshal.load(Marshal.dump($game_message))
  171.     header[:switches]      = Marshal.load(Marshal.dump($game_switches))
  172.     header[:variables]     = Marshal.load(Marshal.dump($game_variables))
  173.     header[:self_switches] = Marshal.load(Marshal.dump($game_self_switches))
  174.     header[:actors]        = Marshal.load(Marshal.dump($game_actors))
  175.     header[:party]         = Marshal.load(Marshal.dump($game_party))
  176.     header[:troop]         = Marshal.load(Marshal.dump($game_troop))
  177.     header[:map]           = Marshal.load(Marshal.dump($game_map))
  178.     header[:player]        = Marshal.load(Marshal.dump($game_player))
  179.     header
  180.   end
  181.  
  182. end # DataManager
  183.  
  184. #==============================================================================
  185. # ?! Window_MenuCommand
  186. #==============================================================================
  187.  
  188. class Window_MenuCommand < Window_Command
  189.  
  190.   #--------------------------------------------------------------------------
  191.   # overwrite method: save_enabled
  192.   #--------------------------------------------------------------------------
  193.   def save_enabled; return true; end
  194.  
  195. end # Window_MenuCommand
  196.  
  197. #==============================================================================
  198. # ?! Window_FileList
  199. #==============================================================================
  200.  
  201. class Window_FileList < Window_Selectable
  202.  
  203.   #--------------------------------------------------------------------------
  204.   # initialize
  205.   #--------------------------------------------------------------------------
  206.   def initialize(dx, dy)
  207.     super(dx, dy, 128, Graphics.height - dy)
  208.     refresh
  209.     activate
  210.     select(SceneManager.scene.first_savefile_index)
  211.   end
  212.  
  213.   #--------------------------------------------------------------------------
  214.   # item_max
  215.   #--------------------------------------------------------------------------
  216.   def item_max; return DataManager.savefile_max; end
  217.  
  218.   #--------------------------------------------------------------------------
  219.   # current_item_enabled?
  220.   #--------------------------------------------------------------------------
  221.   def current_item_enabled?
  222.     header = DataManager.load_header(index)
  223.     return false if header.nil? && SceneManager.scene_is?(Scene_Load)
  224.     return true
  225.   end
  226.  
  227.   #--------------------------------------------------------------------------
  228.   # refresh
  229.   #--------------------------------------------------------------------------
  230.   def refresh
  231.     create_contents
  232.     draw_all_items
  233.   end
  234.  
  235.   #--------------------------------------------------------------------------
  236.   # draw_item
  237.   #--------------------------------------------------------------------------
  238.   def draw_item(index)
  239.     header = DataManager.load_header(index)
  240.     enabled = !header.nil?
  241.     rect = item_rect(index)
  242.     rect.width -= 4
  243.     draw_icon(save_icon?(header), rect.x, rect.y, enabled)
  244.     change_color(normal_color, enabled)
  245.     text = sprintf(YEA::SAVE::SLOT_NAME, (index + 1).group)
  246.     draw_text(rect.x+24, rect.y, rect.width-24, line_height, text)
  247.   end
  248.  
  249.   #--------------------------------------------------------------------------
  250.   # save_icon?
  251.   #--------------------------------------------------------------------------
  252.   def save_icon?(header)
  253.     return Icon.empty_icon if header.nil?
  254.     return Icon.save_icon
  255.   end
  256.  
  257. end # Window_FileList
  258.  
  259. #==============================================================================
  260. # ?! Window_FileStatus
  261. #==============================================================================
  262.  
  263. class Window_FileStatus < Window_Base
  264.  
  265.   #--------------------------------------------------------------------------
  266.   # initialize
  267.   #--------------------------------------------------------------------------
  268.   def initialize(dx, dy, file_window)
  269.     super(dx, dy, Graphics.width - dx, Graphics.height - dy)
  270.     @file_window = file_window
  271.     @current_index = @file_window.index
  272.     refresh
  273.   end
  274.  
  275.   #--------------------------------------------------------------------------
  276.   # update
  277.   #--------------------------------------------------------------------------
  278.   def update
  279.     super
  280.     return if @file_window.index < 0
  281.     return if @current_index == @file_window.index
  282.     @current_index = @file_window.index
  283.     refresh
  284.   end
  285.  
  286.   #--------------------------------------------------------------------------
  287.   # refresh
  288.   #--------------------------------------------------------------------------
  289.   def refresh
  290.     contents.clear
  291.     reset_font_settings
  292.     @header = DataManager.load_header(@file_window.index)
  293.     if @header.nil?
  294.       draw_empty
  295.     else
  296.       draw_save_contents
  297.     end
  298.   end
  299.  
  300.   #--------------------------------------------------------------------------
  301.   # draw_empty
  302.   #--------------------------------------------------------------------------
  303.   def draw_empty
  304.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  305.     rect = Rect.new(0, 0, contents.width, contents.height)
  306.     contents.fill_rect(rect, colour)
  307.     text = YEA::SAVE::EMPTY_TEXT
  308.     change_color(system_color)
  309.     draw_text(rect, text, 1)
  310.   end
  311.  
  312.   #--------------------------------------------------------------------------
  313.   # draw_save_slot
  314.   #--------------------------------------------------------------------------
  315.   def draw_save_slot(dx, dy, dw)
  316.     reset_font_settings
  317.     change_color(system_color)
  318.     text = sprintf(YEA::SAVE::SLOT_NAME, "")
  319.     draw_text(dx, dy, dw, line_height, text)
  320.     cx = text_size(text).width
  321.     change_color(normal_color)
  322.     draw_text(dx+cx, dy, dw-cx, line_height, (@file_window.index+1).group)
  323.   end
  324.  
  325.   #--------------------------------------------------------------------------
  326.   # draw_save_playtime
  327.   #--------------------------------------------------------------------------
  328.   def draw_save_playtime(dx, dy, dw)
  329.     return if @header[:playtime_s].nil?
  330.     reset_font_settings
  331.     change_color(system_color)
  332.     draw_text(dx, dy, dw, line_height, YEA::SAVE::PLAYTIME, 0)
  333.     change_color(normal_color)
  334.     draw_text(dx, dy, dw, line_height, @header[:playtime_s], 2)
  335.   end
  336.  
  337.   #--------------------------------------------------------------------------
  338.   # draw_save_total_saves
  339.   #--------------------------------------------------------------------------
  340.   def draw_save_total_saves(dx, dy, dw)
  341.     return if @header[:system].nil?
  342.     reset_font_settings
  343.     change_color(system_color)
  344.     text = YEA::SAVE::TOTAL_SAVE
  345.     draw_text(dx, dy, dw, line_height, text)
  346.     cx = text_size(text).width
  347.     change_color(normal_color)
  348.     draw_text(dx+cx, dy, dw-cx, line_height, @header[:system].save_count.group)
  349.   end
  350.  
  351.   #--------------------------------------------------------------------------
  352.   # draw_save_gold
  353.   #--------------------------------------------------------------------------
  354.   def draw_save_gold(dx, dy, dw)
  355.     return if @header[:party].nil?
  356.     reset_font_settings
  357.     change_color(system_color)
  358.     draw_text(dx, dy, dw, line_height, YEA::SAVE::TOTAL_GOLD)
  359.     text = Vocab::currency_unit
  360.     draw_text(dx, dy, dw, line_height, text, 2)
  361.     cx = text_size(text).width
  362.     change_color(normal_color)
  363.     text = @header[:party].gold.group
  364.     draw_text(dx, dy, dw-cx, line_height, text, 2)
  365.   end
  366.  
  367.   #--------------------------------------------------------------------------
  368.   # draw_save_location
  369.   #--------------------------------------------------------------------------
  370.   def draw_save_location(dx, dy, dw)
  371.     return if @header[:map].nil?
  372.     reset_font_settings
  373.     change_color(system_color)
  374.     draw_text(dx, dy, dw, line_height, YEA::SAVE::LOCATION)
  375.     change_color(normal_color)
  376.     cx = text_size(YEA::SAVE::LOCATION).width
  377.     return if $data_mapinfos[@header[:map].map_id].nil?
  378.     text = @header[:map].display_name
  379.     text = $data_mapinfos[@header[:map].map_id].name if text == ""
  380.     draw_text(dx+cx, dy, dw-cx, line_height, text)
  381.   end
  382.  
  383.   #--------------------------------------------------------------------------
  384.   # draw_save_characters
  385.   #--------------------------------------------------------------------------
  386.   def draw_save_characters(dx, dy)
  387.     return if @header[:party].nil?
  388.     reset_font_settings
  389.     make_font_smaller
  390.     dw = (contents.width - dx) / @header[:party].max_battle_members
  391.     dx += dw/2
  392.     for member in @header[:party].battle_members
  393.       next if member.nil?
  394.       member = @header[:actors][member.id]
  395.       change_color(normal_color)
  396.       draw_actor_graphic(member, dx, dy)
  397.       text = member.name
  398.       draw_text(dx-dw/2, dy, dw, line_height, text, 1)
  399.       text = member.level.group
  400.       draw_text(dx-dw/2, dy-line_height, dw-4, line_height, text, 2)
  401.       cx = text_size(text).width
  402.       change_color(system_color)
  403.       text = Vocab::level_a
  404.       draw_text(dx-dw/2, dy-line_height, dw-cx-4, line_height, text, 2)
  405.       dx += dw
  406.     end
  407.   end
  408.  
  409.   #--------------------------------------------------------------------------
  410.   # draw_save_column1
  411.   #--------------------------------------------------------------------------
  412.   def draw_save_column1(dx, dy, dw)
  413.     data = YEA::SAVE::COLUMN1_VARIABLES
  414.     draw_column_data(data, dx, dy, dw)
  415.   end
  416.  
  417.   #--------------------------------------------------------------------------
  418.   # draw_save_column2
  419.   #--------------------------------------------------------------------------
  420.   def draw_save_column2(dx, dy, dw)
  421.     data = YEA::SAVE::COLUMN2_VARIABLES
  422.     draw_column_data(data, dx, dy, dw)
  423.   end
  424.  
  425.   #--------------------------------------------------------------------------
  426.   # draw_column_data
  427.   #--------------------------------------------------------------------------
  428.   def draw_column_data(data, dx, dy, dw)
  429.     return if @header[:variables].nil?
  430.     reset_font_settings
  431.     for variable_id in data
  432.       next if $data_system.variables[variable_id].nil?
  433.       change_color(system_color)
  434.       name = $data_system.variables[variable_id]
  435.       draw_text(dx, dy, dw, line_height, name, 0)
  436.       value = @header[:variables][variable_id].group
  437.       change_color(normal_color)
  438.       draw_text(dx, dy, dw, line_height, value, 2)
  439.       dy += line_height
  440.     end
  441.   end
  442.  
  443.   #--------------------------------------------------------------------------
  444.   # draw_save_contents
  445.   #--------------------------------------------------------------------------
  446.   def draw_save_contents
  447.     draw_save_slot(4, 0, contents.width/2-8)
  448.     draw_save_playtime(contents.width/2+4, 0, contents.width/2-8)
  449.     draw_save_total_saves(4, line_height, contents.width/2-8)
  450.     draw_save_gold(contents.width/2+4, line_height, contents.width/2-8)
  451.     draw_save_location(4, line_height*2, contents.width-8)
  452.     draw_save_characters(0, line_height*5 + line_height/3)
  453.     draw_save_column1(16, line_height*7, contents.width/2-48)
  454.     draw_save_column2(contents.width/2+16, line_height*7, contents.width/2-48)
  455.   end
  456.  
  457. end # Window_FileStatus
  458.  
  459. #==============================================================================
  460. # ?! Window_FileAction
  461. #==============================================================================
  462.  
  463. class Window_FileAction < Window_HorzCommand
  464.  
  465.   #--------------------------------------------------------------------------
  466.   # initialize
  467.   #--------------------------------------------------------------------------
  468.   def initialize(dx, dy, file_window)
  469.     @file_window = file_window
  470.     super(dx, dy)
  471.     deactivate
  472.     unselect
  473.   end
  474.  
  475.   #--------------------------------------------------------------------------
  476.   # window_width
  477.   #--------------------------------------------------------------------------
  478.   def window_width; Graphics.width - 128; end
  479.  
  480.   #--------------------------------------------------------------------------
  481.   # col_max
  482.   #--------------------------------------------------------------------------
  483.   def col_max; return 3; end
  484.  
  485.   #--------------------------------------------------------------------------
  486.   # update
  487.   #--------------------------------------------------------------------------
  488.   def update
  489.     super
  490.     return if @file_window.index < 0
  491.     return if @current_index == @file_window.index
  492.     @current_index = @file_window.index
  493.     refresh
  494.   end
  495.  
  496.   #--------------------------------------------------------------------------
  497.   # make_command_list
  498.   #--------------------------------------------------------------------------
  499.   def make_command_list
  500.     @header = DataManager.load_header(@file_window.index)
  501.     add_load_command
  502.     add_save_command
  503.     add_delete_command
  504.   end
  505.  
  506.   #--------------------------------------------------------------------------
  507.   # add_load_command
  508.   #--------------------------------------------------------------------------
  509.   def add_load_command
  510.     add_command(YEA::SAVE::ACTION_LOAD, :load, load_enabled?)
  511.   end
  512.  
  513.   #--------------------------------------------------------------------------
  514.   # load_enabled?
  515.   #--------------------------------------------------------------------------
  516.   def load_enabled?
  517.     return false if @header.nil?
  518.     return true
  519.   end
  520.  
  521.   #--------------------------------------------------------------------------
  522.   # add_save_command
  523.   #--------------------------------------------------------------------------
  524.   def add_save_command
  525.     add_command(YEA::SAVE::ACTION_SAVE, :save, save_enabled?)
  526.   end
  527.  
  528.   #--------------------------------------------------------------------------
  529.   # save_enabled?
  530.   #--------------------------------------------------------------------------
  531.   def save_enabled?
  532.     return false if @header.nil? && SceneManager.scene_is?(Scene_Load)
  533.     return false if SceneManager.scene_is?(Scene_Load)
  534.     return false if $game_system.save_disabled
  535.     return true
  536.   end
  537.  
  538.   #--------------------------------------------------------------------------
  539.   # add_delete_command
  540.   #--------------------------------------------------------------------------
  541.   def add_delete_command
  542.     add_command(YEA::SAVE::ACTION_DELETE, :delete, delete_enabled?)
  543.   end
  544.  
  545.   #--------------------------------------------------------------------------
  546.   # delete_enabled?
  547.   #--------------------------------------------------------------------------
  548.   def delete_enabled?
  549.     return false if @header.nil?
  550.     return true
  551.   end
  552.  
  553.   #--------------------------------------------------------------------------
  554.   # update_help
  555.   #--------------------------------------------------------------------------
  556.   def update_help
  557.     case current_symbol
  558.     when :load; @help_window.set_text(YEA::SAVE::LOAD_HELP)
  559.     when :save; @help_window.set_text(YEA::SAVE::SAVE_HELP)
  560.     when :delete; @help_window.set_text(YEA::SAVE::DELETE_HELP)
  561.     end
  562.   end
  563.  
  564. end # Window_FileAction
  565.  
  566. #==============================================================================
  567. # ?! Scene_File
  568. #==============================================================================
  569.  
  570. class Scene_File < Scene_MenuBase
  571.  
  572.   #--------------------------------------------------------------------------
  573.   # overwrite method: start
  574.   #--------------------------------------------------------------------------
  575.   def start
  576.     super
  577.     create_all_windows
  578.   end
  579.  
  580.   #--------------------------------------------------------------------------
  581.   # overwrite method: terminate
  582.   #--------------------------------------------------------------------------
  583.   def terminate
  584.     super
  585.   end
  586.  
  587.   #--------------------------------------------------------------------------
  588.   # overwrite method: update
  589.   #--------------------------------------------------------------------------
  590.   def update
  591.     super
  592.   end
  593.  
  594.   #--------------------------------------------------------------------------
  595.   # new method: create_all_windows
  596.   #--------------------------------------------------------------------------
  597.   def create_all_windows
  598.     create_help_window
  599.     create_file_window
  600.     create_action_window
  601.     create_status_window
  602.   end
  603.  
  604.   #--------------------------------------------------------------------------
  605.   # overwrite method: create_help_window
  606.   #--------------------------------------------------------------------------
  607.   def create_help_window
  608.     @help_window = Window_Help.new
  609.     @help_window.set_text(YEA::SAVE::SELECT_HELP)
  610.   end
  611.  
  612.   #--------------------------------------------------------------------------
  613.   # new method: create_file_window
  614.   #--------------------------------------------------------------------------
  615.   def create_file_window
  616.     wy = @help_window.height
  617.     @file_window = Window_FileList.new(0, wy)
  618.     @file_window.set_handler(:ok, method(:on_file_ok))
  619.     @file_window.set_handler(:cancel, method(:return_scene))
  620.   end
  621.  
  622.   #--------------------------------------------------------------------------
  623.   # new method: create_action_window
  624.   #--------------------------------------------------------------------------
  625.   def create_action_window
  626.     wx = @file_window.width
  627.     wy = @help_window.height
  628.     @action_window = Window_FileAction.new(wx, wy, @file_window)
  629.     @action_window.help_window = @help_window
  630.     @action_window.set_handler(:cancel, method(:on_action_cancel))
  631.     @action_window.set_handler(:load, method(:on_action_load))
  632.     @action_window.set_handler(:save, method(:on_action_save))
  633.     @action_window.set_handler(:delete, method(:on_action_delete))
  634.   end
  635.  
  636.   #--------------------------------------------------------------------------
  637.   # new method: create_status_window
  638.   #--------------------------------------------------------------------------
  639.   def create_status_window
  640.     wx = @action_window.x
  641.     wy = @action_window.y + @action_window.height
  642.     @status_window = Window_FileStatus.new(wx, wy, @file_window)
  643.   end
  644.  
  645.   #--------------------------------------------------------------------------
  646.   # new method: on_file_ok
  647.   #--------------------------------------------------------------------------
  648.   def on_file_ok
  649.     @action_window.activate
  650.     index = SceneManager.scene_is?(Scene_Load) ? 0 : 1
  651.     @action_window.select(index)
  652.   end
  653.  
  654.   #--------------------------------------------------------------------------
  655.   # new method: on_action_cancel
  656.   #--------------------------------------------------------------------------
  657.   def on_action_cancel
  658.     @action_window.unselect
  659.     @file_window.activate
  660.     @help_window.set_text(YEA::SAVE::SELECT_HELP)
  661.   end
  662.  
  663.   #--------------------------------------------------------------------------
  664.   # new method: on_action_load
  665.   #--------------------------------------------------------------------------
  666.   def on_action_load
  667.     if DataManager.load_game(@file_window.index)
  668.       on_load_success
  669.     else
  670.       Sound.play_buzzer
  671.     end
  672.   end
  673.  
  674.   #--------------------------------------------------------------------------
  675.   # overwrite method: on_load_success
  676.   #--------------------------------------------------------------------------
  677.   def on_load_success
  678.     Sound.play_load
  679.     fadeout_all
  680.     $game_system.on_after_load
  681.     SceneManager.goto(Scene_Map)
  682.   end
  683.  
  684.   #--------------------------------------------------------------------------
  685.   # new method: on_action_save
  686.   #--------------------------------------------------------------------------
  687.   def on_action_save
  688.     @action_window.activate
  689.     if DataManager.save_game(@file_window.index)
  690.       on_save_success
  691.       refresh_windows
  692.     else
  693.       Sound.play_buzzer
  694.     end
  695.   end
  696.  
  697.   #--------------------------------------------------------------------------
  698.   # overwrite method: on_save_success
  699.   #--------------------------------------------------------------------------
  700.   def on_save_success; Sound.play_save; end
  701.  
  702.   #--------------------------------------------------------------------------
  703.   # new method: on_action_delete
  704.   #--------------------------------------------------------------------------
  705.   def on_action_delete
  706.     @action_window.activate
  707.     DataManager.delete_save_file(@file_window.index)
  708.     on_delete_success
  709.     refresh_windows
  710.   end
  711.  
  712.   #--------------------------------------------------------------------------
  713.   # new method: on_delete_success
  714.   #--------------------------------------------------------------------------
  715.   def on_delete_success
  716.     YEA::SAVE::DELETE_SOUND.play
  717.   end
  718.  
  719.   #--------------------------------------------------------------------------
  720.   # new method: refresh_windows
  721.   #--------------------------------------------------------------------------
  722.   def refresh_windows
  723.     @file_window.refresh
  724.     @action_window.refresh
  725.     @status_window.refresh
  726.   end
  727.  
  728. end # Scene_File
  729.  
  730. #==============================================================================
  731. # ?! Scene_Save
  732. #==============================================================================
  733.  
  734. class Scene_Save < Scene_File
  735.  
  736.   #--------------------------------------------------------------------------
  737.   # overwrite method: on_savefile_ok
  738.   #--------------------------------------------------------------------------
  739.   def on_savefile_ok; super; end
  740.  
  741.   #--------------------------------------------------------------------------
  742.   # overwrite method: on_save_success
  743.   #--------------------------------------------------------------------------
  744.   def on_save_success; super; end
  745.  
  746. end # help_window_text
  747.  
  748. #==============================================================================
  749. # ?! Scene_Load
  750. #==============================================================================
  751.  
  752. class Scene_Load < Scene_File
  753.  
  754.   #--------------------------------------------------------------------------
  755.   # overwrite method: on_savefile_ok
  756.   #--------------------------------------------------------------------------
  757.   def on_savefile_ok; super; end
  758.  
  759.   #--------------------------------------------------------------------------
  760.   # overwrite method: on_load_success
  761.   #--------------------------------------------------------------------------
  762.   def on_load_success; super; end
  763.  
  764. end # Scene_Load
  765.  
  766. #==============================================================================
  767. #
  768. # ?\ End of File
  769. #
  770. #==============================================================================



有需要或有問題者在下面發問
大神們發現上面有錯或有意見請出聲感謝<(_ _)>  

点评

可以存储在注册表中  发表于 2013-7-11 19:17

评分

参与人数 3星屑 +305 梦石 +1 收起 理由
Mic_洛洛 + 200 精品文章
Sion + 100 + 1 感谢分享
黄濑凉太 + 5 就剩这么点了

查看全部评分

Lv2.观梦者

梦石
0
星屑
284
在线时间
271 小时
注册时间
2013-4-23
帖子
143
2
 楼主| 发表于 2013-6-28 22:19:36 | 只看该作者
沒人對2周目方法有意見嗎?
果然新手小白的帖不值一看_(:3」 ∠)_

点评

我只是吐槽你的方法而已,我自己会脚本=。=  发表于 2014-4-6 16:54
开启存档画面 储存后设置返回标题 之后读档时会回到存完档案的那边 接着又重复返回标题 求解~~~  发表于 2013-7-18 22:25
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
120 小时
注册时间
2011-5-30
帖子
44
3
发表于 2013-7-3 23:00:58 | 只看该作者
收藏不了呢。
需要呢。多谢LZ。等着要用了来看下。
...
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

4
发表于 2013-7-4 08:44:20 | 只看该作者
复制不了你的脚本···能不能框起来

点评

换个浏览器。  发表于 2013-7-4 09:48
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
54
在线时间
1049 小时
注册时间
2012-1-27
帖子
1446
5
发表于 2013-7-4 11:29:24 | 只看该作者
不,可以说目前的存档继承二周目在RPG里才是主流,只是VA操作麻烦点,并不能说是“伪·二周目”或是别的什么,反而因为是游戏的继承,使得一些周目特定的开关盒变量和部分重要道具得以继承,才更加的便利。嘛,不过实质上只需要用到全局变量储存就可以,不过我还是认为用存档继承才更加舒服,特别是类似于我这种碰上脚本没特别说明就是两眼一抹黑的家伙,用存档继承才更有实感,才更加容易明白多周目中能保存下来的是什么,被删掉的是什么。
而作为一名MAKER,清楚地明白自己做的东西会达到一个怎样的效果,还能达到一个怎样的效果,都是很重要的东西,

点评

單一存檔继承那個我叫它伪二周目是基於它不是按開新遊戲進入二周目, 可是我認同它也是進入二周目的方法因此我把它放上上頭  发表于 2013-7-5 20:36
惨了,没装全局变量,这下只能玩读档进EXTRA的把戏了∑(゚ω゚ノ)ノ
我感觉我快成兜售Q键幻灯片狂魔了
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21631
在线时间
9415 小时
注册时间
2012-6-19
帖子
7118

开拓者短篇九导演组冠军

6
发表于 2013-7-5 19:29:24 | 只看该作者
吐槽一下方法3

那个全局变量不一定只能用来做通关次数的

比如我获得了结局1,那么这个变量为1,我获得了结局2,这个变量为2,我获得了结局1+2,这个变量为3

用条件分歧的话可以做出不少的效果来

点评

其實我不太明白那個全局變量是改或加上哪個地方,看懂的話可以說多一些嗎(/w\)?  发表于 2013-7-5 20:39
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21631
在线时间
9415 小时
注册时间
2012-6-19
帖子
7118

开拓者短篇九导演组冠军

7
发表于 2013-7-11 18:38:48 | 只看该作者
@yiu889

范例工程

Data.zip

210.07 KB, 下载次数: 100

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2013-2-27
帖子
14
8
发表于 2013-7-18 15:23:55 | 只看该作者
方法一不太明白..

有更詳盡的講解嗎??

我在事件中使用腳本時測試出錯了 ~~

点评

脚本有错  发表于 2014-4-6 15:00
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (版主)

…あたしは天使なんかじゃないわ

梦石
0
星屑
2208
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

9
发表于 2014-4-6 14:57:05 | 只看该作者
本帖最后由 taroxd 于 2014-4-6 15:01 编辑

$game_self_switches.clear
$game_switches.clear
$game_variables.clear

这三个东西又不是数组,哪来的clear。楼主真的有测试过吗??

然后方法二,我只要放个空文件改成FinishedA.rvdata2就可以了。至少也从里面读取点东西吧?

点评

沒有真的全部試過_(:3」∠)_ 方法二上方喵大範本中有  发表于 2014-4-6 16:48
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-16 13:39

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表