• 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!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[v17] Adding new moves in FieldMoves

Rinkoou

Awful-Pun Master
  • 54
    Posts
    8
    Years
    Hi, I'm trying to add different moves that can cut trees, but it doesn't seem to work. In the Cut section of PField_FieldMoves I've tried stuff like this:
    Code:
    def Kernel.pbCut
      move = getID(PBMoves,:CUT,:SLASH,:LEAFBLADE,:NIGHTSLASH)
      movefinder = Kernel.pbCheckMove(move)
      if !pbCheckHiddenMoveBadge(BADGEFORCUT,false) || (!$DEBUG && !movefinder)
        Kernel.pbMessage(_INTL("A thorny tree blocks your way."))
        return false
      end
    and copied
    Code:
    ,:SLASH,:LEAFBLADE,:NIGHTSLASH
    behind every instense of
    Code:
    :CUT
    in this section, but it ends up crashing immediatly. Can someone help?
     
    Hi, I'm trying to add different moves that can cut trees, but it doesn't seem to work. In the Cut section of PField_FieldMoves I've tried stuff like this:
    Code:
    def Kernel.pbCut
      move = getID(PBMoves,:CUT,:SLASH,:LEAFBLADE,:NIGHTSLASH)
      movefinder = Kernel.pbCheckMove(move)
      if !pbCheckHiddenMoveBadge(BADGEFORCUT,false) || (!$DEBUG && !movefinder)
        Kernel.pbMessage(_INTL("A thorny tree blocks your way."))
        return false
      end
    and copied
    Code:
    ,:SLASH,:LEAFBLADE,:NIGHTSLASH
    behind every instense of
    Code:
    :CUT
    in this section, but it ends up crashing immediatly. Can someone help?

    Have a look at this tutorial. It explains it very well and it works too. Tried it myself
     
    The reason it crashes, is because getID only accepts 2 arguments, the Constant module to use (in this case, PBMoves) and the constant to check, which is usually a symbol. All getID does is change the symbol into a numerical constant. It does no other checks.

    The tutorial that Ego13 posted shows the correct applications to implement this, so I won't discuss this further.
     
    Thank you both so much! It originally didn't work for me, resulting in me posting about this issue, but I later found out I misplaced it.
     
    not to necropost, but I want to do this exact thing, and that tutorial link is dead, and there are no other posts about this, presumably because it was answered once upon a time, is there a chance it was saved somewhere else?
     
    Back
    Top