1. 在 DataManager 的 def self.make_save_header 是这样的:
def self .make_save_header
header = { }
header[ :characters ] = $game_party .characters_for_savefile
header[ :playtime_s ] = $game_system .playtime_s
header[ :mapname ] = ( $game_map.display_name .size > 0 ? $game_map .display_name : '未命名' )
header[ :faces ] = $game_party .faces_for_savefile
header
end
def self .make_save_header
header = { }
header[ :characters ] = $game_party .characters_for_savefile
header[ :playtime_s ] = $game_system .playtime_s
header[ :mapname ] = ( $game_map.display_name .size > 0 ? $game_map .display_name : '未命名' )
header[ :faces ] = $game_party .faces_for_savefile
header
end
2. 在 Game_Party 的 def characters_for_savefile 下方,加这么一行:
#--------------------------------------------------------------------------
# ● 存档档案显示用的角色脸图讯息
#--------------------------------------------------------------------------
def faces_for_savefile
battle_members.collect do |actor|
[ actor.face_name , actor.face_index ]
end
end
#--------------------------------------------------------------------------
# ● 存档档案显示用的角色脸图讯息
#--------------------------------------------------------------------------
def faces_for_savefile
battle_members.collect do |actor|
[ actor.face_name , actor.face_index ]
end
end
3. 在 Window_SaveFile 的 def refresh 要这样改:
def refresh
contents.clear
change_color( normal_color)
name = Vocab::File + " #{@file_index + 1}"
draw_text( 4 , 0 , 200 , line_height, name)
@name_width = text_size( name) .width
#draw_party_characters(152, 58)
draw_party_faces( 80 , 58 ) #<--- 描绘脸图
draw_playtime( 0 , contents.height - line_height, contents.width - 4 , 2 )
header = DataManager.load_header ( @file_index)
return unless header
draw_text( 620 , 0 , 200 , line_height, header[ :mapname ] ) #<--- 描绘地图名
end
def refresh
contents.clear
change_color( normal_color)
name = Vocab::File + " #{@file_index + 1}"
draw_text( 4 , 0 , 200 , line_height, name)
@name_width = text_size( name) .width
#draw_party_characters(152, 58)
draw_party_faces( 80 , 58 ) #<--- 描绘脸图
draw_playtime( 0 , contents.height - line_height, contents.width - 4 , 2 )
header = DataManager.load_header ( @file_index)
return unless header
draw_text( 620 , 0 , 200 , line_height, header[ :mapname ] ) #<--- 描绘地图名
end
然后,在 def draw_party_characters(x, y) 的下方,加这么一段:
def draw_party_characters( x, y)
header = DataManager.load_header ( @file_index)
return unless header
header[ :faces ] .each_with_index do |data, i|
draw_face( data[ 0 ] , data[ 1 ] , x + i * 96 , 10 )
end
end
def draw_party_characters( x, y)
header = DataManager.load_header ( @file_index)
return unless header
header[ :faces ] .each_with_index do |data, i|
draw_face( data[ 0 ] , data[ 1 ] , x + i * 96 , 10 )
end
end
就这样而已,没有那么复杂...