• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

[Scripting Question] Setting that changes location names in game

  • 38
    Posts
    9
    Years
    Hi, so i'm pretty new to RPG maker, but i'm having a blast learning all this stuff, and i'm making my own fan game now. I just have a quick question, i'm still figuring out what i'm going to name all the areas, and was wondering if I could say, make a setting or something similar to the RIVALNAMES one where you assign a name to a rival, so that if I decide to change the region name, for example, I just have to change it in the settings rather than going through every bit of text in the game?
     
    So I think you're basically asking for something like \PN? I'm sure that I've seen a thread around here that talk about creating new commands like that, but I don't remember the name right now so you'll have to try and search. (I did find this one that shows what you would need to do to make the command work for maps—see the OP for the context around the code I quoted).
     
    You can create something like \RN by adding code similar to the code that allows the use of \PN, assuming you have already stored the rival's name in the game variable defined by RIVAL1. Just add the following lines:

    1. Under the Game_Map section, around line 95:
    Code:
    ret.gsub!(/\\RN/,pbGet(:RIVAL1)) # Add this above
    ret.gsub!(/\\PN/,$Trainer.name) if $Trainer # Find this

    2. Under the Messages section, around line 867:
    Code:
    map.gsub!(/\\RN/,pbGet(:RIVAL1)) # Add this above
    map.gsub!(/\\PN/,$Trainer.name) if $Trainer # Find this
     
    Last edited:
    Back
    Top