.

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
682
Reaction score
446
First Language
English
Primarily Uses
RMVXA
The battle log window is about 6 lines tall, though; it'll appear in the middle of the screen.

EDIT:
Here, try this. Just change 'max_line_number' as needed.
Code:
class Window_BattleLog < Window_Selectable

  def initialize
    y = Graphics.height - fitting_height(4.5 + max_line_number)
    super(0, y, window_width, window_height)
    self.z = 200
    self.opacity = 0
    @lines = []
    @num_wait = 0
    create_back_bitmap
    create_back_sprite
    refresh
  end
 
  def max_line_number
    return 3    # change this as necessary
  end
 
  def message_speed
    return 30
  end
 
  def add_text(text)
    if @lines.size >= max_line_number
      replace_text(text)
    else
      @lines.push(text)
      refresh
    end
  end
 
end
 
Last edited:

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
682
Reaction score
446
First Language
English
Primarily Uses
RMVXA
No worries, glad it's working for you. The battle log uses a different method of drawing text that doesn't let you centre it, unfortunately, but give this a try:
Code:
class Window_BattleLog < Window_Selectable

  def initialize
    y = Graphics.height - fitting_height(4.5 + max_line_number)
    super(0, y, window_width, window_height)
    self.z = 200
    self.opacity = 0
    @lines = []
    @num_wait = 0
    create_back_bitmap
    create_back_sprite
    refresh
  end
 
  def max_line_number
    return 3    # change this as necessary
  end
 
  def message_speed
    return 30
  end
 
  def add_text(text)
    if @lines.size >= max_line_number
      replace_text(text)
    else
      @lines.push(text)
      refresh
    end
  end
 
  def draw_line(line_number)
    rect = item_rect_for_text(line_number)
    contents.clear_rect(rect)
    draw_text(rect, @lines[line_number], 1)
  end
 
end

I can envisage some issues with control characters, but as far as I know, the battle log doesn't really use any.
 

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,467
Members
137,821
Latest member
Capterson
Top