Save-Point
KDescXtraLines ACE - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+--- Thread: KDescXtraLines ACE (/thread-8675.html)



KDescXtraLines ACE - kyonides - 02-08-2023

KDescXtraLines ACE

by Kyonides

Introduction

Did you ever feel the need to add more description lines to your hero's status?
Did you resize the screen?
Then this is the perfect scriptlet for you!

Please read the comments embedded in the scriptlet!

[Image: attachment.php?aid=1750]

The Script

Code:
# * KDescXtraLines ACE * #
#  Scripter : Kyonides Arkanthes
#  2023-02-07

# Add More Lines to Your Hero's Description!
# Use the <desc> tag to mark the beginning and end of your description lines.
# - Note Tag Usage Example - #
# <desc>
# Line 1
# <desc>

class Window_Status
  alias :kyon_desc_xtra_ln_win_stts_draw_desc :draw_description
  def draw_description(dx, dy)
    kyon_desc_xtra_ln_win_stts_draw_desc(dx, dy)
    lines = @actor.actor.note.split(/<desc>/i)[1]
    draw_extra_lines(dx, dy, lines) unless lines.nil? or lines.empty?
  end

  def draw_extra_lines(dx, dy, lines)
    lines = lines.split("\n")[1..-1]
    total = lines.size
    lh = line_height
    ly = dy + 2 * lh
    cw = contents.width
    total.times do |n|
      contents.draw_text(dx, ly + lh * n, cw, lh, lines[n])
    end
  end
end

Terms & Conditions

Free as in beer.
Do not repost it!