• 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!
  • 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 make a move that copies the user's typing?

Scraps The Man

Crystal Collector
  • 33
    Posts
    4
    Years
    • Seen Jun 19, 2024
    Hey I am wondering if there is an easy way to code a move that uses the typing of the user (as the user has different forms for all types).

    If you know anything and can help, that would be great!
     
    This piece of code changes the type of a move to the user's first type. Simply insert it into the class of your move. :)
    Code:
    def pbBaseType(user)
      ret = user.pbTypes[0]
      return ret
    end
     
    This piece of code changes the type of a move to the user's first type. Simply insert it into the class of your move. :)
    Code:
    def pbBaseType(user)
      ret = user.pbTypes[0]
      return ret
    end

    Thanks for the heads up. Sadly I am a bit too stupid and new to this to know where exactly to put the code and not break anything. If you have any idea on what to do there that would be appreciated. If you need ANY context I can totally provide it (like the move name I plan to use or the monster that may use it), other than that thanks again!
     
    Hey again, don't worry I'm happy to help. :)
    When you create a move in your PBS File "moves.txt" there is a lot to be defined. What every value exactly does is explained here(https://essentialsdocs.fandom.com/wiki/Defining_a_move).
    Code:
    757,SPECIATION,Speciation,[COLOR="Red"]195[/COLOR],0,NORMAL,Status,0,40,0,10,0,de,"The user changes its ability to a random ability."
    Right now the"195" is important for what you want to achieve. It's called the move's "function code" and it directly corresponds to the same number in the "Move_Effects_..." script sections. Note that this value is hexadecimal, meaning the numbers used arent [0,1,2,3,4,5,6,7,8,9] but instead [0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F]. In this script section each part of the code looks something like this:
    Spoiler:

    Also here a two version of your move(Don't forget to change the function codes to one's that fit your move):
    Spoiler:
     
    Last edited:
    Thanks so much! I seriously would have had so many troubles if you didn't swoop in and save me from hours of tedious move creations! <3
     
    Back
    Top