• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other Question] Letting player name maps?

  • 20
    Posts
    5
    Years
    • Seen Jun 30, 2023
    In the game I'm working on right now I'd like the player to be able to name a map and for that map name to be displayed on entry. I tried using the pbEnterNPCname command (storing it in variable 29) and then naming the map \v[29] Town but "\v[29] Town" is literally what's displayed on entry. (I also double checked to make sure the name was being stored with a dialogue box in game, and it is.)

    Is what I'm trying not possible? Or is there a different way to do what I'm trying?
     
  • 1,682
    Posts
    8
    Years
    • Seen today
    By default the game does not process any of the in line commands except for \PN, a hard coded exception.
    you'll need to edit def name in Game_Map, but the catch is game variables are not loaded on the load screen, so you won't be able to load it there. (there's similar code there as there is in def name) You could save it on a variable that is loaded, like $Trainer (which is just called trainer on the load screen).
     
  • 20
    Posts
    5
    Years
    • Seen Jun 30, 2023
    By default the game does not process any of the in line commands except for \PN, a hard coded exception.
    you'll need to edit def name in Game_Map, but the catch is game variables are not loaded on the load screen, so you won't be able to load it there. (there's similar code there as there is in def name) You could save it on a variable that is loaded, like $Trainer (which is just called trainer on the load screen).

    I thought that might have been the case. I'm unsure how to edit the code in Game_Map, I've tried a few things but it it doesn't seem to do anything.

    Code:
    def name2
        ret=pbGetMessage(MessageTypes::MapNames,@map_id)
        ret.gsub!(/\\v[29]/,$game_variables) if $game_variables[29]
        return ret
      end

    This is the most recent thing I've tried, could you point out where I'm going wrong? And also thank you so much for replying in the first place!
     
  • 1,682
    Posts
    8
    Years
    • Seen today
    you are replacing \v[29] with the entire value of $game_variables. you forgot the [29].
    also, you got rid of the orginal replace, that changes \PN to the player's name. you can keep both, on after the other.
     
    Back
    Top