Choices in events be variables and show variable name

Discussion in 'RPG Maker MV' started by Flaqko, Aug 30, 2018.

  1. Flaqko

    Flaqko Villager Member

    Messages:
    19
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Ok so im making an event that makes me choose one of my followers for a one vs one. I made the followers be variables example
    variable 1= party member 1 and so on. I made the npc ask who i would like to choose and to make it show choices.
    i want the choices 1-4 to be variable 1-4 but idk how to type that in and make it appear as the name of the follower.
    i would just.. ( who would i like to choose?) and write 4 follower names there but in my rpg you will have opportunities to have different followers then the name in the choice would be wrong if i have different follower the next time. PLEASE HELP!
    This would be good for training or an Arena. like 2v2 choose your best fighters type of thing thank you! Event.PNG Choices.PNG
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,005
    Likes Received:
    6,328
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    No need for variables, that is what the text codes are for. You only need variables to check the result, but not for the text fields of show choices.

    Check the help file for the show text command to learn more about text codes.
     
    #2
    Flaqko likes this.
  3. Flaqko

    Flaqko Villager Member

    Messages:
    19
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Ok thank you I used yanflys message core that has those text codes i needed
     
    #3
  4. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,456
    Likes Received:
    930
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    FYI, those text codes are not from Yanfly's Message Core.

    If you had read the help file as Andar suggested, you would have seen these text codes in the RPG Maker program. Alternatively, you can hover your mouse over the "Show Text" command in the editor.

    The codes you're interested in for this example are either \N[n] or \P[n]
    TextCodes.png
     
    #4
  5. Flaqko

    Flaqko Villager Member

    Messages:
    19
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    I just looked up text codes in the internet and saw a youtube video is all. but thanks for the help though weve-got-a-badass-over-here-tee-shirt-a60-650x650.jpg
     
    #5
  6. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,456
    Likes Received:
    930
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    If I came off as curt/offensive, then I apologize, it was not my intention. How I should have phrased it is that it would be great for you long-term to get to know the basic/standard capabilities of the editor (including text codes) without any plugins at first. By knowing what you can do without plugins, you will know exactly what you do need plugins for. Having fewer plugins means a lower chance of compatibility issues when you want to add some new features in your game.
     
    #6
  7. Flaqko

    Flaqko Villager Member

    Messages:
    19
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    its ok i might be a little easy to offend because of other people but i understand what you mean. however this creates another problem. with text codes i can show who is thru text \p[1] \[p2] and so on but when removing party members it shows only the actors who are currently in party. if i have another actor instead it would ruin the event. is there a way to remove party members by there slots?
     
    #7
  8. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,456
    Likes Received:
    930
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Yeah that's true. The text command \P[2] always gives you the name of the 2nd party member but if someone leaves the party you can't get their name anymore using that text code. But, we have other codes to use.

    Note that you can nest these text codes. So you can save the Actor ID into a variable and use that later. For example, save the Actor ID of the 2nd party member (Actor #8) into Variable #47.

    So even if that Actor is no longer in the party, you can still get their name in a Show Text or Show Choices by the text code:
    Code:
    \N[\V[47]]
    If that doesn't make sense, just try it a few times and look at each part.
    It first replaces the variable value, so "\N[\V[47]]" ---> "\N[8]" ---> "John Smith"

    Yeah of course, but remember that when someone is removed, everyone moves up, like a queue/line. So you have to remove actor back-to-front, not front-to-back.
    If you have a 4-person party, and you want to keep the actor in the 3rd position, you have to:
    • Remove Actor in the 4th position
    • Remove Actor in the 2rd position (the actor who was in the 3rd position shifts up to the 2nd position)
    • Remove Actor in the 1st position (the actor who was in the 2nd position shifts up to the 1st position)
     
    #8

Share This Page