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

[Scripting Question] Replace "call" with "run" in Trainer battles

  • 15
    Posts
    7
    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:
  • 1,682
    Posts
    8
    Years
    • Seen yesterday
    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)
     
  • 15
    Posts
    7
    Years
    • Seen Aug 29, 2020
    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