LegendResearcher88
aka TheRedeemedGamer
- 4
- Posts
- 4
- Years
- Seen Nov 8, 2023
Any plan to update this to be compatible with v19?
I will update any script (from me) what isn't working with V19 (but I probably wait a little for 19.1).Any plan to update this to be compatible with v19?
I will update any script (from me) what isn't working with V19 (but I probably wait a little for 19.1).
So, this is working?
I updated the main post.Any plan to update this to be compatible with v19?
#===============================================================================
# * Roaming Icon - by FL (Credits will be apreciated)
#===============================================================================
#
# This script is for Pokémon Essentials. It displays icons on map for roaming
# pokémon.
#
#===============================================================================
#
# To this script works, put it above main. On script section PScreen_RegionMap,
# add line 'drawRoamingPosition(mapindex)' before line
# 'if playerpos && mapindex==playerpos[0]'. For each roaming pokémon icon, put
# an image on "Graphics/Pictures/mapPokemonXXX.png" changing XXX for species
# number, where "Graphics/Pictures/mapPokemon000.png" is the default one.
#
#===============================================================================
class PokemonRegionMap_Scene
def drawRoamingPosition(mapindex)
for roamPos in $PokemonGlobal.roamPosition
roamingData = RoamingSpecies[roamPos[0]]
active = $game_switches[roamingData[2]] && (
$PokemonGlobal.roamPokemon.size <= roamPos[0] ||
$PokemonGlobal.roamPokemon[roamPos[0]]!=true
)
next if !active
species=getID(PBSpecies,roamingData[0])
next if !species || species<=0
pokepos = $game_map ? pbGetMetadata(roamPos[1],MetadataMapPosition) : nil
next if mapindex!=pokepos[0]
x = pokepos[1]
y = pokepos[2]
@sprites["roaming#{species}"] = IconSprite.new(0,0,@viewport)
@sprites["roaming#{species}"].setBitmap(getRoamingIcon(species))
@sprites["roaming#{species}"].x = -SQUAREWIDTH/2+(x*SQUAREWIDTH)+(
Graphics.width-@sprites["map"].bitmap.width
)/2
@sprites["roaming#{species}"].y = -SQUAREHEIGHT/2+(y*SQUAREHEIGHT)+(
Graphics.height-@sprites["map"].bitmap.height
)/2
end
end
def getRoamingIcon(species)
return nil if !species
fileName = sprintf("Graphics/Pictures/mapPokemon%03d", species)
ret = pbResolveBitmap(fileName)
if !ret
fileName = "Graphics/Pictures/mapPokemon000"
ret = pbResolveBitmap(fileName)
end
return ret
end
end
Script updated to support forms!The icons don't show up for any Roaming Pokémon with different forms (for example, the Galarian Legendary Birds' icons don't show up on the map (they work just fine in terms of gameplay)).
Thanks! I added to the thread. According to bulbapedia, there wasn't more roamers (but bulbapedia doesn't mention Enamorus).Enamorus one! :)
Credit me if used.
Also lemme know if we have more pokémons that use that mechanic (since gen 8).
Cya!
View attachment 156315
I made her BC we already made Landorus (non-roamer as well), just to have all force of Nature pokes. HahaThanks! I added to the thread. According to bulbapedia, there wasn't more roamers (but bulbapedia doesn't mention Enamorus).
I tested here in v20.1 and it is working.Hello, I am using PE 20.1 and the icons are not appearing on the map, even though I followed the installation steps in the script. Do you have any idea where this could be coming from?
Do you think the issue could be related to the fact that I'm using 4 regions?I tested here in v20.1 and it is working.
- If you converted it into a plugin, make sure that it was compiled and correctly converted.
- Make sure that the graphics and his folder have the right names. I suggest testing with the examples.
- Make sure that the roaming pokémon were enabled (you can easily check in debug).
- Make sure that you pasted the line in the right place.
- If nothing works, test in a vanilla v20.1, maybe is something in your project interfering.
I tested now, the script work with other regions. You can find the roaming pokémon in these regions?Do you think the issue could be related to the fact that I'm using 4 regions?
Yes, the Pokémon in question are findable/capturable. Here's the list of plugins I'm using with PE 20.1. Please let me know if you have any compatibility concerns with any of these or if you know of any. Thank you in advance for your help and your work:I tested now, the script work with other regions. You can find the roaming pokémon in these regions?
By name, no one looks like it was changing the map system.Yes, the Pokémon in question are findable/capturable. Here's the list of plugins I'm using with PE 20.1. Please let me know if you have any compatibility concerns with any of these or if you know of any. Thank you in advance for your help and your work:
Spoiler: Plugin list
- Alphabetized Bag
- Auto Multi Save
- Automatic Level Scaling
- Bag Screen with interactable Party
- Battle Card
- Berrypots
- BW Gender Selector
- BW Key Items
- BW Party Screen
- BW Storage System
- BW Summary Screen
- BW TEXTENTRY
- Charms Case
- Day-Care Checker Item
- DiegoWT's Starter Selection
- Easy Mouse System
- Egg Sprite per Group
- Encounter List UI
- Enhanced UI
- Essentials Deluxe
- Fly Animation
- Following Pokemon EX
- Generation 8 Pack Scripts
- Generation 9 Pack Script
- Improved Field Skills
- Improved Item Text
- Improved Mementos
- Infinite Save Backups (Auto Multi Save Dependency) v1.0
- Item Crafting UI Plus
- Level Based Mixed EV System and Allocator
- Lin's HGSS Options Screen
- Lin's Pokegear Themes
- Location Signposts
- Mining Game Mouse
- MQS
- Overworld Shadows EX
- Roulette Minigame
- Prize Wheels
- Pokeblocks
- Pokemon Amie
- Pokemon Contests
- rainefallUtils
- Speed Up 2.0
- TDW Berry Core and Dex
- Terastal Phenomenon
- Terrain Tag Side Stairs
- Trade With Friends
- Type Quiz
- Unown Report
- v20.1 Hotfixes
- Voltseon's Overworld Encounters
- Voltseon's Pause Menu
- Pokegear Watch
- Unreal Time System
- Wall Clock
- Wonder Trade
- ZUD Mechanics
Thank you very much for your help, the issue was with the use of the plugin: Lin's Pokegear Themes, it was just necessary to integrate your function into it. Everything is functional now!By name, no one looks like it was changing the map system.
If you have a code editor (like Atom, VS Code and Notepad++) you can make sure. Search for 'class PokemonRegionMap_Scene' (you can search at all files once, opening the folder and using the editor global Ctrl+F, the command is Ctrl+Shif+F for VS Code). If this piece of code was found, some script redefines something in the map. If the scripts redefines pbStartScene (the 'def pbStartScene' was inside of class PokemonRegionMap_Scene) doing this script instructions (pasting 'draw_roaming_position(mapindex)' in the right spot) may make the script compatible.
After the last `end` in my script, addAny way to make it be shown in the Pokedex instead of townmaps?
class PokemonRegionMap_Scene
def self.refresh_pokedex(sprites, visible)
icon_index = 0
loop do
break if !sprites["roaming#{icon_index}"]
sprites["roaming#{icon_index}"].visible = visible
icon_index+=1
end
end
def self.draw_roaming_position2(sprites, viewport, mapindex)
icon_index = 0
for roam_pos in $PokemonGlobal.roamPosition
active = $game_switches[Settings::ROAMING_SPECIES[roam_pos[0]][2]] && (
$PokemonGlobal.roamPokemon.size <= roam_pos[0] ||
$PokemonGlobal.roamPokemon[roam_pos[0]]!=true
)
next if !active
roam_town_map_pos = GameData::MapMetadata.try_get(
roam_pos[1]
)&.town_map_position
next if mapindex!=roam_town_map_pos&.[](0)
x = roam_town_map_pos[1]
y = roam_town_map_pos[2]
sprites["roaming#{icon_index}"] = IconSprite.new(0,0,viewport)
sprites["roaming#{icon_index}"].setBitmap(
get_roaming_icon2(Settings::ROAMING_SPECIES[roam_pos[0]][0])
)
sprites["roaming#{icon_index}"].x = -SQUARE_WIDTH/2+(x*SQUARE_WIDTH)+(
Graphics.width-sprites["areamap"].bitmap.width
)/2
sprites["roaming#{icon_index}"].y = -SQUARE_HEIGHT/2+(y*SQUARE_HEIGHT)+(
Graphics.height-sprites["areamap"].bitmap.height
)/2
icon_index+=1
end
end
def self.get_roaming_icon2(species)
species_data = GameData::Species.try_get(species)
return nil if !species_data
path = "Graphics/Pokemon/Map icons/"
if species_data.form > 0
ret = pbResolveBitmap(
sprintf("%s%s_%d",path, species_data.species, species_data.form)
)
return ret if ret
end
ret = pbResolveBitmap(sprintf("%s%s", path, species_data.species))
return ret if ret
return pbResolveBitmap(path+"000")
end
end
@sprites["areahighlight"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
PokemonRegionMap_Scene.draw_roaming_position2(@sprites,@viewport,@region)
overlay.clear
PokemonRegionMap_Scene.refresh_pokedex(@sprites, @page == 2)
Fixed. Thanks!Also found a "glitch" I think.
When flip a switch for the "Roaming" encounter, and I open the Pokegear's Town map before changing map, so that the roaming encounter updates, my game crashes.
If I wait with opening the town map til after I've changed map once it works.
I haven't converted it into a plugin or any of the sorts.
Hey Fl. Thanks alot, I updated the script. and did the changes you've done, the image shows in the Pokedex as I want, but the "Area unknown" text is still in the middle of the screen is there a way to remove that?After the last `end` in my script, add
Code:class PokemonRegionMap_Scene def self.refresh_pokedex(sprites, visible) icon_index = 0 loop do break if !sprites["roaming#{icon_index}"] sprites["roaming#{icon_index}"].visible = visible icon_index+=1 end end def self.draw_roaming_position2(sprites, viewport, mapindex) icon_index = 0 for roam_pos in $PokemonGlobal.roamPosition active = $game_switches[Settings::ROAMING_SPECIES[roam_pos[0]][2]] && ( $PokemonGlobal.roamPokemon.size <= roam_pos[0] || $PokemonGlobal.roamPokemon[roam_pos[0]]!=true ) next if !active roam_town_map_pos = GameData::MapMetadata.try_get( roam_pos[1] )&.town_map_position next if mapindex!=roam_town_map_pos&.[](0) x = roam_town_map_pos[1] y = roam_town_map_pos[2] sprites["roaming#{icon_index}"] = IconSprite.new(0,0,viewport) sprites["roaming#{icon_index}"].setBitmap( get_roaming_icon2(Settings::ROAMING_SPECIES[roam_pos[0]][0]) ) sprites["roaming#{icon_index}"].x = -SQUARE_WIDTH/2+(x*SQUARE_WIDTH)+( Graphics.width-sprites["areamap"].bitmap.width )/2 sprites["roaming#{icon_index}"].y = -SQUARE_HEIGHT/2+(y*SQUARE_HEIGHT)+( Graphics.height-sprites["areamap"].bitmap.height )/2 icon_index+=1 end end def self.get_roaming_icon2(species) species_data = GameData::Species.try_get(species) return nil if !species_data path = "Graphics/Pokemon/Map icons/" if species_data.form > 0 ret = pbResolveBitmap( sprintf("%s%s_%d",path, species_data.species, species_data.form) ) return ret if ret end ret = pbResolveBitmap(sprintf("%s%s", path, species_data.species)) return ret if ret return pbResolveBitmap(path+"000") end end
Then, in UI Pokédex Entry, before line
addCode:@sprites["areahighlight"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
Code:PokemonRegionMap_Scene.draw_roaming_position2(@sprites,@viewport,@region)
After line
add lineCode:overlay.clear
.Code:PokemonRegionMap_Scene.refresh_pokedex(@sprites, @page == 2)
Fixed. Thanks!