- Joined
- Oct 11, 2015
- Messages
- 83
- Reaction score
- 1
- First Language
- French
- Primarily Uses
Hello again !
In Rm Vx Ace, by default you can see buffs/debuffs icons next actors name, but you can't with enemy names.
It could be an efficient way to track enemy buffs/debuffs. I've searched in Window_BattleEnemy, but I can't find a way to do that.
#==============================================================================
# ■ Window_BattleEnemy
#------------------------------------------------------------------------------
# バトル画面で、行動対象の敵キャラを選択するウィンドウです。
#==============================================================================
class Window_BattleEnemy < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# info_viewport : 情報表示用ビューポート
#--------------------------------------------------------------------------
def initialize(info_viewport)
super(0, info_viewport.rect.y, window_width, fitting_height(4))
refresh
self.visible = false
@info_viewport = info_viewport
end
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
Graphics.width - 128
end
#--------------------------------------------------------------------------
# ● 桁数の取得
#--------------------------------------------------------------------------
def col_max
return 1
end
#--------------------------------------------------------------------------
# ● 項目数の取得
#--------------------------------------------------------------------------
def item_max
$game_troop.alive_members.size
end
#--------------------------------------------------------------------------
# ● 敵キャラオブジェクト取得
#--------------------------------------------------------------------------
def enemy
$game_troop.alive_members[@index]
end
#--------------------------------------------------------------------------
# ● 項目の描画
#--------------------------------------------------------------------------
def draw_item(index)
change_color(normal_color)
name = $game_troop.alive_members[index].name
draw_text(item_rect_for_text(index), name)
end
#--------------------------------------------------------------------------
# ● ウィンドウの表示
#--------------------------------------------------------------------------
def show
if @info_viewport
width_remain = Graphics.width - width
self.x = width_remain
@info_viewport.rect.width = width_remain
select(0)
end
super
end
#--------------------------------------------------------------------------
# ● ウィンドウの非表示
#--------------------------------------------------------------------------
def hide
@info_viewport.rect.width = Graphics.width if @info_viewport
super
end
end
Here's a picture to explain :
http://hpics.li/50f768d
That's all, if someone finds out.
In Rm Vx Ace, by default you can see buffs/debuffs icons next actors name, but you can't with enemy names.
It could be an efficient way to track enemy buffs/debuffs. I've searched in Window_BattleEnemy, but I can't find a way to do that.
#==============================================================================
# ■ Window_BattleEnemy
#------------------------------------------------------------------------------
# バトル画面で、行動対象の敵キャラを選択するウィンドウです。
#==============================================================================
class Window_BattleEnemy < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# info_viewport : 情報表示用ビューポート
#--------------------------------------------------------------------------
def initialize(info_viewport)
super(0, info_viewport.rect.y, window_width, fitting_height(4))
refresh
self.visible = false
@info_viewport = info_viewport
end
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
Graphics.width - 128
end
#--------------------------------------------------------------------------
# ● 桁数の取得
#--------------------------------------------------------------------------
def col_max
return 1
end
#--------------------------------------------------------------------------
# ● 項目数の取得
#--------------------------------------------------------------------------
def item_max
$game_troop.alive_members.size
end
#--------------------------------------------------------------------------
# ● 敵キャラオブジェクト取得
#--------------------------------------------------------------------------
def enemy
$game_troop.alive_members[@index]
end
#--------------------------------------------------------------------------
# ● 項目の描画
#--------------------------------------------------------------------------
def draw_item(index)
change_color(normal_color)
name = $game_troop.alive_members[index].name
draw_text(item_rect_for_text(index), name)
end
#--------------------------------------------------------------------------
# ● ウィンドウの表示
#--------------------------------------------------------------------------
def show
if @info_viewport
width_remain = Graphics.width - width
self.x = width_remain
@info_viewport.rect.width = width_remain
select(0)
end
super
end
#--------------------------------------------------------------------------
# ● ウィンドウの非表示
#--------------------------------------------------------------------------
def hide
@info_viewport.rect.width = Graphics.width if @info_viewport
super
end
end
Here's a picture to explain :
http://hpics.li/50f768d
That's all, if someone finds out.
