- 239
- Posts
- 9
- Years
- Seen Apr 17, 2025
[Pokeemerald] DexNav & Detector Mode
This adds a simplified DexNav including search and detector modes into pokeemerald. Open the GUI to view your pokedex progress on the current map and search for a specific pokemon, or if the detector mode is enabled, hidden pokemon may pop up out of the grass as you pass!
I've also added a creeping feature! If you are in search mode (from either manual or detection) and hold A, the player will walk at a slow speed. You must creep towards the rustling grass/cave dust/water ripple within 2 tiles, or the pokemon will flee! The distinction is best shown in the grass search mode GIF below.
DexNav Search Mode:
Detector Mode: Hidden Wild Encounters
Here is the repo. Details on adding the branch to your project at the bottom of the post.
Important Info:
Customizable Options: include/dexnav.h
GUI/Search Mode Info:
Detector Mode Info:
Other Info:
How To Add:
Known Bugs:
Credits:
This adds a simplified DexNav including search and detector modes into pokeemerald. Open the GUI to view your pokedex progress on the current map and search for a specific pokemon, or if the detector mode is enabled, hidden pokemon may pop up out of the grass as you pass!
I've also added a creeping feature! If you are in search mode (from either manual or detection) and hold A, the player will walk at a slow speed. You must creep towards the rustling grass/cave dust/water ripple within 2 tiles, or the pokemon will flee! The distinction is best shown in the grass search mode GIF below.
DexNav Search Mode:
![[PokeCommunity.com] DexNav (with Detector Mode!) [PokeCommunity.com] DexNav (with Detector Mode!)](https://i.imgur.com/dsf4ksv.gif)
![[PokeCommunity.com] DexNav (with Detector Mode!) [PokeCommunity.com] DexNav (with Detector Mode!)](https://i.imgur.com/0o2ngo5.gif)
![[PokeCommunity.com] DexNav (with Detector Mode!) [PokeCommunity.com] DexNav (with Detector Mode!)](https://i.imgur.com/T0uNU0h.gif)
Detector Mode: Hidden Wild Encounters
![[PokeCommunity.com] DexNav (with Detector Mode!) [PokeCommunity.com] DexNav (with Detector Mode!)](https://i.imgur.com/3umOuT8.gif)
Here is the repo. Details on adding the branch to your project at the bottom of the post.
Important Info:
- A dexNavSearchLevels field has been added to saveblock1. It requires a byte per pokemon, so by default there is not enough space in any saveblock for such a large structure. See this post for freeing up some space
- Press START at any time to cancel a search. I wish I could have fit this on the search window, but space was scarce
Customizable Options: include/dexnav.h
- DEXNAV_TIMEOUT - number of seconds until the pokemon will flee
- SNEAKING_PROXIMITY - the player must be walking or creeping within this number of tiles. Running/Biking will cause the pokemon to flee
- CREEPING_PROXIMITY - the player must be creeping within this number of tiles or the pokemon will flee
- MAX_PROXIMITY - if the player moves this number of tiles away, the hidden pokemon will run away
- HIDDEN_MON_STEP_COUNT - number of steps until a hidden pokemon may appear
- HIDDEN_MON_SEARCH_RATE - percent chance of any hidden pokemon appearing after X steps
- HIDDEN_MON_PROBABILTY - probability of the detected pokemon being hidden-exclusive
- Search Bonus Probabilities - see dexnav wiki
GUI/Search Mode Info:
- The GUI is by default added to the start menu when FLAG_SYS_DEXNAV_GET is set. No poketools submenus or anything. Run DexNavGuiInit with a callback argument to access from elsewhere.
- In the GUI, press "R" on a pokemon to register it to VAR_DEXNAV_SPECIES. Pressing "R" in the overworld will then perform a search for that species, if they are to be found on the map
- FLAG_SYS_DEXNAV_SEARCH is set when searching is in progress. You do NOT need to manually toggle this flag
- A Pokeball icon will appear in the corner of each GUI environment when you have caught all of the unique species in the area
- You can search for a pokemon when you've seen it in any battle. More bonuses are possible when the species is caught, however.
- Search levels increment after any encounter, capping at 255.
Detector Mode Info:
- The three species at the bottom of the GUI are for hidden pokemon. These are map specific.
- Adding hidden mons:
Spoiler:- Open porymap. Press "Configure JSON" in the top right:
Spoiler: - Select "Add new field" and label it "hidden_mons":
Spoiler: - Right click on "hidden_mons" to add a new set of encounter data to it.
- Set "Encounter Rate" to 1 if the hidden pokemon are to appear in the water. Set it to 0 otherwise. The encounter rate is handled separately. This was done to reduce the number of additional parameters per map.
- Set species, min/max data as normal. The encounter chances are still used to load the wild pokemon index. So you could have a 1% chance of finding a super rare hidden pokemon, for example.
- If no hidden_mons data exists, the pointer will default to NULL, and no detector mode functionality will be allowed on the map.
- Open porymap. Press "Configure JSON" in the top right:
- Detector mode is inaccessible until FLAG_SYS_DETECTOR_MODE is manually set. Until then, ?? icons will appear on the GUI even if the hidden pokemon species has been seen/caught.
- VAR_DEXNAV_STEP_COUNTER is a step counter for finding hidden species. You do not need to manually access this variable
- Detector mode will only work if there is hidden_mons data on the map, even though detector mode works with the regular encounter data. This is to prevent any extra CPU usage on maps we don't want them on, as there can sometimes be a brief lag while searching (you can change if (++attempts > 20) in TryFindHiddenPokemon if this is a problem)
- An exclamation mark appears inside the search icon window if the detected pokemon is a hidden-exclusive pokemon
Other Info:
- DexNav Chaining - using either detector mode or search mode to either kill or capture species increases the chain value. The current chain is shown in the bottom right of the search window. It increases the chances of the hidden pokemon being shiny.
How To Add:
- git remote add ghoul https://github.com/ghoulslash/pokeemerald
- git pull ghoul dexnav
- sort out any merge conflicts:
Spoiler:Code:<<<<<<< HEAD Changes on your working version (the branch that is being merged into) ======= Changes from the branch you are pulling from (being merged in) - typically what you want to keep >>>>>>>
Known Bugs:
- None yet. Please post or message me on discord (ghoulslash#3839) with any concerns
Credits:
- CFRU dexnav gui source
- FBI/Blah for original dexnav code (an extremely impressive feature for the time it was created in)
Last edited: