The RPG Maker Resource Kit

Other Game Creation => Game Creation General Chat => Topic started by: fenicearcana on September 01, 2011, 04:52:30 PM

Title: [Resolved] Textbox with NPC name on it? They Exist?
Post by: fenicearcana on September 01, 2011, 04:52:30 PM
Greetings, i was wandering...is there a way to show the NPC or character name in the upper left corner of the textbox when they talk?
Is boring and also not very professional start each textbox with:
[NPC or Character] bla bla bla... and also uses some of the alredy limited space for text.
I've tried to use some script but i'm not yet found one that can help with this...and i'm not good at creating scripts by myself XD
Also, is there a sistem to input more than 4 line text when you are writing down the dialogues?
I've see many script allow you to "show" to the player more than 4 line, but al least until now, i havent found a script allowing me to write in the textbox more than 4 line.
Is there a way?

Thanks for your time ^^
Title: Re: Textbox with NPC name on it? They Exist?
Post by: littlesatyr on September 01, 2011, 06:01:26 PM
Really, it would depend on which system you use.
If you're using RM2K/3 you'd have to either have a message box use one line for the name and three lines for the text or use pictures to create a fifth line for the name. I'm sure there'd be a script somewhere for adding a name with XP or VX.
As for the more than four lines at a time - you're out of luck for 2k/3. Maybe write it all out in a text document then copy paste into message boxes?
Not sure about XP but VX has a small option when writing the message for a 'batch entry' which allows you to add more than four lines at a time. I'm not sure of the limits to it, but I've personally done something like 20 or so lines at a time.

Hope this helps a bit!
Title: Re: Textbox with NPC name on it? They Exist?
Post by: Zylos on September 01, 2011, 06:04:51 PM
Again, scripts make the world go round here. If you're using VX, look up Modern Algebra's Advanced Text System. If you're using XP, look up either DubeAlex's AMS or Ccoa's UMS. You'll find instructions with each of them for how to use them.
Title: Re: Textbox with NPC name on it? They Exist?
Post by: fenicearcana on September 01, 2011, 08:01:23 PM
Got it! I'm not very used to modify Scripts, but this one seems pretty cool.
It give me some conflict problem, but i've figured out whats the problem [the problem is, a conflict with another script...i will fix it)
Thanks Guys, with http://rmrk.net/index.php/topic,25348.0.html is is all fixed, ^^
My system is VX, i sometime forgot to say ut ehhe ^^

Thanks Again for your Time.

P.S. Algebra's works are really awesome...
Title: Re: [Resolved] Textbox with NPC name on it? They Exist?
Post by: Infinate X on September 02, 2011, 06:20:33 PM
If it hasn't been fixed already, then the namebox can not support long names. I edited the script and finally decided to ask MA if he wanted to know how to fix it. I just posted so I don't know if he wants the edit I made.

If you want it, go to around line 2123 and change the code to this:
Spoiler for:
Code: [Select]
class Window_NameBox < Window_WordBox
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize (name, viewport = nil)
    @word_sprite = Sprite_Base.new (viewport)
    wlh = $game_message.name_wlh > 0 ? $game_message.name_wlh : $game_message.wlh
    rows = (name.scan (/\x00/).size) + 1
    hght = [($game_message.name_border_size*2) + rows*wlh, 33].max
    super (viewport, name, 0, 0, -1, hght, true)
    self.viewport = viewport
    @word_sprite.x, @word_sprite.y = $game_message.name_border_size, $game_message.name_border_size
    @word_sprite.bitmap = Bitmap.new (self.width - (2*$game_message.name_border_size), self.height - (2*$game_message.name_border_size))
    @word_sprite.bitmap.font.name = $game_message.name_fontname
    @word_sprite.bitmap.font.size = $game_message.name_fontsize
    @word_sprite.bitmap.font.color = text_color ($game_message.name_fontcolour)
    @contents_x, @line_x = 2, 2
    draw_word (name, @word_sprite.bitmap)
  end

I'm pretty sure that's the right part
Title: Re: [Resolved] Textbox with NPC name on it? They Exist?
Post by: modern algebra on September 02, 2011, 06:32:21 PM
It seems to work fine for me, but it depends on the font since the Bitmap method which measures the length of a string is inaccurate for some fonts. Long names work fine in the name box for at least the default font.

What did you change though InfinateX? That looks like the same as it is in the ATS 3.0c.