#============================================================== # Character biography screens Ver. 1.2 by Claimh # Translated by TruthfulTiger # Revision by ItalianStal1ion (shows more features; lines) #------------------------------------------------------------------------------ # This will display character properties in a new status screen. # To access it, go into your existing status screen in the usual way, # then press the decision key. You will then be greeted with a short # biography of your selected character. # The default stats (were)are: Name, Age, From, Height and Weight, but you can change # them to anything you want. You can also change the colour of the heading text. # # ItalianStal1ion's Revision: # You can now have SEVEN lines to describe your character, instead of three # Added Blood Type, Gender, Specialty, and Race. Also displays character's class. # Cleaned up some code, made it look nicer, took out foreign comments # And a bunch of small edits...(moved battler for more room...) # Added FAQ # # Extra # To call without going to status window: # Go to about line 335, and read the comment there. # call by $scene = Scene_Charactor.new #==============================================================
#---------------------------------------------------------------------------- # START #---------------------------------------------------------------------------- # This sets the decision key as the key to access the bios. CHENGE_KEY = Input::C #-------------------------------------------------------------------------- # This is where you determine the characters' ages. There's spaces for eight, # although you can add more. Each "??" is where you set the age, in order of # where your characters are in the database. I.e, the first "??" is for character one, # the "??" after that is for character two, etc. #-------------------------------------------------------------------------- CHARA_AGE = ["29","??","??","??","??","??","??","??"] #-------------------------------------------------------------------------- # This is where you set where each of your characters comes from. Same applies # as for age, i.e in order of characters in the database. #-------------------------------------------------------------------------- CHARA_FROM = ["Au colisé","??","??","??","??","??","??","??"] #-------------------------------------------------------------------------- # This is character height by default. I changed this to "Lives in". #-------------------------------------------------------------------------- CHARA_H = ["1m89","??","??","??","??","??","??","??"] #-------------------------------------------------------------------------- # This is character's weight by default. #-------------------------------------------------------------------------- CHARA_W = ["Lourd","??","??","??","??","??","??","??"] #-------------------------------------------------------------------------- # This is the character's race by default #-------------------------------------------------------------------------- CHARA_R = ["Humain","??","??","??","??","??","??","??"] #-------------------------------------------------------------------------- # This is the character's blood type by default #-------------------------------------------------------------------------- CHARA_B = ["O","??","??","??","??","??","??","??"] #-------------------------------------------------------------------------- # This is the character's specialty by default #-------------------------------------------------------------------------- CHARA_S = ["Haches","??","??","??","??","??","??","??"] #-------------------------------------------------------------------------- # This is the character's gender by default #-------------------------------------------------------------------------- CHARA_G = ["Mâle","??","??","??","??","??","??","??"] #-------------------------------------------------------------------------- # This is where you add a few lines to briefly describe your character. # Again, it follows character position in database. # L1, L2, L3, L4, L5, L6, and L7 display text on lines 1, 2, 3, 4, 5, 6 and 7 respectively. # To add another, copy and paste the L1-L7 lines and L_SET# = .... # then change L_SET# to the hero u want. ex: L_SET9 (for hero 9) #-------------------------------------------------------------------------- # Hero 1 description L1 = "Ligne de description N°1" # Line 1 of description L2 = "Ligne de description N°2" # Line 2 of description L3 = "Ligne de description N°3" # Line 3 of description L4 = "Ligne de description N°74" #4th added line of description L5 = "Ligne de description N°5" #5th added line of description L6 = "Ligne de description N°6" #6th added line of description L7 = "Ligne de description N°DERNIERE" #7th added line of description L_SET1 = [L1, L2, L3, L4, L5, L6, L7] # This groups together the lines and displays them # Hero 2 description L1 = "Ligne de description N°1" # Line 1 of description L2 = "" # Line 2 of description L3 = "" # Line 3 of description L4 = "" L5 = "" L6 = "" L7 = "" L_SET2 = [L1, L2, L3, L4, L5, L6, L7] # This groups together the lines and displays them # Hero 3 description L1 = "Ligne de description N°1" # Line 1 of description L2 = "" # Line 2 of description L3 = "" # Line 3 of description L4 = "" L5 = "" L6 = "" L7 = "" L_SET3 = [L1, L2, L3, L4, L5, L6, L7] # This groups together the lines and displays them # Hero 4 description L1 = "Ligne de description N°1" # Line 1 of description L2 = "" # Line 2 of description L3 = "" # Line 3 of description L4 = "" L5 = "" L6 = "" L7 = "" L_SET4 = [L1, L2, L3, L4, L5, L6, L7] # This groups together the lines and displays them # Hero 5 description L1 = "Ligne de description N°1" # Line 1 of description L2 = "" # Line 2 of description L3 = "" # Line 3 of description L4 = "" L5 = "" L6 = "" L7 = "" L_SET5 = [L1, L2, L3, L4, L5, L6, L7] # This groups together the lines and displays them # Hero 6 description L1 = "Ligne de description N°1" # Line 1 of description L2 = "" # Line 2 of description L3 = "" # Line 3 of description L4 = "" L5 = "" L6 = "" L7 = "" L_SET6 = [L1, L2, L3, L4, L5, L6, L7] # This groups together the lines and displays them # Hero 7 description L1 = "Ligne de description N°1" # Line 1 of description L2 = "" # Line 2 of description L3 = "" # Line 3 of description L4 = "" L5 = "" L6 = "" L7 = "" L_SET7 = [L1, L2, L3, L4, L5, L6, L7] # This groups together the lines and displays them # Hero 8 description L1 = "Ligne de description N°1" # Line 1 of description L2 = "" # Line 2 of description L3 = "" # Line 3 of description L4 = "" L5 = "" L6 = "" L7 = "" L_SET8 = [L1, L2, L3, L4, L5, L6, L7] # This groups together the lines and displays them # This sets the variable CHARA_INFO to the different sets for each character CHARA_INFO = [L_SET1,L_SET2,L_SET3,L_SET4,L_SET5,L_SET6,L_SET7,L_SET8] # change if you add more characters. ex: [...L_SET9]
#---------------------------------------------------------------------------- # END #----------------------------------------------------------------------------
#============================================================== # Window_Charactor #==============================================================
class Window_Charactor < Window_Base
def initialize(actor) super(0, 0, 640, 480) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize @actor = actor refresh end
def refresh self.contents.clear draw_battler_graphics(@actor, 140, 225) # Draws the battler on screen self.contents.font.color.set(250, 0, 0) # Color for the following text. Set in (Red, Green, Blue) # Draws text. Change words in " " to whatever you want self.contents.draw_text(250, 10, 80, 32, "Nom:") self.contents.draw_text(250, 50, 80, 32, "Age:") self.contents.draw_text(250, 90, 80, 32, "Lieu:") self.contents.draw_text(250, 130, 80, 32, "Taille:") self.contents.draw_text(250, 170, 80, 32, "Poids:") self.contents.draw_text(250, 210, 80, 32, "Race:") self.contents.draw_text(420, 50, 90, 32, "Groupe Sanguin:") self.contents.draw_text(420, 130, 100, 32, "Specialté:") self.contents.draw_text(420, 170, 100, 32, "Genre:") self.contents.font.color = normal_color # Sets text to normal color draw_actor_class(@actor, 520, 10) draw_actor_name(@actor, 340, 10) # Writes the variables you set earlier draw_actor_age(@actor, 340, 50) draw_actor_from(@actor, 340, 90) draw_actor_height(@actor, 340, 130) draw_actor_weight(@actor, 340, 170) draw_actor_race(@actor, 340, 210) draw_actor_bloodtype(@actor, 520, 50) draw_actor_specialty(@actor, 520, 130) draw_actor_gender(@actor, 520, 170) draw_actor_other(@actor, 50, 250) end end
class Window_Base < Window #-------------------------------------------------------------------------- # Draws the character picture #-------------------------------------------------------------------------- def draw_battler_graphics(actor, x, y) battler=RPG::Cache.battler(actor.battler_name, actor.battler_hue) # Sets the battler graphic to be drawn w = battler.width h = battler.height self.contents.blt(x-w/2, y-h, battler, Rect.new(0, 0, w,h)) end
#-------------------------------------------------------------------------- # Draws the character's age #-------------------------------------------------------------------------- def draw_actor_age(actor, x, y) self.contents.draw_text(x, y, 80, 32, CHARA_AGE[actor.id-1]) end
#-------------------------------------------------------------------------- # Draws the character's "From" attribute #-------------------------------------------------------------------------- def draw_actor_from(actor, x, y) self.contents.draw_text(x, y, 280, 32, CHARA_FROM[actor.id-1]) end
#-------------------------------------------------------------------------- # Draws the character's "Height" #-------------------------------------------------------------------------- def draw_actor_height(actor, x, y) self.contents.draw_text(x, y , 80, 32, CHARA_H[actor.id-1]) end
#-------------------------------------------------------------------------- # Draws the character's weight #-------------------------------------------------------------------------- def draw_actor_weight(actor, x, y) self.contents.draw_text(x, y, 80, 32, CHARA_W[actor.id-1]) end
#-------------------------------------------------------------------------- # Draws the character's race #-------------------------------------------------------------------------- def draw_actor_race(actor, x, y) self.contents.draw_text(x, y, 280, 32, CHARA_R[actor.id-1]) end #-------------------------------------------------------------------------- # Draws the character's blood type #-------------------------------------------------------------------------- def draw_actor_bloodtype(actor, x, y) self.contents.draw_text(x, y, 100, 32, CHARA_B[actor.id-1]) end #-------------------------------------------------------------------------- # Draws the character's specialty #-------------------------------------------------------------------------- def draw_actor_specialty(actor, x, y) self.contents.draw_text(x, y, 100, 32, CHARA_S[actor.id-1]) end #-------------------------------------------------------------------------- # Draws the character's gender #-------------------------------------------------------------------------- def draw_actor_gender(actor, x, y) self.contents.draw_text(x, y, 100, 32, CHARA_G[actor.id-1]) end #-------------------------------------------------------------------------- # Draws the character's description - line numbers start from 0 #-------------------------------------------------------------------------- def draw_actor_other(actor, x, y) info = CHARA_INFO[actor.id-1] self.contents.draw_text(x, y, 600, 32, info[0]) self.contents.draw_text(x, y+28, 600, 32, info[1]) self.contents.draw_text(x, y+56, 600, 32, info[2]) self.contents.draw_text(x, y+84, 600, 32, info[3]) self.contents.draw_text(x, y+112, 600, 32, info[4]) self.contents.draw_text(x, y+140, 600, 32, info[5]) self.contents.draw_text(x, y+168, 600, 32, info[6]) end end
#============================================================= # Scene_Charactor #=============================================================
class Scene_Charactor
def initialize(actor_index = 0, equip_index = 0) @actor_index = actor_index end
def main @actor = $game_party.actors[@actor_index] @status_window = Window_Charactor.new(@actor) Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @status_window.dispose end #-------------------------------------------------------------------------- # Checks for buttons pressed; if "R" is pressed it goes onto the next character #-------------------------------------------------------------------------- def update if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Menu.new(3) return end if Input.trigger?(Input::R) $game_system.se_play($data_system.cursor_se) @actor_index += 1 @actor_index %= $game_party.actors.size $scene = Scene_Charactor.new(@actor_index) return end if Input.trigger?(Input::L) $game_system.se_play($data_system.cursor_se) @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size $scene = Scene_Charactor.new(@actor_index) return end end end
#To not call from Status Window Delete the following lines (until STOP): #=============================================================== # Scene_Status #=============================================================== class Scene_Status #-------------------------------------------------------------------------- # This applies to the existing status window, and opens the bios if the decision key's pressed #-------------------------------------------------------------------------- alias update_chara update def update if Input.trigger?(CHENGE_KEY) $game_system.se_play($data_system.decision_se) $scene = Scene_Charactor.new(@actor_index) return end update_chara end end # STOP
=begin A plaçé dans 'Main' $fontface = $fonttype = $defaultfontface = $defaultfonttype = "Arial" $fontsize = $defaultfontsize = 18 =end |