Status
Not open for further replies.

Sangreale

Villager
Member
Joined
Jun 29, 2017
Messages
18
Reaction score
4
First Language
English
Primarily Uses
RMVXA
Hi anyone knows, or have any scripts, to increase an item or skill description window from just a mere 2 lines? Thank you!
 

Sangreale

Villager
Member
Joined
Jun 29, 2017
Messages
18
Reaction score
4
First Language
English
Primarily Uses
RMVXA
Window_help line 11
Oops, your solution indeed works! But apologize my noob-ness, how do I actually write on the third line? It opens up but i can't write on the third line from my item customization screen. Thanks again and thanks beforehand!! You're awesome.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,201
Reaction score
854
First Language
Hungarian
Primarily Uses
RMVXA
You can use the \n message code to force a line break in the description box.
If that won't work for some reason, you can try \\n or \en too. One of them should work.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,369
Reaction score
799
First Language
English
Primarily Uses
RMVXA
Figured it out. The problem really is that the description box only allows two lines. I could not find a way (so far) of getting it to recognize the \n function used in other scripts for messages. I however was able to get it to show the text written in the note box.
So...
item.PNG
item2.PNG
Window Help line 11
Code:
def initialize(line_number = 4)
Window_Help line 34
Code:
set_text(item ? item.description + item.note : "")

If you have to put other lines in the note box for other scripts just start them on line 5 of the note box.

Hopefully this will work for you. you can use a lot of text in the note box, as long as it fits in the window

I just tried what you suggested Sixth... it didn't work for me.

*EDIT

Updated method for this thread
Code:
=begin
Requires placing a notetag in the item description
<note desc>
third line
fourth line
</note desc>
=end
class Window_Help < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(line_number = 4)
    super(0, 0, Graphics.width, fitting_height(line_number))
  end
  def set_item(item)
    set_text(item ? item.description + "\n" + make_note_desc(item) : "")
  end
  def make_note_desc(item)
    @note_desc = nil
    results = item.note.scan(/<note[-_ ]*desc>(.*?)<\/note[-_ ]*desc>/imx)
    results.each do |res|
      res[0].strip.split("\r").each do |line|
        @note_desc = @note_desc.to_s + line.to_s
      end
    end
    return @note_desc.to_s
  end
end
1578256619830.png
 
Last edited:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,201
Reaction score
854
First Language
Hungarian
Primarily Uses
RMVXA
Ohh, yeah, I remember, I encountered this issue too a long time ago.
Here is a funny workaround:
Set a variable to "\n" (with the quotation marks!) with the "Script" option at the start of the game.
Now use that variable in your descriptions where you want to force a line break with the default \V[id] message code.

Stupid code kills off the \n message code. -.-
Reminds me why I ditched the default help window with the default descriptions completely in every single project I started (and never finished, of course :D).

Ohh, btw, drawing the entire note-box might slow down your game severely if you have a lot of text in it. There are tons of scripts using the note-box for extra features, and the text in it can get pretty long, even over 100+ lines. Drawing that with draw_text_ex will most probably generate lag spikes whenever you move the cursor in the menu.
 

marbeltoast

Your future fish empress
Veteran
Joined
Nov 11, 2018
Messages
98
Reaction score
32
First Language
English
Primarily Uses
RMMV
Hey, so, sorry for necroposting, but I want to implement this myself:
*EDIT

Updated method for this thread
Code:
=begin
Requires placing a notetag in the item description
<note desc>
third line
fourth line
</note desc>
=end
class Window_Help < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(line_number = 4)
    super(0, 0, Graphics.width, fitting_height(line_number))
  end
  def set_item(item)
    set_text(item ? item.description + "\n" + make_note_desc(item) : "")
  end
  def make_note_desc(item)
    @note_desc = nil
    results = item.note.scan(/<note[-_ ]*desc>(.*?)<\/note[-_ ]*desc>/imx)
    results.each do |res|
      res[0].strip.split("\r").each do |line|
        @note_desc = @note_desc.to_s + line.to_s
      end
    end
    return @note_desc.to_s
  end
end
View attachment 130389
But I genuinely don't know how to. Should I make this code into a plugin? Or copy-paste it into some section of the JS files? Is this something I implement across multiple different parts of the code? I'm clueless when it comes to code.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,489
Reaction score
8,288
First Language
Indonesian
Primarily Uses
RMVXA
Hey, so, sorry for necroposting, but I want to implement this myself:

But I genuinely don't know how to. Should I make this code into a plugin? Or copy-paste it into some section of the JS files? Is this something I implement across multiple different parts of the code? I'm clueless when it comes to code.
This is for VXAce, if you're looking for the one that is for MV, you may want to open your own topic with your own question.
 

marbeltoast

Your future fish empress
Veteran
Joined
Nov 11, 2018
Messages
98
Reaction score
32
First Language
English
Primarily Uses
RMMV
Ah, my apologies.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

ready to fall into another development hell...
Mega has been giving me a lot of problems as of late, so I think I'll need to switch to another cloud service. I'm considering Dropbox.
Rough week, but in the end there's light in the darkness.
Mental health is an issue I wish was taken more seriously.
Take care.
1638421271905.jpeg
By the power of timezones! This picture shall still be posted on december 1st!!!
7xI2Gc2.jpg

This is not something I'd ever even considered but wow! What a way to use music in a game.

Forum statistics

Threads
117,122
Messages
1,104,755
Members
153,165
Latest member
visisoothepills1
Top