# v19Showing icon based on form

This thread pertains to v19 of Pokémon Essentials.

#### Desbrina

##### Rookie
Member
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

Ruby:
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.

#### Attachments

• Screenshot 2021-05-03 at 18.53.18.png
156.4 KB · Views: 16
Solution
Hello again. I already replied to you on PokéCommunity, but just wondering if the encounter list UI script helped you solve this?

#### ThatWelshOne_

##### Eevee User
Member
Hello again. I already replied to you on PokéCommunity, but just wondering if the encounter list UI script helped you solve this?

#### Desbrina

##### Rookie
Member
It did, the params bit sorted it. Just need to go back and do some testing on an unmodified version as I’m seeing strange behaviour with forms

#### ThatWelshOne_

##### Eevee User
Member
It did, the params bit sorted it. Just need to go back and do some testing on an unmodified version as I’m seeing strange behaviour with forms
Great! Let me know if you need a hand with anything. Looks good so far from the screenshot you posted.

#### Desbrina

##### Rookie
Member
Thanks. It was working fine in v18 but due to the changes in encounters it no longer worked