Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
643 commits
Select commit Hold shift + click to select a range
c9018bd
Don't wait for movement delay during wander when starting encounter
Bivurnum Jan 22, 2026
4addcf4
Added config to allow instant battle start
Bivurnum Jan 22, 2026
7b4e0d1
OWEs no longer impede trainer sight
Bivurnum Jan 22, 2026
fa94211
Normal NPCs despawn OWEs when walking into them
Bivurnum Jan 22, 2026
b4ec133
Remove Unused
HashtagMarky Jan 23, 2026
09b0316
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Jan 23, 2026
cf50a40
Refactor Field Effect Palette Loading
HashtagMarky Jan 23, 2026
4af1b7a
Add comment and idea?
HashtagMarky Jan 23, 2026
ec64d6a
Despawn Mon Helper Functions
HashtagMarky Jan 23, 2026
8f163fd
Remove Unused Function
HashtagMarky Jan 23, 2026
617c787
silly mistake
HashtagMarky Jan 23, 2026
c86f58c
Cleanup Spawn Anim Function
HashtagMarky Jan 23, 2026
66d9e31
Merge pull request #20 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 23, 2026
9ada50a
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
HashtagMarky Jan 23, 2026
e5813c5
Upcoming Merge Fixes
HashtagMarky Jan 23, 2026
dc43b0d
Merge pull request #21 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 23, 2026
41cfc8b
Refactor Semi and Manual OWEs
HashtagMarky Jan 23, 2026
fe4ad2f
Missed Alias
HashtagMarky Jan 23, 2026
7a7771a
Add P_GENDER_DIFFERENCES Preproc
HashtagMarky Jan 23, 2026
e504ba2
Missed Player Object Check
HashtagMarky Jan 23, 2026
5f41a3a
Consolidate IsOverworldWildEncounter Functions
HashtagMarky Jan 23, 2026
94f4bd0
Hardcode Spawn Anim Priority
HashtagMarky Jan 24, 2026
5ffff81
Add OverworldWildEncounter_OnObjectEventSpawned after Setting
HashtagMarky Jan 24, 2026
aa74a11
Change Check for templateOWE
HashtagMarky Jan 24, 2026
731e949
Couple Capitalisation
HashtagMarky Jan 24, 2026
1e4835e
Refactor ShouldRunOverworldEncounterScript
HashtagMarky Jan 24, 2026
630bd94
Merge pull request #22 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 24, 2026
66ee7cf
Add isPlayer Check
HashtagMarky Jan 24, 2026
ab30fb4
Mon behavior states are now restored after being unloaded
Bivurnum Jan 24, 2026
9c74633
Add IsOverworldWildEncounter Checks
HashtagMarky Jan 24, 2026
ce47cf0
Add Early Returns to OWE_DespawnMonDueToTrainerSight
HashtagMarky Jan 24, 2026
db8ddda
Update field_control_avatar.c
HashtagMarky Jan 24, 2026
21cf4c0
Enum Conversion
HashtagMarky Jan 24, 2026
1565c8e
Allow for Water OWE Reflections
HashtagMarky Jan 24, 2026
55adce8
Move OWE_CanEncounterBeLoaded
HashtagMarky Jan 24, 2026
967dbee
Add check for field effect palette inOWE_CanEncounterBeLoaded
HashtagMarky Jan 24, 2026
efd85c6
Explicetly prevent Manual OWEs being Roamers or Mass Outbreaks
HashtagMarky Jan 24, 2026
253a00e
Remove References to SemiManual OWEs
HashtagMarky Jan 24, 2026
b6c3d6a
Increase Roamer Safety
HashtagMarky Jan 25, 2026
15c21f2
Start adding documentation and adjust code to reflect it
HashtagMarky Jan 25, 2026
18e688d
More Documentation
HashtagMarky Jan 25, 2026
64b471d
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Jan 25, 2026
55b5522
Small Adjustments
HashtagMarky Jan 25, 2026
46b02a7
Tidy OWE_CanAwareMonSeePlayer
HashtagMarky Jan 25, 2026
d5ae7ee
Add line of sight to OWEs
HashtagMarky Jan 25, 2026
4acb437
Pack enum OverworldEncounterBehaviors
HashtagMarky Jan 25, 2026
cd6139b
Revert "Add isPlayer Check"
HashtagMarky Jan 25, 2026
5a3266b
Fix Roamer Safety
HashtagMarky Jan 25, 2026
e76ad78
Fix If Check
HashtagMarky Jan 25, 2026
258b386
Reorder Lines
HashtagMarky Jan 25, 2026
8c73ece
Update how_to_overworld_wild_encounters.md
HashtagMarky Jan 25, 2026
8d900ea
Remove Nesting
HashtagMarky Jan 25, 2026
e446e0d
Reorder Collision Checks
HashtagMarky Jan 25, 2026
6833082
Hide Followers if they are in the way of collision
HashtagMarky Jan 25, 2026
7573692
Fix Collision Checking
HashtagMarky Jan 25, 2026
fe5c2c3
Add Battle Frontier to OWEs
HashtagMarky Jan 26, 2026
b04f390
Update how_to_overworld_wild_encounters.md
HashtagMarky Jan 26, 2026
9d56aa1
Fix assert conditions
HashtagMarky Jan 26, 2026
afb5eda
stray config
HashtagMarky Jan 26, 2026
41b3f5a
Consistent checking
HashtagMarky Jan 26, 2026
cf14b4f
Remove Comment
HashtagMarky Jan 26, 2026
e27cb6e
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
HashtagMarky Jan 26, 2026
d1b20f1
Fix Follower NPC Direction None
HashtagMarky Jan 26, 2026
1315aef
Edit Follower NPC OWE Function
HashtagMarky Jan 26, 2026
87baff9
Merge pull request #23 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 26, 2026
49c8b1f
Fix 1 Free OWE Palette Loading
HashtagMarky Jan 26, 2026
b23ae0e
Disable Generated OWE Reflections
HashtagMarky Jan 26, 2026
2600c35
Cleanup OWE_CheckPathToPlayerFromCollision
HashtagMarky Jan 26, 2026
e1311f8
Clean Up OWE_CheckRestrictedMovement
HashtagMarky Jan 26, 2026
ba699a6
Consolidate OWE_CheckRestrictMovement Functions
HashtagMarky Jan 26, 2026
69f8f5a
Merge pull request #24 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 26, 2026
578b60d
Rename OWE_CheckRestrictedMovementAtCoords Parameters
HashtagMarky Jan 26, 2026
09ef155
Merge pull request #25 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 26, 2026
a8f0fd7
Approach for encounter rework
Bivurnum Jan 27, 2026
1aabec3
Approach for Encounter Script Shortening
HashtagMarky Jan 27, 2026
69e7f80
Move GetWalkMovementActionInDirectionWithSpeed
HashtagMarky Jan 27, 2026
bebab70
More Direction Enum Conversion
HashtagMarky Jan 27, 2026
c725060
TurnDirectionNinetyDegrees to GetNinetyDegreeDirection
HashtagMarky Jan 27, 2026
7bb0f5d
Remove Unneeded DexNav Additions
HashtagMarky Jan 27, 2026
46eb590
Remove GetBattlePyramidWildMonHeaderIdFromSpecies
HashtagMarky Jan 27, 2026
f71f344
Add assertf
HashtagMarky Jan 27, 2026
918efdb
Use IsOverworldWildEncounter in TryGetObjectEventTemplateForOverworld…
HashtagMarky Jan 27, 2026
3e0dcfa
Consolidate GetNumActiveOverworldEncounters
HashtagMarky Jan 27, 2026
e9b4d61
Specify GetMaxOverworldEncounterSpawns
HashtagMarky Jan 27, 2026
81cbe6b
Don't allow manual owes in the Battle Pyramid
HashtagMarky Jan 27, 2026
0f7a1f9
Revert "Don't allow manual owes in the Battle Pyramid" as should be n…
HashtagMarky Jan 27, 2026
15dd5bc
Seperate OWE_CanEncounterBeLoaded Functions
HashtagMarky Jan 27, 2026
292e05a
Add OWE_CanEncounterBeLoaded assertfs
HashtagMarky Jan 27, 2026
b61ca64
Add assertf when object limit reached
HashtagMarky Jan 27, 2026
f7b8d29
Move and Rename Remove Oldest OWE functions
HashtagMarky Jan 27, 2026
42efb47
Rename RemoveOldestOverworldEncounter to RemoveOldestGeneratedOverwor…
HashtagMarky Jan 27, 2026
cbcfb5f
Convert RemoveObjectEventByLocalIdAndMap to RemoveObjectEvent
HashtagMarky Jan 27, 2026
12018c6
Adjust OWE_PlayMonObjectCry
HashtagMarky Jan 27, 2026
06d3be7
Adjust Created Macros
HashtagMarky Jan 27, 2026
b02c70c
Create overworldwildencounterapproach macro
HashtagMarky Jan 27, 2026
5979f8a
Revert "Use IsOverworldWildEncounter in TryGetObjectEventTemplateForO…
HashtagMarky Jan 27, 2026
946cce5
typo
HashtagMarky Jan 27, 2026
830cc8c
Fix For OWE mid movement
HashtagMarky Jan 27, 2026
1310c35
Updated Fix
HashtagMarky Jan 27, 2026
ba9ab9a
Assertf Soft Lock
HashtagMarky Jan 27, 2026
2675293
Adjust ShouldRunOverworldEncounterScript
HashtagMarky Jan 27, 2026
29ecbb0
Better ShouldRunOverworldEncounterScript Adjustment
HashtagMarky Jan 27, 2026
67cd64c
Merge pull request #26 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 27, 2026
9c1e66d
Reduced sSavedMovementState to 1 bit
Bivurnum Jan 27, 2026
7654813
Update how_to_overworld_wild_encounters.md
HashtagMarky Jan 27, 2026
a0c0545
Added OWE_NO_REPLACE_FLAG bit
Bivurnum Jan 27, 2026
9310ec6
Renamed OWE_SAVED_MOVEMENT_STATE to OWE_SAVED_MOVEMENT_STATE_FLAG
Bivurnum Jan 27, 2026
6f6fe20
Consolidated max spawns into one value
Bivurnum Jan 27, 2026
d9ca3e2
Added config to disable shiny spawn anim
Bivurnum Jan 27, 2026
45d89cf
Renamed OW_WILD_ENCOUNTERS_RANDOM for clarity
Bivurnum Jan 28, 2026
f253e91
Moved OWE configs to their own file
Bivurnum Jan 28, 2026
59ec42f
Remove debug line
Bivurnum Jan 28, 2026
00e8a4f
Merge branch 'upcoming' into ow-encounters-dev
Bivurnum Jan 28, 2026
ba182b6
Renamed TRAINER_TYPE_ENCOUNTER to TRAINER_TYPE_OW_WILD_ENCOUNTER
Bivurnum Jan 28, 2026
fba730e
Added doc to SUMMARY.md so the check will stop yelling at me
Bivurnum Jan 28, 2026
331735b
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Jan 28, 2026
dd30526
OWE_GetRandomActiveEncounterObject now includes manual OWEs
Bivurnum Jan 28, 2026
b3617f4
Merge branch 'upcoming' into ow-encounters-dev
Bivurnum Jan 28, 2026
706b5ef
Set Manual OWE Flags When Removed
HashtagMarky Jan 28, 2026
a055753
Disallow Cries if Outside View
HashtagMarky Jan 28, 2026
77c8a8e
Remove isFeebasSpot
HashtagMarky Jan 28, 2026
cd1200f
Ambient cries now have their own timer
Bivurnum Jan 29, 2026
1edfcbb
Removed extra added line
Bivurnum Jan 29, 2026
2ad29a5
Removed left over DebugPrintf
Bivurnum Jan 29, 2026
b6fc14b
Added empty line between functions
Bivurnum Jan 29, 2026
5790925
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Jan 29, 2026
91232cf
Ambient Cries Refactor
HashtagMarky Jan 29, 2026
d74c300
Allow OWEs to work when BATTLE_PYRAMID_RANDOM_ENCOUNTERS is TRUE
HashtagMarky Jan 29, 2026
61b0970
Remove OWE_MAX_SPAWN_SLOTS for OWE_MAX_SPAWNS
HashtagMarky Jan 29, 2026
60ec6af
Revert "Disallow Cries if Outside View"
HashtagMarky Jan 29, 2026
cf962b6
Reimplement Disallow Cries if Outside View
HashtagMarky Jan 29, 2026
e126caf
Merge pull request #27 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 29, 2026
c20051d
More Roamer Safety
HashtagMarky Jan 29, 2026
157409d
Move Roamer data into warpArrowSpriteId
HashtagMarky Jan 29, 2026
1b5b0d6
Mons with OWE_NO_DESPAWN_FLAG now persist off screen
Bivurnum Jan 29, 2026
9e91660
Don't sort if only 1 OWE
Bivurnum Jan 29, 2026
21e7aa7
Add Static Inlines
HashtagMarky Jan 29, 2026
1bfd52e
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Jan 29, 2026
7519e16
Consolidate OWE_IsMonRemovalExempt
HashtagMarky Jan 29, 2026
737072f
Add Types to RemoveAllGeneratedOverworldEncounterObjects
HashtagMarky Jan 29, 2026
ca2d4de
Fix Level Assertf Going Off
HashtagMarky Jan 29, 2026
ea12754
Unify Assertf
HashtagMarky Jan 29, 2026
f0fff2c
Remove Redundant Code
HashtagMarky Jan 29, 2026
54e6061
Merge pull request #28 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 29, 2026
2dd1dd0
Despawn all when entering a town (not finished)
Bivurnum Jan 30, 2026
40e0c8a
Add Max Value for Roamers
HashtagMarky Jan 30, 2026
d82abac
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Jan 30, 2026
09fe060
Despawn OWEs On Town or City Transition
HashtagMarky Jan 30, 2026
1f63761
Fix Despawning on Map Connection
HashtagMarky Jan 30, 2026
7f3c67c
Change Function Types
HashtagMarky Jan 30, 2026
4607c0b
Change OWE_SPAWN_ANIM_CAVE yOffset
HashtagMarky Jan 30, 2026
6226ac3
Stop OWE Updates when DexNav Searching
HashtagMarky Jan 30, 2026
a08fd33
Make Battle Pyramid Adjustments Clearer
HashtagMarky Jan 30, 2026
da86e4e
Move Defines to reflect scope
HashtagMarky Jan 30, 2026
df43c00
Merge pull request #29 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 30, 2026
8c933fd
Play sound when despawn on cross map connection
Bivurnum Jan 30, 2026
d9e821c
Undo Field Effect Changes
HashtagMarky Jan 30, 2026
a66f914
Robust Mon Generation and Prevent Manual from being special spawns at…
HashtagMarky Jan 31, 2026
232284a
Move Functions to Fieldmap
HashtagMarky Jan 31, 2026
e69951f
Move Function Call
HashtagMarky Jan 31, 2026
30c43cc
Merge pull request #30 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 31, 2026
4e7d836
Step on grass effect doesn't skip to end of anim
Bivurnum Jan 31, 2026
1c8e210
Match Upcoming
HashtagMarky Jan 31, 2026
7c015c3
Rename Files
HashtagMarky Jan 31, 2026
33735e1
Merge pull request #31 from HashtagMarky/biv-expansion-ow
Bivurnum Jan 31, 2026
e68e26b
Adjusted wording in doc
Bivurnum Jan 31, 2026
d254057
Wrote Restricted Despawning section in the doc
Bivurnum Jan 31, 2026
f2c00da
Wrote OWE Movements section of the doc
Bivurnum Jan 31, 2026
60c42d0
Add WE_OWE_ALLOW_REPEL_DEXNAV_COLLISION
HashtagMarky Jan 31, 2026
0df238c
Try spawn every frame when lure is active
Bivurnum Jan 31, 2026
575d1fa
Change SpawnAnim Subpriority
HashtagMarky Jan 31, 2026
e8aa427
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Jan 31, 2026
35bddb5
Update error calling
HashtagMarky Jan 31, 2026
778caf7
Rename Defines
HashtagMarky Jan 31, 2026
b9ea868
Rename Files Again, and the missed one
HashtagMarky Jan 31, 2026
a0398e1
Rename Scripts
HashtagMarky Jan 31, 2026
bdcff24
Despawn all OWEs before dexnav fade from black
Bivurnum Feb 1, 2026
1610766
Wrote OWE Behaviour Types section of the doc
Bivurnum Feb 1, 2026
7f3c008
Removed question
Bivurnum Feb 1, 2026
6b551cb
Removed redundant wording
Bivurnum Feb 1, 2026
9ade3ef
Revert ROAMER_COUNT line
HashtagMarky Feb 1, 2026
807af3c
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Feb 1, 2026
3fa98e9
Remove unnecessary RemoveAllOverworldWildEncounterObjects
Bivurnum Feb 1, 2026
197bf81
Revert global.fieldmap.h and add note to documentation
HashtagMarky Feb 1, 2026
8de39d9
Update field_effect_objects.h
HashtagMarky Feb 1, 2026
424e522
Rename OWE Movement Functions
HashtagMarky Feb 1, 2026
f2b27db
Proper level checking for repel and ability
Bivurnum Feb 2, 2026
469bd78
Existing OWEs are despawned if repel restricts them
Bivurnum Feb 2, 2026
13542ca
Repel obeys OWE_NO_DESPAWN_FLAG
Bivurnum Feb 2, 2026
9aa8c18
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Feb 2, 2026
4108e0b
Biv Merge Fixes
HashtagMarky Feb 2, 2026
863a655
Remove redundant call
HashtagMarky Feb 2, 2026
5f4f33f
Swap to other RemoveAllRepelRestrictedOverworldWildEncounterObjects
HashtagMarky Feb 2, 2026
25fdd57
Initialise Level
HashtagMarky Feb 2, 2026
a0faad9
Cleanup event_object_movement.h
HashtagMarky Feb 2, 2026
40561e7
Start cleaning event_object_movement.c
HashtagMarky Feb 2, 2026
25f2625
Cleanup field_control_avatar.c and remove OverworldWildEncounter_Shou…
HashtagMarky Feb 2, 2026
964c51e
Adjust Field Effects
HashtagMarky Feb 2, 2026
4c1cb13
Adjust OverworldWildEncounter_SetMinimumSpawnTimer
HashtagMarky Feb 2, 2026
b76fabf
Adjust Repel Despawning
HashtagMarky Feb 2, 2026
c7967c5
Readd WE_OWE_REPEL_DEXNAV_COLLISION config
HashtagMarky Feb 2, 2026
6fd11da
Combine Remove Overworld Encounter Functions
HashtagMarky Feb 2, 2026
0e7ec00
Add Check for Abilities to Despawn OWEs
HashtagMarky Feb 2, 2026
4b93607
Revert "Add Check for Abilities to Despawn OWEs"
HashtagMarky Feb 2, 2026
66b793d
Merge pull request #32 from HashtagMarky/biv-expansion-ow
Bivurnum Feb 2, 2026
ad31c16
Bugged CheckStandardWildEncounter
HashtagMarky Feb 2, 2026
c7715c0
Disable vanilla encounters if WE_VANILLA_RANDOM is FALSE
Bivurnum Feb 3, 2026
81fd4a0
Return after creating Feebas
Bivurnum Feb 3, 2026
f6d2cd5
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Feb 3, 2026
c022bb5
Move FlagSet to Create Encounter
HashtagMarky Feb 3, 2026
1241a21
Fix Other Special Spawns being overwritten
HashtagMarky Feb 3, 2026
9091582
Move Shiny Sparkle Data
HashtagMarky Feb 3, 2026
341c991
Move gFieldEffectObjectPic_ShinySparkle
HashtagMarky Feb 3, 2026
1435876
Move OWE Flag Set and Clean OverworldWildEncounter_RemoveObjectOnBattle
HashtagMarky Feb 3, 2026
fc5d83b
Clean Up DetermineObjectEventDirectionFromObject
HashtagMarky Feb 3, 2026
5e5f3dc
Cleanup event_object_movement.c
HashtagMarky Feb 3, 2026
a72e57e
Cleanup wild_encounter_ow.h
HashtagMarky Feb 3, 2026
b3db3a4
Rename and Reorder wild_encounter_ow.h
HashtagMarky Feb 3, 2026
a6cf4c2
Convert functions to static inline
HashtagMarky Feb 3, 2026
92d0e77
Remove CheckForObjectEventAtLocation
HashtagMarky Feb 3, 2026
cf37283
Reorder declarations in wild_encounter_ow.c
HashtagMarky Feb 3, 2026
70401f5
Reorder wild_encounter_ow files
HashtagMarky Feb 3, 2026
6e857e8
Remove IsSafeToSpawnObjectEvents
HashtagMarky Feb 3, 2026
ec13a42
Inline OWE_ShouldSpawnWaterMons
HashtagMarky Feb 3, 2026
6bcd44d
Remove comments
HashtagMarky Feb 3, 2026
7220141
Edit Function Headers
HashtagMarky Feb 3, 2026
ff036ec
Update typedefs
HashtagMarky Feb 3, 2026
f1952e7
Tidy multilines statements
HashtagMarky Feb 3, 2026
2125d7f
Adjust ShouldPlayAmbientCryVanillaOWE
HashtagMarky Feb 3, 2026
963337f
Fix GetObjectEventIdByPosition check
HashtagMarky Feb 3, 2026
edd5522
Added OWE localIds check to SPECIAL_LOCALIDS_START
Bivurnum Feb 3, 2026
a04a5ab
Remove Testing Code
HashtagMarky Feb 3, 2026
5eafeb7
Remove GetNewestOWEncounterLocalId
HashtagMarky Feb 3, 2026
49629a2
Merge branch 'ow-encounters-dev' of https://github.com/Bivurnum/pokee…
HashtagMarky Feb 3, 2026
dab6017
Update WE config
HashtagMarky Feb 3, 2026
ec07947
Readd OverworldWildEncounter_ShouldDisableRandomEncounters
HashtagMarky Feb 3, 2026
6714562
default config
HashtagMarky Feb 3, 2026
81942b3
Rename Functions and Remove OWE_StartEncounter
HashtagMarky Feb 3, 2026
3822552
Rename
HashtagMarky Feb 3, 2026
106bc1c
Standardise ObjectEvent Name
HashtagMarky Feb 3, 2026
c1f238e
Change typedefs
HashtagMarky Feb 3, 2026
da5bd49
Merge pull request #33 from HashtagMarky/biv-expansion-ow
Bivurnum Feb 3, 2026
64af2b3
Reset jump timer on reload OW for MOVEMENT_TYPE_APPROACH_PLAYER_OWE
Bivurnum Feb 3, 2026
ad0fc81
Can use a flag to toggle generated OWEs
Bivurnum Feb 4, 2026
99fc0fd
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
HashtagMarky Feb 20, 2026
18aedec
Merge pull request #34 from HashtagMarky/biv-expansion-ow
Bivurnum Feb 20, 2026
6dccdac
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-…
HashtagMarky Mar 1, 2026
247e313
Elevation Documentation
HashtagMarky Mar 1, 2026
6c8a24e
Merge pull request #35 from HashtagMarky/biv-expansion-ow
Bivurnum Mar 3, 2026
098e8a2
Changed PIKACHU to NONE
Bivurnum Mar 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions asm/macros/event.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2815,6 +2815,21 @@
.byte \status
.endm

@ Makes the player and selected object (if there is one) face one another.
.macro facetogether
callnative ScriptFaceEachOther
.endm

@ Starts an Overworld Wild Encounter with a selected object, if possible.
.macro tryoverworldwildencounter
callnative StartWildBattleWithOWE
.endm

@ Start a scripted approach for an overworld wild encounter towards the player.
.macro overworldwildencounterapproach
callnative OWEApproachForBattle
.endm

@ FRLG


Expand Down
1 change: 1 addition & 0 deletions data/event_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -1736,3 +1736,4 @@ EventScript_PalletTown_PlayersHouse_2F_TurnOnPC::
.include "data/scripts/dexnav.inc"
.include "data/scripts/battle_frontier.inc"
.include "data/scripts/apricorn_tree.inc"
.include "data/scripts/wild_encounter.inc"
5 changes: 5 additions & 0 deletions data/field_effect_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ gFieldEffectScriptPointers::
.4byte gFldEffScript_SmileyFaceIcon @ FLDEFF_SMILEY_FACE_ICON
.4byte gFieldEffectScript_HallOfFameRecordFrlg @ FLDEFF_HALL_OF_FAME_RECORD_FRLG
.4byte gFldEffScript_PhotoFlash @ FLDEFF_PHOTO_FLASH
.4byte gFieldEffectScript_OWE_SpawnAnim @ FLDEFF_OW_ENCOUNTER_SPAWN_ANIM

gFieldEffectScript_ExclamationMarkIcon1::
field_eff_callnative FldEff_ExclamationMarkIcon
Expand Down Expand Up @@ -415,3 +416,7 @@ gFieldEffectScript_HallOfFameRecordFrlg::
gFldEffScript_PhotoFlash::
field_eff_callnative FldEff_PhotoFlash
field_eff_end

gFieldEffectScript_OWE_SpawnAnim::
field_eff_callnative FldEff_OWE_SpawnAnim
field_eff_end
11 changes: 11 additions & 0 deletions data/scripts/wild_encounter.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
InteractWithOverworldWildEncounter::
lock
overworldwildencounterapproach
applymovement VAR_LAST_TALKED, Common_Movement_ExclamationMark
facetogether
playmoncry VAR_0x8004, CRY_MODE_DOUBLES
waitmoncry
tryoverworldwildencounter
waitstate
end

1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
- [Struct Pokemon Generation](tutorials/mon_generation.md)
- [How to use FRLG](tutorials/how_to_frlg.md)
- [How to delete vanilla maps](tutorials/how_to_delete_vanilla_maps.md)
- [How to use Overworld Wild Encounters](tutorials/how_to_overworld_wild_encounters.md)
- [Changelog](./CHANGELOG.md)
- [1.14.x]()
- [Version 1.14.3](changelogs/1.14.x/1.14.3.md)
Expand Down
102 changes: 102 additions & 0 deletions docs/tutorials/how_to_overworld_wild_encounters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Overworld Wild Encounters Tutorial
## OWE Spawning
Overworld Wild Encounters (OWEs), refer to the wild encounters that can be seen as object events in the overworld, prior to engaging in battle with them. They use either the `WILD_AREA_LAND` or `WILD_AREA_WATER` encounter tables by default. OWEs come in two types, Generated or Manual.

### Generated OWEs
Generated OWEs are spawned automatically when `WE_OW_ENCOUNTERS` is set to `TRUE`, being spawned on a random encounter tile near the player, with the encounter table used dependant on it. These are considered low priority OWEs, and automatically populate a level, species, gender and shinyness exactly how a vanilla wild encounter would, or can even be a special spawn, but more on those later.
> Setting `OW_GFX_COMPRESS` to `FALSE` will free more space in VRAM, allowing for more large OWEs to spawn, and reducing the chance of running into a tiles error when trying to spawn Generated OWEs.

### Manual OWEs
Manual OWEs are created by the developer as any other object event would be and are defined by having the `.trainerType` set to `TRAINER_TYPE_OW_WILD_ENCOUNTER`. These can be fully customised by the developer, with the level, species, gender and shinyness all able to be specified. The level can be set by filling the desired value in the `trainerRange_berryTreeId`. The latter three are specified by the `graphicsId` of the object, for example;
- `OBJ_EVENT_GFX_SPECIES(BULBASAUR)` will produce a male, non-shiny Bulbasaur.
- `OBJ_EVENT_GFX_SPECIES_SHINY(CHARMANDER)` will produce a male, shiny Charmander.
- `OBJ_EVENT_GFX_SPECIES_FEMALE(SQUIRTLE)` will produce a female, non-shiny Squirtle.
- `OBJ_EVENT_GFX_SPECIES_SHINY_FEMALE(PIKACHU)` will produce a female, shiny Pikachu.

However, Manual OWEs do not have to be defined fully, leaving any of the level, species, gender, shinyness or script unspecified will revert to default behaviours. If left blank, the level or species will be generated from the relevant encounter table. Leaving the shinyness blank will revert to default shiny odds, although this can still be affected by `P_FLAG_FORCE_SHINY` and `P_FLAG_FORCE_NO_SHINY`. Setting the `OBJ_EVENT_MON` bit of the `graphicsId`, but not the `OBJ_EVENT_MON_FEMALE` will result in a male encounter, setting both will result in a female encounter, as seen above, but setting neither will randomise the gender based on species. A species can be defined with a random gender by just using the species define. A specific script can be specified, but if not the default OWE encounter script will be used.
Assuming the following `graphicsId` have `.trainerType` set to `TRAINER_TYPE_OW_WILD_ENCOUNTER`;
- `SPECIES_EEVEE` will result in an Eevee with a randomised level, gender and shinyness, using the default encounter script.
- `OBJ_EVENT_GFX_SPECIES(NONE)` will result in a male randomised species of randomised level, gender and shinyness, using the default encounter script.
- `OBJ_EVENT_GFX_SPECIES_SHINY_FEMALE(NONE)` will result in a female, shiny randomised species with randomised level and gender, using the default encounter script.

As level and species are potentially taken from the Wild Encounter Header, there is an `assertf` to let developers know when an invalid value is used. If the resultant level is invalid, it will be set to `MIN_LEVEL` (1). If the species is invalid, a replacement object will be created using `OBJ_EVENT_GFX_BOY_1`, this will not be an OWE of any kind.

No matter how much of a Manual OWE is defined, it is considered a high priority OWE, and treated as a regular object event in all ways other than ones outlined above. They will always spawn, regardless of level of abilties of player Pokémon. However, they cannot be special spawns.

> Flags are set when removed.

### Special Spawns
Special spawns can be one of three types, in decreasing priority: A Roamer, Feebas, or Mass Outbreak Encounter. Generated OWEs can have any of these, however, Manual OWEs can only have the Feebas Special Spawn. These work exactly as they would normally;
- If a Roamer is on the route and is able to spawn, then it may appear where a Generated OWE would.
- If any OWE spawns on a tile where a Feebas special fishing spot is, it may appear is a Feebas (only if `WE_OWE_FEEBAS_SPOTS` is TRUE).
- If a Generated OWE spawns on a route that has a mass outbreak occuring, it may spawn as an encounter from that mass outbreak.
> OWE_MAX_ROAMERS

### Restricted Despawning
There are three configs that can be used to restrict the despawning of Generated OWEs.

- If `WE_OWE_PREVENT_SHINY_DESPAWN` is set to `TRUE`, any Generated OWE that spawns as shiny will not be despawned if they go outside of the viewable area. They can still be despawned off-screen if the player goes to another map. This config also ensures that shiny Generated OWEs will never be despawned and replaced if `WE_OWE_SPAWN_REPLACEMENT` is `TRUE`.
- If `WE_OWE_PREVENT_FEEBAS_DESPAWN` is set to `TRUE`, any Generated OWE that is a Feebas spawned from a Feebas fishing spot will follow the same rules as `WE_OWE_PREVENT_SHINY_DESPAWN` above.
- If `WE_OWE_DESPAWN_ON_ENTER_TOWN` is set to `TRUE`, all Generated OWEs will be instantly despawned upon the player crossing a map connection into a map with a map type of either `MAP_TYPE_TOWN` or `MAP_TYPE_CITY`, like what happens in Scarlet/Violet.

None of these three configs can prevent the forceful despawning of OWEs to free up limited resources, as is explained in the next section.


## High Priority and Low Priority OWEs
Low Priority OWEs may not be spawned or even be destroyed in certain situations. There are palettes and object tiles checks to prevent these from spawning if it would fail, as well as similar checks for number of event objects, palettes and object tiles. These checks will despawn the oldest of Low Priority OWEs when other objects event are attempting to be spawned and Low Priority OWEs are using these resources. Low Priority OWEs may also be destroyed by NPC object events colliding with them due to their movements or the OWE being in the way of a trainer interaction. High priority OWEs are treated as regular objects and will not be destroyed in the ways outlined above, but may cause the destruction of Generated OWEs and will not face spawning restrictions.
These despawn conditions will overwrite the restrictive despawns mentioned above.

## Encountering an OWE
Collision between Player and OWE or Interacting with one. Can also interact with an OWE in the water even when the player is not.
### Encounter Types
## Repel and Lure Behaviours

## OWE Behaviour Types
The behaviors that these OWEs have is set up to be customizable for each individual species. By default, every species is set to `OWE_IGNORE_PLAYER`. To add a different behavior to a species, find their species struct in their `gen_X_families.h` file in the `src/data/pokemon/species_info` folder and add a `.overworldEncounterBehavior = <BEHAVIOR>` to it. `<BEHAVIOR>` should be replaced with the behavior you want them to use. For example, if I wanted to add the `OWE_FLEE_PLAYER_NORMAL` behavior to Mudkip I would open `gen_3_families.h`, find the struct for `SPECIES_MUDKIP`, and add `.overworldEncounterBehavior = OWE_FLEE_PLAYER_NORMAL` to the end of it like so:
```diff
.eggMoveLearnset = sMudkipEggMoveLearnset,
.evolutions = EVOLUTION({EVO_LEVEL, 16, SPECIES_MARSHTOMP}),
+ .overworldEncounterBehavior = OWE_FLEE_PLAYER_NORMAL
},

[SPECIES_MARSHTOMP] =
{
.baseHP = 70,
```

The behaviors themselves are defined in `src/data/pokemon/wild_encounter_overworld_behavior.h`. These are the customizable parameters:
- `movementType` is the movement type you want the object event to have. More on these in the next section.
- `viewDistance` is the number of tiles away the mon is able to notice the player in the cardinal directions (similar to the sight distance of trainers).
- `viewWidth` is the total width of the area in which the mon will notice the player. For example, if `viewWidth` is set to `3`, the mon will be able to detect the player if they are within 1 tile of either side of the line of sight.
- `activeDistance` is the max distance away from the mon that the player can be before the mon loses track of them and goes back to wandering.
- `idleSpeed` is the speed at which the mon will take a step while wandering (player is not noticed). This must be one of the values in `enum SpeedOWE`.
- `activeSpeed` is the speed at which the mon will take a step while active (player has been noticed). This must be one of the values in `enum SpeedOWE`.

If any of these parameters are not defined, they will be automatically assigned the value of `0`.

A small number of premade behaviors have been provided and are ready to use. You can add as many new custom behaviors as you like, but make sure to add each behavior to `enum OverworldWildEncounterBehaviors`, making sure that `OWE_SPECIES_BEHAVIOR_COUNT` is always at the end.

The same behavior can be used for multiple different species.

## OWE Movements
While OWE objects can be given any movement type, there are several different custom movement types that were made specifically for OWEs:
- The basic one is `MOVEMENT_TYPE_WANDER_AROUND_OWE`. All of the other OWE movement types start with this behavior and differentiate into other behavior when they notice the player. Similar to `MOVEMENT_TYPE_WANDER_AROUND`, the object will take steps in random directions at random intervals. The main difference here is that the object will never turn more than 90 degrees from their current facing direction when taking a step. OWEs with this movement type will completely ignore the player until they are directly collided/interacted with.
- `MOVEMENT_TYPE_CHASE_PLAYER_OWE` will switch the OWE to chasing down the player when it notices the player. The OWE is still blocked by collision, but does have the intelligence to walk around small obstacles. They will go back to wandering if the player goes outside of their sight radius.
- `MOVEMENT_TYPE_FLEE_PLAYER_OWE` will switch the OWE to fleeing from the player when it notices the player. They use the same pathfinding logic as `MOVEMENT_TYPE_CHASE_PLAYER_OWE`, but in the opposite direction from the player. They will go back to wandering if the player goes outside of their sight radius. If `WE_OWE_FLEE_DESPAWN` is set to `TRUE`, the fleeing OWE will despawn if it is unable to take a step for a short amount of time (ie, if they are cornered).
- `MOVEMENT_TYPE_WATCH_PLAYER_OWE` will switch the OWE to stand in place and always face in the direction of the player's location when the player is noticed by it. They will go back to wandering if the player goes outside of their sight radius.
- `MOVEMENT_TYPE_APPROACH_PLAYER_OWE` will switch the OWE to approach the player as if curious when it notices the player. The OWE will try to keep a one tile gap between itself and the player. They may also occasionally do an excited hop. They will go back to wandering if the player goes outside of their sight radius.
- `MOVEMENT_TYPE_DESPAWN_OWE` will make the OWE do a very brief animation of surprise and then instantly despawn when it notices the player.

### Restricted Movements
### How Data is Saved
```
struct ObjectEvent
{
u8 trainerRange_berryTreeId; // Also stores level for Overworld Encounters.
u8 directionSequenceIndex; // Also stores roamer status for Overworld Encounters.
u8 playerCopyableMovement; // COPY_MOVE_* Also stores age for Overworld Encounters.
}
```
Binary file added graphics/field_effects/pics/shiny_sparkle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion include/battle_pyramid.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void CallBattlePyramidFunction(void);
u16 LocalIdToPyramidTrainerId(u8 localId);
bool8 GetBattlePyramidTrainerFlag(u8 eventId);
void MarkApproachingPyramidTrainersAsBattled(void);
void GenerateBattlePyramidWildMon(void);
void GenerateBattlePyramidWildMon(u32 forceSpecies);
u8 GetPyramidRunMultiplier(void);
u8 CurrentBattlePyramidLocation(void);
bool8 InBattlePyramid_(void);
Expand Down
15 changes: 13 additions & 2 deletions include/config/overworld.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
// Overworld Pokémon
#define OW_POKEMON_OBJECT_EVENTS TRUE // Adds Object Event fields for every species. Can be used for NPCs using the OBJ_EVENT_GFX_SPECIES macro (eg. OBJ_EVENT_GFX_SPECIES(BULBASAUR))
#define OW_SUBSTITUTE_PLACEHOLDER TRUE // Use a substitute OW for Pokémon that are missing overworld sprites
#define OW_LARGE_OW_SUPPORT TRUE // If true, adds a small amount of overhead to OW code so that large (48x48, 64x64) OWs will display correctly under bridges, etc.
#define OW_LARGE_OW_SUPPORT TRUE // If TRUE, adds a small amount of overhead to OW code so that large (48x48, 64x64) OWs will display correctly under bridges, etc.
#define OW_PKMN_OBJECTS_SHARE_PALETTES FALSE // [WIP!! NOT ALL PALETTES HAVE BEEN ADJUSTED FOR THIS!!] If TRUE, follower palettes are taken from battle sprites.
#define OW_GFX_COMPRESS TRUE // Adds support for compressed OW graphics, (Also compresses pokemon follower graphics).
// IMPORTANT: Gfx are loaded into VRAM to avoid continous decompression. If you require more VRAM or want to use a lot of overworld Pokémon at once, you should disable this config.
// Compressed gfx are incompatible with non-power-of-two sprite sizes:
// (You should not use 48x48 sprites/tables for compressed gfx)
// 16x32, 32x32, 64x64 etc are fine
#define OW_MON_WANDER_WALK TRUE // If true, OW pokemon with MOVEMENT_TYPE_WANDER will walk-in-place in between steps.
#define OW_MON_WANDER_WALK TRUE // If TRUE, OW Pokémon with MOVEMENT_TYPE_WANDER will walk-in-place in between steps.
// Follower Pokémon
#define OW_FOLLOWERS_ENABLED FALSE // Enables follower Pokémon, HGSS style. Requires OW_POKEMON_OBJECT_EVENTS. Note that additional scripting may be required for them to be fully supported!
#define OW_FOLLOWERS_BOBBING TRUE // If TRUE, follower Pokémon will bob up and down during their idle & walking animations
Expand Down Expand Up @@ -148,4 +148,15 @@
// Trainer Rematches
#define OW_REMATCH_BADGE_COUNT 5 // Number of badges necessary before the match call or vs seeker features allow rematches

// Ambient Cries
// Constants
#define OW_AMBIENT_CRIES_NONE 0 // Do not play ambient cries.
#define OW_AMBIENT_CRIES_VANILLA 1 // Play ambient cries taken from encounter tables, as in vanilla.
#define OW_AMBIENT_CRIES_OWE_PRIORITY 2 // Play ambient cries based on active Overworld Wild Encounters, reverting to vanilla cries if none are present.
#define OW_AMBIENT_CRIES_OWE_ONLY 3 // Play ambient cries based on active Overworld Wild Encounters only.
// Overworld Wild Encounters will play ambient cries based on their location relative to the player.

// Configuration
#define OW_AMBIENT_CRIES OW_AMBIENT_CRIES_VANILLA // Selects how ambient cries are played, if at all. As in vanilla, no matter what is chosen, cries will not play if the player is not on a map with Land or Water encounter tables.

#endif // GUARD_CONFIG_OVERWORLD_H
Loading