Jump to content
Melosx

MSX - Window_SaveFile I & II

Recommended Posts

MSX - Window_SaveFile 1.0

+

MSX - Window_SaveFile II 1.0

by Melosx

 

 

Introduction

This script change the Window_SaveFile by adding more information.

This release add: actor name, level, class, map name and gold.

 

Screenshots

28a2r94.png

 

Version II

 

jrd8up.png

 

 

How to Use

Place the script under Materials and above Main.

 

 

Script

 

 

#==============================================================================
# ** MSX - Window_SaveFile
#==============================================================================
# Author:   Melosx
# Versione: 1.0
# Release Date: 11/03/2012
#				  
#==============================================================================
# * Description
# -----------------------------------------------------------------------------
# This script change the Window_SaveFile by adding more information.
# This release add: actor name, level, class, map name and gold.
#
#==============================================================================
# * Instruction
# -----------------------------------------------------------------------------
# Place the script under Materials and above Main.
#
#==============================================================================

#==============================================================================
# ** DataManager
#==============================================================================
module DataManager

 def self.make_save_header
header = {}
header[:characters] = $game_party.characters_for_savefile
header[:playtime_s] = $game_system.playtime_s
header[:info] = $game_party.characters_info_for_savefile
header
 end

end

#==============================================================================
# ** Game_Party
#==============================================================================
class Game_Party < Game_Unit

 def characters_info_for_savefile
battle_members.collect do |actor|
  map_name = load_data("Data/MapInfos.rvdata2")[$game_map.map_id].name
  [actor.name, actor.level, actor.class.name, $game_party.gold, map_name]
end
 end

end

#==============================================================================
# ** Window_SaveFile
#==============================================================================
class Window_SaveFile < Window_Base

 def refresh
contents.clear
self.contents.font.size = 16
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(70, 45)
draw_playtime(0, contents.height - line_height, contents.width - 4, 2)
draw_info
 end

 def draw_party_characters(x, y)
header = DataManager.load_header(@file_index)
return unless header
header[:characters].each_with_index do |data, i|
  draw_character(data[0], data[1], x + i * 115, y)
end
 end

 def draw_playtime(x, y, width, align)
header = DataManager.load_header(@file_index)
return unless header
draw_text(x, y, width, line_height, "Playtime: " + header[:playtime_s], 2)
 end

 def draw_info
header = DataManager.load_header(@file_index)
return unless header
header[:info].each_with_index do |data, i|
  draw_text(55 + i * 115, 45, 110, line_height, data[0], 0)
  draw_text(90 + i * 115, 30, 110, line_height, Vocab.level_a + " " + data[1].to_s, 0)
  draw_text(90 + i * 115, 10, 105, line_height, data[2], 0)
  draw_text(0, contents.height - line_height, contents.width - 4, line_height, "Map: " + data[4], 1)
  draw_text(4, contents.height - line_height, contents.width - 4, line_height, "Gold: " + data[3].to_s + Vocab::currency_unit, 0)
end
 end

end

#==============================================================================
# ** Scene_File
#==============================================================================
class Scene_File < Scene_MenuBase
 def visible_max
return 3
 end

end

 

 

 

Version II

 

 

 

#==============================================================================
# ** MSX - Window_SaveFile II
#==============================================================================
# Author:   Melosx
# Versione: 1.0
# Release Date: 27/03/2012
#								
#==============================================================================
# * Description
# -----------------------------------------------------------------------------
# This script change the Window_SaveFile by adding more information.
# This release add: actor name, level, class, map name and gold.
#
#==============================================================================
# * Instruction
# -----------------------------------------------------------------------------
# Place the script under Materials and above Main.
#
#==============================================================================

#==============================================================================
# ** DataManager
#==============================================================================
module DataManager

 def self.make_save_header
	header = {}
	header[:characters] = $game_party.characters_for_savefile
	header[:playtime_s] = $game_system.playtime_s
	header[:info] = $game_party.characters_info_for_savefile
	header
 end

end

#==============================================================================
# ** Game_Party
#==============================================================================
class Game_Party < Game_Unit

 def characters_info_for_savefile
	battle_members.collect do |actor|
	  map_name = load_data("Data/MapInfos.rvdata2")[$game_map.map_id].name
	  [actor.name,
	  actor.level,
	  actor.class.name,
	  $game_party.gold,
	  map_name,
	  actor.face_name,
	  actor.face_index]
	end
 end

end

#==============================================================================
# ** Window_SaveFile
#==============================================================================
class Window_SaveFile < Window_Base

 def refresh
	contents.clear
	self.contents.font.size = 16
	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_playtime(0, contents.height - line_height, contents.width - 4, 2)
	draw_info
	draw_party_characters(150, 117)
 end

 def draw_party_characters(x, y)
	header = DataManager.load_header(@file_index)
	return unless header
	header[:characters].each_with_index do |data, i|
	  draw_character(data[0], data[1], x + i * 115, y)
	end
 end

 def draw_playtime(x, y, width, align)
	header = DataManager.load_header(@file_index)
	return unless header
	draw_text(x, y, width, line_height, "Playtime: " + header[:playtime_s], 2)
 end

 def draw_info
	header = DataManager.load_header(@file_index)
	return unless header
	header[:info].each_with_index do |data, i|
	  draw_face(data[5], data[6], 70 + i * 115, 23)
	  draw_text(70 + i * 115, 3, 110, line_height, data[0], 0)
	  draw_text(75 + i * 115, 38, 110, line_height, Vocab.level_a + " " + data[1].to_s, 0)
	  draw_text(75 + i * 115, 23, 105, line_height, data[2], 0)
	  draw_text(0, contents.height - line_height, contents.width - 4, line_height, "Map: " + data[4], 1)
	  draw_text(4, contents.height - line_height, contents.width - 4, line_height, "Gold: " + data[3].to_s + Vocab::currency_unit, 0)
	end
 end

end

#==============================================================================
# ** Scene_File
#==============================================================================
class Scene_File < Scene_MenuBase
 def visible_max
	return 2
 end

end
end

 

 

 

Credit and Thanks

- Melosx

Edited by Melosx

Share this post


Link to post
Share on other sites

it have the default slots number... 16 slots...

Edited by Melosx

Share this post


Link to post
Share on other sites

You should rename the "map: " to "location:" sounds more understand able to non.rpgmaker users ;) awesome script anyway, thanks ;)

Share this post


Link to post
Share on other sites

Any way to fix it so it will show 5 party members?

Share this post


Link to post
Share on other sites

Looks like it won't shows up the appropriate member in the save file if you have 5 or more party member.

Share this post


Link to post
Share on other sites

That's an awesome script!
Is it okay If my team uses this for a commercial project?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted