class Scene_Map
def auto_save_data(file)
#——以下定义内容和Scene_Save的write_save_data(file)完全一样
#——如果你修改过该存档方法,不要忘记用你修改的覆盖这部分内容。
# 生成描绘存档文件用的角色图形
characters = []
for i in 0...$game_party.actors.size
actor = $game_party.actors
characters.push([actor.character_name, actor.character_hue, actor])
end
# 写入描绘存档文件用的角色数据
Marshal.dump(characters, file)
# 写入测量游戏时间用画面计数
Marshal.dump(Graphics.frame_count, file)
# 增加 1 次存档次数
$game_system.save_count += 1
# 保存魔法编号
# (将编辑器保存的值以随机值替换)
$game_system.magic_number = $data_system.magic_number
# 写入各种游戏对像
Marshal.dump($game_system, file)
Marshal.dump($game_switches, file)
Marshal.dump($game_variables, file)
Marshal.dump($game_self_switches, file)
Marshal.dump($game_screen, file)
Marshal.dump($game_actors, file)
Marshal.dump($game_party, file)
Marshal.dump($game_troop, file)
Marshal.dump($game_map, file)
Marshal.dump($game_player, file)
end
def auto_save_switch_map
Screen::shot
file = File.open(DIR+"Save1.rxdata", "wb")
auto_save_data(file)
if FileTest.exist?( DIR+"shot.jpg")
File.rename( DIR+"shot.jpg", DIR+"Save1.jpg")
end
file.close
end
alias transfer_player_old transfer_player if
!method_defined? :transfer_player_old
def transfer_player
transfer_player_old
if $game_system.save_disabled
Audio.se_play($按下F5之后禁止存档时候的音效)
$game_temp.common_event_id = $按下F5之后禁止存档调用的公共事件
else
Audio.se_play($按下F5之后的自动存档的音效)
$game_temp.common_event_id = $按下F5之后可以存档调用的公共事件
auto_save_switch_map
end
end
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |