[RMVX ACE] NAME INPUT PROCESSING LONGER THAN 16 CHARACTERS

Posts

Pages: 1
As the title suggests, I'd like to be able to let the player type more than 16 characters in the "Name input processing" command. I'm using it as sort of an "ask a question" prompt, so I'd also need to be able to somehow type more than 16 characters in the "Actor name" conditional branch. Possibly with a script call.

I'd be extremely grateful for any help provided, thanks!
Not sure if you're still looking for help on this, but you don't need a separate script. Rather than calling the Name Input scene through the editor, use this script call instead:
SceneManager.call(Scene_Name)
SceneManager.scene.prepare(ID, CHARS)

Where ID is the ID of the actor whose name you want to change, and CHARS is the number of characters.

For the conditional branch, do the script call section and use:
$game_actors[ID].name == "string goes here"

This is to check if the name is equal to "string goes here", so it needs to be exact and doesn't differentiate between caps and no caps. E.g. if the character's name was Dean, it would return false if you asked it to check "dean".

Alternatively, to check if the name includes a string, use:
$game_actors[ID].name =~ /string goes here/i

So it would return true if you checked for dean or Dean or DEAN. It would also return true if you checked if the name included dean and the character's name was Deano or The Dean.
OzzyTheOne
Future Ruler of Gam Mak
4696
This is also very useful general knowledge, thanks for asking this question Pancaek and thanks for answering it AMoonlessNight -.-)
Oh wow, thank you so much!

I did run into a bit of a problem when trying this out, though.
Whenever I attempt to run the event, I get this error message.



Any idea what I might be doing wrong?
pianotm
The TM is for Totally Magical.
32388
I'm not having that problem.

Screencap the event.

Should look like this.

Kloe
I lost my arms in a tragic chibi accident
2236
Well there's a " missing in the conditional but more importantly the ID in the conditional needs to be the ID of the actor (e.g. 2)
author=Kloe
Well there's a " missing in the conditional but more importantly the ID in the conditional needs to be the ID of the actor (e.g. 2)

Yeah, I noticed those after I posted the screenshot. Doesn't have anything to do with the error message, though. Even when I fix or completely remove the conditional branch I still get the error. Whatever the problem is, it's coming from the first script call.
pianotm
The TM is for Totally Magical.
32388
It has to be one of your scripts. Do the thing. One by one.

EDIT: Yeah, because I can't even replicate that error.
I removed all at once just to check if anything changed, and now I get this error message.



Pretty much the same as the one before, but with a few minor differences.

I'm guessing it's some previous change I've made to one of the core scripts, although I'd have no way of locating which change. The only things I've changed should've been values, so I'm pretty confused to say the least.
pianotm
The TM is for Totally Magical.
32388
Well, line 1412 is an end function. Maybe test the script calls in a new project and then test the changes you've made one by one?
I started a completely new project, and it still didn't work. After that I tried creating a new event instead of copy and pasting my old one, and it works just fine. I'm completely baffled as to why, as there shouldn't be any differences in the two events. I copy and pasted the script call from the old event to the new one, so it should function exactly the same. The only difference is that the old event did have a few other event pages, however they were inactive at the time, only being accessible through a certain switch which was turned off. All I can assume is that this is some weird bug. Thanks for the help, everyone.

EDIT: Alright, now that I'm getting around to actually to trying this method out, I've noticed it's a bit wonky. After entering the correct name into the prompt, it'll simply exit the prompt without activating the conditional branch, until you do it a second time. I'm not sure why this is, but a simple work around I found is to add a one frame long wait command in between the first script call and the conditional branch. It should look like this:



Hope someone finds this helpful.
Actually something similar happens when you're using XP, and yeah a wait n frames might help. The alternative I found then was that it should be handled by the Scene_Map and then the Interpreter, for VX Ace it would be Game_Interpreter, as a system flag being activated; let's say it could be something like $game_temp.my_flag. Once it recognizes it as some internal instead of an event call, it just doesn't matter if you add the wait frame command or not. Of course, it's not as pragmatic as adding the frames. :P
Pages: 1