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

Adding a new form to pokemon

  • 12
    Posts
    8
    Years
    • Seen May 25, 2021
    Basically I want to include a type in my game called Corrupted. In the Corrupted form, the pokemon loses its primary typing and it is replaced with Corruption typing. These pokemon will not be wild and will only be used by certain NPCs in the game, as well as having their own sprites. Any ideas on how I would go about setting this up?
     
  • 59
    Posts
    8
    Years
    • Seen Aug 9, 2020
    Basically I want to include a type in my game called Corrupted. In the Corrupted form, the pokemon loses its primary typing and it is replaced with Corruption typing. These pokemon will not be wild and will only be used by certain NPCs in the game, as well as having their own sprites. Any ideas on how I would go about setting this up?

    If there is a simpler way, I don't know, but you should manually make one new form for every Pokemon that you plan the trainers to use. See the MultiplesForms script for help. Check Castform for a change in typing, Deoxys for a BST and movelist change, Giratina for ability and... that's it.
     
  • 824
    Posts
    9
    Years
    A few questions:
    1.) Is Corruption type added to the PBS file types.txt?
    2.) You said "loses its primary typing"? Does that mean it keeps it's secondary type? For example, Corrupted Gallade, would he be Corruption/Fighting or pure Corruption?
    3.) Are you also planning to have Shadow Pokemon in addition to Corrupted Pokemon?
     
  • 76
    Posts
    8
    Years
    • Seen Oct 6, 2017
    It's funny this is asked. I have the exact same thing in my game, except for the fact that mine is called Tainted Pokémon.

    You can see a question I posted here about adding an icon to Pokémon.

    What I did is I added a whole new Pokémon in pokemon.txt, and I didn't create a type for it. For the graphics, I just changed the hue of the Pokémon I wanted to make "Tainted".

    Examples:
    Spoiler:

    Hope this helped!
     
  • 12
    Posts
    8
    Years
    • Seen May 25, 2021
    A few questions:
    1.) Is Corruption type added to the PBS file types.txt?
    2.) You said "loses its primary typing"? Does that mean it keeps it's secondary type? For example, Corrupted Gallade, would he be Corruption/Fighting or pure Corruption?
    3.) Are you also planning to have Shadow Pokemon in addition to Corrupted Pokemon?

    The corruption typing is added to the typex.txt
    Yes for example Gallade would be Corruption/Fighting
    I do not plan to have Shadow Pokemon
     
    Last edited:
  • 824
    Posts
    9
    Years
    Okay, then:

    1.) In PokeBattle_Pokemon, find this line. Add the red line below it:
    Code:
      attr_accessor(:shinyflag)   # Forces the shininess (true/false)
    [COLOR="Red"]  attr_accessor(:corruptflag)   # Forces the corruption (true/false)[/COLOR]

    2.) Add this code within PokeBattle_Pokemon:
    Code:
    ################################################################################
    # Corruption
    ################################################################################
      def isCorrupted?
        return @corruptflag if @corruptflag!=nil
        return false
      end
      
      def makeCorrupt
        @corruptflag=true
      end
      
      def makeNotCorrupt
        @corruptflag=false
      end

    3.) Find the following code and add in the red line:
    Code:
    # Returns this Pokémon's first type.
      def type1
        [COLOR="Red"]return getConst(PBTypes,:CORRUPTION) if self.isCorrupt?[/COLOR]
        dexdata=pbOpenDexData
        pbDexDataOffset(dexdata,@species,8)
        ret=dexdata.fgetb
        dexdata.close
        return ret
      end

    4.) Next up, move to the script section PTrainer_NPCTrainers. Find this code, and REMOVE the red part:
    Code:
          if poke[TPSHADOW]   # if this is a Shadow Pokémon
            pokemon.makeShadow[COLOR="Red"] rescue nil
            pokemon.pbUpdateShadowMoves(true) rescue nil
            pokemon.makeNotShiny[/COLOR]
          end
    Then change the line that reads "pokemon.makeShadow" so that it instead reads "pokemon.makeCorrupt".

    5.) Now, move to the script section PSystem_Utilities and find the function "def pbLoadPokemonBitmapSpecies(". In it, there's two instances of "pokemon.isShadow?". Change both to "pokemon.isCorrupt?".

    6.) Find the function "def pbCheckPokemonBitmapFiles(". There are two instances of
    Code:
    tshadow ? "_shadow" : ""
    .
    Change both to
    Code:
    tshadow ? "_corrupt" : ""
    .
    LEAVE ANY OTHER REFERENCES TO SHADOW POKEMON AS THEY ARE.

    7.) Find the function "def pbPokemonIconFile(". There's one instance of "pokemon.isShadow?". Change it to "pokemon.isCorrupt?"

    8.) Find the function "def pbCheckPokemonIconFiles(". There's two instances of
    Code:
    tshadow ? "_shadow" : ""
    .
    Change both to
    Code:
    tshadow ? "_corrupt" : ""
    .
    LEAVE ANY OTHER REFERENCES TO SHADOW POKEMON AS THEY ARE.





    Now, you can make a sprite for a Corrupted Pokemon the same way Essentials has sprites for Shadow Pokemon. For example, the sprite for a Corrupted Gallade would be labelled "475_corrupt". The icon for a Corrupted Gallade would be "icon475_corrupt".

    You can make any trainer's Pokemon Corrupt the same way Pokemon become Shadow, by putting the word "corrupt" in a certain place in the trainers.txt PBS file.

    The Pokemon's first type is replaced with the Corruption type (assuming that you made its internal name CORRUPTION.



    ...and this took hours to type. Mostly because my girlfriend kept distracting me with errands.
     
  • 12
    Posts
    8
    Years
    • Seen May 25, 2021
    Wow man this is actually really helpful. I am really thankful for this. Adding your name to the special thanks area of my credits ^^. I didnt actually expect you to go and write the code. I owe you big time man
     
  • 824
    Posts
    9
    Years
    Wow man this is actually really helpful. I am really thankful for this. Adding your name to the special thanks area of my credits ^^. I didnt actually expect you to go and write the code. I owe you big time man

    You're welcome. I did a similar thing in my own game to avoid writing stuff for every single Pokemon in the Multiple Forms section when I included Delta Pokemon.
     
  • 12
    Posts
    8
    Years
    • Seen May 25, 2021
    Ok. I dont know if this has to do with scripting or not. Corrupt pokemon are immune to Fairy type moves. Whenever I use a Fairy type move against a Corrupt pokemon I get this error

    Spoiler:

    The game doesnt crash, and the Fairy move doesnt do damage. The battle continues after closing the error message. However there is no "It didnt affect ____" message.Any ideas on how to fix this?

    Also the sprite is not showing up. Does this have something to do with EBS? Ive been thinking about pulling it and more and more things seem to point towards making this so much simpler without it
     
    Last edited by a moderator:
    Back
    Top