• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • 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] Replace "call" with "run" in Trainer battles

  • 15
    Posts
    8
    Years
    • Seen Aug 29, 2020
    Hello.
    Not sure how it happened, but I recently realised that during trainer battles, instead of having the "run" button, there's a "call" button instead, which randomly boosts one of the Pokémon's stats.
    I looked around a bit online, and I learnt it had something to do with the Shadow Pokémon, so I dug around in the scripts but couldn't figure out how to revert this.

    If you know how to do this, that would be brilliant!
    (this is version 17 btw, in case this helps anyone!)
     
    Last edited:
    Okay, so the reason this happens is because you have the Shadow type defined in your types.txt PBS file.
    Removing that prevents the call button from appearing because call is set here in PokeBattle_Scene
    Code:
    def pbCommandMenu(index)
        shadowTrainer=(hasConst?(PBTypes,:SHADOW) && @battle.opponent)
        ret=pbCommandMenuEx(index,[
           _INTL("What will\n{1} do?",@battle.battlers[index].name),
           _INTL("Fight"),
           _INTL("Bag"),
           _INTL("Pokémon"),
           shadowTrainer ? _INTL("Call") : _INTL("Run")
        ],(shadowTrainer ? 1 : 0))
        ret=4 if ret==3 && shadowTrainer   # Convert "Run" to "Call"
        return ret
      end

    The bit that really does the checking is this line here
    Code:
    shadowTrainer=(hasConst?(PBTypes,:SHADOW) && @battle.opponent)
    If you have Shadow type defined and it's a trainer battle, put call as an option.

    (If you make shadowTrainer=false, it will never make call appear, but that's not always a good idea if you actually use shadow pokemon)
     
    Oh brilliant! Thank you very much - I don't plan on having shadow Pokémon as that kind of feature, so I just wanted to get rid of it.
    Thank you :)
     
    Back
    Top