- 143
- Posts
- 11
- Years
- Seen Jun 11, 2021
I'm aware that roaming legendaries can be frustrating, so I figured I'd add this feature to make them a little more bearable. Basically, I want the active legendaries to be viewed on the map whenever their switch is active and their view to go away upon capture or defeat. Not only that, but I'd also like the icons to be different to identify each legendary depending on their species. I've tried to code this myself, but it didn't work out too well.
This code was added in PScreen_RegionMap around line 154:
And this method was added in PSystem_Utilities under the method pbPlayerHeadFile:
This code was added in PScreen_RegionMap around line 154:
Code:
curmap=$PokemonGlobal.roamPosition[i]
@sprites["roamer"]=IconSprite.new(0,0,@viewport)
@sprites["roamer"].setBitmap(pbPokemonHeadFile($Trainer.trainertype))
@sprites["roamer"].x=-SQUAREWIDTH/2+(@mapX*SQUAREWIDTH)+(Graphics.width-@sprites["map"].bitmap.width)/2
@sprites["roamer"].y=-SQUAREHEIGHT/2+(@mapY*SQUAREHEIGHT)+(Graphics.height-@sprites["map"].bitmap.height)/2
And this method was added in PSystem_Utilities under the method pbPlayerHeadFile:
Code:
def pbPokemonHeadFile(species)
species=getID(PBSpecies,RoamingSpecies[i][0])
return nil if !species
bitmapFileName=sprintf("Graphics/Pictures/mapPokemon%s",getConstantName(PBSpecies,species)) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName=sprintf("Graphics/Pictures/mapPokemon001")
end
return bitmapFileName
end