• 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] Custom Move

ZYD

  • 2
    Posts
    4
    Years
    • Seen Aug 2, 2020
    I'm completely new when it comes to scripts (really the whole game making itself). I'm making my own pokemon and want it to have a special move. I want it to have a move called Shed Skin. I want Shed Skin to let the user change its types to any desired party pokemons. I have no idea how to write this. I've already made the move in "move.txt". Can anyone help me write it? Also, if there are any resources on scripts and how to read/write them that would be great.
     
    Sounds like a complicated move. I'd start by watching a video on creating new moves by a youtube channel called Thundaga (I can't post links yet, sorry) which gives a very basic rundown on how moves work. Also, make sure to read through the Pokemon Essentials Docs Wiki page on move creation. But basically, the effects of moves are stored in moves.txt as a three character code right after the move's display name. The code is referenced by the scripts in PokeBattle_MoveEffects, which actually contain the code for the moves. The move you describe doesn't sound like any move Pokemon has right now, though, so you may have to cobble together a script from a few different areas. I'd try practicing by messing with moves or abilities that already change the user or opponent's types, and perhaps looking into how the move can call the party screen, since the player would probably have to choose the party pokemon whose type is used, and then which type is used if the pokemon has two types.

    Edit: one thing I forgot to mention was that you should always keep an unedited version of Essentials in a folder somewhere so you can restore your game to default essentials if necessary, and to back up your game regularly.
     
    Last edited:
    Sounds like a complicated move. I'd start by watching a video on creating new moves by a youtube channel called Thundaga (I can't post links yet, sorry) which gives a very basic rundown on how moves work. Also, make sure to read through the Pokemon Essentials Docs Wiki page on move creation. But basically, the effects of moves are stored in moves.txt as a three character code right after the move's display name. The code is referenced by the scripts in PokeBattle_MoveEffects, which actually contain the code for the moves. The move you describe doesn't sound like any move Pokemon has right now, though, so you may have to cobble together a script from a few different areas. I'd try practicing by messing with moves or abilities that already change the user or opponent's types, and perhaps looking into how the move can call the party screen, since the player would probably have to choose the party pokemon whose type is used, and then which type is used if the pokemon has two types.

    Thank you so much for the advice. I will definitely watch the video and mess around with different moves. I was thinking the ability "protean" is the closest thing to Shed Skin and a good start point.
     
    This is pretty complicated because of the choosing aspect (the rest a basic tutorial should be fine for), but maybe this code for switching out a Pokemon can help you in choosing the Pokemon whose type will be copied (you'll still have to alter it a bit, and I'll bold the part you would probably need to change the most):
    Code:
      def pbSwitch(index,lax,cancancel)
        [email protected](index)
        [email protected]
        ret=-1
        # Fade out and hide all sprites
        visiblesprites=pbFadeOutAndHide(@sprites)
        pbShowWindow(BLANK)
        pbSetMessageMode(true)
        modparty=[]
        for i in 0...6
          modparty.push(party[partypos[i]])
        end
        scene=PokemonParty_Scene.new
        @switchscreen=PokemonPartyScreen.new(scene,modparty)
        @switchscreen.pbStartScene(_INTL("Choose a Pokémon."),
           @battle.doublebattle && [email protected])
        loop do
          scene.pbSetHelpText(_INTL("Choose a Pokémon."))
          [email protected]
          if cancancel && activecmd==-1
            ret=-1
            break
          end
          [B]if activecmd>=0
            commands=[]
            cmdShift=-1
            cmdSummary=-1
            pkmnindex=partypos[activecmd]
            commands[cmdShift=commands.length]=_INTL("Switch In") if !party[pkmnindex].isEgg?
            commands[cmdSummary=commands.length]=_INTL("Summary")
            commands[commands.length]=_INTL("Cancel")
            command=scene.pbShowCommands(_INTL("Do what with {1}?",party[pkmnindex].name),commands)
            if cmdShift>=0 && command==cmdShift
              canswitch=lax ? @battle.pbCanSwitchLax?(index,pkmnindex,true) :
                 @battle.pbCanSwitch?(index,pkmnindex,true)
              if canswitch
                ret=pkmnindex
                break
              end
            elsif cmdSummary>=0 && command==cmdSummary
              scene.pbSummary(activecmd)
            end
          end[/B]
        end
        @switchscreen.pbEndScene
        @switchscreen=nil
        pbShowWindow(BLANK)
        pbSetMessageMode(false)
        # back to main battle screen
        pbFadeInAndShow(@sprites,visiblesprites)
        return ret
      end
    Hopefully this helps in some way, but it would be much easier if you just had it copy the type of the last Pokemon in the party or something.
     
    Back
    Top