• 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] How to edit "Call"

  • 1
    Posts
    6
    Years
    • Seen Jan 2, 2021
    Hello!​

    Is it possible to make the shadow trainer call activate without needing the shadow type? I would like to switch the mechanic a bit and rename it to something like "morale".


    You know how in the pokemon anime trainers can tell their pokemon to dodge an attack? I want to make it so a pokemon's evasion increases until the end of the turn. However this lowers defense and sp. defense until the end of the turn aswell. If possible I would like to know which code I can edit and which I cannot.

    Thank you in advance!
     
    So by default, call only appears if it's both a trainer battle and you have shadow type defined in your PBS.
    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 does the checking is this line here.
    Code:
    shadowTrainer=(hasConst?(PBTypes,:SHADOW) && @battle.opponent)
    If we remove the hasConst?(PBTypes,:SHADOW), as well as the &&, because we no longer have two conditions to check, then it will allow call in regular trainer battles.
     
    Back
    Top