查看: 5424|回复: 12

[已经解决] 用变量来记录杀敌数的问题

[复制链接]
梦石
0
星屑
2019
在线时间
940 小时
注册时间
2015-10-26
回帖
293

开拓者

发表于 2015-11-14 22:24:00 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 踢腿水上飘 于 2015-11-14 22:46 编辑

我在敌群的事件页里设置敌人血量低于0%的时候变量+1
结果发现我撤退变量也会涨- -没法准确统计,而且很麻烦,每个敌群都要设置,所以估计要求助于脚本了,特来求助- -
如果能有一个我方战斗不能次数的统计就更好了

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

开拓者短篇九导演组冠军

发表于 2015-11-14 22:50:19 | 显示全部楼层
https://rpg.blue/home.php?mod=sp ... o=blog&id=14685

(只有杀敌数,没有我方不能战斗统计)
回复

使用道具 举报

梦石
0
星屑
2019
在线时间
940 小时
注册时间
2015-10-26
回帖
293

开拓者

 楼主| 发表于 2015-11-14 22:58:36 | 显示全部楼层
本帖最后由 踢腿水上飘 于 2015-11-14 23:03 编辑
喵呜喵5 发表于 2015-11-14 22:50
https://rpg.blue/home.php?mod=sp ... o=blog&id=14685

(只有杀敌数,没有我方不能战斗统 ...


我在变量操作里面输入M5EC20151114[1],结果报错- -
这里必须要输入敌人ID吗?想统计各种敌人的击杀总数的话怎么办?

123.jpg

回复

使用道具 举报

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

开拓者短篇九导演组冠军

发表于 2015-11-14 23:07:15 | 显示全部楼层
踢腿水上飘 发表于 2015-11-14 22:58
我在变量操作里面输入M5EC20151114[1],结果报错- -
这里必须要输入敌人ID吗?想统计各种敌人的击杀总数 ...

你插入脚本了吗……= =

统计击杀总数就一个敌人一个敌人的加上去呗
回复

使用道具 举报

梦石
0
星屑
2019
在线时间
940 小时
注册时间
2015-10-26
回帖
293

开拓者

 楼主| 发表于 2015-11-14 23:12:26 | 显示全部楼层
喵呜喵5 发表于 2015-11-14 23:07
你插入脚本了吗……= =

统计击杀总数就一个敌人一个敌人的加上去呗

饿,对没加入脚本,统计总数是像M5EC20151114[1,2,3,4,5,6,7] 这样吗- -
回复

使用道具 举报

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

开拓者短篇九导演组冠军

发表于 2015-11-14 23:14:48 | 显示全部楼层
无标题.png
回复

使用道具 举报

梦石
0
星屑
2019
在线时间
940 小时
注册时间
2015-10-26
回帖
293

开拓者

 楼主| 发表于 2015-11-14 23:36:32 | 显示全部楼层
嗯,我设置好了,但是并没有记录下来呀- -#
杀了敌人,但杀敌数还是0- -
我怕是脚本冲突,特地新建了一个工程
但也是一样的结果呀,帮忙看看是哪里出的问题吧~
Project1.rar (1.42 MB, 下载次数: 67)
回复

使用道具 举报

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

开拓者短篇九导演组冠军

发表于 2015-11-14 23:43:05 | 显示全部楼层
击杀数是每次需要时通过M5EC20151114[敌人的ID]获取的……
你要实时更新的话那个事件不能只执行一次,而应该设置成并行处理
回复

使用道具 举报

梦石
0
星屑
2019
在线时间
940 小时
注册时间
2015-10-26
回帖
293

开拓者

 楼主| 发表于 2015-11-14 23:59:36 | 显示全部楼层
额- -那就有点想得复杂了- - 我想的东西很简单- -就是死一个怪物 变量0003就+1,不用单独统计打了哪个ID多少次之类的- -
我在想能不能在公共事件里设置 有敌人战斗不能,变量0003就+1,但是好像不行- -
搜索了一下,VX哪里有人在Game_Troop
的def exp_total 里面加上一行
$game_variables[变量ID] += 1 unless enemy.hidden
就搞定了,但是这是VX的,VA用不了似乎- -,求教能改改用吗?

点评

敌人每死一次,M5EC20151114[敌人的ID] 获得的值自动加1,你要是想要指定变量自动加1就扔一个并行事件实时更新这个变量  发表于 2015-11-15 00:42
回复

使用道具 举报

梦石
0
星屑
2019
在线时间
940 小时
注册时间
2015-10-26
回帖
293

开拓者

 楼主| 发表于 2015-11-16 20:56:51 | 显示全部楼层
对了
@喵呜喵5

这个脚本和存档强化继承脚本有冲突- -,看不出是哪里额


332211.jpg


脚本如下

  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.     # - Slot Window Settings -
  53.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  54.     # This section adjusts how the slot window appears on the left side of the
  55.     # screen. This also adjusts the maximum number of saves a player can make,
  56.     # the way the slot names appear, and the icons used.
  57.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  58.     MAX_FILES = 24         # Maximum saves a player can make. Default: 16
  59.     SLOT_NAME = "存档 %s"  # How the file slots will be named.

  60.     # These are the icons
  61.     SAVE_ICON  = 368       # Icon used to indicate a save is present.
  62.     EMPTY_ICON = 375       # Icon used to indicate an empty file.

  63.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  64.     # - Action Window Settings -
  65.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  66.     # This section adjusts how the action window appears, the sound effect
  67.     # played when deleting files, and what appears in the help window above.
  68.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  69.     ACTION_LOAD   = "读档"           # Text used for loading games.
  70.     ACTION_SAVE   = "存档"           # Text used for saving games.
  71.     ACTION_DELETE = "删除"         # Text used for deleting games.
  72.     DELETE_SOUND  = RPG::SE.new("Collapse3", 100, 100) # Sound for deleting.

  73.     # These text settings adjust what displays in the help window.
  74.     SELECT_HELP = "请选择一个存档位置。"
  75.     LOAD_HELP   = "读取你的游戏进度。"
  76.     SAVE_HELP   = "储存你的游戏进度。"
  77.     DELETE_HELP = "删除你的游戏进度。"

  78.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  79.     # - Status Window Settings -
  80.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  81.     # This section adjusts how the status window appears in the middle of the
  82.     # screen (that displays the game's data) such as the total playtime, total
  83.     # times saved, total gold, the party's current location, and the variables
  84.     # to be displayed.
  85.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  86.     EMPTY_TEXT = "没有存档"      # Text used when no save data is present.
  87.     PLAYTIME   = "游戏时间"          # Text used for total playtime.
  88.     TOTAL_SAVE = "Total Saves: "     # Text used to indicate total saves.
  89.     TOTAL_GOLD = "持有金钱:"      # Text used to indicate total gold.
  90.     LOCATION   = "存档地点:"        # Text used to indicate current location.

  91.     # These variables will be shown in each of the two columns for those who
  92.     # would want to display more information than just what's shown. Input the
  93.     # variables into the arrays below to designate what data will be shown.
  94.     COLUMN1_VARIABLES = [1, 2, 3]
  95.     COLUMN2_VARIABLES = [4, 5, 6]

  96.   end # SAVE
  97. end # YEA

  98. #==============================================================================
  99. # ?\ Editting anything past this point may potentially result in causing
  100. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  101. # halitosis so edit at your own risk.
  102. #==============================================================================

  103. #==============================================================================
  104. # ?! Icon
  105. #==============================================================================

  106. module Icon

  107.   #--------------------------------------------------------------------------
  108.   # self.save_icon
  109.   #--------------------------------------------------------------------------
  110.   def self.save_icon; return YEA::SAVE::SAVE_ICON; end

  111.   #--------------------------------------------------------------------------
  112.   # self.empty_icon
  113.   #--------------------------------------------------------------------------
  114.   def self.empty_icon; return YEA::SAVE::EMPTY_ICON; end

  115. end # Icon

  116. #==============================================================================
  117. # ?! Numeric
  118. #==============================================================================

  119. class Numeric

  120.   #--------------------------------------------------------------------------
  121.   # new method: group_digits
  122.   #--------------------------------------------------------------------------
  123.   unless $imported["YEA-CoreEngine"]
  124.   def group; return self.to_s; end
  125.   end # $imported["YEA-CoreEngine"]

  126. end # Numeric

  127. #==============================================================================
  128. # ?! DataManager
  129. #==============================================================================

  130. module DataManager

  131.   #--------------------------------------------------------------------------
  132.   # overwrite method: savefile_max
  133.   #--------------------------------------------------------------------------
  134.   def self.savefile_max
  135.     return YEA::SAVE::MAX_FILES
  136.   end

  137.   #--------------------------------------------------------------------------
  138.   # overwrite method: self.make_save_header
  139.   #--------------------------------------------------------------------------
  140.   def self.make_save_header
  141.     header = {}
  142.     header[:characters]    = $game_party.characters_for_savefile
  143.     header[:playtime_s]    = $game_system.playtime_s
  144.     header[:system]        = Marshal.load(Marshal.dump($game_system))
  145.     header[:timer]         = Marshal.load(Marshal.dump($game_timer))
  146.     header[:message]       = Marshal.load(Marshal.dump($game_message))
  147.     header[:switches]      = Marshal.load(Marshal.dump($game_switches))
  148.     header[:variables]     = Marshal.load(Marshal.dump($game_variables))
  149.     header[:self_switches] = Marshal.load(Marshal.dump($game_self_switches))
  150.     header[:actors]        = Marshal.load(Marshal.dump($game_actors))
  151.     header[:party]         = Marshal.load(Marshal.dump($game_party))
  152.     header[:troop]         = Marshal.load(Marshal.dump($game_troop))
  153.     header[:map]           = Marshal.load(Marshal.dump($game_map))
  154.     header[:player]        = Marshal.load(Marshal.dump($game_player))
  155.     header
  156.   end

  157. end # DataManager

  158. #==============================================================================
  159. # ?! Window_MenuCommand
  160. #==============================================================================

  161. class Window_MenuCommand < Window_Command

  162.   #--------------------------------------------------------------------------
  163.   # overwrite method: save_enabled
  164.   #--------------------------------------------------------------------------
  165.   def save_enabled; return true; end

  166. end # Window_MenuCommand

  167. #==============================================================================
  168. # ?! Window_FileList
  169. #==============================================================================

  170. class Window_FileList < Window_Selectable

  171.   #--------------------------------------------------------------------------
  172.   # initialize
  173.   #--------------------------------------------------------------------------
  174.   def initialize(dx, dy)
  175.     super(dx, dy, 128, Graphics.height - dy)
  176.     refresh
  177.     activate
  178.     select(SceneManager.scene.first_savefile_index)
  179.   end

  180.   #--------------------------------------------------------------------------
  181.   # item_max
  182.   #--------------------------------------------------------------------------
  183.   def item_max; return DataManager.savefile_max; end

  184.   #--------------------------------------------------------------------------
  185.   # current_item_enabled?
  186.   #--------------------------------------------------------------------------
  187.   def current_item_enabled?
  188.     header = DataManager.load_header(index)
  189.     return false if header.nil? && SceneManager.scene_is?(Scene_Load)
  190.     return true
  191.   end

  192.   #--------------------------------------------------------------------------
  193.   # refresh
  194.   #--------------------------------------------------------------------------
  195.   def refresh
  196.     create_contents
  197.     draw_all_items
  198.   end

  199.   #--------------------------------------------------------------------------
  200.   # draw_item
  201.   #--------------------------------------------------------------------------
  202.   def draw_item(index)
  203.     header = DataManager.load_header(index)
  204.     enabled = !header.nil?
  205.     rect = item_rect(index)
  206.     rect.width -= 4
  207.     draw_icon(save_icon?(header), rect.x, rect.y, enabled)
  208.     change_color(normal_color, enabled)
  209.     text = sprintf(YEA::SAVE::SLOT_NAME, (index + 1).group)
  210.     draw_text(rect.x+24, rect.y, rect.width-24, line_height, text)
  211.   end

  212.   #--------------------------------------------------------------------------
  213.   # save_icon?
  214.   #--------------------------------------------------------------------------
  215.   def save_icon?(header)
  216.     return Icon.empty_icon if header.nil?
  217.     return Icon.save_icon
  218.   end

  219. end # Window_FileList

  220. #==============================================================================
  221. # ?! Window_FileStatus
  222. #==============================================================================

  223. class Window_FileStatus < Window_Base

  224.   #--------------------------------------------------------------------------
  225.   # initialize
  226.   #--------------------------------------------------------------------------
  227.   def initialize(dx, dy, file_window)
  228.     super(dx, dy, Graphics.width - dx, Graphics.height - dy)
  229.     @file_window = file_window
  230.     @current_index = @file_window.index
  231.     refresh
  232.   end

  233.   #--------------------------------------------------------------------------
  234.   # update
  235.   #--------------------------------------------------------------------------
  236.   def update
  237.     super
  238.     return if @file_window.index < 0
  239.     return if @current_index == @file_window.index
  240.     @current_index = @file_window.index
  241.     refresh
  242.   end

  243.   #--------------------------------------------------------------------------
  244.   # refresh
  245.   #--------------------------------------------------------------------------
  246.   def refresh
  247.     contents.clear
  248.     reset_font_settings
  249.     @header = DataManager.load_header(@file_window.index)
  250.     if @header.nil?
  251.       draw_empty
  252.     else
  253.       draw_save_contents
  254.     end
  255.   end

  256.   #--------------------------------------------------------------------------
  257.   # draw_empty
  258.   #--------------------------------------------------------------------------
  259.   def draw_empty
  260.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  261.     rect = Rect.new(0, 0, contents.width, contents.height)
  262.     contents.fill_rect(rect, colour)
  263.     text = YEA::SAVE::EMPTY_TEXT
  264.     change_color(system_color)
  265.     draw_text(rect, text, 1)
  266.   end

  267.   #--------------------------------------------------------------------------
  268.   # draw_save_slot
  269.   #--------------------------------------------------------------------------
  270.   def draw_save_slot(dx, dy, dw)
  271.     reset_font_settings
  272.     change_color(system_color)
  273.     text = sprintf(YEA::SAVE::SLOT_NAME, "")
  274.     draw_text(dx, dy, dw, line_height, text)
  275.     cx = text_size(text).width
  276.     change_color(normal_color)
  277.     draw_text(dx+cx, dy, dw-cx, line_height, (@file_window.index+1).group)
  278.   end

  279.   #--------------------------------------------------------------------------
  280.   # draw_save_playtime
  281.   #--------------------------------------------------------------------------
  282.   def draw_save_playtime(dx, dy, dw)
  283.     return if @header[:playtime_s].nil?
  284.     reset_font_settings
  285.     change_color(system_color)
  286.     draw_text(dx, dy, dw, line_height, YEA::SAVE::PLAYTIME, 0)
  287.     change_color(normal_color)
  288.     draw_text(dx, dy, dw, line_height, @header[:playtime_s], 2)
  289.   end

  290.   #--------------------------------------------------------------------------
  291.   # draw_save_total_saves
  292.   #--------------------------------------------------------------------------
  293.   def draw_save_total_saves(dx, dy, dw)
  294.     return if @header[:system].nil?
  295.     reset_font_settings
  296.     change_color(system_color)
  297.     text = YEA::SAVE::TOTAL_SAVE
  298.     draw_text(dx, dy, dw, line_height, text)
  299.     cx = text_size(text).width
  300.     change_color(normal_color)
  301.     draw_text(dx+cx, dy, dw-cx, line_height, @header[:system].save_count.group)
  302.   end

  303.   #--------------------------------------------------------------------------
  304.   # draw_save_gold
  305.   #--------------------------------------------------------------------------
  306.   def draw_save_gold(dx, dy, dw)
  307.     return if @header[:party].nil?
  308.     reset_font_settings
  309.     change_color(system_color)
  310.     draw_text(dx, dy, dw, line_height, YEA::SAVE::TOTAL_GOLD)
  311.     text = Vocab::currency_unit
  312.     draw_text(dx, dy, dw, line_height, text, 2)
  313.     cx = text_size(text).width
  314.     change_color(normal_color)
  315.     text = @header[:party].gold.group
  316.     draw_text(dx, dy, dw-cx, line_height, text, 2)
  317.   end

  318.   #--------------------------------------------------------------------------
  319.   # draw_save_location
  320.   #--------------------------------------------------------------------------
  321.   def draw_save_location(dx, dy, dw)
  322.     return if @header[:map].nil?
  323.     reset_font_settings
  324.     change_color(system_color)
  325.     draw_text(dx, dy, dw, line_height, YEA::SAVE::LOCATION)
  326.     change_color(normal_color)
  327.     cx = text_size(YEA::SAVE::LOCATION).width
  328.     return if $data_mapinfos[@header[:map].map_id].nil?
  329.     text = @header[:map].display_name
  330.     text = $data_mapinfos[@header[:map].map_id].name if text == ""
  331.     draw_text(dx+cx, dy, dw-cx, line_height, text)
  332.   end

  333.   #--------------------------------------------------------------------------
  334.   # draw_save_characters
  335.   #--------------------------------------------------------------------------
  336.   def draw_save_characters(dx, dy)
  337.     return if @header[:party].nil?
  338.     reset_font_settings
  339.     make_font_smaller
  340.     dw = (contents.width - dx) / @header[:party].max_battle_members
  341.     dx += dw/2
  342.     for member in @header[:party].battle_members
  343.       next if member.nil?
  344.       member = @header[:actors][member.id]
  345.       change_color(normal_color)
  346.       draw_actor_graphic(member, dx, dy)
  347.       text = member.name
  348.       draw_text(dx-dw/2, dy, dw, line_height, text, 1)
  349.       text = member.level.group
  350.       draw_text(dx-dw/2, dy-line_height, dw-4, line_height, text, 2)
  351.       cx = text_size(text).width
  352.       change_color(system_color)
  353.       text = Vocab::level_a
  354.       draw_text(dx-dw/2, dy-line_height, dw-cx-4, line_height, text, 2)
  355.       dx += dw
  356.     end
  357.   end

  358.   #--------------------------------------------------------------------------
  359.   # draw_save_column1
  360.   #--------------------------------------------------------------------------
  361.   def draw_save_column1(dx, dy, dw)
  362.     data = YEA::SAVE::COLUMN1_VARIABLES
  363.     draw_column_data(data, dx, dy, dw)
  364.   end

  365.   #--------------------------------------------------------------------------
  366.   # draw_save_column2
  367.   #--------------------------------------------------------------------------
  368.   def draw_save_column2(dx, dy, dw)
  369.     data = YEA::SAVE::COLUMN2_VARIABLES
  370.     draw_column_data(data, dx, dy, dw)
  371.   end

  372.   #--------------------------------------------------------------------------
  373.   # draw_column_data
  374.   #--------------------------------------------------------------------------
  375.   def draw_column_data(data, dx, dy, dw)
  376.     return if @header[:variables].nil?
  377.     reset_font_settings
  378.     for variable_id in data
  379.       next if $data_system.variables[variable_id].nil?
  380.       change_color(system_color)
  381.       name = $data_system.variables[variable_id]
  382.       draw_text(dx, dy, dw, line_height, name, 0)
  383.       value = @header[:variables][variable_id].group
  384.       change_color(normal_color)
  385.       draw_text(dx, dy, dw, line_height, value, 2)
  386.       dy += line_height
  387.     end
  388.   end

  389.   #--------------------------------------------------------------------------
  390.   # draw_save_contents
  391.   #--------------------------------------------------------------------------
  392.   def draw_save_contents
  393.     draw_save_slot(4, 0, contents.width/2-8)
  394.     draw_save_playtime(contents.width/2+4, 0, contents.width/2-8)
  395.     draw_save_total_saves(4, line_height, contents.width/2-8)
  396.     draw_save_gold(contents.width/2+4, line_height, contents.width/2-8)
  397.     draw_save_location(4, line_height*2, contents.width-8)
  398.     draw_save_characters(0, line_height*5 + line_height/3)
  399.     draw_save_column1(16, line_height*7, contents.width/2-48)
  400.     draw_save_column2(contents.width/2+16, line_height*7, contents.width/2-48)
  401.   end

  402. end # Window_FileStatus

  403. #==============================================================================
  404. # ?! Window_FileAction
  405. #==============================================================================

  406. class Window_FileAction < Window_HorzCommand

  407.   #--------------------------------------------------------------------------
  408.   # initialize
  409.   #--------------------------------------------------------------------------
  410.   def initialize(dx, dy, file_window)
  411.     @file_window = file_window
  412.     super(dx, dy)
  413.     deactivate
  414.     unselect
  415.   end

  416.   #--------------------------------------------------------------------------
  417.   # window_width
  418.   #--------------------------------------------------------------------------
  419.   def window_width; Graphics.width - 128; end

  420.   #--------------------------------------------------------------------------
  421.   # col_max
  422.   #--------------------------------------------------------------------------
  423.   def col_max; return 3; end

  424.   #--------------------------------------------------------------------------
  425.   # update
  426.   #--------------------------------------------------------------------------
  427.   def update
  428.     super
  429.     return if @file_window.index < 0
  430.     return if @current_index == @file_window.index
  431.     @current_index = @file_window.index
  432.     refresh
  433.   end

  434.   #--------------------------------------------------------------------------
  435.   # make_command_list
  436.   #--------------------------------------------------------------------------
  437.   def make_command_list
  438.     @header = DataManager.load_header(@file_window.index)
  439.     add_load_command
  440.     add_save_command
  441.     add_delete_command
  442.   end

  443.   #--------------------------------------------------------------------------
  444.   # add_load_command
  445.   #--------------------------------------------------------------------------
  446.   def add_load_command
  447.     add_command(YEA::SAVE::ACTION_LOAD, :load, load_enabled?)
  448.   end

  449.   #--------------------------------------------------------------------------
  450.   # load_enabled?
  451.   #--------------------------------------------------------------------------
  452.   def load_enabled?
  453.     return false if @header.nil?
  454.     return true
  455.   end

  456.   #--------------------------------------------------------------------------
  457.   # add_save_command
  458.   #--------------------------------------------------------------------------
  459.   def add_save_command
  460.     add_command(YEA::SAVE::ACTION_SAVE, :save, save_enabled?)
  461.   end

  462.   #--------------------------------------------------------------------------
  463.   # save_enabled?
  464.   #--------------------------------------------------------------------------
  465.   def save_enabled?
  466.     return false if @header.nil? && SceneManager.scene_is?(Scene_Load)
  467.     return false if SceneManager.scene_is?(Scene_Load)
  468.     return false if $game_system.save_disabled
  469.     return true
  470.   end

  471.   #--------------------------------------------------------------------------
  472.   # add_delete_command
  473.   #--------------------------------------------------------------------------
  474.   def add_delete_command
  475.     add_command(YEA::SAVE::ACTION_DELETE, :delete, delete_enabled?)
  476.   end

  477.   #--------------------------------------------------------------------------
  478.   # delete_enabled?
  479.   #--------------------------------------------------------------------------
  480.   def delete_enabled?
  481.     return false if @header.nil?
  482.     return true
  483.   end

  484.   #--------------------------------------------------------------------------
  485.   # update_help
  486.   #--------------------------------------------------------------------------
  487.   def update_help
  488.     case current_symbol
  489.     when :load; @help_window.set_text(YEA::SAVE::LOAD_HELP)
  490.     when :save; @help_window.set_text(YEA::SAVE::SAVE_HELP)
  491.     when :delete; @help_window.set_text(YEA::SAVE::DELETE_HELP)
  492.     end
  493.   end

  494. end # Window_FileAction

  495. #==============================================================================
  496. # ?! Scene_File
  497. #==============================================================================

  498. class Scene_File < Scene_MenuBase

  499.   #--------------------------------------------------------------------------
  500.   # overwrite method: start
  501.   #--------------------------------------------------------------------------
  502.   def start
  503.     super
  504.     create_all_windows
  505.   end

  506.   #--------------------------------------------------------------------------
  507.   # overwrite method: terminate
  508.   #--------------------------------------------------------------------------
  509.   def terminate
  510.     super
  511.   end

  512.   #--------------------------------------------------------------------------
  513.   # overwrite method: update
  514.   #--------------------------------------------------------------------------
  515.   def update
  516.     super
  517.   end

  518.   #--------------------------------------------------------------------------
  519.   # new method: create_all_windows
  520.   #--------------------------------------------------------------------------
  521.   def create_all_windows
  522.     create_help_window
  523.     create_file_window
  524.     create_action_window
  525.     create_status_window
  526.   end

  527.   #--------------------------------------------------------------------------
  528.   # overwrite method: create_help_window
  529.   #--------------------------------------------------------------------------
  530.   def create_help_window
  531.     @help_window = Window_Help.new
  532.     @help_window.set_text(YEA::SAVE::SELECT_HELP)
  533.   end

  534.   #--------------------------------------------------------------------------
  535.   # new method: create_file_window
  536.   #--------------------------------------------------------------------------
  537.   def create_file_window
  538.     wy = @help_window.height
  539.     @file_window = Window_FileList.new(0, wy)
  540.     @file_window.set_handler(:ok, method(:on_file_ok))
  541.     @file_window.set_handler(:cancel, method(:return_scene))
  542.   end

  543.   #--------------------------------------------------------------------------
  544.   # new method: create_action_window
  545.   #--------------------------------------------------------------------------
  546.   def create_action_window
  547.     wx = @file_window.width
  548.     wy = @help_window.height
  549.     @action_window = Window_FileAction.new(wx, wy, @file_window)
  550.     @action_window.help_window = @help_window
  551.     @action_window.set_handler(:cancel, method(:on_action_cancel))
  552.     @action_window.set_handler(:load, method(:on_action_load))
  553.     @action_window.set_handler(:save, method(:on_action_save))
  554.     @action_window.set_handler(:delete, method(:on_action_delete))
  555.   end

  556.   #--------------------------------------------------------------------------
  557.   # new method: create_status_window
  558.   #--------------------------------------------------------------------------
  559.   def create_status_window
  560.     wx = @action_window.x
  561.     wy = @action_window.y + @action_window.height
  562.     @status_window = Window_FileStatus.new(wx, wy, @file_window)
  563.   end

  564.   #--------------------------------------------------------------------------
  565.   # new method: on_file_ok
  566.   #--------------------------------------------------------------------------
  567.   def on_file_ok
  568.     @action_window.activate
  569.     index = SceneManager.scene_is?(Scene_Load) ? 0 : 1
  570.     @action_window.select(index)
  571.   end

  572.   #--------------------------------------------------------------------------
  573.   # new method: on_action_cancel
  574.   #--------------------------------------------------------------------------
  575.   def on_action_cancel
  576.     @action_window.unselect
  577.     @file_window.activate
  578.     @help_window.set_text(YEA::SAVE::SELECT_HELP)
  579.   end

  580.   #--------------------------------------------------------------------------
  581.   # new method: on_action_load
  582.   #--------------------------------------------------------------------------
  583.   def on_action_load
  584.     if DataManager.load_game(@file_window.index)
  585.       on_load_success
  586.     else
  587.       Sound.play_buzzer
  588.     end
  589.   end

  590.   #--------------------------------------------------------------------------
  591.   # overwrite method: on_load_success
  592.   #--------------------------------------------------------------------------
  593.   def on_load_success
  594.     Sound.play_load
  595.     fadeout_all
  596.     $game_system.on_after_load
  597.     SceneManager.goto(Scene_Map)
  598.   end

  599.   #--------------------------------------------------------------------------
  600.   # new method: on_action_save
  601.   #--------------------------------------------------------------------------
  602.   def on_action_save
  603.     @action_window.activate
  604.     if DataManager.save_game(@file_window.index)
  605.       on_save_success
  606.       refresh_windows
  607.     else
  608.       Sound.play_buzzer
  609.     end
  610.   end

  611.   #--------------------------------------------------------------------------
  612.   # overwrite method: on_save_success
  613.   #--------------------------------------------------------------------------
  614.   def on_save_success; Sound.play_save; end

  615.   #--------------------------------------------------------------------------
  616.   # new method: on_action_delete
  617.   #--------------------------------------------------------------------------
  618.   def on_action_delete
  619.     @action_window.activate
  620.     DataManager.delete_save_file(@file_window.index)
  621.     on_delete_success
  622.     refresh_windows
  623.   end

  624.   #--------------------------------------------------------------------------
  625.   # new method: on_delete_success
  626.   #--------------------------------------------------------------------------
  627.   def on_delete_success
  628.     YEA::SAVE::DELETE_SOUND.play
  629.   end

  630.   #--------------------------------------------------------------------------
  631.   # new method: refresh_windows
  632.   #--------------------------------------------------------------------------
  633.   def refresh_windows
  634.     @file_window.refresh
  635.     @action_window.refresh
  636.     @status_window.refresh
  637.   end

  638. end # Scene_File

  639. #==============================================================================
  640. # ?! Scene_Save
  641. #==============================================================================

  642. class Scene_Save < Scene_File

  643.   #--------------------------------------------------------------------------
  644.   # overwrite method: on_savefile_ok
  645.   #--------------------------------------------------------------------------
  646.   def on_savefile_ok; super; end

  647.   #--------------------------------------------------------------------------
  648.   # overwrite method: on_save_success
  649.   #--------------------------------------------------------------------------
  650.   def on_save_success; super; end

  651. end # help_window_text

  652. #==============================================================================
  653. # ?! Scene_Load
  654. #==============================================================================

  655. class Scene_Load < Scene_File

  656.   #--------------------------------------------------------------------------
  657.   # overwrite method: on_savefile_ok
  658.   #--------------------------------------------------------------------------
  659.   def on_savefile_ok; super; end

  660.   #--------------------------------------------------------------------------
  661.   # overwrite method: on_load_success
  662.   #--------------------------------------------------------------------------
  663.   def on_load_success; super; end

  664. end # Scene_Load

  665. #==============================================================================
  666. #
  667. # ?\ End of File
  668. #
  669. #==============================================================================
复制代码




  1. #==============================================================================
  2. #
  3. # ▼ 养肥系统 AceEngine Ace - 存档系统插件: 开始新游戏增强 v1.00
  4. # -- 最终更新: 2011.12.26
  5. # -- 等级: 普通人能够用的脚本
  6. # -- 要求插入脚本: YEA - Ace Save Engine v1.01+
  7. # -- 无节操的顺手翻译: 喵呜喵5
  8. #
  9. #==============================================================================

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

  12. #==============================================================================
  13. # ▼ 更新日志
  14. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  15. # 2011.12.26 - 开始写并且写完了~#
  16. #==============================================================================
  17. # ▼ 介绍
  18. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  19. # 这脚本能够实现继承存档的功能,详细的说明太长懒得翻译
  20. #
  21. #==============================================================================
  22. # ▼ 使用方法
  23. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  24. # 脚本扔到▼ Materials/素材 下 ▼ Main 以上
  25. # 记得保存,总之就是个没啥特殊用法的脚本啦
  26. #
  27. # -----------------------------------------------------------------------------
  28. # 物品备注 - 如果把下面的<no carry over>扔到对应物品的备注栏里
  29. # -----------------------------------------------------------------------------
  30. # <no carry over>
  31. #
  32. # 就不会被继承到新游戏中了
  33. #
  34. # -----------------------------------------------------------------------------
  35. # 武器备注 - 同上
  36. # -----------------------------------------------------------------------------
  37. # <no carry over>
  38. #
  39. # -----------------------------------------------------------------------------
  40. # 防具备注 - 同上
  41. # -----------------------------------------------------------------------------
  42. # <no carry over>
  43. #
  44. #==============================================================================
  45. # ▼ 注意
  46. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  47. # 这是VA脚本不是VX脚本#
  48. #
  49. # 这脚本还需要养肥引擎脚本Yanfly Engine Ace - Ace Save Engine v1.01+
  50. # 并且在编辑器中的位置必须比引擎脚本更下
  51. #
  52. #==============================================================================

  53. module YEA
  54.   module NEW_GAME_PLUS

  55.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  56.     # - 普通设置 -
  57.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  58.     # 帮助文字
  59.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  60.     NGP_SWITCH = 1      # 开关打开的时候存档将显示周目标志.
  61.     NGP_TEXT   = "可继承"   # 显示周目标志的文字.

  62.     # 能够继承存档的时候帮助窗口的提示文字   
  63.     NGP_HELP   = "使用这个存档开始游戏."

  64.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  65.     # - 需要继承的内容 -
  66.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  67.     # 看清楚了再设置
  68.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  69.     # 需要继承的开关
  70.     CARRY_OVER_SWITCHES = [14]

  71.     # 需要继承的变量
  72.     CARRY_OVER_VARIABLES = [1,2]

  73.     # 设置成 false 的话不继承角色信息
  74.     CARRY_OVER_ACTORS = true

  75.     # 继承角色等级、继承角色装备、继承角色技能
  76.     # 上面那个角色信息不继承的话这下面三个也继承不了
  77.     CARRY_OVER_LEVELS = true
  78.     CARRY_OVER_EQUIPS = true
  79.     CARRY_OVER_SKILLS = true

  80.     # 继承队伍成员
  81.     CARRY_OVER_PARTY_MEMBERS = false

  82.     # 继承金钱、物品、道具、装备
  83.     CARRY_OVER_GOLD    = true
  84.     CARRY_OVER_ITEMS   = true
  85.     CARRY_OVER_WEAPONS = true
  86.     CARRY_OVER_ARMOURS = true

  87.   end # 别理这行
  88. end # 也别理这行

  89. #==============================================================================
  90. # ▼ 看不懂的话就别碰这以下的脚本了
  91. #==============================================================================
  92. #==============================================================================
  93. # ▼ Editting anything past this point may potentially result in causing
  94. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  95. # halitosis so edit at your own risk.
  96. #==============================================================================

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

  98. module YEA
  99.   module NEW_GAME_PLUS
  100.     module_function
  101.     #--------------------------------------------------------------------------
  102.     # convert_integer_array
  103.     #--------------------------------------------------------------------------
  104.     def convert_integer_array(array)
  105.       result = []
  106.       array.each { |i|
  107.         case i
  108.         when Range; result |= i.to_a
  109.         when Integer; result |= [i]
  110.         end }
  111.       return result
  112.     end
  113.     #--------------------------------------------------------------------------
  114.     # converted_contants
  115.     #--------------------------------------------------------------------------
  116.     CARRY_OVER_SWITCHES = convert_integer_array(CARRY_OVER_SWITCHES)
  117.     CARRY_OVER_VARIABLES = convert_integer_array(CARRY_OVER_VARIABLES)
  118.   end # NEW_GAME_PLUS
  119.   module REGEXP
  120.   module BASEITEM
  121.    
  122.     NO_CARRY_OVER = /<(?:NO_CARRY_OVER|no carry over)>/i
  123.    
  124.   end # BASEITEM
  125.   end # REGEXP
  126. end # YEA

  127. #==============================================================================
  128. # ■ DataManager
  129. #==============================================================================

  130. module DataManager
  131.   
  132.   #--------------------------------------------------------------------------
  133.   # alias method: load_database
  134.   #--------------------------------------------------------------------------
  135.   class <<self; alias load_database_ngp load_database; end
  136.   def self.load_database
  137.     load_database_ngp
  138.     load_notetags_ngp
  139.   end
  140.   
  141.   #--------------------------------------------------------------------------
  142.   # new method: load_notetags_ngp
  143.   #--------------------------------------------------------------------------
  144.   def self.load_notetags_ngp
  145.     groups = [$data_items, $data_weapons, $data_armors]
  146.     for group in groups
  147.       for obj in group
  148.         next if obj.nil?
  149.         obj.load_notetags_ngp
  150.       end
  151.     end
  152.   end
  153.   
  154. end # DataManager

  155. #==============================================================================
  156. # ■ RPG::BaseItem
  157. #==============================================================================

  158. class RPG::BaseItem
  159.   
  160.   #--------------------------------------------------------------------------
  161.   # public instance variables
  162.   #--------------------------------------------------------------------------
  163.   attr_accessor :no_carry_over
  164.   
  165.   #--------------------------------------------------------------------------
  166.   # common cache: load_notetags_ngp
  167.   #--------------------------------------------------------------------------
  168.   def load_notetags_ngp
  169.     @no_carry_over = false
  170.     #---
  171.     self.note.split(/[\r\n]+/).each { |line|
  172.       case line
  173.       #---
  174.       when YEA::REGEXP::BASEITEM::NO_CARRY_OVER
  175.         @no_carry_over = true
  176.       end
  177.     } # self.note.split
  178.     #---
  179.   end
  180.   
  181. end # RPG::BaseItem

  182. #==============================================================================
  183. # ■ Switch
  184. #==============================================================================

  185. module Switch
  186.   
  187.   #--------------------------------------------------------------------------
  188.   # self.new_game_plus
  189.   #--------------------------------------------------------------------------
  190.   def self.new_game_plus
  191.     return $game_switches[YEA::NEW_GAME_PLUS::NGP_SWITCH]
  192.   end
  193.   
  194. end # Switch

  195. #==============================================================================
  196. # ■ DataManager
  197. #==============================================================================

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

  344. #==============================================================================
  345. # ■ Game_Actor
  346. #==============================================================================

  347. class Game_Actor < Game_Battler
  348.   
  349.   #--------------------------------------------------------------------------
  350.   # new method: new_game_plus_levels
  351.   #--------------------------------------------------------------------------
  352.   def new_game_plus_levels
  353.     @class_id = actor.class_id
  354.     @level = actor.initial_level
  355.     @exp = {}
  356.     if $imported["YEA-ClassSystem"]
  357.       init_unlocked_classes
  358.       init_subclass
  359.     end
  360.     clear_param_plus
  361.     init_exp
  362.     refresh
  363.   end
  364.   
  365.   #--------------------------------------------------------------------------
  366.   # new method: new_game_plus_equips
  367.   #--------------------------------------------------------------------------
  368.   def new_game_plus_equips
  369.     init_equips(actor.equips)
  370.   end
  371.   
  372.   #--------------------------------------------------------------------------
  373.   # new method: new_game_plus_skills
  374.   #--------------------------------------------------------------------------
  375.   def new_game_plus_skills
  376.     init_skills
  377.   end
  378.   
  379. end # Game_Actor

  380. #==============================================================================
  381. # ■ Window_FileAction
  382. #==============================================================================

  383. class Window_FileAction < Window_HorzCommand
  384.   
  385.   #--------------------------------------------------------------------------
  386.   # alias method: add_load_command
  387.   #--------------------------------------------------------------------------
  388.   alias add_load_command_ngp add_load_command
  389.   def add_load_command
  390.     if new_game_plus?
  391.       add_command(YEA::NEW_GAME_PLUS::NGP_TEXT, :new_game_plus)
  392.     else
  393.       add_load_command_ngp
  394.     end
  395.   end
  396.   
  397.   #--------------------------------------------------------------------------
  398.   # new method: new_game_plus?
  399.   #--------------------------------------------------------------------------
  400.   def new_game_plus?
  401.     return false if @header.nil?
  402.     return false if @header[:switches].nil?
  403.     return @header[:switches][YEA::NEW_GAME_PLUS::NGP_SWITCH]
  404.   end
  405.   
  406.   #--------------------------------------------------------------------------
  407.   # alias method: update_help
  408.   #--------------------------------------------------------------------------
  409.   alias update_help_ngp update_help
  410.   def update_help
  411.     case current_symbol
  412.     when :new_game_plus; @help_window.set_text(YEA::NEW_GAME_PLUS::NGP_HELP)
  413.     else; update_help_ngp
  414.     end
  415.   end
  416.   
  417. end # Window_FileAction

  418. #==============================================================================
  419. # ■ Scene_File
  420. #==============================================================================

  421. class Scene_File < Scene_MenuBase
  422.   
  423.   #--------------------------------------------------------------------------
  424.   # alias method: create_action_window
  425.   #--------------------------------------------------------------------------
  426.   alias create_action_window_ngp create_action_window
  427.   def create_action_window
  428.     create_action_window_ngp
  429.     @action_window.set_handler(:new_game_plus, method(:on_action_ngp))
  430.   end
  431.   
  432.   #--------------------------------------------------------------------------
  433.   # new method: on_action_ngp
  434.   #--------------------------------------------------------------------------
  435.   def on_action_ngp
  436.     Sound.play_load
  437.     DataManager.setup_new_game_plus(@file_window.index)
  438.     fadeout_all
  439.     $game_system.on_after_load
  440.     SceneManager.goto(Scene_Map)
  441.   end
  442.   
  443. end # Scene_File

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

  445. #==============================================================================
  446. #
  447. # ▼ End of File
  448. #
  449. #==============================================================================
复制代码
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部