• 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.

Alternate name for Mega Ring to be used by opposing Trainers

rigbycwts

Hmm, hmm.
98
Posts
11
Years
    • Seen Feb 22, 2019
    This works similar to the dialogues in the sixth gen games, when a NPC Trainer Mega Evolves his/her Pokemon, the text displayed has a different name for the Mega Ring (e.g. Maxie's Mega Glasses, Archie's Mega Anchor). The only script that will be edited is PokeBattle_Battle.
    Credit would be appreciated.

    First, change line 1606 to:
    Code:
    ownername=pbGetOwner(index).name

    Below this line:
    Code:
    pbDisplay(_INTL("{1}",@battlers[index].getMegaMessage(pbGetOwner(index))))
    add one or more of these conditions (Note - add more trainer types by adding elsif):
    Code:
    elsif pbGetOwner(index).trainertype == 62 # Magma Leader
          pbDisplay(_INTL("{1}'s {2} is reacting to {3}'s Mega Glasses!",
             @battlers[index].pbThis,
             PBItems.getName(@battlers[index].item),
             ownername))
        else
           pbDisplay(_INTL("{1}'s {2} is reacting to {3}'s Mega Ring!",
            @battlers[index].pbThis,
            PBItems.getName(@battlers[index].item),
            ownername))
        end
    In this example, 62 is the trainer type ID (check the PBS files for these) of the trainer type "Magma Leader."
     
    Last edited:

    rigbycwts

    Hmm, hmm.
    98
    Posts
    11
    Years
    • Seen Feb 22, 2019
    Updated the script so that it uses trainer type IDs instead of the actual trainer names.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    This bit of code is deprecated as of Essentials v16. Search for "Mega Net" and you'll find an example of how to add in custom Mega objects.
     
    Back
    Top