#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Info_Book by Nathmatt
# Version: 1.00
# Type: Add On
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# PART 2
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #-----------------------------------------------------------------------------
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#==============================================================================
# Game_People
#------------------------------------------------------------------------------
# This defines everything that needs to be defined.
#==============================================================================
class Game_People
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :name # The name of the people
attr_reader :race # The race of the people
attr_reader :pclass # The class of the people
attr_reader :age # The age of the people
attr_reader :gender # The Gender of the people
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Create actor array
@name = Info_Book::Name
@race = Info_Book::Race
@pclass = Info_Book::Pclass
@age = Info_Book::Age
@gender = Info_Book::Gender
end
#--------------------------------------------------------------------------
# * Add an Actor
# people_id : actor ID
#--------------------------------------------------------------------------
def add_people(people_id)
# Get actor
@people = $game_people[people_id]
end
#--------------------------------------------------------------------------
# * age
# people_id : people's ID
#--------------------------------------------------------------------------
def age(people_id)
# the age of the people
return @age[people_id]
end
#--------------------------------------------------------------------------
# * name
# people_id : people's ID
#--------------------------------------------------------------------------
def name(people_id)
# the age of the people
return @name[people_id]
end
#--------------------------------------------------------------------------
# * gender
# people_id : people's ID
#--------------------------------------------------------------------------
def gender(people_id)
# the age of the people
return @gender[people_id]
end
#--------------------------------------------------------------------------
# * prace
# people_id : people's ID
#--------------------------------------------------------------------------
def race(people_id)
# the age of the people
return @race[people_id]
end
#--------------------------------------------------------------------------
# * pclass
# people_id : people's ID
#--------------------------------------------------------------------------
def pclass(people_id)
# the age of the people
return @pclass[people_id]
end
end
#==============================================================================
# ** Scene_Status
#------------------------------------------------------------------------------
# This class performs status screen processing.
#==============================================================================
class Scene_Info_Book
#--------------------------------------------------------------------------
# * Object Initialization
# actor_index : actor index
#--------------------------------------------------------------------------
def initialize(actor_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Get actor
@actor = $game_party.actors[@actor_index]
# Make status window
@info_window = Window_Info.new(@actor)
#@picture_window = Window_picture.new(@actor)
#@description_window = Window_description.new(@actor)
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@info_window.dispose
#@picture_window.dispose
#@description_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Map.new
return
end
# If R button was pressed
if Input.trigger?(Input::R)
# Play cursor SE
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= Info_Book::max_number
$scene = Scene_Info_Book.new(@actor_index)
return
end
# If L button was pressed
if Input.trigger?(Input::L)
# Play cursor SE
$game_system.se_play($data_system.cursor_se)
@actor_index += Info_Book::max_number - 1
@actor_index %= Info_Book::max_number
$scene = Scene_Info_Book.new(@actor_index)
return
end
end
end
#==============================================================================
# ** Window_Info
#------------------------------------------------------------------------------
# This window displays the info of the people.
#==============================================================================
class Window_Info < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(actor)
super(400, 0, 250, 250)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
@game_people = Game_People.new
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 32, 'Name:', 2)
self.contents.draw_text(35, 0, 120, 32, @game_people.name(@actor).to_s, 2)
self.contents.draw_text(4, 64, 120, 32, 'Race:', 2)
self.contents.draw_text(35, 64, 120, 32, @game_people.race(@actor).to_s, 2)
self.contents.draw_text(4, 96, 120, 32, 'Class:', 2)
self.contents.draw_text(35, 96, 120, 32, @game_people.pclass(@actor).to_s, 2)
self.contents.draw_text(4, 128, 120, 32, 'Age:', 2)
self.contents.draw_text(35, 128, 120, 32, @game_people.age(@actor).to_s, 2)
self.contents.draw_text(4, 160, 120, 32, 'Gender:', 2)
self.contents.draw_text(35, 160, 120, 32, @game_people.gender(@actor).to_s, 2)
end
end