• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

[Custom Feature Question] in V18 how do you make Triple-Type Pokemon work? I could do it in the previous version

  • 413
    Posts
    5
    Years
    I've tried coding it myself in the new version, but trying to get all 3 Pokemon types to show up on the Pokemon Summary Screen or Pokemon PC crashes the game. All 3 Pokemon Types show up alright on the Pokedex screen, but it always shows "Normal" for the third type no matter what the third type actually is.
     
    Can you perhaps share the code that you modified? It's very hard to tell what is wrong without being able to see it. My guess is that the code is set to display a type but is defaulting to type 0/type 1.
     
    # Draw Pokémon type(s)
    type1rect = Rect.new(0,@pokemon.type1*28,64,28)
    type2rect = Rect.new(0,@pokemon.type2*28,64,28)
    type3rect = Rect.new(0,@pokemon.type3*28,64,28)
    if @[email protected]
    overlay.blt(402,146,@typebitmap.bitmap,type1rect)
    else
    overlay.blt(370,146,@typebitmap.bitmap,type1rect)
    overlay.blt(405,146,@typebitmap.bitmap,type2rect)
    end
    # Draw Exp bar
    if @pokemon.level<PBExperience.maxLevel
    w = @pokemon.expFraction*128
    w = ((w/2).round)*2
    pbDrawImagePositions(overlay,[
    ["Graphics/Pictures/Summary/overlay_exp",362,372,0,0,w,6]
    ])
    end
    end

    That's from PScreen_Summary
    this is from PokedexMain

    for i in 1...regionalSpecies.length
    nationalSpecies = regionalSpecies
    if pbCanAddForModeList?($PokemonGlobal.pokedexMode,nationalSpecies)
    form = $Trainer.formlastseen[nationalSpecies][1] || 0
    fspecies = pbGetFSpeciesFromForm(nationalSpecies,form)
    color = speciesData[fspecies][SpeciesColor] || 0
    type1 = speciesData[fspecies][SpeciesType1] || 0
    type2 = speciesData[fspecies][SpeciesType2] || type1
    type3 = speciesData[fspecies][SpeciesType3] || type1
    shape = speciesData[fspecies][SpeciesShape] || 0
    height = speciesData[fspecies][SpeciesHeight] || 1
    weight = speciesData[fspecies][SpeciesWeight] || 1
    shift = DEXES_WITH_OFFSETS.include?(region)
    dexlist.push([nationalSpecies,PBSpecies.getName(nationalSpecies),
    height,weight,i,shift,type1,type2,color,shape,type3])
    end
    end
    return dexlist
    end

    And for PokedexEntry

    # Show the owned icon
    imagepos.push(["Graphics/Pictures/Pokedex/icon_own",212,44])
    # Draw the type icon(s)
    type1 = speciesData[SpeciesType1] || 0
    type2 = speciesData[SpeciesType2] || type1
    type3 = speciesData[SpeciesType3] || 0
    type1rect = Rect.new(0,type1*32,96,32)
    type2rect = Rect.new(0,type2*32,96,32)
    type3rect = Rect.new(0,type3*32,96,32)
    overlay.blt(296,120,@typebitmap.bitmap,type1rect)
    overlay.blt(331,120,@typebitmap.bitmap,type2rect) if type1!=type2
    overlay.blt(366,120,@typebitmap.bitmap,type3rect) if type1!=type3
    else
    # Write the kind
    textpos.push([_INTL("????? Pokémon"),246,74,0,base,shadow])
    # Write the height and weight
    if pbGetCountry()==0xF4 # If the user is in the United States
    textpos.push([_INTL("???'??""),460,158,1,base,shadow])
    textpos.push([_INTL("????.? lbs."),494,190,1,base,shadow])
    else
    textpos.push([_INTL("????.? m"),470,158,1,base,shadow])
    textpos.push([_INTL("????.? kg"),482,190,1,base,shadow])
    end
    end

    edit: whoops, forgot about Battler_Initialize

    def pbInitBlank
    @name = ""
    @species = 0
    @form = 0
    @level = 0
    @hp = @totalhp = 0
    @type1 = @type2 = @type3 = 0
    @ability = 0
    @item = 0
    @gender = 0
    @attack = @defense = @spatk = @spdef = @speed = 0
    @status = PBStatuses::NONE
    @statusCount = 0
    @pokemon = nil
    @pokemonIndex = -1
    @participants = []
    @moves = []
    @iv = [0,0,0,0,0,0]
    end

    and here's the error message I get that crashes the game to desktop when I look at a Pokemon in the Pokemon Summary screen

    ---------------------------
    Pokemon Sunrise Pink
    ---------------------------
    [Pokémon Essentials version 18.1]

    Exception: NoMethodError

    Message: undefined method `*' for nil:NilClass



    Backtrace:

    PScreen_Summary:440:in `drawPageOne'

    PScreen_Summary:349:in `drawPage'

    PScreen_Summary:165:in `pbStartScene'

    PScreen_Summary:1315:in `pbStartScreen'

    PScreen_Party:639:in `pbSummary'

    PScreen_Party:1217:in `pbPokemonScreen'

    PScreen_Party:1114:in `loop'

    PScreen_Party:1323:in `pbPokemonScreen'

    PScreen_PauseMenu:178:in `pbStartPokemonMenu'

    PScreen_PauseMenu:175:in `pbFadeOutIn'



    This exception was logged in

    C:\Users\MYNAME\Saved Games\Pokemon Sunrise Pink\errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------
     
    Last edited:
    Back
    Top