Notice: fwrite(): Write of 483 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 59 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 1714 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 8192 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Print Page - Text Operators in Map Screen Names - RPG Maker VX Ace

The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: chair24 on August 21, 2012, 05:51:01 AM

Title: Text Operators in Map Screen Names - RPG Maker VX Ace
Post by: chair24 on August 21, 2012, 05:51:01 AM
Hi there and thanks for viewing my post.

I was wondering if anyone would know a possible method to have text operators work on map names (i.e the ones that appear at the top-left of the screen as you enter). In particular, I'm interested in having /N working for EnterNameHere's House or something so that would display on the screen.

Many thanks!
Title: Re: Text Operators in Map Screen Names - RPG Maker VX Ace
Post by: modern algebra on August 22, 2012, 12:47:43 AM
Well, there are actually a couple ways in which we can accomodate you, but I recommend my own Global Text Codes (http://rmrk.net/index.php/topic,44810.0.html) script. It will allow you to use any message codes anywhere as long as you also put a \* somewhere in the message. In other words, once you insert (http://rmrk.net/index.php/topic,46709.0.html) the script into the Script Editor, all you need to do is place the following into the Display Message slot of a map:

\*\n[1]'s House

That will allow you to any message code you want in the map name window or any other window, for that matter.

P.S. I notice that you put /N[i] as your example. Please note that it is actually supposed to be a \, not a /.
Title: Re: Text Operators in Map Screen Names - RPG Maker VX Ace
Post by: chair24 on August 26, 2012, 02:06:15 PM
Thank you very much, I really appreciate your help and that was very easy to apply! It works absolutely fine and that script seems to do a lot more than just what I needed there!

Thanks for the slash comment, yeah I always make that mistake, I suppose it's because we use / more often than \ with the keyboard, heh...

I have one other quick question, is there any way using your Global Test Codes script that I can allow longer map titles to appear onscreen? Like 25 characters or so? Thanks!
Title: Re: Text Operators in Map Screen Names - RPG Maker VX Ace
Post by: modern algebra on August 26, 2012, 09:55:45 PM
Yes and no. You can use a replacement code to avoid the space limitations of the program, by creating an entry in the MAGTC_RCODES hash. Ie. go to this part of the script:


MAGTC_RCODES = { # <- Do not touch
  0 => "\\i[112]\\c[14]New Game\\c[0]", # Example
  1 => "", # You can make as many of these as you want
  2 => "\\i[40]Blood Hound",
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#  END Editable Region
#//////////////////////////////////////////////////////////////////////////////
}


Add in the following line below the line that starts with 2 => (you can actually delete these lines if you want as they are just samples):


  3 => "The Forest Outside \\n[4]'s House",


Then, in the actual display name field, you would write:

\*\r[3]

However, the actual window its being drawn in is only 240 pixels wide, so any name that exceeds that will be cut off. To fix that, you would need to increase the size of the window by inserting the following code into its own slot in the Script Editor above Main and below Materials:


class Window_MapName
  def window_width
    return 400
  end
end


You can replace the 400 with any number between 25 and your resolution size (you could use Graphics.width if you wanted to be the width of the entire screen), but keep in mind that since the window is the same for all map names and the name is centre-aligned, it might look a little silly for smaller names.
Title: Re: Text Operators in Map Screen Names - RPG Maker VX Ace
Post by: chair24 on August 27, 2012, 01:01:54 AM
You are a total genius, thank you very much and thanks for your prompt replies!   :D
Title: Re: Text Operators in Map Screen Names - RPG Maker VX Ace
Post by: modern algebra on August 27, 2012, 01:09:45 AM
You're welcome. I'm happy I could help.