That depends entirely on what you mean by "certain areas", and indeed what you mean by "always" (the dark grass in Gen 5 only had a chance of double wild battles).
if $PokemonGlobal.partner && $Trainer.ablePokemonCount>1
In PokemonField, look for def pbEncounter(enctype). This is the line you'll edit
Code:if $PokemonGlobal.partner && $Trainer.ablePokemonCount>1
Put whatever condition in there.
if $game_map.map_id== 3
if $game_switches[64]
tried both
andCode:if $game_map.map_id== 3
Code:if $game_switches[64]
but neither of them made double wild pokemon battles. sorry if i'm noob at this :/
if ($PokemonGlobal.partner || $game_map.map_id== 3 || $game_switches[64]) && $Trainer.ablePokemonCount>1
Code:if ($PokemonGlobal.partner || $game_map.map_id== 3 || $game_switches[64]) && $Trainer.ablePokemonCount>1
this should work, I'm pretty sure
if $PokemonGlobal.partner
if ($PokemonGlobal.partner || $game_map.map_id== 3 || $game_switches[64]) && $Trainer.ablePokemonCount>1
Code:if ($PokemonGlobal.partner || $game_map.map_id== 3 || $game_switches[64]) && $Trainer.ablePokemonCount>1
this should work, I'm pretty sure
I do hope you have more than one able Pokémon in your party when you're trying this. And using the correct numbers, and actually setting the Game Switch if you're using it.
The code is fine.
Ah, I see. The code's in the wrong place. It should be put in def pbBattleOnStepTaken, not where mej told you.
pbEncounter is for fishing and Rock Smash and Sweet Scent. You can leave it there as well if you like.
I know I probably wont get a reply because this thread is REALLY old but what tool did you guys use for this ??? Im currently using hexmaniacadvance and cant find pbBattleOnStepTaken anywhere
You are in the wrong forum. This is Game Dev, but you appear to be ROM Hacking. You'll want to ask in the Binary ROM Hacking forum: https://www.pokecommunity.com/forumdisplay.php?fn=rom-hacking-center