查看: 1041|回复: 2

[已经解决] RMVA存檔腳本的遊戲時間改為電腦時間問題

[复制链接]
梦石
0
星屑
724
在线时间
314 小时
注册时间
2013-6-1
回帖
128
发表于 2014-3-30 16:15:18 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 e900003 于 2014-3-30 16:24 编辑

我想要把存檔腳本的遊戲時間  改為電腦系統時間

雖然我找到這個帖子:http://rpg.blue/thread-358101-1-1.html
可是我也不知道要怎麼把存檔腳本裡面的遊戲時間改為電腦時間的說   
所以我需要幫助....

存檔腳本如下:
  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/素材 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 = 20         # Maximum saves a player can make. Default: 16
  60.     SLOT_NAME = "檔案 %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   = "讀取"           # Text used for loading games.
  73.     ACTION_SAVE   = "存檔"           # Text used for saving games.
  74.     ACTION_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 = "請選擇想要的進度"
  79.     LOAD_HELP   = "讀取上次的遊戲進度檔案"
  80.     SAVE_HELP   = "存取遊戲進度檔案"
  81.     DELETE_HELP = "刪除遊戲進度的檔案"
  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 = "找不到檔案"      # Text used when no save data is present.
  92.     PLAYTIME   = "遊戲時間:"          # Text used for total playtime.
  93.     TOTAL_SAVE = "存檔次數: "     # Text used to indicate total saves.
  94.     TOTAL_GOLD = "楓幣: "      # Text used to indicate total gold.
  95.     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. #==============================================================================
复制代码


如果有人知道的話就跟我說腳本怎麼改就可以了~~~

…あたしは天

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

开拓者贵宾

发表于 2014-3-30 16:29:16 | 显示全部楼层
本帖最后由 taroxd 于 2014-3-30 16:30 编辑

添加脚本

  1. class Game_System
  2.   def playtime_s
  3.     Time.now.strftime('%T')
  4.   end
  5. end
复制代码
然后所有游戏时间都变成当前系统时间~

评分

参与人数 1星屑 +150 收起 理由
Sion + 150 认可答案

查看全部评分

回复

使用道具 举报

梦石
0
星屑
724
在线时间
314 小时
注册时间
2013-6-1
回帖
128
 楼主| 发表于 2014-3-30 17:06:30 | 显示全部楼层
taroxd 发表于 2014-3-30 16:29
添加脚本然后所有游戏时间都变成当前系统时间~

剛剛複製上去  可以用了   
謝謝你了~~
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部