Okay, I don;t know if you want to try yourself putting it there. Either way, I made A little script which adds height, weight and age to your characters. You can simply put in above main, and edit the database to your needs. Let me explain, but here is the script.
#==============================================================================
# *** Database
#------------------------------------------------------------------------------
# Contains extra values not in the default Database
# >> Syntax: ID => Starting VALUE
# >> 'def' is used when ID is not found
# >> 'max' is used when higher then max
# >> 'min' is used when lower then min
#==============================================================================
module Database
#--------------------------------------------------------------------------
# * Weights
#--------------------------------------------------------------------------
Weights = {
1 => 43, 2 => 92, 3 => 31,
4 => 23, 5 => 45, 6 => 99,
7 => 102, 8 => 30,
'def' => 60, 'max' => 3000, 'min' => 10
}
#--------------------------------------------------------------------------
# * Heights
#--------------------------------------------------------------------------
Heights = {
1 => 178, 2 => 190, 3 => 156,
4 => 162, 5 => 110, 6 => 203,
7 => 167, 8 => 170,
'def' => 165, 'max' => 300, 'min' => 50
}
#--------------------------------------------------------------------------
# * Ages
#--------------------------------------------------------------------------
Ages = {
1 => 19, 2 => 24, 3 => 26,
4 => 31, 5 => 44, 6 => 21,
7 => 31, 8 => 30,
'def' => 26, 'max' => 150, 'min' => 0
}
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor
#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
alias old_setup_me_gameactor setup
def setup(actor_id)
old_setup_me_gameactor(actor_id)
setup_extra
end
#--------------------------------------------------------------------------
# * Setup Extra
#--------------------------------------------------------------------------
def setup_extra
@age = (Database::Ages.has_key?(id) ? Database::Ages[id] : Database::Ages['def'] )
@weight = (Database::Weights.has_key?(id) ? Database::Weights[id] : Database::Weights['def'] )
@height = (Database::Heights.has_key?(id) ? Database::Heights[id] : Database::Heights['def'] )
end
#--------------------------------------------------------------------------
# * Gain Weight
# n = number to gain
#--------------------------------------------------------------------------
def gain_weight(n=5)
@weight = [[@weight + n, Database::Weights['min']].max,Database::Weights['max']].min
end
#--------------------------------------------------------------------------
# * Lose Weight
# n = number to lose
#--------------------------------------------------------------------------
def lose_weight(n=5)
gain_weight(n.abs)
end
#--------------------------------------------------------------------------
# * Gain Height
# n = number to gain
#--------------------------------------------------------------------------
def gain_height(n=1)
@height = [[@height + n, Database::Heights['min']].max,Database::Heights['max']].min
end
#--------------------------------------------------------------------------
# * Lose Height
# n = number to lose
#--------------------------------------------------------------------------
def lose_height(n=1)
gain_height(-n)
end
#--------------------------------------------------------------------------
# * Gain Years
# n = number to gain
#--------------------------------------------------------------------------
def gain_years(n=1)
@age = [[@age + n,Database::Ages['min']].max,Database::Ages['max']].min
end
#--------------------------------------------------------------------------
# * Lose Years (ODD)
# n = number to lose
#--------------------------------------------------------------------------
def lose_years(n=1)
gain_years(-n)
end
#--------------------------------------------------------------------------
# * Get Age
#--------------------------------------------------------------------------
def age
return @age
end
#--------------------------------------------------------------------------
# * Get Height
#--------------------------------------------------------------------------
def height
return @height
end
#--------------------------------------------------------------------------
# * Get Weight
#--------------------------------------------------------------------------
def weight
return @weight
end
end
I know it could be done with simple attribute accessors, but I added some failsaves for you. So here we go. In the module Database all the defaults (aka at game starting) listed. You can add more or change it to your needs. It works like this:
Variable = {
ID => Value,
ID2 => Value2 }
Also, I added 3 special values: def, min and max. I will return on that later. Now, I aliased a new setup command into the initialisation (aka creation) of the Game_Actor Script. This is where the 'def' value comes in. Let's say you have 9! actors in the database. This means when creating actor 9, there is no value of weight for it (notice how there is not number 9 in the hash Weights ). The script sees that and takes the 'def' value which is in the hash.
I only told you about the creation, but not how to modify the values, and read the values. that can be done on the folowing way. Each method discribed below can be used on any Game_Actor object. The methods availeble are:
.age # returns the current age
.height # returns the current height
.weight # returns the current weight
.gain_weight(n) # gains n weight
.gain_height(n) # gains n height
.gain_years(n) # gains n years
.lose_weight(n) # loses n weight
.lose_height(n) # loses n height
.lose_years(n) # loses n years
.setup_extra # resets the values
note: gain_years(10) is the same as lose_years(-10) and lose_years(-10) the same as gain_years(10). Best is only to use positive numbers!note: gain_years(n) > the age will be set to 'max' if n is larger then 'max'note: lose_years(n) > the age will be set to 'min' if n is smaller then 'min'
Now, how to draw this on screen? In a window where @actor is set to the current actor you could simply do:
self.contents.draw_text(X,Y,WIDTH,HEIGHT, @actor.age + " years")
self.contents.draw_text(X,Y,WIDTH,HEIGHT, @actor.weight + " kilogram")
self.contents.draw_text(X,Y,WIDTH,HEIGHT, @actor.height + " centimeters")
Me™
you could simply change kilogram to lbs or whatever you want!. I just added the ability to change the years and weight as you might run into such thing in the game, where the player has some diseases making him reallsy small or old, or a fountain which makes you younger, or turning into a giant.. w/e