I'm trying to do a script that shows the Pokémon available on map. I have it loading the data in and showing correctly for the majority, but struggling to work out how to do forms.
The code I have currently. The print gives me :RATTATA_1
I only have the standard Rattata registered in the Pokédex, not the Alolan, which is form 1, but as you can see from the attachment, Rattata is in there twice, though with no icon and shows as seen when the form isn't.
The code I have currently. The print gives me :RATTATA_1
Code:
species=havespecies[i]
p species
# Show Pokémon icon
@sprites["icon#{i}"]=PokemonSpeciesIconSprite.new(species,@viewport)
@sprites["icon#{i}"].x=24+100*(i%ICONSPERROW)
@sprites["icon#{i}"].y=80+100*(i/ICONSPERROW).floor
if $Trainer.owned?(species)
@sprites["caught#{i}"].setBitmap("Graphics/Pictures/Custom/mapencounters-caught")
seen+=1; caught+=1
elsif $Trainer.seen?(species)
@sprites["caught#{i}"].setBitmap("Graphics/Pictures/Custom/mapencounters-notcaught")
seen+=1
else
@sprites["caught#{i}"].setBitmap("Graphics/Pictures/Custom/mapencounters-notcaught")
@sprites["icon#{i}"].tone=Tone.new(-255,-255,-255) # Blacked out
end
I only have the standard Rattata registered in the Pokédex, not the Alolan, which is form 1, but as you can see from the attachment, Rattata is in there twice, though with no icon and shows as seen when the form isn't.