How to give a character multiple names?

Discussion in 'RPG Maker VX Ace' started by Sami-Fire64, Sep 18, 2014.

  1. Sami-Fire64

    Sami-Fire64 Veteran Veteran

    Messages:
    62
    Likes Received:
    132
    First Language:
    English
    In my game, your character gets two names: a civilian name and a powered name. I can't figure out how to get both names registered and keep them that way after a name switch occurs. It goes something like this: the character starts out with their civilian name, then their main profile will switch to their powered name after a plot point. I was considering making two actors- one for the actual character, and one just to hold the other name- but wouldn't changing the actor's name erase the name that was originally in its slot (in this case, the civilian name)? I could perhaps stealth-swap the actors' names so that the civilian name is still available but in a different position, but I feel there has to be an easier way. I looked around and I saw something about a script, but I didn't really understand how to do it... I was wondering if a variable could help, but I don't know how to store a name as a variable in VX Ace. Any help is appreciated.
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,908
    Likes Received:
    11,583
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    There is a Change Actor Name command.


    Are you allowing your player to name the actor? One name or both names? If you're not, I don't see what the issue is.
     
    #2
    MyLordRobinson likes this.
  3. Sami-Fire64

    Sami-Fire64 Veteran Veteran

    Messages:
    62
    Likes Received:
    132
    First Language:
    English
    The player gives the actor/character both names. I don't know how to store both names at the same time and keep them when they're swapped out with the Change Actor Name Command (which probably wouldn't actually work since it doesn't seem you can call a stored variable or anything of the sort to fill in the name space, unless I missed something). If I was using set names for the actor, yes, I could just swap them since they'd be consistent, but since they're not... like I said, I don't know how to keep both names. Does that clarify things a bit?
     
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,908
    Likes Received:
    11,583
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Sure. In that case, you can store the names in variables the first time they are given. Then when you want to change them, you can use a script call to set the actor's name to whatever is in the variable.


    I don't have Ace with me right now so I can't check what the exact commands would be. If I remember by the time I get home, I'll take a look and give them to you - if nobody else has done so in the meantime :)
     
    #4
  5. Sami-Fire64

    Sami-Fire64 Veteran Veteran

    Messages:
    62
    Likes Received:
    132
    First Language:
    English
    I see! I could have sworn I saw the option for script calls in the event menu, but I suddenly can't find it... until I get the commands and instructions, I might do something like a full actor switch to make sure the profile names swap properly. It's cumbersome, but it'll work, hopefully (since you don't do any combat until the plot point where the powered name comes in).
     
    #5
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    37,908
    Likes Received:
    11,583
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    You can do script calls in the event commands. It's the very last one on tab 3.


    No, don't do a full actor switch. That has inherent problems of its own - better to stay away from it.


    How often will you be changing the name back and forth? What will be the trigger? Does it depend on who you're talking to, what map you're on, what point in the game you're on, a particular switch? Will it be changing in the menus? On the battle screen? Just in Show Text commands? Where else?


    You can do it using variables and script calls to switch the actor name out. But depending on your requirements & how often you need to do this, maybe a little script might be easier.
     
    #6
  7. Sami-Fire64

    Sami-Fire64 Veteran Veteran

    Messages:
    62
    Likes Received:
    132
    First Language:
    English
    Let's see... the profile name switch only occurs once, from civilian to powered (and the portrait changes too). It will stay the same in menus from then on. Only the powered name will appear in battles. I anticipate that... probably just about all of the name mentions (of either name) will be in Show Text/message commands, since there's no need to change the menu instances that I can think of. Certain people will call the character by the civilian name, while others will use the powered name. Does that help?
     
    #7
  8. Shaz

    Shaz Veteran Veteran

    Messages:
    37,908
    Likes Received:
    11,583
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    So they start off by giving the civilian name, which will appear in all messages and menus until the time they become powered, and after that menus and battles will show the powered name, and Show Text will sometimes use one, and sometimes another?


    Here's what I'd do ...


    Set up two actors - only the first one will have a sprite or any settings. The second one will be completely empty - just a "placeholder".


    Get them to enter the civilian name on Actor 1, and as soon as they do, do a Script command like this:

    $game_actors[2].name = $game_actors[1].nameWhen it comes to converting them to powered, you already have the civilian name stored, so go ahead and let them enter the new name, again on Actor 1.
    Then in all your message boxes, when you want to show the powered name, use \N[1]. When you want to show the civilian name, use \N[2].


    The second actor will never be used in your game - never added to the party or anything. It's just an empty slot to store the name. You could do the same by using variables if you wanted - instead of the Script command to copy Actor 1's name to Actor 2's name, use a Control Variables command, choose the variable, select the Script option, and put $game_actors[1].name into the script box. Then use \V[5] in the Show Text command (assuming 5 is the variable id that you used).


    No need to swap them back and forth. Ever ;)
     
    Last edited by a moderator: Sep 19, 2014
    #8
  9. Sami-Fire64

    Sami-Fire64 Veteran Veteran

    Messages:
    62
    Likes Received:
    132
    First Language:
    English
    I see! I'll test that out when I get a bit further and actually write the segment where the character receives their powered name. The thing is that, as it stands now, the player is asked to enter the civilian and the powered name at the same time in the introduction. So... would I use that script after they enter the civilian name, then have them enter the powered name and have that stored in the same place? That wouldn't switch out the menu/battle name immediately, would it? Since there's also a "Your civilian name is \N[1]" and a "Powered name is \N[2]" line in the introduction as I have it, would the script automatically slot things into place so that the names would be different? It sounds a bit like the player would need to enter the powered name later to avoid a premature switch, but since my knowledge of script is very very small I might be wrong about that.
     
    #9
  10. Shaz

    Shaz Veteran Veteran

    Messages:
    37,908
    Likes Received:
    11,583
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Yes, because Actor 1 is the REAL character, whatever you name them is what will be seen in the menus.


    If you want them to provide both names at the same time, I'd introduce another "placeholder" actor. Put the civilian name into Actor 2 and the powered name into Actor 3. Then immediately do a script call like this:

    Code:
    $game_actors[1].name = $game_actors[2].name
    and when they become powered, put this:
    Code:
    $game_actors[1].name = $game_actors[3].name
    and in the message boxes, use \N[2] and \N[3] to show the civilian and powered names. If you ever have an NPC you want to refer to the PC by the "current" name (civilian when he's a civilian, and powered when he's powered), just use \N[1].
     
    #10
  11. Sami-Fire64

    Sami-Fire64 Veteran Veteran

    Messages:
    62
    Likes Received:
    132
    First Language:
    English
    I think I've almost got it! I did a preliminary test to see if the menu name would change from civ to powered upon interacting with an event (the \N[x] names showed up fine)... and the civilian name was still on the menu screen, not the powered. Not sure what I did wrong.
     
    #11
  12. Shaz

    Shaz Veteran Veteran

    Messages:
    37,908
    Likes Received:
    11,583
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    In the menu, it shows whatever name is given to the actor. If you haven't given actor 1 the powered name yet, then the civilian name is what will show in the menu.
     
    #12
  13. Sami-Fire64

    Sami-Fire64 Veteran Veteran

    Messages:
    62
    Likes Received:
    132
    First Language:
    English
    I put the second script bit you gave me into the event first. Shouldn't that trigger the name change? Or is there another step I missed?
     
    #13
  14. Shaz

    Shaz Veteran Veteran

    Messages:
    37,908
    Likes Received:
    11,583
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Maybe show screenshots of the event where you set them up, and the event where you name Actor 1? IF you put the powered name into Actor 3, and then used the script to set Actor 1's name to Actor 3's name, then yes, it should show the powered name in the menu.
     
    #14
  15. Sami-Fire64

    Sami-Fire64 Veteran Veteran

    Messages:
    62
    Likes Received:
    132
    First Language:
    English
    Under the spoiler are the two event files: the first is where the character is named (the name inputs go to actors 2 and 3 respectively, I checked) and the second script is the switch to the powered name activated by touching an event (outside of the test, the actual name switch event will be an autorun event, if that changes anything).

    [​IMG][​IMG]
     
    #15
  16. Shaz

    Shaz Veteran Veteran

    Messages:
    37,908
    Likes Received:
    11,583
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    So you have entered both names by activating the first event, and then you have activated the second event, seen the text you have in the second event, and gone to the menu, but it still shows the civilian name?


    Can you confirm that it is Actor 1 who is in the party, and not Actor 2?


    You're not using any custom menu scripts?
     
    Last edited by a moderator: Sep 21, 2014
    #16
  17. Sami-Fire64

    Sami-Fire64 Veteran Veteran

    Messages:
    62
    Likes Received:
    132
    First Language:
    English
    Oh, how embarrassing. Actor 2 was in the party all along from when I was planning to use the actor switch trick and I never switched it back to 1. It works now! Thank you!

    I'm going to wait a little bit to mark this solved because I think I had one more concern but I don't remember what it was.
     
    #17
    Shaz likes this.

Share This Page