RPG Maker VX Ace

RPG Maker VX Ace

View Stats:
SynnKo Jan 6, 2015 @ 6:36pm
textboxes with script only?
I want to be able to easily edit an event filled with dialog. If i need to change something in 20+ textboxes in one event, I would have to go into each one in the edit event window, right click and edit the textboxes one by one. Having scripts inbetween for various effects (for example the novel-like image controller or Ace Message System) doesn't make it any easier to edit longer dialog.

Therefore, what I wanted to do, since I have to work with scripts anyway, is pack all the dialog into one custom script for each event. Is that possible? I know I can create a textbox using this script:

$game_message.add("TEXT")

But I can only create one textbox with it. If I try to add another textbox, like this:

$game_message.add("TEXT1")
$game_message.add("TEXT2")

They merge into one textbox.

Any help would be appreciated.
< >
Showing 1-15 of 19 comments
Ultratron Jan 6, 2015 @ 7:15pm 
If i were in your case i would make a picture with the text and scroll it down, (i almost do everything with events)
Kio Kurashi Jan 6, 2015 @ 8:13pm 
\n
This functions the same as a line break or hitting the Return key on the keyboard. That being said, if you wanted two dialoge boxes with one line each then you would need something like this
$game_message.add("TEXT1\n\n\n") $game_message.add("TEXT2\n\n\n")
Note: The \n must be within the quotation marks. Further note that the game_message.add command will automatically place a line break at the end of the string due to how Ruby nativly functions. Elsewise you would have had your dialoge continuing on the same line.
Last edited by Kio Kurashi; Jan 6, 2015 @ 8:15pm
Aros Jan 7, 2015 @ 9:10am 
Assuming you want to add choices to dialogue at some point you're going to need to do a little extra scripting. You'll need to overwrite two methods at minimum. call_ok_handler and call_cancel_handler in Window_Command. I have a working example of that in a script-in-progress here: http://pastebin.com/p19fzw5Z

If anyone actually uses it, file bugs, complaints or requests here: http://forums.rpgmakerweb.com/index.php?/topic/35552-ace-easy-teleport/

Scroll to the bottom to see the methods. In hindsight, I would recommend setting the process to act off a module's instance variable that's set to an array of procs containing the desired branching effects rather than using a case statement. It would be trivial to add the when effects one by one as you push the choices into the choice array. I'll probably upgrade the code at some point today or tomorrow because I intend to take the same script loaded dialogue approach you want to take.
Kio Kurashi Jan 7, 2015 @ 6:16pm 
Originally posted by Balrogic:
Assuming you want to add choices to dialogue at some point you're going to need to do a little extra scripting. You'll need to overwrite two methods at minimum. call_ok_handler and call_cancel_handler in Window_Command. I have a working example of that in a script-in-progress here: http://pastebin.com/p19fzw5Z

If anyone actually uses it, file bugs, complaints or requests here: http://forums.rpgmakerweb.com/index.php?/topic/35552-ace-easy-teleport/

Scroll to the bottom to see the methods. In hindsight, I would recommend setting the process to act off a module's instance variable that's set to an array of procs containing the desired branching effects rather than using a case statement. It would be trivial to add the when effects one by one as you push the choices into the choice array. I'll probably upgrade the code at some point today or tomorrow because I intend to take the same script loaded dialogue approach you want to take.
I seem to recall that this was posted in this here post and is easier in my opinion.
http://forums.rpgmakerweb.com/index.php?/topic/6248-script-call-equivalent-of-events/#entry70304
Hajami Jan 8, 2015 @ 3:04am 
Archeia just offered half of the Codes and the several Users who Asked to get it Work never got final answer in that Thread. (Besides that the Thread is very Helpfull)

Thx to a Friend from German Forum i can share the Complete Code for insert in
Eventcommand "Script" :

$game_message.face_name = 'Actor1'
$game_message.face_index = 0
$game_message.background = 0
$game_message.position = 2
$game_message.add("Choose your Style")
params = []
choices = []
choices.push("Warrior")
choices.push("Magician", "Knight", "Archer")
choices.push("Mergent", "Chuck Norris", "Eric Cartman", "MacGyver")
params.push(choices)
params.push(2) #(If Cancel: 0=Disallow/1,2...)
setup_choices(params)
wait_for_message
$game_variables[1] = @branch[@indent]

Hope this gets you into the Correct direction.If you got further Questions just share them with us.
SynnKo Jan 8, 2015 @ 5:41pm 
Tnx for all the answers! Unfortunately I could not solve my problem. :( I didn't go into the "choices" topic yet because of that, and because I won't use it very often, but I'll look into it in the future (once I fix the multiple text boxes issue).

@El puzzle de dios: You mean I should make pics out of the text? Wouldn't that make it more of a pain in the ass than just adding the text directly?

@Kurashi: It ALMOST worked perfectly. I get a new textbox, but the problem is that it sort of "breaks" or doesn't work well with the Ace Message System. If I want to have two textboxes for two different characters (where the name of the two actors are displayed in a separated box), like this:

$game_message.add("\\n<\\N[1]>TEXT1\n\n\n")
$game_message.add("\\n<\\N[2]>TEXT2\n\n\n")

BOTH textboxes will have the name of the second actor, instead of the first textbox having the first actor's name and the second textbox having the second actor's name. Is there a way around this?
Last edited by SynnKo; Jan 8, 2015 @ 5:42pm
Ultratron Jan 8, 2015 @ 7:59pm 
ZOAG well... yea but that is what i usually do.
What about Hajami solution, do you test it?
Hajami Jan 8, 2015 @ 8:28pm 
I randomly found a solution by combining the existing commands i got.

$game_message.add("Text")
wait_for_message
$game_message.add("Text")

The wait_for_message is the Magic you need to get your Textboxes working.
Dont ask me why :) iam still learning and this is just shared knowledge with some random combining.
SynnKo Jan 10, 2015 @ 5:51pm 
@Hajami: YES, YES, YES, thank you! That's exactly what I was looking for XD It works perfectly! Tnx a lot!

@"El puzzle de dios" & "Hajami": Since my multibox dilemma is solved now, I tried the options script too and it also works perfectly.

Only thing left now is...the stupid character limit in the script window -.- Turns out you can only have like 2278 characters (that's how much it let me have) in one script, which is easily exceeded of course if you have all the dialog in one script.
Last edited by SynnKo; Jan 10, 2015 @ 8:09pm
Kio Kurashi Jan 10, 2015 @ 7:25pm 
SynnKo Jan 10, 2015 @ 8:31pm 
Haha, wow, that was fast! XD I was about to open a new topic. Guess that wont be necessary.

I tried the script but I think I'm doing something wrong or maybe I misunderstood something. What does the script do exactly? Can I insert an unlimited amount of characters into the script box or does it just "slightly" raise the limit? Because I still can't enter more than the little script box allows (it acts like I clicked "OK" when I reach the last line).
Kio Kurashi Jan 10, 2015 @ 9:45pm 
What it does is it combines multipule script calls that are sequenced one after the other together. It doesn't raise the limit but it does make the program read them all together.
SynnKo Jan 10, 2015 @ 9:49pm 
Alright, so it basically makes it easier to splice the script up into multiple parts so it doesn't break? I can just cut the script at whatever line I want and it will still works as if it's one script?
Kio Kurashi Jan 10, 2015 @ 10:03pm 
Yes. That is the gist of how it works, and it's purpose.
SynnKo Jan 10, 2015 @ 11:32pm 
Nice. But I guess there is no way to pack the dialog into one single big script instead of many big-sized scripts? Damn character limit...

It's fine though, being able to have the dialog in bigger, editable pieces makes it already a lot easier than editing one small textbox after the other.

Again, thank you all for the help! Much appreciated.
Last edited by SynnKo; Jan 10, 2015 @ 11:33pm
< >
Showing 1-15 of 19 comments
Per page: 1530 50

Date Posted: Jan 6, 2015 @ 6:36pm
Posts: 19