Atheron Admin
Número de Mensagens : 103 Idade : 29
| Assunto: [RGSS2] Actor Profile Qui Jun 03, 2010 8:47 pm | |
| Actor Profile por Claimh IntroduçãoCria uma tela de perfil para os personagens. Características
- Cria um perfil altamente customizável;
[ Como usarCole acima do Main. Para acessar, vá até o Status do personagem e use o botão de escolha. Uma tela com o perfil será aberta. Screenshots- Spoiler:
Script - Código:
-
#=============================================================== # � Actor Profile Information - CC_ExtendedActorInfo � VX � # ◇ Versão 1.0.0 by Claimh ◇ # ◆ Tradução para inglês por Mr. Anonymous ◆ # ◆ Tradução para portugues por Atheron ◆ # Generation Maker - http://genmaker.forumeiros.com/index.htm #------------------------------------------------------------------------------ # Esse script adiciona um perfil para os personagens, que é chamado pelo status. # O perfil é totalmente customizado abaixo! Ao apertar um determinado botão, # o status abrirá essa janela #============================================================================== module Chara_Review #==============================================================================# # ★ Customização ★ # #==============================================================================# # Se você tem mais de 8 personagens em seu jogo,você deverá fazer uma linha adicional # para cada campo. #---------------------------------------------------------------------------- # Botão de chamada do perfil #---------------------------------------------------------------------------- # Botão que abrirá o perfil. Padrão: C CHENGE_KEY = Input::C #-------------------------------------------------------------------------- # � Customizar a Idade do Personagem #-------------------------------------------------------------------------- CHARA_AGE = { # Idade é o primeiro campo mostrado no perfil. # ActorID => "Idade" 1 => "16", 2 => "17", 3 => "19", 4 => "15" } #-------------------------------------------------------------------------- # � Customizar a Origem do Personagem #-------------------------------------------------------------------------- CHARA_FROM = { # Origem é o segundo campo mostrado no perfil. # ActorID => "Origem" 1 => "Tandra", 2 => "Tandra", 3 => "Cormalus", 4 => "Intrepia" } #-------------------------------------------------------------------------- # � Customizar Altura #-------------------------------------------------------------------------- CHARA_H = { # Altura é o quarto campo mostrado no perfil. # ActorID => "Altura" 1 => "1,72 metros", 2 => "1,69 metros", 3 => "1,71 metros", 4 => "1,64 metros" } #-------------------------------------------------------------------------- # � Customizar Peso #-------------------------------------------------------------------------- CHARA_W = { # Peso é o quarto campo mostrado no perfil. # ActorID => "Peso" 1 => "62 KG", 2 => "59 KG", 3 => "65 KG", 4 => "53 KG" } #-------------------------------------------------------------------------- # � Customize as informações do perfil #-------------------------------------------------------------------------- CHARA_INFO = { # Pequeno texto exibido abaixo da imagem. # ActorID => "`Perfil" 1 => "Adam é um soldade de Tandra. Perdeu seus pais em um ataque de bárbaros, a 9 anos atrás. Cresceu com poucos amigos e tem grandes habilidades com a espada.", 2 => "Melhor amigo de Adam, Ralph é um guardião que tem total controle de sua lança. Possui habilidades corporais impressionantes e parece saber sobre a familia de Adam.", 3 => "Jhonatan utiliza seu grimório e as magias elementais como armas. Não gosta muito de Adam, mas o admira pelas habilidades. Veio de Cormalus, mas seus amigos só sabem isso.", 4 => "Katrina cresceu na capital Intrepia. É uma arqueira habilidosa,e não hesita quando precisa usar de tudo para salvar seus amigos. É bem temperamental e parece ter uma queda por Jhonatan." } #-------------------------------------------------------------------------- # � Customizando a imagem #-------------------------------------------------------------------------- # Você pode escolher entre mostrar uma imagem ou a faceset do personagem. # true = Imagem customizada # false = Faceset do personagem é utilizada BSTUP = true # Imagem customizada do perfil ("SEUPROJETO/Graphics/Face")(Se BSTUP = true) BSTUP_FILE = { # ActorID => "Imagem" (Sem formato de imagem) # Você pode adicionar mais imagens depois da quarte linha. 1 => "actor1", 2 => "actor1", 3 => "actor1", 4 => "actor1" }
#---------------------------------------------------------------------------- # Fim da área de customização #---------------------------------------------------------------------------- end
#============================================================================== # � Window_Charactor #------------------------------------------------------------------------------ # � Define Window #============================================================================== class Window_Charactor < Window_Base #-------------------------------------------------------------------------- # � Initialize Profile Window # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, 544, 416) self.contents = Bitmap.new(width - 32, height - 32) refresh(actor) end #-------------------------------------------------------------------------- # � Determine BSTUP Type #-------------------------------------------------------------------------- def refresh(actor) self.contents.clear return if actor.nil? if Chara_Review::BSTUP refresh_bstup(actor) # Se BSTUP = true else refresh_face(actor) # Se BSTUP = false end end #-------------------------------------------------------------------------- # � Draw Parameters and Profile Image (BSTUP) #-------------------------------------------------------------------------- def refresh_bstup(actor) draw_face_picture(Chara_Review::BSTUP_FILE[actor.id], 0, 0) self.contents.font.color = system_color self.contents.draw_text(280, 30, 80, WLH, "Nome:") self.contents.draw_text(280, 60, 80, WLH, "Idade:") self.contents.draw_text(280, 90, 80, WLH, "Origem:") self.contents.draw_text(280, 120, 80, WLH, "Altura:") self.contents.draw_text(280, 150, 80, WLH, "Peso:") self.contents.font.color = normal_color draw_actor_name(actor, 380, 30) self.contents.draw_text(380, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id]) self.contents.draw_text(380, 90, 180, WLH, Chara_Review::CHARA_FROM[actor.id]) self.contents.draw_text(380, 120 , 200, WLH, Chara_Review::CHARA_H[actor.id]) self.contents.draw_text(380, 150, 250, WLH, Chara_Review::CHARA_W[actor.id]) draw_enter_text(20, 300, 500, WLH, Chara_Review::CHARA_INFO[actor.id]) end #-------------------------------------------------------------------------- # � Draw Parameters and Profile Image (FACE) #-------------------------------------------------------------------------- def refresh_face(actor) draw_actor_face(actor, 8, 32) self.contents.font.color = system_color self.contents.draw_text(200, 30, 80, WLH, "Nome:") self.contents.draw_text(200, 60, 80, WLH, "Idade:") self.contents.draw_text(200, 90, 80, WLH, "Origem:") self.contents.draw_text(200, 120, 80, WLH, "Altura:") self.contents.draw_text(200, 150, 80, WLH, "Peso:") self.contents.font.color = normal_color draw_actor_name(actor, 300, 30) self.contents.draw_text(300, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id]) self.contents.draw_text(300, 90, 180, WLH, Chara_Review::CHARA_FROM[actor.id]) self.contents.draw_text(300, 120 , 200, WLH, Chara_Review::CHARA_H[actor.id]) self.contents.draw_text(300, 150, 250, WLH, Chara_Review::CHARA_W[actor.id]) draw_enter_text(20, 200, 500, WLH, Chara_Review::CHARA_INFO[actor.id]) end end
class Window_Base < Window #-------------------------------------------------------------------------- # � Draw Entered Text #-------------------------------------------------------------------------- def draw_enter_text(x, y, width, height, text) info_box = text.split(/\n/) for i in 0...info_box.size self.contents.draw_text( x, y+i*WLH, width, WLH, info_box[i]) break if (y+i*WLH) > (self.height-WLH) end end #-------------------------------------------------------------------------- # � Draw Face Graphic(Graphics/Face) #-------------------------------------------------------------------------- def draw_face_picture(file_name, x, y) bitmap = Cache.face(file_name) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x, y, bitmap, src_rect) end end
#============================================================================== # � Scene_Charactor #------------------------------------------------------------------------------ # � Define Methods #============================================================================== class Scene_Charactor < Scene_Base #-------------------------------------------------------------------------- # � Initialize Actor # actor_index : Actor ID #-------------------------------------------------------------------------- def initialize(actor_index = 0) @actor_index = actor_index end #-------------------------------------------------------------------------- # � Create Menu Background #-------------------------------------------------------------------------- def start super create_menu_background @actor = $game_party.members[@actor_index] @status_window = Window_Charactor.new(@actor) end #-------------------------------------------------------------------------- # � Dispose Status Window #-------------------------------------------------------------------------- def terminate super dispose_menu_background @status_window.dispose end #-------------------------------------------------------------------------- # � Return Scene #-------------------------------------------------------------------------- def return_scene $scene = Scene_Status.new(@actor_index) end #-------------------------------------------------------------------------- # � Next Actor #-------------------------------------------------------------------------- def next_actor @actor_index += 1 @actor_index %= $game_party.members.size $scene = Scene_Charactor.new(@actor_index) end #-------------------------------------------------------------------------- # � Previous Actor #-------------------------------------------------------------------------- def prev_actor @actor_index += $game_party.members.size - 1 @actor_index %= $game_party.members.size $scene = Scene_Charactor.new(@actor_index) end #-------------------------------------------------------------------------- # � Actor Profile Screne Inputs #-------------------------------------------------------------------------- def update update_menu_background @status_window.update if Input.trigger?(Input::B) Sound.play_cancel return_scene elsif Input.trigger?(Input::R) Sound.play_cursor next_actor elsif Input.trigger?(Input::L) Sound.play_cursor prev_actor end super end end
#============================================================================== # � Scene_Status #============================================================================== class Scene_Status #-------------------------------------------------------------------------- # � Update Actor #-------------------------------------------------------------------------- alias update_chara update def update if Input.trigger?(Chara_Review::CHENGE_KEY) Sound.play_decision $scene = Scene_Charactor.new(@actor_index) end update_chara end end
F.A.Q. - Citação :
- P: Funciona para XP?
R:Não! Créditos- Claimh, por criar; - Mr. Anonymous, por traduzir para inglês; - Atheron, por traduzir para portugues.
Última edição por Atheron em Sex Jun 04, 2010 8:36 am, editado 1 vez(es) | |
|