[VXACE] Battle Log with Window

Hello, anyone can help me to make a script so battle log show with window? Like Dragon Quest Battle Log. Thank you!
Taking the idea from Wcoulliard FF battle log
Ruby:
class Window_BattleLog < Window_Selectable
  def show_log
    self.opacity = 255
    self.back_opacity = 255
  end
  def add_text(text)
    show_log
    @lines.push(text)
    refresh
  end
  def clear
    @num_wait = 0
    @lines.clear
    self.opacity = 0
    self.back_opacity = 0
    refresh
  end
  def max_line_number
    return 2
  end
end
@Roninator2 thank you! But it's too big. Can you make it just for 1-2 lines? and if you can, please make the text at center align too. 😅

1651514038905.png
Can you make it just for 1-2 lines? and if you can, please make the text at center align too. 😅
Those are exactly the conditions that WCoulliards script does.
So I would suggest you use that.
:rsad:
Untitled-1.png

@Roninator2 still error. What happened?

Edit: Sorry ma bad. I think i did the wrong way.
Edit2: Still error my friend.
Edit3: I will try with another script.
Edit4: Sorry brother, i need this. The other script can't fit to my game.
Yes, it seems there is a dependency for something else that has windowskin a part of game_system.
This will fix it
Ruby:
class Game_System
  def windowskin
    return "Window"
  end
end
@Roninator2 thank you! But still error. Enemy battlers can't hide when they died. It's okay btw, i will try another script that i found.
Enemy battlers can't hide when they died
Yes this script seems to be relying on other scripts like yanfly battle engine.

I have added on the changes you wanted.
If this is not good then whatever the other script you said you are using must be the answer.
Ruby:
class Window_BattleLog < Window_Selectable
  def initialize
    super(Graphics.width / 2 - window_width / 2, 0, window_width, window_height)
    self.z = 200
    self.opacity = 0
    @lines = []
    @num_wait = 0
    create_back_bitmap
    create_back_sprite
    refresh
  end
  def show_log
    self.opacity = 255
    self.back_opacity = 255
  end
  def add_text(text)
    show_log
    @lines.push(text)
    refresh
  end
  def clear
    @num_wait = 0
    @lines.clear
    self.opacity = 0
    self.back_opacity = 0
    refresh
  end
  def max_line_number
    return 2
  end
  def draw_line(line_number)
    rect = item_rect_for_text(line_number)
    contents.clear_rect(rect)
    draw_text(rect.x, rect.y, window_width - 24, line_height, @lines[line_number], 1)
  end
end
Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/vxace-battle-log-with-window.147251/