• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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] Changing how Multitype works

Arkadious

Developer of Fragmentum
  • 50
    Posts
    9
    Years
    Hello everyone, just a quick problem I was hoping someone would be able to please help me fix. I'm trying to change Multitype to work that it changes Arceus's type also when it is holding a Z-Crystal like in the Generation VII games.

    Currently I've got the code for Multitype set up in Pokemon_Forms like this:
    Code:
    MultipleForms.register(:ARCEUS,{
    "getForm"=>proc{|pokemon|
       next 1  if isConst?(pokemon.item,PBItems,:FISTPLATE,:FIGHTINIUMZ)
       next 2  if isConst?(pokemon.item,PBItems,:SKYPLATE,:FLYINIUMZ)
       next 3  if isConst?(pokemon.item,PBItems,:TOXICPLATE,:POISONIUMZ)
       next 4  if isConst?(pokemon.item,PBItems,:EARTHPLATE,:GROUNDIUMZ)
       next 5  if isConst?(pokemon.item,PBItems,:STONEPLATE,:ROCKIUMZ)
       next 6  if isConst?(pokemon.item,PBItems,:INSECTPLATE,:BUGINIUMZ)
       next 7  if isConst?(pokemon.item,PBItems,:SPOOKYPLATE,:GHOSTIUMZ)
       next 8  if isConst?(pokemon.item,PBItems,:IRONPLATE,IRONIUMZ)
       next 10 if isConst?(pokemon.item,PBItems,:FLAMEPLATE,FIRIUMZ)
       next 11 if isConst?(pokemon.item,PBItems,:SPLASHPLATE,:WATERIUMZ)
       next 12 if isConst?(pokemon.item,PBItems,:MEADOWPLATE,:GRASSIUMZ)
       next 13 if isConst?(pokemon.item,PBItems,:ZAPPLATE,:ELECTRIUMZ)
       next 14 if isConst?(pokemon.item,PBItems,:MINDPLATE,:PSYCHIUMZ)
       next 15 if isConst?(pokemon.item,PBItems,:ICICLEPLATE,:ICIUMZ)
       next 16 if isConst?(pokemon.item,PBItems,:DRACOPLATE,:DRAGONIUMZ)
       next 17 if isConst?(pokemon.item,PBItems,:DREADPLATE,:DARKINIUMZ)
       next 18 if isConst?(pokemon.item,PBItems,:PIXIEPLATE,:FAIRIUMZ)
       next 19 if isConst?(pokemon.item,PBItems,:SHADOWPLATE,:SHADOWIUMZ)
       next 20 if isConst?(pokemon.item,PBItems,:VOIDPLATE,:VOIDIUMZ)
       next 0
    }
    })
    It's giving me this argument error but I'm not sure what exactly needs changing:
    Code:
    [Pokémon Essentials version 17.1]
    Exception: ArgumentError
    Message: wrong number of arguments(4 for 3)
    Pokemon_Forms:369:in `isConst?'
    Pokemon_Forms:369
    Pokemon_Forms:368:in `call'
    Pokemon_Forms:95:in `call'
    Pokemon_Forms:7:in `form'
    Pokemon_Forms:28:in `fSpecies'
    PokeBattle_Pokemon:848:in `baseStats'
    PokeBattle_Pokemon:884:in `calcStats'
    Pokemon_Forms:18:in `form='
    Debug_Pokemon:491:in `pbPokemonDebugActions'
    Should I change the last part to an array of some sort? This will probably be my last custom scripts question for a long while. As always, any help is appreciated. Thanks.

    Edit: I guess I could just do the same line twice in Pokemon_Forms; one with item that's already there, and the one I want to add, but surely there must be an easier way?
     
    Last edited:
    Nevermind, I got what I wanted it to do the long way by individually writing a new line for each Z-Crystal.
     
    Have you tried this?

    next 1 if isConst?(pokemon.item,PBItems,:FISTPLATE) || isConst?(pokemon.item,PBItems,:FIGHTINIUMZ)
     
    Last edited:
    Back
    Top