查看: 6074|回复: 8

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

[复制链接]
梦石
0
星屑
284
在线时间
271 小时
注册时间
2013-4-23
回帖
122
发表于 2013-6-28 00:44:46 | 显示全部楼层 |阅读模式

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

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

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

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

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

方法一:关闭所有开关、独立开关,清理变量
(來源:http://rpg.blue/thread-289239-1-1.html   4樓)
通關後,问是否进入二周目
选是的话就关闭所有开关、独立开关还有清理变量
脚本:(在事件中使用)
  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行)

原碼:
  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
复制代码



改為:
  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]
  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二周目原腳本:
  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. $imported = {} if $imported.nil?
  10. $imported["YEA-NewGame+"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2011.12.26 - Started Script and Finished.
  15. #
  16. #==============================================================================
  17. # ▼ Introduction
  18. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  19. # New Game+ is a great way to provide replay value for your game. It lets the
  20. # player re-experience the game in a different way with either carried over
  21. # items, to carried over party members, to carried over skills, switches, and
  22. # variables even. There exists many options to change how New Game+ will work
  23. # for your game.
  24. #
  25. #==============================================================================
  26. # ▼ Instructions
  27. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  28. # To install this script, open up your script editor and copy/paste this script
  29. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  30. #
  31. # -----------------------------------------------------------------------------
  32. # Item Notetags - These notetags go in the items notebox in the database.
  33. # -----------------------------------------------------------------------------
  34. # <no carry over>
  35. # This will cause this specific item to not carry over in New Game+ if the item
  36. # can be carried over. This does not affect any items that actors may have
  37. # equipped.
  38. #
  39. # -----------------------------------------------------------------------------
  40. # Weapon Notetags - These notetags go in the weapons notebox in the database.
  41. # -----------------------------------------------------------------------------
  42. # <no carry over>
  43. # This will cause this specific item to not carry over in New Game+ if the item
  44. # can be carried over. This does not affect any items that actors may have
  45. # equipped.
  46. #
  47. # -----------------------------------------------------------------------------
  48. # Armour Notetags - These notetags go in the armours notebox in the database.
  49. # -----------------------------------------------------------------------------
  50. # <no carry over>
  51. # This will cause this specific item to not carry over in New Game+ if the item
  52. # can be carried over. This does not affect any items that actors may have
  53. # equipped.
  54. #
  55. #==============================================================================
  56. # ▼ Compatibility
  57. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  58. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  59. # it will run with RPG Maker VX without adjusting.
  60. #
  61. # This script requires Yanfly Engine Ace - Ace Save Engine v1.01+ and the
  62. # script must be placed under Ace Save Engine in the script listing.
  63. #
  64. #==============================================================================

  65. module YEA
  66.   module NEW_GAME_PLUS
  67.    
  68.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  69.     # - General Settings -
  70.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  71.     # Description
  72.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  73.     NGP_SWITCH = 203           # If Switch ON, the game file has NG+ flag.
  74.     NGP_TEXT   = "周目"   # Text used to show New Game+.
  75.    
  76.     # This is the help window text used for New Game+ when the New Game+
  77.     # option is highlighted.
  78.     NGP_HELP   = "继承新存档."
  79.    
  80.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  81.     # - Carry Over Settings -
  82.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  83.     # These settings adjust what carries over and what doesn't. These settings
  84.     # are very specific so adjust them carefully.
  85.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  86.     # This array contains all of the switches that you want carried over to
  87.     # be maintained. Any switches that aren't here will be set false.
  88.     CARRY_OVER_SWITCHES = [3, 6, 7,12,15,16,17,18]
  89.    
  90.     # This array contains all of the variables that you want carried over to
  91.     # be maintained. Any variables that aren't here will be set to 0.
  92.     CARRY_OVER_VARIABLES = [1,2,3,4,5]
  93.    
  94.     # If this is set to false, then actors will be completely reset back to
  95.     # their original starting states. If it's set to true, then actors will
  96.     # be kept exactly as they are.
  97.     CARRY_OVER_ACTORS = true
  98.    
  99.     # These settings are only used if actors will be carried over. With this,
  100.     # you can limit what specifics will be carried over for actors from levels
  101.     # to equips to skills.
  102.     CARRY_OVER_LEVELS = true
  103.     CARRY_OVER_EQUIPS = true
  104.     CARRY_OVER_SKILLS = true
  105.    
  106.     # If this is set to false, then the party members will revert back to the
  107.     # original starting party members. If it's true, then the party setup will
  108.     # remain exactly the same.
  109.     CARRY_OVER_PARTY_MEMBERS = true
  110.    
  111.     # If any of these are set to false, then no items, weapons, or armours will
  112.     # be carried over. If it's set to true, then the respective items will be
  113.     # carried over to the newer game.
  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. # ▼ Editting anything past this point may potentially result in causing
  123. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  124. # halitosis so edit at your own risk.
  125. #==============================================================================

  126. if $imported["YEA-SaveEngine"]

  127. module YEA
  128.   module NEW_GAME_PLUS
  129.     module_function
  130.     #--------------------------------------------------------------------------
  131.     # convert_integer_array
  132.     #--------------------------------------------------------------------------
  133.     def convert_integer_array(array)
  134.       result = []
  135.       array.each { |i|
  136.         case i
  137.         when Range; result |= i.to_a
  138.         when Integer; result |= [i]
  139.         end }
  140.       return result
  141.     end
  142.     #--------------------------------------------------------------------------
  143.     # converted_contants
  144.     #--------------------------------------------------------------------------
  145.     CARRY_OVER_SWITCHES = convert_integer_array(CARRY_OVER_SWITCHES)
  146.     CARRY_OVER_VARIABLES = convert_integer_array(CARRY_OVER_VARIABLES)
  147.   end # NEW_GAME_PLUS
  148.   module REGEXP
  149.   module BASEITEM
  150.    
  151.     NO_CARRY_OVER = /<(?:NO_CARRY_OVER|no carry over)>/i
  152.    
  153.   end # BASEITEM
  154.   end # REGEXP
  155. end # YEA

  156. #==============================================================================
  157. # ■ DataManager
  158. #==============================================================================

  159. module DataManager
  160.   
  161.   #--------------------------------------------------------------------------
  162.   # alias method: load_database
  163.   #--------------------------------------------------------------------------
  164.   class <<self; alias load_database_ngp load_database; end
  165.   def self.load_database
  166.     load_database_ngp
  167.     load_notetags_ngp
  168.   end
  169.   
  170.   #--------------------------------------------------------------------------
  171.   # new method: load_notetags_ngp
  172.   #--------------------------------------------------------------------------
  173.   def self.load_notetags_ngp
  174.     groups = [$data_items, $data_weapons, $data_armors]
  175.     for group in groups
  176.       for obj in group
  177.         next if obj.nil?
  178.         obj.load_notetags_ngp
  179.       end
  180.     end
  181.   end
  182.   
  183. end # DataManager

  184. #==============================================================================
  185. # ■ RPG::BaseItem
  186. #==============================================================================

  187. class RPG::BaseItem
  188.   
  189.   #--------------------------------------------------------------------------
  190.   # public instance variables
  191.   #--------------------------------------------------------------------------
  192.   attr_accessor :no_carry_over
  193.   
  194.   #--------------------------------------------------------------------------
  195.   # common cache: load_notetags_ngp
  196.   #--------------------------------------------------------------------------
  197.   def load_notetags_ngp
  198.     @no_carry_over = false
  199.     #---
  200.     self.note.split(/[\r\n]+/).each { |line|
  201.       case line
  202.       #---
  203.       when YEA::REGEXP::BASEITEM::NO_CARRY_OVER
  204.         @no_carry_over = true
  205.       end
  206.     } # self.note.split
  207.     #---
  208.   end
  209.   
  210. end # RPG::BaseItem

  211. #==============================================================================
  212. # ■ Switch
  213. #==============================================================================

  214. module Switch
  215.   
  216.   #--------------------------------------------------------------------------
  217.   # self.new_game_plus
  218.   #--------------------------------------------------------------------------
  219.   def self.new_game_plus
  220.     return $game_switches[YEA::NEW_GAME_PLUS::NGP_SWITCH]
  221.   end
  222.   
  223. end # Switch

  224. #==============================================================================
  225. # ■ DataManager
  226. #==============================================================================

  227. module DataManager
  228.   
  229.   #--------------------------------------------------------------------------
  230.   # new method: setup_new_game_plus
  231.   #--------------------------------------------------------------------------
  232.   def self.setup_new_game_plus(index)
  233.     create_new_game_plus_objects(index)
  234.     $game_map.setup($data_system.start_map_id)
  235.     $game_player.moveto($data_system.start_x, $data_system.start_y)
  236.     $game_player.refresh
  237.     Graphics.frame_count = 0
  238.   end
  239.   
  240.   #--------------------------------------------------------------------------
  241.   # new method: create_new_game_plus_objects
  242.   #--------------------------------------------------------------------------
  243.   def self.create_new_game_plus_objects(index)
  244.     load_game_without_rescue(index)
  245.     ngp_reset_switches
  246.     ngp_reset_variables
  247.     ngp_reset_self_switches
  248.     ngp_reset_actors
  249.     ngp_reset_party
  250.   end
  251.   
  252.   #--------------------------------------------------------------------------
  253.   # new method: ngp_reset_switches
  254.   #--------------------------------------------------------------------------
  255.   def self.ngp_reset_switches
  256.     for i in 0...$data_system.switches.size
  257.       next if i <= 0
  258.       next if YEA::NEW_GAME_PLUS::CARRY_OVER_SWITCHES.include?(i)
  259.       $game_switches[i] = false
  260.     end
  261.   end
  262.   
  263.   #--------------------------------------------------------------------------
  264.   # new method: ngp_reset_variables
  265.   #--------------------------------------------------------------------------
  266.   def self.ngp_reset_variables
  267.     for i in 0...$data_system.variables.size
  268.       next if i <= 0
  269.       next if YEA::NEW_GAME_PLUS::CARRY_OVER_VARIABLES.include?(i)
  270.       $game_variables[i] = 0
  271.     end
  272.   end
  273.   
  274.   #--------------------------------------------------------------------------
  275.   # new method: ngp_reset_self_switches
  276.   #--------------------------------------------------------------------------
  277.   def self.ngp_reset_self_switches
  278.     $game_self_switches = Game_SelfSwitches.new
  279.   end
  280.   
  281.   #--------------------------------------------------------------------------
  282.   # new method: ngp_reset_actors
  283.   #--------------------------------------------------------------------------
  284.   def self.ngp_reset_actors
  285.     unless YEA::NEW_GAME_PLUS::CARRY_OVER_ACTORS
  286.       $game_actors = Game_Actors.new
  287.     else
  288.       #---
  289.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_LEVELS
  290.         for i in 0...$data_actors.size
  291.           actor = $game_actors[i]
  292.           next if actor.nil?
  293.           actor.new_game_plus_levels
  294.         end
  295.       end
  296.       #---
  297.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_EQUIPS
  298.         for i in 0...$data_actors.size
  299.           actor = $game_actors[i]
  300.           next if actor.nil?
  301.           actor.new_game_plus_equips
  302.         end
  303.       end
  304.       #---
  305.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_SKILLS
  306.         for i in 0...$data_actors.size
  307.           actor = $game_actors[i]
  308.           next if actor.nil?
  309.           actor.new_game_plus_skills
  310.         end
  311.       end
  312.       #---
  313.     end
  314.   end
  315.   
  316.   #--------------------------------------------------------------------------
  317.   # new method: ngp_reset_party
  318.   #--------------------------------------------------------------------------
  319.   def self.ngp_reset_party
  320.     gold = 0
  321.     items = {}
  322.     members = []
  323.     #---
  324.     if YEA::NEW_GAME_PLUS::CARRY_OVER_PARTY_MEMBERS
  325.       for member in $game_party.members
  326.         members.push(member.id)
  327.       end
  328.     end
  329.     #---
  330.     gold = $game_party.gold if YEA::NEW_GAME_PLUS::CARRY_OVER_GOLD
  331.     #---
  332.     if YEA::NEW_GAME_PLUS::CARRY_OVER_ITEMS
  333.       for item in $data_items
  334.         next if item.nil?
  335.         next if item.no_carry_over
  336.         items[item] = $game_party.item_number(item)
  337.       end
  338.     end
  339.     #---
  340.     if YEA::NEW_GAME_PLUS::CARRY_OVER_WEAPONS
  341.       for item in $data_weapons
  342.         next if item.nil?
  343.         next if item.no_carry_over
  344.         items[item] = $game_party.item_number(item)
  345.       end
  346.     end
  347.     #---
  348.     if YEA::NEW_GAME_PLUS::CARRY_OVER_ARMOURS
  349.       for item in $data_armors
  350.         next if item.nil?
  351.         next if item.no_carry_over
  352.         items[item] = $game_party.item_number(item)
  353.       end
  354.     end
  355.     #---
  356.     $game_party = Game_Party.new
  357.     unless YEA::NEW_GAME_PLUS::CARRY_OVER_PARTY_MEMBERS
  358.       $game_party.setup_starting_members
  359.     end
  360.     #---
  361.     for member_id in members
  362.       $game_party.add_actor(member_id)
  363.     end
  364.     $game_party.gain_gold(gold)
  365.     for key in items
  366.       item = key[0]
  367.       next if item.nil?
  368.       $game_party.gain_item(item, key[1])
  369.     end
  370.   end
  371.   
  372. end # DataManager

  373. #==============================================================================
  374. # ■ Game_Actor
  375. #==============================================================================

  376. class Game_Actor < Game_Battler
  377.   
  378.   #--------------------------------------------------------------------------
  379.   # new method: new_game_plus_levels
  380.   #--------------------------------------------------------------------------
  381.   def new_game_plus_levels
  382.     @class_id = actor.class_id
  383.     [url=home.php?mod=space&uid=22147]@level[/url] = actor.initial_level
  384.     [url=home.php?mod=space&uid=13302]@exp[/url] = {}
  385.     if $imported["YEA-ClassSystem"]
  386.       init_unlocked_classes
  387.       init_subclass
  388.     end
  389.     clear_param_plus
  390.     init_exp
  391.     refresh
  392.   end
  393.   
  394.   #--------------------------------------------------------------------------
  395.   # new method: new_game_plus_equips
  396.   #--------------------------------------------------------------------------
  397.   def new_game_plus_equips
  398.     init_equips(actor.equips)
  399.   end
  400.   
  401.   #--------------------------------------------------------------------------
  402.   # new method: new_game_plus_skills
  403.   #--------------------------------------------------------------------------
  404.   def new_game_plus_skills
  405.     init_skills
  406.   end
  407.   
  408. end # Game_Actor

  409. #==============================================================================
  410. # ■ Window_FileAction
  411. #==============================================================================

  412. class Window_FileAction < Window_HorzCommand
  413.   
  414.   #--------------------------------------------------------------------------
  415.   # alias method: add_load_command
  416.   #--------------------------------------------------------------------------
  417.   alias add_load_command_ngp add_load_command
  418.   def add_load_command
  419.     if new_game_plus?
  420.       add_command(YEA::NEW_GAME_PLUS::NGP_TEXT, :new_game_plus)
  421.     else
  422.       add_load_command_ngp
  423.     end
  424.   end
  425.   
  426.   #--------------------------------------------------------------------------
  427.   # new method: new_game_plus?
  428.   #--------------------------------------------------------------------------
  429.   def new_game_plus?
  430.     return false if @header.nil?
  431.     return false if @header[:switches].nil?
  432.     return @header[:switches][YEA::NEW_GAME_PLUS::NGP_SWITCH]
  433.   end
  434.   
  435.   #--------------------------------------------------------------------------
  436.   # alias method: update_help
  437.   #--------------------------------------------------------------------------
  438.   alias update_help_ngp update_help
  439.   def update_help
  440.     case current_symbol
  441.     when :new_game_plus; @help_window.set_text(YEA::NEW_GAME_PLUS::NGP_HELP)
  442.     else; update_help_ngp
  443.     end
  444.   end
  445.   
  446. end # Window_FileAction

  447. #==============================================================================
  448. # ■ Scene_File
  449. #==============================================================================

  450. class Scene_File < Scene_MenuBase
  451.   
  452.   #--------------------------------------------------------------------------
  453.   # alias method: create_action_window
  454.   #--------------------------------------------------------------------------
  455.   alias create_action_window_ngp create_action_window
  456.   def create_action_window
  457.     create_action_window_ngp
  458.     @action_window.set_handler(:new_game_plus, method(:on_action_ngp))
  459.   end
  460.   
  461.   #--------------------------------------------------------------------------
  462.   # new method: on_action_ngp
  463.   #--------------------------------------------------------------------------
  464.   def on_action_ngp
  465.     Sound.play_load
  466.     DataManager.setup_new_game_plus(@file_window.index)
  467.     fadeout_all
  468.     $game_system.on_after_load
  469.     SceneManager.goto(Scene_Map)
  470.   end
  471.   
  472. end # Scene_File

  473. end # $imported["YEA-SaveEngine"]

  474. #==============================================================================
  475. #
  476. # ▼ End of File
  477. #
  478. #==============================================================================
复制代码


意譯後:
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly引擎ACE - 附加儲存引擎:New Game+ V1.00
  4. # - 最後更新:2011.12.26
  5. # - 等級:普通
  6. # - 需要:YEA - Ace Save Engine v1.01+
  7. #==============================================================================

  8. $imported = {} if $imported.nil?
  9. $imported["YEA-NewGame+"] = true

  10. #==============================================================================
  11. # ▼ 更新
  12. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  13. # 2011.12.26 - 完成成品
  14. #
  15. #==============================================================================
  16. # ▼ 簡介
  17. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  18. # New Game+ 是一個很好的腳本為您的遊戲增加重玩的要素。它可以讓玩家以不同的方式
  19. # 重新體驗遊戲。功能為繼承物品,轉換成員,技能保留,保存變量,開關等。存在很多
  20. # 選項來改變你的遊戲。
  21. #
  22. #==============================================================================
  23. # ▼ 說明
  24. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  25. # 要使用此腳本,打開你的腳本編輯器和複製/粘貼此腳本
  26. # 低於▼場景 但在 ▼ Main 之上 ,記得保存。
  27. #
  28. # -----------------------------------------------------------------------------
  29. # 物品 Notetags - These notetags go in the items notebox in the database.
  30. # -----------------------------------------------------------------------------
  31. # <no carry over>
  32. # This will cause this specific item to not carry over in New Game+ if the item
  33. # can be carried over. This does not affect any items that actors may have
  34. # equipped.
  35. #
  36. # -----------------------------------------------------------------------------
  37. # 武器 Notetags - These notetags go in the weapons notebox in the database.
  38. # -----------------------------------------------------------------------------
  39. # <no carry over>
  40. # This will cause this specific item to not carry over in New Game+ if the item
  41. # can be carried over. This does not affect any items that actors may have
  42. # equipped.
  43. #
  44. # -----------------------------------------------------------------------------
  45. # 裝備 Notetags - These notetags go in the armours notebox in the database.
  46. # -----------------------------------------------------------------------------
  47. # <no carry over>
  48. # This will cause this specific item to not carry over in New Game+ if the item
  49. # can be carried over. This does not affect any items that actors may have
  50. # equipped.
  51. #
  52. #==============================================================================
  53. # ▼ 兼容性
  54. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  55. # 這個腳本是 RPG Maker VX Ace 專用.這是極不可能的用在 RPG Maker VX
  56. #
  57. #
  58. # 這個腳本需要 Yanfly Engine Ace - Ace Save Engine v1.01+
  59. # 腳本必須放在腳本列表中 Ace Save 引擎之下.
  60. #
  61. #==============================================================================

  62. module YEA
  63.   module NEW_GAME_PLUS
  64.    
  65.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  66.     # -常規設置 -
  67.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  68.     # 說明
  69.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  70.     NGP_SWITCH = 203           # 如果開關ON,遊戲文件有NG +標誌。
  71.     NGP_TEXT   = "周目"   # Text 用來顯示新周目。
  72.    
  73.     # 這是幫助窗口(提示的字樣?)的字句用於新周目上當有新周目時
  74.     # 選項是突出。(?)
  75.     NGP_HELP   = "继承新存档."
  76.    
  77.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  78.     # - Carry Over 設置 -
  79.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  80.     # 這些設置調整是很關鍵的所以要仔細調整
  81.     #
  82.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  83.     # 這個數組包含了所有的開關都你要繼承的,任何開關在這裡都不會將被設置為 false(關閉)。
  84.     #
  85.     CARRY_OVER_SWITCHES = [3, 6, 7,12,15,16,17,18]
  86.    
  87.     # 這個數組包含了所有的變量都你要繼承的,任何開關在這裡都不會將被設置為0。
  88.     #
  89.     CARRY_OVER_VARIABLES = [1,2,3,4,5]
  90.    
  91.     # 如果此設置為false,那麼角色的能力便會初始化(完全復位)
  92.     # 如果設置為true,角色的能力便會保持
  93.     #
  94.     CARRY_OVER_ACTORS = true
  95.    
  96.     #如果你要繼承角色數值,可以限制或調整什麼樣的細節
  97.     #
  98.     #
  99.     CARRY_OVER_LEVELS = true
  100.     CARRY_OVER_EQUIPS = true
  101.     CARRY_OVER_SKILLS = true
  102.    
  103.     # 如果此設置為false,那麼將恢復本來的隊伍設定
  104.     # 如果此設置為true, 那麼將保留通關時的隊伍
  105.     #
  106.     CARRY_OVER_PARTY_MEMBERS = true
  107.    
  108.     # 如果其中任何一個設置為false,那麼相應的項目將不會被繼承
  109.     # 如果其中任何一個設置為true,那麼相應的項目將會被繼承
  110.     # (順序:金錢,物品,武器,裝備)
  111.     CARRY_OVER_GOLD    = true
  112.     CARRY_OVER_ITEMS   = true
  113.     CARRY_OVER_WEAPONS = true
  114.     CARRY_OVER_ARMOURS = true
  115.    
  116.   end # NEW_GAME_PLUS
  117. end # YEA

  118. #==============================================================================
  119. # ▼編輯下面任何東西,
  120. # 可能會導致造成電腦受損,使用者大小便失禁,昏迷,爆炸的死亡,和/或口臭
  121. # 請自行評估風險
  122. #==============================================================================

  123. if $imported["YEA-SaveEngine"]

  124. module YEA
  125.   module NEW_GAME_PLUS
  126.     module_function
  127.     #--------------------------------------------------------------------------
  128.     # convert_integer_array
  129.     #--------------------------------------------------------------------------
  130.     def convert_integer_array(array)
  131.       result = []
  132.       array.each { |i|
  133.         case i
  134.         when Range; result |= i.to_a
  135.         when Integer; result |= [i]
  136.         end }
  137.       return result
  138.     end
  139.     #--------------------------------------------------------------------------
  140.     # converted_contants
  141.     #--------------------------------------------------------------------------
  142.     CARRY_OVER_SWITCHES = convert_integer_array(CARRY_OVER_SWITCHES)
  143.     CARRY_OVER_VARIABLES = convert_integer_array(CARRY_OVER_VARIABLES)
  144.   end # NEW_GAME_PLUS
  145.   module REGEXP
  146.   module BASEITEM
  147.    
  148.     NO_CARRY_OVER = /<(?:NO_CARRY_OVER|no carry over)>/i
  149.    
  150.   end # BASEITEM
  151.   end # REGEXP
  152. end # YEA

  153. #==============================================================================
  154. # ■ DataManager
  155. #==============================================================================

  156. module DataManager
  157.   
  158.   #--------------------------------------------------------------------------
  159.   # alias method: load_database
  160.   #--------------------------------------------------------------------------
  161.   class <<self; alias load_database_ngp load_database; end
  162.   def self.load_database
  163.     load_database_ngp
  164.     load_notetags_ngp
  165.   end
  166.   
  167.   #--------------------------------------------------------------------------
  168.   # new method: load_notetags_ngp
  169.   #--------------------------------------------------------------------------
  170.   def self.load_notetags_ngp
  171.     groups = [$data_items, $data_weapons, $data_armors]
  172.     for group in groups
  173.       for obj in group
  174.         next if obj.nil?
  175.         obj.load_notetags_ngp
  176.       end
  177.     end
  178.   end
  179.   
  180. end # DataManager

  181. #==============================================================================
  182. # ■ RPG::BaseItem
  183. #==============================================================================

  184. class RPG::BaseItem
  185.   
  186.   #--------------------------------------------------------------------------
  187.   # public instance variables
  188.   #--------------------------------------------------------------------------
  189.   attr_accessor :no_carry_over
  190.   
  191.   #--------------------------------------------------------------------------
  192.   # common cache: load_notetags_ngp
  193.   #--------------------------------------------------------------------------
  194.   def load_notetags_ngp
  195.     @no_carry_over = false
  196.     #---
  197.     self.note.split(/[\r\n]+/).each { |line|
  198.       case line
  199.       #---
  200.       when YEA::REGEXP::BASEITEM::NO_CARRY_OVER
  201.         @no_carry_over = true
  202.       end
  203.     } # self.note.split
  204.     #---
  205.   end
  206.   
  207. end # RPG::BaseItem

  208. #==============================================================================
  209. # ■ Switch
  210. #==============================================================================

  211. module Switch
  212.   
  213.   #--------------------------------------------------------------------------
  214.   # self.new_game_plus
  215.   #--------------------------------------------------------------------------
  216.   def self.new_game_plus
  217.     return $game_switches[YEA::NEW_GAME_PLUS::NGP_SWITCH]
  218.   end
  219.   
  220. end # Switch

  221. #==============================================================================
  222. # ■ DataManager
  223. #==============================================================================

  224. module DataManager
  225.   
  226.   #--------------------------------------------------------------------------
  227.   # new method: setup_new_game_plus
  228.   #--------------------------------------------------------------------------
  229.   def self.setup_new_game_plus(index)
  230.     create_new_game_plus_objects(index)
  231.     $game_map.setup($data_system.start_map_id)
  232.     $game_player.moveto($data_system.start_x, $data_system.start_y)
  233.     $game_player.refresh
  234.     Graphics.frame_count = 0
  235.   end
  236.   
  237.   #--------------------------------------------------------------------------
  238.   # new method: create_new_game_plus_objects
  239.   #--------------------------------------------------------------------------
  240.   def self.create_new_game_plus_objects(index)
  241.     load_game_without_rescue(index)
  242.     ngp_reset_switches
  243.     ngp_reset_variables
  244.     ngp_reset_self_switches
  245.     ngp_reset_actors
  246.     ngp_reset_party
  247.   end
  248.   
  249.   #--------------------------------------------------------------------------
  250.   # new method: ngp_reset_switches
  251.   #--------------------------------------------------------------------------
  252.   def self.ngp_reset_switches
  253.     for i in 0...$data_system.switches.size
  254.       next if i <= 0
  255.       next if YEA::NEW_GAME_PLUS::CARRY_OVER_SWITCHES.include?(i)
  256.       $game_switches[i] = false
  257.     end
  258.   end
  259.   
  260.   #--------------------------------------------------------------------------
  261.   # new method: ngp_reset_variables
  262.   #--------------------------------------------------------------------------
  263.   def self.ngp_reset_variables
  264.     for i in 0...$data_system.variables.size
  265.       next if i <= 0
  266.       next if YEA::NEW_GAME_PLUS::CARRY_OVER_VARIABLES.include?(i)
  267.       $game_variables[i] = 0
  268.     end
  269.   end
  270.   
  271.   #--------------------------------------------------------------------------
  272.   # new method: ngp_reset_self_switches
  273.   #--------------------------------------------------------------------------
  274.   def self.ngp_reset_self_switches
  275.     $game_self_switches = Game_SelfSwitches.new
  276.   end
  277.   
  278.   #--------------------------------------------------------------------------
  279.   # new method: ngp_reset_actors
  280.   #--------------------------------------------------------------------------
  281.   def self.ngp_reset_actors
  282.     unless YEA::NEW_GAME_PLUS::CARRY_OVER_ACTORS
  283.       $game_actors = Game_Actors.new
  284.     else
  285.       #---
  286.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_LEVELS
  287.         for i in 0...$data_actors.size
  288.           actor = $game_actors[i]
  289.           next if actor.nil?
  290.           actor.new_game_plus_levels
  291.         end
  292.       end
  293.       #---
  294.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_EQUIPS
  295.         for i in 0...$data_actors.size
  296.           actor = $game_actors[i]
  297.           next if actor.nil?
  298.           actor.new_game_plus_equips
  299.         end
  300.       end
  301.       #---
  302.       unless YEA::NEW_GAME_PLUS::CARRY_OVER_SKILLS
  303.         for i in 0...$data_actors.size
  304.           actor = $game_actors[i]
  305.           next if actor.nil?
  306.           actor.new_game_plus_skills
  307.         end
  308.       end
  309.       #---
  310.     end
  311.   end
  312.   
  313.   #--------------------------------------------------------------------------
  314.   # new method: ngp_reset_party
  315.   #--------------------------------------------------------------------------
  316.   def self.ngp_reset_party
  317.     gold = 0
  318.     items = {}
  319.     members = []
  320.     #---
  321.     if YEA::NEW_GAME_PLUS::CARRY_OVER_PARTY_MEMBERS
  322.       for member in $game_party.members
  323.         members.push(member.id)
  324.       end
  325.     end
  326.     #---
  327.     gold = $game_party.gold if YEA::NEW_GAME_PLUS::CARRY_OVER_GOLD
  328.     #---
  329.     if YEA::NEW_GAME_PLUS::CARRY_OVER_ITEMS
  330.       for item in $data_items
  331.         next if item.nil?
  332.         next if item.no_carry_over
  333.         items[item] = $game_party.item_number(item)
  334.       end
  335.     end
  336.     #---
  337.     if YEA::NEW_GAME_PLUS::CARRY_OVER_WEAPONS
  338.       for item in $data_weapons
  339.         next if item.nil?
  340.         next if item.no_carry_over
  341.         items[item] = $game_party.item_number(item)
  342.       end
  343.     end
  344.     #---
  345.     if YEA::NEW_GAME_PLUS::CARRY_OVER_ARMOURS
  346.       for item in $data_armors
  347.         next if item.nil?
  348.         next if item.no_carry_over
  349.         items[item] = $game_party.item_number(item)
  350.       end
  351.     end
  352.     #---
  353.     $game_party = Game_Party.new
  354.     unless YEA::NEW_GAME_PLUS::CARRY_OVER_PARTY_MEMBERS
  355.       $game_party.setup_starting_members
  356.     end
  357.     #---
  358.     for member_id in members
  359.       $game_party.add_actor(member_id)
  360.     end
  361.     $game_party.gain_gold(gold)
  362.     for key in items
  363.       item = key[0]
  364.       next if item.nil?
  365.       $game_party.gain_item(item, key[1])
  366.     end
  367.   end
  368.   
  369. end # DataManager

  370. #==============================================================================
  371. # ■ Game_Actor
  372. #==============================================================================

  373. class Game_Actor < Game_Battler
  374.   
  375.   #--------------------------------------------------------------------------
  376.   # new method: new_game_plus_levels
  377.   #--------------------------------------------------------------------------
  378.   def new_game_plus_levels
  379.     @class_id = actor.class_id
  380.     [url=home.php?mod=space&uid=22147]@level[/url] = actor.initial_level
  381.     [url=home.php?mod=space&uid=13302]@exp[/url] = {}
  382.     if $imported["YEA-ClassSystem"]
  383.       init_unlocked_classes
  384.       init_subclass
  385.     end
  386.     clear_param_plus
  387.     init_exp
  388.     refresh
  389.   end
  390.   
  391.   #--------------------------------------------------------------------------
  392.   # new method: new_game_plus_equips
  393.   #--------------------------------------------------------------------------
  394.   def new_game_plus_equips
  395.     init_equips(actor.equips)
  396.   end
  397.   
  398.   #--------------------------------------------------------------------------
  399.   # new method: new_game_plus_skills
  400.   #--------------------------------------------------------------------------
  401.   def new_game_plus_skills
  402.     init_skills
  403.   end
  404.   
  405. end # Game_Actor

  406. #==============================================================================
  407. # ■ Window_FileAction
  408. #==============================================================================

  409. class Window_FileAction < Window_HorzCommand
  410.   
  411.   #--------------------------------------------------------------------------
  412.   # alias method: add_load_command
  413.   #--------------------------------------------------------------------------
  414.   alias add_load_command_ngp add_load_command
  415.   def add_load_command
  416.     if new_game_plus?
  417.       add_command(YEA::NEW_GAME_PLUS::NGP_TEXT, :new_game_plus)
  418.     else
  419.       add_load_command_ngp
  420.     end
  421.   end
  422.   
  423.   #--------------------------------------------------------------------------
  424.   # new method: new_game_plus?
  425.   #--------------------------------------------------------------------------
  426.   def new_game_plus?
  427.     return false if @header.nil?
  428.     return false if @header[:switches].nil?
  429.     return @header[:switches][YEA::NEW_GAME_PLUS::NGP_SWITCH]
  430.   end
  431.   
  432.   #--------------------------------------------------------------------------
  433.   # alias method: update_help
  434.   #--------------------------------------------------------------------------
  435.   alias update_help_ngp update_help
  436.   def update_help
  437.     case current_symbol
  438.     when :new_game_plus; @help_window.set_text(YEA::NEW_GAME_PLUS::NGP_HELP)
  439.     else; update_help_ngp
  440.     end
  441.   end
  442.   
  443. end # Window_FileAction

  444. #==============================================================================
  445. # ■ Scene_File
  446. #==============================================================================

  447. class Scene_File < Scene_MenuBase
  448.   
  449.   #--------------------------------------------------------------------------
  450.   # alias method: create_action_window
  451.   #--------------------------------------------------------------------------
  452.   alias create_action_window_ngp create_action_window
  453.   def create_action_window
  454.     create_action_window_ngp
  455.     @action_window.set_handler(:new_game_plus, method(:on_action_ngp))
  456.   end
  457.   
  458.   #--------------------------------------------------------------------------
  459.   # new method: on_action_ngp
  460.   #--------------------------------------------------------------------------
  461.   def on_action_ngp
  462.     Sound.play_load
  463.     DataManager.setup_new_game_plus(@file_window.index)
  464.     fadeout_all
  465.     $game_system.on_after_load
  466.     SceneManager.goto(Scene_Map)
  467.   end
  468.   
  469. end # Scene_File

  470. end # $imported["YEA-SaveEngine"]

  471. #==============================================================================
  472. #
  473. # ▼ End of File
  474. #
  475. #==============================================================================
复制代码




YEA - Ace Save Engine v1.01+(存檔強化腳本):
(如果要用上上面的腳本一定要用上這一個)
  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. $imported = {} if $imported.nil?
  10. $imported["YEA-SaveEngine"] = true

  11. #==============================================================================
  12. # ?\ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.07.22 - Fixed: Location Drawing.
  15. # 2012.01.23 - Anti-crash method added for removed maps.
  16. # 2011.12.26 - Compatibility Update: New Game+
  17. # 2011.12.26 - Started Script and Finished.
  18. #
  19. #==============================================================================
  20. # ?\ Introduction
  21. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. # This script provides a new save interface for the player. Along with a new
  23. # interface, the player can also load and delete saves straight from the menu
  24. # itself. This will in turn make the save command from the Main Menu always
  25. # available, but the save option within the new save menu will be enabled
  26. # depending on whether or not it is allowed or disallowed. From the interface,
  27. # the player is given more information regarding the save file including the
  28. # the location the player saved at, the amount of gold available, and any
  29. # variables that you want to show the player as well.
  30. #
  31. #==============================================================================
  32. # ?\ Instructions
  33. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  34. # To install this script, open up your script editor and copy/paste this script
  35. # to an open slot below ?\ Materials/ef?T but above ?\ Main. Remember to save.
  36. #
  37. # For first time installers, be warned that loading this script the first time
  38. # may not display all information in the status window for save files made
  39. # before the installation of this script. To remedy this, just load up the save
  40. # and save the file again.
  41. #
  42. #==============================================================================
  43. # ?\ Compatibility
  44. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  45. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  46. # it will run with RPG Maker VX without adjusting.
  47. #
  48. #==============================================================================

  49. module YEA
  50.   module SAVE
  51.    
  52.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  53.     # - Slot Window Settings -
  54.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  55.     # This section adjusts how the slot window appears on the left side of the
  56.     # screen. This also adjusts the maximum number of saves a player can make,
  57.     # the way the slot names appear, and the icons used.
  58.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  59.     MAX_FILES = 24         # Maximum saves a player can make. Default: 16
  60.     SLOT_NAME = "File %s"  # How the file slots will be named.
  61.    
  62.     # These are the icons
  63.     SAVE_ICON  = 368       # Icon used to indicate a save is present.
  64.     EMPTY_ICON = 375       # Icon used to indicate an empty file.
  65.    
  66.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  67.     # - Action Window Settings -
  68.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  69.     # This section adjusts how the action window appears, the sound effect
  70.     # played when deleting files, and what appears in the help window above.
  71.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  72.     ACTION_LOAD   = "Load"           # Text used for loading games.
  73.     ACTION_SAVE   = "Save"           # Text used for saving games.
  74.     ACTION_DELETE = "Delete"         # Text used for deleting games.
  75.     DELETE_SOUND  = RPG::SE.new("Collapse3", 100, 100) # Sound for deleting.
  76.    
  77.     # These text settings adjust what displays in the help window.
  78.     SELECT_HELP = "Please select a file slot."
  79.     LOAD_HELP   = "Loads the data from the saved game."
  80.     SAVE_HELP   = "Saves the current progress in your game."
  81.     DELETE_HELP = "Deletes all data from this save file."
  82.    
  83.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  84.     # - Status Window Settings -
  85.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  86.     # This section adjusts how the status window appears in the middle of the
  87.     # screen (that displays the game's data) such as the total playtime, total
  88.     # times saved, total gold, the party's current location, and the variables
  89.     # to be displayed.
  90.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  91.     EMPTY_TEXT = "No Save Data"      # Text used when no save data is present.
  92.     PLAYTIME   = "Playtime"          # Text used for total playtime.
  93.     TOTAL_SAVE = "Total Saves: "     # Text used to indicate total saves.
  94.     TOTAL_GOLD = "Total Gold: "      # Text used to indicate total gold.
  95.     LOCATION   = "Location: "        # Text used to indicate current location.
  96.    
  97.     # These variables will be shown in each of the two columns for those who
  98.     # would want to display more information than just what's shown. Input the
  99.     # variables into the arrays below to designate what data will be shown.
  100.     COLUMN1_VARIABLES = [1, 2, 3]
  101.     COLUMN2_VARIABLES = [4, 5, 6]
  102.    
  103.   end # SAVE
  104. end # YEA

  105. #==============================================================================
  106. # ?\ Editting anything past this point may potentially result in causing
  107. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  108. # halitosis so edit at your own risk.
  109. #==============================================================================

  110. #==============================================================================
  111. # ?! Icon
  112. #==============================================================================

  113. module Icon
  114.   
  115.   #--------------------------------------------------------------------------
  116.   # self.save_icon
  117.   #--------------------------------------------------------------------------
  118.   def self.save_icon; return YEA::SAVE::SAVE_ICON; end
  119.   
  120.   #--------------------------------------------------------------------------
  121.   # self.empty_icon
  122.   #--------------------------------------------------------------------------
  123.   def self.empty_icon; return YEA::SAVE::EMPTY_ICON; end
  124.    
  125. end # Icon

  126. #==============================================================================
  127. # ?! Numeric
  128. #==============================================================================

  129. class Numeric
  130.   
  131.   #--------------------------------------------------------------------------
  132.   # new method: group_digits
  133.   #--------------------------------------------------------------------------
  134.   unless $imported["YEA-CoreEngine"]
  135.   def group; return self.to_s; end
  136.   end # $imported["YEA-CoreEngine"]
  137.    
  138. end # Numeric

  139. #==============================================================================
  140. # ?! DataManager
  141. #==============================================================================

  142. module DataManager
  143.   
  144.   #--------------------------------------------------------------------------
  145.   # overwrite method: savefile_max
  146.   #--------------------------------------------------------------------------
  147.   def self.savefile_max
  148.     return YEA::SAVE::MAX_FILES
  149.   end
  150.   
  151.   #--------------------------------------------------------------------------
  152.   # overwrite method: self.make_save_header
  153.   #--------------------------------------------------------------------------
  154.   def self.make_save_header
  155.     header = {}
  156.     header[:characters]    = $game_party.characters_for_savefile
  157.     header[:playtime_s]    = $game_system.playtime_s
  158.     header[:system]        = Marshal.load(Marshal.dump($game_system))
  159.     header[:timer]         = Marshal.load(Marshal.dump($game_timer))
  160.     header[:message]       = Marshal.load(Marshal.dump($game_message))
  161.     header[:switches]      = Marshal.load(Marshal.dump($game_switches))
  162.     header[:variables]     = Marshal.load(Marshal.dump($game_variables))
  163.     header[:self_switches] = Marshal.load(Marshal.dump($game_self_switches))
  164.     header[:actors]        = Marshal.load(Marshal.dump($game_actors))
  165.     header[:party]         = Marshal.load(Marshal.dump($game_party))
  166.     header[:troop]         = Marshal.load(Marshal.dump($game_troop))
  167.     header[:map]           = Marshal.load(Marshal.dump($game_map))
  168.     header[:player]        = Marshal.load(Marshal.dump($game_player))
  169.     header
  170.   end
  171.   
  172. end # DataManager

  173. #==============================================================================
  174. # ?! Window_MenuCommand
  175. #==============================================================================

  176. class Window_MenuCommand < Window_Command
  177.   
  178.   #--------------------------------------------------------------------------
  179.   # overwrite method: save_enabled
  180.   #--------------------------------------------------------------------------
  181.   def save_enabled; return true; end
  182.   
  183. end # Window_MenuCommand

  184. #==============================================================================
  185. # ?! Window_FileList
  186. #==============================================================================

  187. class Window_FileList < Window_Selectable
  188.   
  189.   #--------------------------------------------------------------------------
  190.   # initialize
  191.   #--------------------------------------------------------------------------
  192.   def initialize(dx, dy)
  193.     super(dx, dy, 128, Graphics.height - dy)
  194.     refresh
  195.     activate
  196.     select(SceneManager.scene.first_savefile_index)
  197.   end
  198.   
  199.   #--------------------------------------------------------------------------
  200.   # item_max
  201.   #--------------------------------------------------------------------------
  202.   def item_max; return DataManager.savefile_max; end
  203.   
  204.   #--------------------------------------------------------------------------
  205.   # current_item_enabled?
  206.   #--------------------------------------------------------------------------
  207.   def current_item_enabled?
  208.     header = DataManager.load_header(index)
  209.     return false if header.nil? && SceneManager.scene_is?(Scene_Load)
  210.     return true
  211.   end
  212.   
  213.   #--------------------------------------------------------------------------
  214.   # refresh
  215.   #--------------------------------------------------------------------------
  216.   def refresh
  217.     create_contents
  218.     draw_all_items
  219.   end
  220.   
  221.   #--------------------------------------------------------------------------
  222.   # draw_item
  223.   #--------------------------------------------------------------------------
  224.   def draw_item(index)
  225.     header = DataManager.load_header(index)
  226.     enabled = !header.nil?
  227.     rect = item_rect(index)
  228.     rect.width -= 4
  229.     draw_icon(save_icon?(header), rect.x, rect.y, enabled)
  230.     change_color(normal_color, enabled)
  231.     text = sprintf(YEA::SAVE::SLOT_NAME, (index + 1).group)
  232.     draw_text(rect.x+24, rect.y, rect.width-24, line_height, text)
  233.   end
  234.   
  235.   #--------------------------------------------------------------------------
  236.   # save_icon?
  237.   #--------------------------------------------------------------------------
  238.   def save_icon?(header)
  239.     return Icon.empty_icon if header.nil?
  240.     return Icon.save_icon
  241.   end
  242.   
  243. end # Window_FileList

  244. #==============================================================================
  245. # ?! Window_FileStatus
  246. #==============================================================================

  247. class Window_FileStatus < Window_Base
  248.   
  249.   #--------------------------------------------------------------------------
  250.   # initialize
  251.   #--------------------------------------------------------------------------
  252.   def initialize(dx, dy, file_window)
  253.     super(dx, dy, Graphics.width - dx, Graphics.height - dy)
  254.     @file_window = file_window
  255.     @current_index = @file_window.index
  256.     refresh
  257.   end
  258.   
  259.   #--------------------------------------------------------------------------
  260.   # update
  261.   #--------------------------------------------------------------------------
  262.   def update
  263.     super
  264.     return if @file_window.index < 0
  265.     return if @current_index == @file_window.index
  266.     @current_index = @file_window.index
  267.     refresh
  268.   end
  269.   
  270.   #--------------------------------------------------------------------------
  271.   # refresh
  272.   #--------------------------------------------------------------------------
  273.   def refresh
  274.     contents.clear
  275.     reset_font_settings
  276.     @header = DataManager.load_header(@file_window.index)
  277.     if @header.nil?
  278.       draw_empty
  279.     else
  280.       draw_save_contents
  281.     end
  282.   end
  283.   
  284.   #--------------------------------------------------------------------------
  285.   # draw_empty
  286.   #--------------------------------------------------------------------------
  287.   def draw_empty
  288.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  289.     rect = Rect.new(0, 0, contents.width, contents.height)
  290.     contents.fill_rect(rect, colour)
  291.     text = YEA::SAVE::EMPTY_TEXT
  292.     change_color(system_color)
  293.     draw_text(rect, text, 1)
  294.   end
  295.   
  296.   #--------------------------------------------------------------------------
  297.   # draw_save_slot
  298.   #--------------------------------------------------------------------------
  299.   def draw_save_slot(dx, dy, dw)
  300.     reset_font_settings
  301.     change_color(system_color)
  302.     text = sprintf(YEA::SAVE::SLOT_NAME, "")
  303.     draw_text(dx, dy, dw, line_height, text)
  304.     cx = text_size(text).width
  305.     change_color(normal_color)
  306.     draw_text(dx+cx, dy, dw-cx, line_height, (@file_window.index+1).group)
  307.   end
  308.   
  309.   #--------------------------------------------------------------------------
  310.   # draw_save_playtime
  311.   #--------------------------------------------------------------------------
  312.   def draw_save_playtime(dx, dy, dw)
  313.     return if @header[:playtime_s].nil?
  314.     reset_font_settings
  315.     change_color(system_color)
  316.     draw_text(dx, dy, dw, line_height, YEA::SAVE::PLAYTIME, 0)
  317.     change_color(normal_color)
  318.     draw_text(dx, dy, dw, line_height, @header[:playtime_s], 2)
  319.   end
  320.   
  321.   #--------------------------------------------------------------------------
  322.   # draw_save_total_saves
  323.   #--------------------------------------------------------------------------
  324.   def draw_save_total_saves(dx, dy, dw)
  325.     return if @header[:system].nil?
  326.     reset_font_settings
  327.     change_color(system_color)
  328.     text = YEA::SAVE::TOTAL_SAVE
  329.     draw_text(dx, dy, dw, line_height, text)
  330.     cx = text_size(text).width
  331.     change_color(normal_color)
  332.     draw_text(dx+cx, dy, dw-cx, line_height, @header[:system].save_count.group)
  333.   end
  334.   
  335.   #--------------------------------------------------------------------------
  336.   # draw_save_gold
  337.   #--------------------------------------------------------------------------
  338.   def draw_save_gold(dx, dy, dw)
  339.     return if @header[:party].nil?
  340.     reset_font_settings
  341.     change_color(system_color)
  342.     draw_text(dx, dy, dw, line_height, YEA::SAVE::TOTAL_GOLD)
  343.     text = Vocab::currency_unit
  344.     draw_text(dx, dy, dw, line_height, text, 2)
  345.     cx = text_size(text).width
  346.     change_color(normal_color)
  347.     text = @header[:party].gold.group
  348.     draw_text(dx, dy, dw-cx, line_height, text, 2)
  349.   end
  350.   
  351.   #--------------------------------------------------------------------------
  352.   # draw_save_location
  353.   #--------------------------------------------------------------------------
  354.   def draw_save_location(dx, dy, dw)
  355.     return if @header[:map].nil?
  356.     reset_font_settings
  357.     change_color(system_color)
  358.     draw_text(dx, dy, dw, line_height, YEA::SAVE::LOCATION)
  359.     change_color(normal_color)
  360.     cx = text_size(YEA::SAVE::LOCATION).width
  361.     return if $data_mapinfos[@header[:map].map_id].nil?
  362.     text = @header[:map].display_name
  363.     text = $data_mapinfos[@header[:map].map_id].name if text == ""
  364.     draw_text(dx+cx, dy, dw-cx, line_height, text)
  365.   end
  366.   
  367.   #--------------------------------------------------------------------------
  368.   # draw_save_characters
  369.   #--------------------------------------------------------------------------
  370.   def draw_save_characters(dx, dy)
  371.     return if @header[:party].nil?
  372.     reset_font_settings
  373.     make_font_smaller
  374.     dw = (contents.width - dx) / @header[:party].max_battle_members
  375.     dx += dw/2
  376.     for member in @header[:party].battle_members
  377.       next if member.nil?
  378.       member = @header[:actors][member.id]
  379.       change_color(normal_color)
  380.       draw_actor_graphic(member, dx, dy)
  381.       text = member.name
  382.       draw_text(dx-dw/2, dy, dw, line_height, text, 1)
  383.       text = member.level.group
  384.       draw_text(dx-dw/2, dy-line_height, dw-4, line_height, text, 2)
  385.       cx = text_size(text).width
  386.       change_color(system_color)
  387.       text = Vocab::level_a
  388.       draw_text(dx-dw/2, dy-line_height, dw-cx-4, line_height, text, 2)
  389.       dx += dw
  390.     end
  391.   end
  392.   
  393.   #--------------------------------------------------------------------------
  394.   # draw_save_column1
  395.   #--------------------------------------------------------------------------
  396.   def draw_save_column1(dx, dy, dw)
  397.     data = YEA::SAVE::COLUMN1_VARIABLES
  398.     draw_column_data(data, dx, dy, dw)
  399.   end
  400.   
  401.   #--------------------------------------------------------------------------
  402.   # draw_save_column2
  403.   #--------------------------------------------------------------------------
  404.   def draw_save_column2(dx, dy, dw)
  405.     data = YEA::SAVE::COLUMN2_VARIABLES
  406.     draw_column_data(data, dx, dy, dw)
  407.   end
  408.   
  409.   #--------------------------------------------------------------------------
  410.   # draw_column_data
  411.   #--------------------------------------------------------------------------
  412.   def draw_column_data(data, dx, dy, dw)
  413.     return if @header[:variables].nil?
  414.     reset_font_settings
  415.     for variable_id in data
  416.       next if $data_system.variables[variable_id].nil?
  417.       change_color(system_color)
  418.       name = $data_system.variables[variable_id]
  419.       draw_text(dx, dy, dw, line_height, name, 0)
  420.       value = @header[:variables][variable_id].group
  421.       change_color(normal_color)
  422.       draw_text(dx, dy, dw, line_height, value, 2)
  423.       dy += line_height
  424.     end
  425.   end
  426.   
  427.   #--------------------------------------------------------------------------
  428.   # draw_save_contents
  429.   #--------------------------------------------------------------------------
  430.   def draw_save_contents
  431.     draw_save_slot(4, 0, contents.width/2-8)
  432.     draw_save_playtime(contents.width/2+4, 0, contents.width/2-8)
  433.     draw_save_total_saves(4, line_height, contents.width/2-8)
  434.     draw_save_gold(contents.width/2+4, line_height, contents.width/2-8)
  435.     draw_save_location(4, line_height*2, contents.width-8)
  436.     draw_save_characters(0, line_height*5 + line_height/3)
  437.     draw_save_column1(16, line_height*7, contents.width/2-48)
  438.     draw_save_column2(contents.width/2+16, line_height*7, contents.width/2-48)
  439.   end
  440.   
  441. end # Window_FileStatus

  442. #==============================================================================
  443. # ?! Window_FileAction
  444. #==============================================================================

  445. class Window_FileAction < Window_HorzCommand
  446.   
  447.   #--------------------------------------------------------------------------
  448.   # initialize
  449.   #--------------------------------------------------------------------------
  450.   def initialize(dx, dy, file_window)
  451.     @file_window = file_window
  452.     super(dx, dy)
  453.     deactivate
  454.     unselect
  455.   end
  456.   
  457.   #--------------------------------------------------------------------------
  458.   # window_width
  459.   #--------------------------------------------------------------------------
  460.   def window_width; Graphics.width - 128; end
  461.   
  462.   #--------------------------------------------------------------------------
  463.   # col_max
  464.   #--------------------------------------------------------------------------
  465.   def col_max; return 3; end
  466.   
  467.   #--------------------------------------------------------------------------
  468.   # update
  469.   #--------------------------------------------------------------------------
  470.   def update
  471.     super
  472.     return if @file_window.index < 0
  473.     return if @current_index == @file_window.index
  474.     @current_index = @file_window.index
  475.     refresh
  476.   end
  477.   
  478.   #--------------------------------------------------------------------------
  479.   # make_command_list
  480.   #--------------------------------------------------------------------------
  481.   def make_command_list
  482.     @header = DataManager.load_header(@file_window.index)
  483.     add_load_command
  484.     add_save_command
  485.     add_delete_command
  486.   end
  487.   
  488.   #--------------------------------------------------------------------------
  489.   # add_load_command
  490.   #--------------------------------------------------------------------------
  491.   def add_load_command
  492.     add_command(YEA::SAVE::ACTION_LOAD, :load, load_enabled?)
  493.   end
  494.   
  495.   #--------------------------------------------------------------------------
  496.   # load_enabled?
  497.   #--------------------------------------------------------------------------
  498.   def load_enabled?
  499.     return false if @header.nil?
  500.     return true
  501.   end
  502.   
  503.   #--------------------------------------------------------------------------
  504.   # add_save_command
  505.   #--------------------------------------------------------------------------
  506.   def add_save_command
  507.     add_command(YEA::SAVE::ACTION_SAVE, :save, save_enabled?)
  508.   end
  509.   
  510.   #--------------------------------------------------------------------------
  511.   # save_enabled?
  512.   #--------------------------------------------------------------------------
  513.   def save_enabled?
  514.     return false if @header.nil? && SceneManager.scene_is?(Scene_Load)
  515.     return false if SceneManager.scene_is?(Scene_Load)
  516.     return false if $game_system.save_disabled
  517.     return true
  518.   end
  519.   
  520.   #--------------------------------------------------------------------------
  521.   # add_delete_command
  522.   #--------------------------------------------------------------------------
  523.   def add_delete_command
  524.     add_command(YEA::SAVE::ACTION_DELETE, :delete, delete_enabled?)
  525.   end
  526.   
  527.   #--------------------------------------------------------------------------
  528.   # delete_enabled?
  529.   #--------------------------------------------------------------------------
  530.   def delete_enabled?
  531.     return false if @header.nil?
  532.     return true
  533.   end
  534.   
  535.   #--------------------------------------------------------------------------
  536.   # update_help
  537.   #--------------------------------------------------------------------------
  538.   def update_help
  539.     case current_symbol
  540.     when :load; @help_window.set_text(YEA::SAVE::LOAD_HELP)
  541.     when :save; @help_window.set_text(YEA::SAVE::SAVE_HELP)
  542.     when :delete; @help_window.set_text(YEA::SAVE::DELETE_HELP)
  543.     end
  544.   end
  545.   
  546. end # Window_FileAction

  547. #==============================================================================
  548. # ?! Scene_File
  549. #==============================================================================

  550. class Scene_File < Scene_MenuBase
  551.   
  552.   #--------------------------------------------------------------------------
  553.   # overwrite method: start
  554.   #--------------------------------------------------------------------------
  555.   def start
  556.     super
  557.     create_all_windows
  558.   end
  559.   
  560.   #--------------------------------------------------------------------------
  561.   # overwrite method: terminate
  562.   #--------------------------------------------------------------------------
  563.   def terminate
  564.     super
  565.   end
  566.   
  567.   #--------------------------------------------------------------------------
  568.   # overwrite method: update
  569.   #--------------------------------------------------------------------------
  570.   def update
  571.     super
  572.   end
  573.   
  574.   #--------------------------------------------------------------------------
  575.   # new method: create_all_windows
  576.   #--------------------------------------------------------------------------
  577.   def create_all_windows
  578.     create_help_window
  579.     create_file_window
  580.     create_action_window
  581.     create_status_window
  582.   end
  583.   
  584.   #--------------------------------------------------------------------------
  585.   # overwrite method: create_help_window
  586.   #--------------------------------------------------------------------------
  587.   def create_help_window
  588.     @help_window = Window_Help.new
  589.     @help_window.set_text(YEA::SAVE::SELECT_HELP)
  590.   end
  591.   
  592.   #--------------------------------------------------------------------------
  593.   # new method: create_file_window
  594.   #--------------------------------------------------------------------------
  595.   def create_file_window
  596.     wy = @help_window.height
  597.     @file_window = Window_FileList.new(0, wy)
  598.     @file_window.set_handler(:ok, method(:on_file_ok))
  599.     @file_window.set_handler(:cancel, method(:return_scene))
  600.   end
  601.   
  602.   #--------------------------------------------------------------------------
  603.   # new method: create_action_window
  604.   #--------------------------------------------------------------------------
  605.   def create_action_window
  606.     wx = @file_window.width
  607.     wy = @help_window.height
  608.     @action_window = Window_FileAction.new(wx, wy, @file_window)
  609.     @action_window.help_window = @help_window
  610.     @action_window.set_handler(:cancel, method(:on_action_cancel))
  611.     @action_window.set_handler(:load, method(:on_action_load))
  612.     @action_window.set_handler(:save, method(:on_action_save))
  613.     @action_window.set_handler(:delete, method(:on_action_delete))
  614.   end
  615.   
  616.   #--------------------------------------------------------------------------
  617.   # new method: create_status_window
  618.   #--------------------------------------------------------------------------
  619.   def create_status_window
  620.     wx = @action_window.x
  621.     wy = @action_window.y + @action_window.height
  622.     @status_window = Window_FileStatus.new(wx, wy, @file_window)
  623.   end
  624.   
  625.   #--------------------------------------------------------------------------
  626.   # new method: on_file_ok
  627.   #--------------------------------------------------------------------------
  628.   def on_file_ok
  629.     @action_window.activate
  630.     index = SceneManager.scene_is?(Scene_Load) ? 0 : 1
  631.     @action_window.select(index)
  632.   end
  633.   
  634.   #--------------------------------------------------------------------------
  635.   # new method: on_action_cancel
  636.   #--------------------------------------------------------------------------
  637.   def on_action_cancel
  638.     @action_window.unselect
  639.     @file_window.activate
  640.     @help_window.set_text(YEA::SAVE::SELECT_HELP)
  641.   end
  642.   
  643.   #--------------------------------------------------------------------------
  644.   # new method: on_action_load
  645.   #--------------------------------------------------------------------------
  646.   def on_action_load
  647.     if DataManager.load_game(@file_window.index)
  648.       on_load_success
  649.     else
  650.       Sound.play_buzzer
  651.     end
  652.   end
  653.   
  654.   #--------------------------------------------------------------------------
  655.   # overwrite method: on_load_success
  656.   #--------------------------------------------------------------------------
  657.   def on_load_success
  658.     Sound.play_load
  659.     fadeout_all
  660.     $game_system.on_after_load
  661.     SceneManager.goto(Scene_Map)
  662.   end
  663.   
  664.   #--------------------------------------------------------------------------
  665.   # new method: on_action_save
  666.   #--------------------------------------------------------------------------
  667.   def on_action_save
  668.     @action_window.activate
  669.     if DataManager.save_game(@file_window.index)
  670.       on_save_success
  671.       refresh_windows
  672.     else
  673.       Sound.play_buzzer
  674.     end
  675.   end
  676.   
  677.   #--------------------------------------------------------------------------
  678.   # overwrite method: on_save_success
  679.   #--------------------------------------------------------------------------
  680.   def on_save_success; Sound.play_save; end
  681.   
  682.   #--------------------------------------------------------------------------
  683.   # new method: on_action_delete
  684.   #--------------------------------------------------------------------------
  685.   def on_action_delete
  686.     @action_window.activate
  687.     DataManager.delete_save_file(@file_window.index)
  688.     on_delete_success
  689.     refresh_windows
  690.   end
  691.   
  692.   #--------------------------------------------------------------------------
  693.   # new method: on_delete_success
  694.   #--------------------------------------------------------------------------
  695.   def on_delete_success
  696.     YEA::SAVE::DELETE_SOUND.play
  697.   end
  698.   
  699.   #--------------------------------------------------------------------------
  700.   # new method: refresh_windows
  701.   #--------------------------------------------------------------------------
  702.   def refresh_windows
  703.     @file_window.refresh
  704.     @action_window.refresh
  705.     @status_window.refresh
  706.   end
  707.   
  708. end # Scene_File

  709. #==============================================================================
  710. # ?! Scene_Save
  711. #==============================================================================

  712. class Scene_Save < Scene_File
  713.   
  714.   #--------------------------------------------------------------------------
  715.   # overwrite method: on_savefile_ok
  716.   #--------------------------------------------------------------------------
  717.   def on_savefile_ok; super; end
  718.   
  719.   #--------------------------------------------------------------------------
  720.   # overwrite method: on_save_success
  721.   #--------------------------------------------------------------------------
  722.   def on_save_success; super; end
  723.   
  724. end # help_window_text

  725. #==============================================================================
  726. # ?! Scene_Load
  727. #==============================================================================

  728. class Scene_Load < Scene_File
  729.   
  730.   #--------------------------------------------------------------------------
  731.   # overwrite method: on_savefile_ok
  732.   #--------------------------------------------------------------------------
  733.   def on_savefile_ok; super; end
  734.   
  735.   #--------------------------------------------------------------------------
  736.   # overwrite method: on_load_success
  737.   #--------------------------------------------------------------------------
  738.   def on_load_success; super; end
  739.   
  740. end # Scene_Load

  741. #==============================================================================
  742. #
  743. # ?\ End of File
  744. #
  745. #==============================================================================
复制代码



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

点评

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

评分

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

查看全部评分

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

点评

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

使用道具 举报

梦石
0
星屑
50
在线时间
120 小时
注册时间
2011-5-30
回帖
41
发表于 2013-7-3 23:00:58 | 显示全部楼层
收藏不了呢。
需要呢。多谢LZ。等着要用了来看下。
...
回复

使用道具 举报

梦石
0
星屑
9292
在线时间
2504 小时
注册时间
2011-5-20
回帖
14521

开拓者

发表于 2013-7-4 08:44:20 | 显示全部楼层
复制不了你的脚本···能不能框起来

点评

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

使用道具 举报

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

点评

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

使用道具 举报

梦石
1
星屑
23371
在线时间
9572 小时
注册时间
2012-6-19
回帖
7021

开拓者短篇九导演组冠军

发表于 2013-7-5 19:29:24 | 显示全部楼层
吐槽一下方法3

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

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

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

点评

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

使用道具 举报

梦石
1
星屑
23371
在线时间
9572 小时
注册时间
2012-6-19
回帖
7021

开拓者短篇九导演组冠军

发表于 2013-7-11 18:38:48 | 显示全部楼层
@yiu889

范例工程

Data.zip

210.07 KB, 下载次数: 105

回复

使用道具 举报

梦石
0
星屑
50
在线时间
17 小时
注册时间
2013-2-27
回帖
10
发表于 2013-7-18 15:23:55 | 显示全部楼层
方法一不太明白..

有更詳盡的講解嗎??

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

点评

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

使用道具 举报

…あたしは天

梦石
0
星屑
2311
在线时间
4033 小时
注册时间
2010-10-4
回帖
10548

开拓者贵宾

发表于 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
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部