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

[v17] Adding new moves in FieldMoves

Rinkoou

Awful-Pun Master
54
Posts
7
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?
 

Ego13

hollow_ego
311
Posts
6
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?

Have a look at this tutorial. It explains it very well and it works too. Tried it myself
 
1,680
Posts
8
Years
  • Age 24
  • Seen yesterday
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.
 

Rinkoou

Awful-Pun Master
54
Posts
7
Years
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.
 
4
Posts
4
Years
  • Age 30
  • Seen Sep 17, 2019
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