Hello!
Does somebody know where can I change the font size of the enemy's battling name only or know the appropriate command(s) to do it? (not the emerge name but when attacking/using skills you see the enemy's name when you select it)
Basic example:
An example from the game, that I'm translating and where I used the Expanded Item/Skill Description that affects the enemy's name as well (in this case another solution may be to make an exception in that script for the enemy battler's name):
In this game this is the script that moves the enemy's name to the upside and lets you select the enemy's picture instead (the part that needs to be modified could be the "def start_target_enemy_selection" and "def end_target_enemy_selection"):
Does somebody know where can I change the font size of the enemy's battling name only or know the appropriate command(s) to do it? (not the emerge name but when attacking/using skills you see the enemy's name when you select it)
Basic example:
[IMG]http://s10.postimg.org/tep3wcgzt/example.jpg[/IMG]
[IMG]http://s10.postimg.org/tdf62xf61/example2.jpg[/IMG]
Code:
#==============================================================================# Window_TargetEnemy_on_EnemyImages Ver.1.00#------------------------------------------------------------------------------# On the battle screen, The window# where the enemy character to act is selected directly on the enemy image. #==============================================================================class Window_TargetEnemy <Window_Command #-------------------------------------------------------------------------- # ☆ オブジェクト初期化 <追加変更> #-------------------------------------------------------------------------- def initialize commands = [] @enemies = [] @enemies_x = [] #追加 @enemies_y = [] #追加 @enemies_w = [] #追加 @enemies_h = [] #追加 for enemy in $game_troop.members next unless enemy.exist? commands.push(enemy.name) @enemies.push(enemy) enemy_position(enemy) #追加 end @item_max = @enemies.size super(544+32, commands, @enemies.size, 1) #変更 self.contents.clear #追加 self.x=-16 #追加 self.y=-16 #追加 self.height=288+32 #追加 self.opacity = 0 #追加 self.active = false #追加 self.index = 0 #追加 end #-------------------------------------------------------------------------- # ☆ 敵キャラ位置,大きさ取得 <新規追加> #-------------------------------------------------------------------------- def enemy_position(enemy) bitmap = Cache.battler(enemy.battler_name,0) x=enemy.screen_x - bitmap.width/2 y=enemy.screen_y - bitmap.height w=bitmap.width h=bitmap.height @enemies_x.push(x) #追加 @enemies_y.push(y) #追加 @enemies_w.push(w) #追加 @enemies_h.push(h) #追加 end #-------------------------------------------------------------------------- # ☆ 敵キャラx位置取得 <新規追加> #-------------------------------------------------------------------------- def enemy_x return @enemies_x[@index] end #-------------------------------------------------------------------------- # ☆ 敵キャラy位置取得 <新規追加> #-------------------------------------------------------------------------- def enemy_y return @enemies_y[@index] end #-------------------------------------------------------------------------- # ☆ 敵キャラw横幅取得 <新規追加> #-------------------------------------------------------------------------- def enemy_w return @enemies_w[@index] end #-------------------------------------------------------------------------- # ☆ 敵キャラh高さ取得 <新規追加> #-------------------------------------------------------------------------- def enemy_h return @enemies_h[@index] end #-------------------------------------------------------------------------- # ☆ カーソルの更新 <新規> <新規追加> #-------------------------------------------------------------------------- def update_cursor if @index < 0 # カーソルなし self.cursor_rect.empty elsif @index < @item_max # 通常 self.cursor_rect.set(enemy_x,enemy_y,enemy_w,enemy_h) end end #-------------------------------------------------------------------------- # ☆ ヘルプテキスト更新 <新規追加> #-------------------------------------------------------------------------- def update_help @help_window.set_text(@enemies[@index] == nil ? "" : @enemies[@index].name,1) #if enemy == nil # text = "" #else # text = enemy.name #end #@help_window.x=enemy_x-16 #@help_window.width = self.contents.text_size(text).width+24+32 #@help_window.set_text(text,1) endendclass Window_Help_Nanme < Window_Base #-------------------------------------------------------------------------- # ☆ オブジェクト初期化 <新規追加> #-------------------------------------------------------------------------- def initialize(item) @item = item super(0, WLH-16, 544, WLH + 32) self.opacity = 0 refresh end #-------------------------------------------------------------------------- # ☆ テキスト設定 <新規追加> # text : ウィンドウに表示する文字列 # align : アラインメント (0..左揃え、1..中央揃え、2..右揃え) #-------------------------------------------------------------------------- def refresh self.contents.clear if @item != nil w=self.contents.text_size(@item.name).width rect = Rect.new(544-w-32-32, 0, 544, WLH) enabled = true draw_item_name(@item, rect.x, rect.y, enabled) end endendclass Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ☆ Begin Target enemy character selection <additional changes> #-------------------------------------------------------------------------- def start_target_enemy_selection @target_enemy_window = Window_TargetEnemy.new @enemy_help_window = Window_Help.new #added @target_enemy_window.help_window = @enemy_help_window #added @target_enemy_window.help_window.opacity = 0 #added @target_enemy_window.help_window.y = -16 #added @target_enemy_window.help_window.x = -38 #added #@target_enemy_window.y = @info_viewport.rect.y #added #@info_viewport.rect.x += @target_enemy_window.width #added #@info_viewport.ox += @target_enemy_window.width #added @actor_command_window.active = false @target_enemy_window.active=true if @skill != nil and @skill_window != nil #added if @skill.need_selection? #added if @skill.for_opponent? #added @skill_name_window = Window_Help_Nanme.new(@skill) #added @skill_window.visible = false #added @skill_window.help_window.visible = false #added end #added end #added end if @item != nil and @item_window != nil #added if @item.need_selection? #added if @item.for_opponent? #added @item_name_window = Window_Help_Nanme.new(@item) #added @item_window.visible = false #added @item_window.help_window.visible = false #added end #added end #added end #added end #-------------------------------------------------------------------------- # ☆ End Target enemy character selection <additional changes> #-------------------------------------------------------------------------- def end_target_enemy_selection #@info_viewport.rect.x -= @target_enemy_window.width #added #@info_viewport.ox -= @target_enemy_window.width #added @target_enemy_window.dispose @target_enemy_window = nil if @actor_command_window.index == 0 @actor_command_window.active = true end @enemy_help_window.dispose #added @enemy_help_window = nil #added if @skill != nil and @skill_window != nil #added if @skill.need_selection? #added if @skill.for_opponent? #added @skill_name_window.dispose #added @skill_name_window = nil #added @skill_window.visible = true #added @skill_window.help_window.visible = true #added end #added end #added end #added if @item != nil and @item_window != nil #added if @item.need_selection? #added if @item.for_opponent? #added @item_name_window.dispose #added @item_name_window = nil #added @item_window.visible = true #added @item_window.help_window.visible = true #added end #added end #added end #added endend