The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: AbsoluteIce on July 20, 2013, 03:13:51 AM

Title: [VXA] TheoAllen's Face Graphics on Save Menu
Post by: AbsoluteIce on July 20, 2013, 03:13:51 AM
<TheoAllen's Face Graphics on Save Menu>
Version: <1.0>
Author: <TheoAllen>
Translator: <AbsoluteIce>
Date: <July>, <20>, <2013>

Version History



Planned Future Versions


Description


This script gives the ability to see faces on the save menu

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2F2.bp.blogspot.com%2F-BsfO00Q8kXQ%2FUapQ3hivaNI%2FAAAAAAAAAek%2FhLgA_RzqubI%2Fs320%2Fsavefile.jpg&hash=ca500e2736bf51f6b55fa782c7c40a8ccd7a185a)

Instructions

Put this script below materials, and above main in the script section.

Script


Code: [Select]
# =============================================================================
# TheoAllen - Face Graphics on Save Menu
# Version : 1.1
# Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
# (This script is translated by AbsoluteIce)
# =============================================================================
($imported ||= {})[:Theo_SaveMenuFace] = true
# =============================================================================
# CHANGE LOGS:
# -----------------------------------------------------------------------------
# 2013.06.03 - Include map name as save header
# 2013.06.02 - Started and finished script
# =============================================================================
=begin

  Introduction :
  This script gives the ability to see faces on the save menu
 
  How to use :
  Put below material and above main
 
  Terms of use :
  This script has a special condition, Feel free to use it.
 
  Note :
  This script lets you handle the look of the save menu. If you use another
  persons script that changes the way/design of the save menu, its highly
  possible that this script is compatible with it.

=end
# =============================================================================
Include_Mapname = true # Set true / false to not include mapname
# =============================================================================
module DataManager

  def self.make_save_header
    header = {}
    header[:characters] = $game_party.characters_for_savefile
    header[:playtime_s] = $game_system.playtime_s
    header[:faces] = $game_party.faces_for_savefile
    header[:map_name] = $game_map.display_name
    header
  end
 
end

class Window_SaveFile
 
  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, 0)
    draw_mapname(0,0,contents.width,2)
    draw_playtime(0, contents.height - line_height, contents.width - 4, 2)
  end
 
  def draw_mapname(x,y,width,align)
    return unless Include_Mapname
    header = DataManager.load_header(@file_index)
    return unless header
    draw_text(x,y,width,line_height,header[:map_name],align)
  end

  def draw_party_faces(x, y)
    header = DataManager.load_header(@file_index)
    return unless header && header[:faces]
    puts header[:faces].size
    header[:faces].each_with_index do |data, i|
      draw_face(data[0], data[1], x + i * 96, y)
    end
  end
 
end

class Game_Party < Game_Unit
 
  def faces_for_savefile
    battle_members.collect do |actor|
      [actor.face_name,actor.face_index]
    end
  end
 
end
Credits



Thanks


Support


Either post on this thread, or pm TheoAllen on RMRK.

Known Compatibility Issues

None that I know of as of now.

Demo

Unavaliable yet as of now.

Author's Notes


I've been pumping out quite alot of Theo's scripts this month. I wonder how I got so hardworking  :V
Nevertheless, enjoy the scripts!

Questions

None at the moment.



Terms of Use


Credit the creator, TheoAllen. Do not claim as your own. If you want to use for a commercial project, share the profit with him. And don't forget to give him a free copy of the game.[/list]
Title: Re: [VXA] TheoAllen's Face Graphics on Save Menu
Post by: &&&&&&&&&&&&& on July 20, 2013, 03:35:47 AM
Slight error, you forgot a "=begin" on line 88, so it gives an undefined error.

Code: [Select]
  Introduction :
  This script will display a polygon parameter in the status menu
 
  How to use :
  Put this script below material and above main.
 
  Terms of use :
  This script has a special condition, Feel free to use it.

  Note :
  This script will only change the look of the RTP status menu.
 
=end
Title: Re: [VXA] TheoAllen's Face Graphics on Save Menu
Post by: AbsoluteIce on July 20, 2013, 03:39:03 AM
@LordStark
Oops, my mistake. I mistakenly copied the polygon script along together with the face graphic script.
My bad, people. I'll fix that right away  :V