Sign in to follow this  
Followers 0
xXDarkDragonXx

KGC_ResultAlter

8 posts in this topic

+ KGC_ResultAlter

Este script lo que hace es que altera la ventana de sultados para formar una nueva que muestra lo siguiente:

Objetos encontrados
Dinero (total)
Si un personaje sube de nivel sale '¡SUBE NIVEL!'
Si subes de nivel y aprendes una habilidad te muestra 'Nueva Habilidad' y al lado las habilidades aprendidas
Muestar el nivel del héroe, su PV y PM total


En todo caso una screen no vendría mal xD.png :

[spoiler]user posted image[/spoiler]

Y el script. Solo copienlo arriba de Main:

[spoiler]
CODE
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  ◆リザルト画面改造 - KGC_ResultAlter◆
#_/----------------------------------------------------------------------------
#_/ リザルト画面を改造します。
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

$imported = {} if $imported == nil
$imported["ResultAlter"] = true

#==============================================================================
# ■ Window_BattleStatus
#==============================================================================

class Window_BattleStatus < Window_Base
 #--------------------------------------------------------------------------
 # ● 公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_reader   :level_up_flags           # レベルアップフラグ
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_BattleResult
#==============================================================================

class Window_BattleResult < Window_Base
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #     exp       : EXP
 #     gold      : ゴールド
 #     treasures : トレジャー
 #--------------------------------------------------------------------------
 def initialize(exp, gold, treasures)
   @exp = exp
   @gold = gold
   @treasures = treasures
   @level_up_flags = [false, false, false, false, false]
   @gold_window = Window_Gold.new
   @gold_window.x = 480
   @gold_window.back_opacity = 160
   @gold_window.z = 3000
   super(0, 0, 640, 480)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.back_opacity = 160
   self.visible = false
   self.z = 2000
 end
 #--------------------------------------------------------------------------
 # ● 解放
 #--------------------------------------------------------------------------
 def dispose
   @gold_window.dispose
   super
 end
 #--------------------------------------------------------------------------
 # ● 可視/不可視
 #--------------------------------------------------------------------------
 def visible=(n)
   @gold_window.visible = n
   super
 end
 #--------------------------------------------------------------------------
 # ● レベルアップフラグの設定
 #     actor_index : アクターインデックス
 #--------------------------------------------------------------------------
 def level_up(actor_index)
   @level_up_flags[actor_index] = true
 end
 #--------------------------------------------------------------------------
 # ● リフレッシュ
 #     last_level : 上昇前のレベル配列
 #--------------------------------------------------------------------------
 def refresh(last_level)
   self.contents.clear
   x = 0
   # 経験値2倍ボーナス(1)が入っている場合
   if $imported["BonusGauge"] && $game_temp.bonus_effects.include?(1)
     self.contents.font.color = text_color(6)
   else
     self.contents.font.color = normal_color
   end
   cx = contents.text_size(@exp.to_s).width
   self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
   x += cx + 4
   self.contents.font.color = system_color
   cx = contents.text_size("EXP").width
   self.contents.draw_text(x, 0, 64, 32, "EXP")
   x += cx + 16
   # 金2倍ボーナス(2)が入っている場合
   if $imported["BonusGauge"] && $game_temp.bonus_effects.include?(2)
     self.contents.font.color = text_color(6)
   else
     self.contents.font.color = normal_color
   end
   cx = contents.text_size(@gold.to_s).width
   self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
   x += cx + 4
   self.contents.font.color = system_color
   self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
   # アイテム入手率上昇ボーナス(3)が入っている場合
   if $imported["BonusGauge"] && $game_temp.bonus_effects.include?(3)
     self.contents.fill_rect(0, 32, 608, 96, Color.new(255, 255, 128, 64))
   end
   x = 0; y = 32
   for item in @treasures
     draw_item_name(item, x, y)
     y += 32
     if y == 128
       x += 224; y = 32
     end
   end
   # キャラクター情報を描画
   y = 128
   for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     self.contents.font.color = system_color
     self.contents.draw_text(128, y, 32, 32, "Nv.")
     self.contents.draw_text(0, y + 32, 32, 32, $data_system.words.hp)
     self.contents.draw_text(96, y + 32, 32, 32, $data_system.words.sp)
     self.contents.font.color = normal_color
     self.contents.draw_text(0, y, 120, 32, actor.name)
     self.contents.draw_text(160, y, 24, 32, actor.level.to_s)
     self.contents.draw_text(32, y + 32, 48, 32, actor.maxhp.to_s, 2)
     self.contents.draw_text(128, y + 32, 48, 32, actor.maxsp.to_s, 2)
     self.contents.font.color = system_color
     self.contents.draw_text(192, y, 80, 32, "EXP")
     self.contents.font.color = normal_color
     self.contents.draw_text(192 + 80, y, 84, 32, actor.exp_s, 2)
     if @level_up_flags[i]
       self.contents.font.color = text_color(6)
       self.contents.draw_text(192, y + 32, 120, 32, "¡SUBE NIVEL!")
       # クラス取得
       actor_class = $data_classes[actor.class_id]
       # 修得するスキルを確認
       @learn_skills = []
       for j in 0...actor_class.learnings.size
         learn_skill = actor_class.learnings[j]
         # 今回のレベルアップで修得するスキルをリストに追加
         if actor.level >= learn_skill.level && last_level[i] < learn_skill.level
           @learn_skills.push(learn_skill.skill_id)
         end
       end
       unless @learn_skills == []
         # ウィンドウに描画
         self.contents.font.size = 16
         self.contents.font.color = text_color(3)
         self.contents.draw_text(360, y + 8, 48, 32, "Nueva", 1)
         self.contents.draw_text(360, y + 28, 48, 32, "Habilidad", 1)
         self.contents.font.color = normal_color
         sy = y + (20 - [@learn_skills.size - 1, 2].min * 10)
         for j in 0...[@learn_skills.size, 3].min
           skill = $data_skills[@learn_skills[j]]
           icon = RPG::Cache.icon(skill.icon_name)
           dest_rect = Rect.new(408, sy + j * 20, 20, 20)
           src_rect = Rect.new(0, 0, 24, 24)
           self.contents.stretch_blt(dest_rect, icon, src_rect)
           self.contents.draw_text(428, sy - 4 + j * 20, 180, 32, skill.name)
         end
         self.contents.font.size = 22
       end
     else
       self.contents.font.color = system_color
       self.contents.draw_text(192, y + 32, 80, 32, "PROX.")
       self.contents.font.color = normal_color
       self.contents.draw_text(192 + 80, y + 32, 84, 32, actor.next_rest_exp_s, 2)
     end
     y += 64
   end
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Scene_Battle (分割定義 2)
#==============================================================================

class Scene_Battle
 #--------------------------------------------------------------------------
 # ● アフターバトルフェーズ開始
 #--------------------------------------------------------------------------
 alias start_phase5_KGC_ResultAlter start_phase5
 def start_phase5
   # 元のレベルを保存
   actor_last_level = []
   for i in 0...$game_party.actors.size
     actor_last_level[i] = $game_party.actors[i].level
   end

   # 元の処理を実行
   start_phase5_KGC_ResultAlter

   # レベルアップ判定
   for i in 0...$game_party.actors.size
     if @status_window.level_up_flags[i]
       @result_window.level_up(i)
     end
   end
   @result_window.refresh(actor_last_level)
 end
end
[/spoiler]

Compatibilidad:

KGC_Module

Comentario Final:

Disfrutenlo aunque no es el mejor resultado de batalla. xD.png
0

Share this post


Link to post
Share on other sites
Pues me gusta este resultado, especialmente si le cambiara algunas cosillas... de momento me lo quedo y pensaré como dejarlo a mi total gusto. xD.png
0

Share this post


Link to post
Share on other sites
o es mu bueno este si lo cojo xd las letras vienen en chino? blink.gif
0

Share this post


Link to post
Share on other sites
No Caistsa, yo lo traducí así que no hay problemas. icon13.gif
0

Share this post


Link to post
Share on other sites
Me gusta mucho, pero como me está pasando ultimamente, todo es incompatible con los scripts que uso en mi proyecto cheesy.gif llorar.gif

Me lo guardo por si un caso... tongue.gif
0

Share this post


Link to post
Share on other sites
oooooooooooooo menos mal porque me imagino con un traductor de chino ay xD.png
gracias xXdark dragon Xx laugh.gif laugh.gif happy.gif
0

Share this post


Link to post
Share on other sites
Para mi no es muy bueno pero lo q tiene de diferencia a los otros resultados es que este es más completo
0

Share this post


Link to post
Share on other sites
Esta bien sobre todo es muy...completito jeje xD.png
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0