PDA

View Full Version : Development: Wild double / triple battles


jabberjabber8
May 29th, 2011, 11:56 PM
I don't own a copy of black or white or even a DS for the matter but a friend told me there were double battles with 2 wild Pokemon every so often.
Now i was wondering if it were possible to implement that in a fire red hack. Reading less specific threads on this topic I think it is possible to create double battles but not triples...

Sorry if this has been asked before.

Crimson5M
May 30th, 2011, 03:01 PM
I don't own a copy of black or white or even a DS for the matter but a friend told me there were double battles with 2 wild Pokemon every so often.
Now i was wondering if it were possible to implement that in a fire red, Ruby or Emerald hack. Reading less specific threads on this topic I think it is possible to create double battles but not triples...

Sorry if this has been asked before.


Fixed it for you.
But yeah, it should probably be possible. Difficult, but possible. I'll leave it for the experts (Knizz, Colcolstyles, Darthatron, Jambo etc.) because I'm a n00b at this stuff.

Team Fail
May 30th, 2011, 03:16 PM
IIRC, there is incomplete coding in Ruby/Sapphire for a wild Double Battle, but the game crashes because the code isn't finished/optimized.

Jambo51
May 30th, 2011, 03:24 PM
Fixed it for you.
But yeah, it should probably be possible. Difficult, but possible. I'll leave it for the experts (Knizz, Colcolstyles, Darthatron, Jambo etc.) because I'm a n00b at this stuff.

ROFLMAO, I'm no expert!!

Nonetheless, this is something I hope to have a look at in the near-ish future, probably some time after i've finished the 649 Patch.

I know that there's code in FR for it too, but it currently duplicates the first generated Pokémon. I'll see if I can find out why that is, and complete the code for it. Here's hoping, eh?

jabberjabber8
May 31st, 2011, 05:04 AM
Thanks for the help i was reading a black white remake thread. Dont know where i got it from but they were using a fire red base and claimed to be able to do it (if I read it write) ill edit the thread in if i can find it again...

sonic1
May 31st, 2011, 09:38 AM
For Firered:
Ok, i'm totally onboard with this idea. I too was also researching, and (thanks to JPAN and Interdepth) came up with a solution. The solution is quite simple, but the battle system is quite buggy. In fact, it involves setting a byte to the battle flag (thats the name I gave to it, in fact, its just an offset in ram, 02022B4B).

How? As soon as the wild battle music starts, BEFORE THE BLACK SCREEN, http://img685.imageshack.us/img685/1653/wildbattlemoment.png, set 02022B4C to 01. Continue to the battle. Voilà! Its a double wild battle.

There are some bugs,tough. The 2nd pokemon in the wild battle is a integral copy of the first one (all the data is the same), and so, if you defeat one of them, the battle ends, as the game just assumes that both of them were defeated because the HP data was the same for both (in theory, if you hit one, the other will suffer too). HOWEVER, if you load the 2nd pokemon in the 2nd battle slot, the battle is totally fine, without any bug except you can only capture on of them.

~Sonic1

Team Fail
May 31st, 2011, 09:54 AM
For Firered:
Ok, i'm totally onboard with this idea. I too was also researching, and (thanks to JPAN and Interdepth) came up with a solution. The solution is quite simple, but the battle system is quite buggy. In fact, it involves setting a byte to the battle flag (thats the name I gave to it, in fact, its just an offset in ram, 02022B4B).

How? As soon as the wild battle music starts, BEFORE THE BLACK SCREEN, http://img685.imageshack.us/img685/1653/wildbattlemoment.png, set 02022B4C to 01. Continue to the battle. Voilà! Its a double wild battle.

There are some bugs,tough. The 2nd pokemon in the wild battle is a integral copy of the first one (all the data is the same), and so, if you defeat one of them, the battle ends, as the game just assumes that both of them were defeated because the HP data was the same for both (in theory, if you hit one, the other will suffer too). HOWEVER, if you load the 2nd pokemon in the 2nd battle slot, the battle is totally fine, without any bug except you can only capture on of them.

~Sonic1

This, I have to try. Is it just Firered, or can you find it for other games?

I'll make a video for proof of concept.

Le edit:
GYVbJ-0XzW4

sonic1
May 31st, 2011, 10:51 AM
It's indeed present on other versions. Ruby/Sapph and Emer.

The process is the same: setting 1 to that offset.

For ruby (US) the offset is: 020239F8.
For emerald, i'm still researching the offset. I'll post when i find it.

Team Fail
May 31st, 2011, 11:02 AM
It's indeed present on other versions. Ruby/Sapph and Emer.

The process is the same: setting 1 to that offset.

For ruby (US) the offset is: 020239F8.
For emerald, i'm still researching the offset. I'll post when i find it.

Ok. Do you think you could write a Gameshark SP code for FireRed so I can test it on my official cartridge, or do you know how?

Edit: Modifying that value can yield different results. 02 gives a Wireless adaptor error. I'll list all that I can get. (From 00 to FF)

sonic1
May 31st, 2011, 11:35 AM
Ok for emerald the offset is 02022FEC.

The trick for double battle is just adding 01 to the value that it's currently there. This means, for example trainerbattle, the value is 08. If you put 09, it will turn into a double trainer battle.Simple, isnt it?

Its a matter of writting a routine that hooks that process. I already have that done. If you want it, i can post the offsets and the routine, so you can investigate more.

~Sonic1

Team Fail
May 31st, 2011, 11:45 AM
Ok for emerald the offset is 02022FEC.

The trick for double battle is just adding 01 to the value that it's currently there. This means, for example trainerbattle, the value is 08. If you put 09, it will turn into a double trainer battle.Simple, isnt it?

Its a matter of writting a routine that hooks that process. I already have that done. If you want it, i can post the offsets and the routine, so you can investigate more.

~Sonic1

That is something. I'm guessing that the RAM address you gave us does the same for Trainer battles, too?

So far, I have uncovered up to 1E. Nothing has crashed yet.

sonic1
May 31st, 2011, 11:56 AM
Are you researching firered? Because that where i have more data uncovered to begin with, so i would like for you to talk in firered's rom.

Anyways, back in my first post in this thread, i named the offset 02022B4C "Battle Flag". Thats because that offset is crucial to every battle: Its there that's set the type of battle before going to the battle loading according to the type.

And i'm sorry, i dont have the knowledge to write gameshark codes :(

~Sonic1

Team Fail
May 31st, 2011, 12:06 PM
Are you researching firered? Because that where i have more data uncovered to begin with, so i would like for you to talk in firered's rom.

Anyways, back in my first post in this thread, i named the offset 02022B4C "Battle Flag". Thats because that offset is crucial to every battle: Its there that's set the type of battle before going to the battle loading according to the type.

And i'm sorry, i dont have the knowledge to write gameshark codes :(

~Sonic1

That's fine. And yes, I am doing Fire Red. Oddly, though, I haven't encountered the Safari Zone-type battle yet.

Edit: I think, with this, we could introduce the concept of multi-player Wild Pokemon Battles. I'll need VBA-Link to test this theory though. It would be a unique, but useless feature.

sonic1
May 31st, 2011, 12:13 PM
That value is 80, and if you put 81, it will make a double Safari battle.

But this one is filled with bugs, like the previous ones from normal wild battles, plus the fact that safari pokemon cant attack and you release your pokemon instead of fighting with rock and bait.

~Sonic1

Team Fail
May 31st, 2011, 12:14 PM
That value is 80, and if you put 81, it will make a double Safari battle.

But this one is filled with bugs, like the previous ones from normal wild battles, plus the fact that safari pokemon cant attack and you release your pokemon instead of fighting with rock and bait.

~Sonic1

Oh, cool. Look at my edit, er... rather:
"Edit: I think, with this, we could introduce the concept of multi-player Wild Pokemon Battles. I'll need VBA-Link to test this theory though. It would be a unique, but useless feature."

Here are my findings as of now:
00- Standard battle
01- Wild double battle
02- Wireless Error
03- Long connection wait, fails
04- Standard Battle
05- Wild Double Battle
06- Long connection wait, fails
07- ""
08- Engages battle with PKMN Trainer (Has Team Aqua Archie sprite), sends out ???,
awards $3540
09- Same as 08, but does a double battle. Ends just the same as wild double
battle- killing one Pokemon ends the fight. Awards $7080
0A- Long connection wait, fails
0B- ""
0C- Same as 08.
0D- Same as 09
0E- Long connection wait, fails
0F- Long connection wait, fails
10- Oak's Tutorial battle. Acts like a Trainer Battle, preventing escape
11- Oak's Tutorial Battle, Double Wild Battle
12- Long connection wait, fails
13- Long connection wait, fails
14- Same as 10
15- Same as 11
16- Long connection wait, fails
17- Long connection wait, fails
18- Combo of 09 and 11. Battle ends when one Pokemon is killed
19- ""
1A- Long connection wait, fails
1B- Long connection wait, fails
1C- Combo of 08 and 10. Most resembles battle Vs. Gary.
1D- Same as 18
1E- Long connection wait, fails
1F- Long connection wait, fails
20- Same as 00. Standard Wild Battle
21- Same as 01
22- Long connection wait, fails
23- Long connection wait, fails
24- Same as 20, 00
25- Same as 01, 21
26- Long connection wait, fails
27- Long connection wait, fails
28- Same as 08
29- Same as 09
2A- Long connection wait, fails
2B- Long connection wait, fails
2C- Same as 08
2D- Same as 09
2E- Long connection wait, fails
2F- Long connection wait, fails
30- Same as 10
31-

sonic1
May 31st, 2011, 12:24 PM
Well now thats thinking afar! I like it xD.

Anyway, i thinks its more possible than you think.But not that possible without big changes. I dont know if you know binary, but i think the values for the B.Flag work by bits. Thats the only reason for the double battle work for everybattle. You set the first bit to 1 (like ASM, to declare a routine THUMB instead of ARM) and the other bits are setup to whatever the battle type was. But now there's a problem. How are we going to generate wild pokemon in both sides (the two players). And even if we sucessefuly did that, i think we would control 1 of our pokemon and the wild pokemon or something like that.
Funny xD

~Sonic1

Team Fail
May 31st, 2011, 12:28 PM
Well now thats thinking afar! I like it xD.

Anyway, i thinks its more possible than you think.But not that possible without big changes. I dont know if you know binary, but i think the values for the B.Flag work by bits. Thats the only reason for the double battle work for everybattle. You set the first bit to 1 (like ASM, to declare a routine THUMB instead of ARM) and the other bits are setup to whatever the battle type was. But now there's a problem. How are we going to generate wild pokemon in both sides (the two players). And even if we sucessefuly did that, i think we would control 1 of our pokemon and the wild pokemon or something like that.
Funny xD

~Sonic1

I had thought of it because of the fact that there are some battle types that require a link. Just possibly, some of them might work correctly. I need to find that VBA-Link NOW.

sonic1
May 31st, 2011, 12:34 PM
You want vba-link? Here: http://www.vbalink.info/download/vbalink180b0.zip

You'll be also needing Hamachi to create a network. If you want, we could do it both, just send me your mail.

Team Fail
May 31st, 2011, 12:42 PM
You want vba-link? Here: http://www.vbalink.info/download/vbalink180b0.zip

You'll be also needing Hamachi to create a network. If you want, we could do it both, just send me your mail.

I'm trying it between two VBA-links running on my PC, but I cannot get it to synch. If I could force it with a code that could be made, and I got another SP and another wireless adapter, I could test it properly. In which timing isn't an issue.

Well, If you change the proceeding bytes, you can make it an Old Man battle! Offset 0x02022B4D. Change to 02.

Edit: DO NOT USE 03. It makes the old man battle, but items cannot be used. It displays that message, then resets the routine and the game keeps attempting to use the items slot, and loops. You would have to reset. FF does the same, but is hilarious.

sonic1
May 31st, 2011, 12:46 PM
Hey, you dont have to go trough that hassle to test it. If you have a decent connection, you can "fool" the emulator and connect to yourself. Select "NETWORK" and with one emulator you start the server and with the other connect to the server by typing localhost in the textbox!

;)

~Sonic1

Team Fail
May 31st, 2011, 12:54 PM
Hey, you dont have to go trough that hassle to test it. If you have a decent connection, you can "fool" the emulator and connect to yourself. Select "NETWORK" and with one emulator you start the server and with the other connect to the server by typing localhost in the textbox!

;)

~Sonic1

Yup. Never did work. It requires timing, more or less. I am trying other various bytes to see what I can get.

EDIT: Changing 020224BE to 01 results in a Pokedude battle from the teachy TV.

Jambo51
May 31st, 2011, 12:55 PM
I had a very quick look at this and was able to make the game generate 2 separate wild pokémon, as opposed to 1 duplicated one, and, despite some odd bugs (like the battle music stopping after the first KO), i'm pretty pleased with this for an hour's work.

http://www.youtube.com/watch?v=nSfJ3OYvq30

As you can see, the first wild battle doesn't work (I don't know why this happens), but every subsequent battle generates a different Genesect and Pikachu combination.

The battle continues until either you catch one of the two (i'll hack that so that it's like DPPt eventually, only allowing a Poké Ball throw when there's only 1 Pokémon left), or until BOTH are KO'd. The music is a slight problem, but should be easily fixable.

Currently, because I haven't found the routine which picks the Pokémon from the Pokémon in a map, the Pikachu is hard coded. In other words, the second Pokémon will always be a Pikachu, but it will always be a randomly generated Pikachu, almost certainly different from the last one.

All in all, for an hour's hacking, i'm quite chuffed at the result.

sonic1
May 31st, 2011, 12:57 PM
Yeah i knew that. That why naming the offset as battle flag isn't correct. Its more like a var, but as i said, it works on bits,because the first part matters to put the type, and the next part takes care of old man, items cant be used and ghost battles. Like, 80,90,A0 and B0(i think) they put the battle to ghost battle. And that part works by bits too, because try BF. It will tell you that items cant be used or something (not testing out, its just by memory, which can be not correct, as i discovered this 8/9 months ago)

~Sonic1

EDIT: Seems you Jambo posted in the middle of my writting time, so the responses were "intersected" xD. this post is for Team Fail

Team Fail
May 31st, 2011, 12:58 PM
I had a very quick look at this and was able to make the game generate 2 separate wild pokémon, as opposed to 1 duplicated one, and, despite some odd bugs (like the battle music stopping after the first KO), i'm pretty pleased with this for an hour's work.

I'm currently uploading a youtube video, I'll link it when it's available.

As you can see, the first wild battle doesn't work (I don't know why this happens), but every subsequent battle generates a different Genesect and Pikachu combination.

The battle continues until either you catch one of the two (i'll hack that so that it's like DPPt eventually, only allowing a Poké Ball throw when there's only 1 Pokémon left), or until BOTH are KO'd. The music is a slight problem, but should be easily fixable.

Currently, because I haven't found the routine which picks the Pokémon from the Pokémon in a map, the Pikachu is hard coded. In other words, the second Pokémon will always be a Pikachu, but it will always be a randomly generated Pikachu, almost certainly different from the last one.

All in all, for an hour's hacking, i'm quite chuffed at the result.

Nice! I've been picking and prodding at some of the bytes near that offset that Sonic gave, and I have been able to substitute many things, like the Marowak battle, Teachy TV Battles and Old man battles. Some are rather glitchy though.

I Just found out why it pulls up a wild battle using Archie, but Sonic1 already most likely knows why. If you use the same thing while entering a trainer battle, it makes it a double trainer battle. Since it is trying to activate a Trainer battle in a Wild battle scenario, it pulls the first default trainer in the list, being that Archie. Since there is no default party set, it just sends out ??? Pokemon as it's placeholder and warrants 1 exp. per kill.

sonic1
May 31st, 2011, 01:17 PM
I Just found out why it pulls up a wild battle using Archie, but Sonic1 already most likely knows why. If you use the same thing while entering a trainer battle, it makes it a double trainer battle. Since it is trying to activate a Trainer battle in a Wild battle scenario, it pulls the first default trainer in the list, being that Archie. Since there is no default party set, it just sends out ??? Pokemon as it's placeholder and warrants 1 exp. per kill.

That is correct.
Jambo, mind telling us how you loaded the pokemon in the 2nd slot?
I mean, you surelly know that the first slot is in 202402c and the second in 202402c + 0x64.
The way i load into there is manually, using data from another pokemon of another battle, saving his data into a file and then loading it to the offset when battle is about to start.

Did you used a routine or manually loaded the data?

~Sonic1

Jambo51
May 31st, 2011, 02:07 PM
That is correct.
Jambo, mind telling us how you loaded the pokemon in the 2nd slot?
I mean, you surelly know that the first slot is in 202402c and the second in 202402c + 0x64.
The way i load into there is manually, using data from another pokemon of another battle, saving his data into a file and then loading it to the offset when battle is about to start.

Did you used a routine or manually loaded the data?

~Sonic1

I made the routine repeat the generation if the battle type was wild double. It currently generates a wild Pikachu (always) because of how I had to design it for now. But it shouldn't be outwith reach to have the game generate 2 random wild Pokémon.

sonic1
May 31st, 2011, 02:19 PM
About the 2 random generated pokemon, according to what JPAN told me, it isn't hard to make the mod in the game in order to get it.

The routine that does the wildbattles is in 0x08082AEC, but only creates 1 pokemon. To change that, we must do a copy of the routine at 0x080829FC, which is the one who creates the pokemon at enemy slot 1. If we could create a hack that asked the game to create a pokemon in the next slot, we could even have 6 wild pokemons at once. I think it would'n be hard to do it.

~Sonic1

Jambo51
May 31st, 2011, 02:48 PM
About the 2 random generated pokemon, according to what JPAN told me, it isn't hard to make the mod in the game in order to get it.

The routine that does the wildbattles is in 0x08082AEC, but only creates 1 pokemon. To change that, we must do a copy of the routine at 0x080829FC, which is the one who creates the pokemon at enemy slot 1. If we could create a hack that asked the game to create a pokemon in the next slot, we could even have 6 wild pokemons at once. I think it would'n be hard to do it.

~Sonic1

I already did that. I got the game to generate 2 wild pokémon, and yes, it could easily generate 6. The game would hang badly though, and there is no code in the game for triple battles, never mind sextuple battles.

The bigger issues are the music playing the "you won" music at the wrong point, and the ability/lack of ability to catch the Pokémon on screen.

Once we deal with these issues, and deal with the lack of ability to run from the battle. We'll be in a good position to start implementing this hack into actual hacks.

slawter666
June 1st, 2011, 08:01 AM
As we're on the topic of battles. How difficult would it be to implement more advanced battlegrounds? i.e. 256 colour backgrounds, animated backgrounds, a different background depending on the time of day (and maybe seasons too), one for specific areas (such as one for each elite four + the champion) etcetera.

TheDarkShark
June 1st, 2011, 01:35 PM
@slawter666: driver implemented a battle BG hack in BPRD (Firered German) which loads different bgs depending on a variable. Shouldn't be hard to port, but I'm not sure if he actually released the info. I'm not an ASM expert, but an animated background could go with the extended BG-loading routine easily, I guess. Same goes for different BGs for daytimes/seasons. A 256 bg should be possible somehow, but it is possible, that there are some background colors used in the standard battle screen. If this is true, it would be very hard to make 256 colors load properly (actually impossible without loading the other bg-palletes into the OBJ-palette...).

slawter666
June 2nd, 2011, 02:51 PM
@slawter666: driver implemented a battle BG hack in BPRD (Firered German) which loads different bgs depending on a variable. Shouldn't be hard to port, but I'm not sure if he actually released the info. I'm not an ASM expert, but an animated background could go with the extended BG-loading routine easily, I guess. Same goes for different BGs for daytimes/seasons. A 256 bg should be possible somehow, but it is possible, that there are some background colors used in the standard battle screen. If this is true, it would be very hard to make 256 colors load properly (actually impossible without loading the other bg-palletes into the OBJ-palette...).

Thanks for the reply.

Could a (roughly) 256 colour background could be done using a similar method to Black Charizard's 256/240 colour Titlescreen (http://www.pokecommunity.com/showthread.php?t=228656)? However he removed how he did it (although it might still be in some quotes, I haven't checked).

Meta Paradox
June 2nd, 2011, 11:20 PM
Okay, if the double wild battle needs changing every so often EXTERNALLY with a hex editor, wouldn't writebytetooffset work? At least for wildbattle scripts?

Jambo51
June 3rd, 2011, 03:39 AM
Okay, if the double wild battle needs changing every so often EXTERNALLY with a hex editor, wouldn't writebytetooffset work? At least for wildbattle scripts?

No. The byte in question is always written with the standard routine. And it's always written as 0x0. This needs some investigation. It is possible for me to make a routine which reads from lastresult for ghe wildbattle type, though.

I've got the game generating 2 random wild pokemon from the map's pokemon. Although i'm struggling to find where the buggy things are, atm.

POKEMONMASTER260
June 3rd, 2011, 05:22 AM
Is it possible to implement this in a Ruby ROM hack, instead of just a memory hack?

miksy91
June 3rd, 2011, 09:16 AM
This is pretty much impossible if you ask me.

Reason:
It would be a difficult thing to make it so that 2 pokemon could appear at the same time but the real problem would be the coding for the battle not to end if you caught one pokemon (of course if the hacker wanted it to be so that the battle would end leaving the other pokemon uncatchable it would be possible, maybe).

sonic1
June 3rd, 2011, 02:36 PM
At 01065c put a branch to this routine:~

.thumb
.align 2

main:
LDR R5, =0x20370CA ' var 8009 adress. Chose this one because its not used often
LDRB R5, [R5]
CMP R5, #0xF 'If var 8009 is 0xF then go to new code. Else continue original code.
BEQ new_code
STR R1, [R2]
LDR R1, =0x2023E82
MOV R0, #0xF
STRB R0, [R1]
LDR R4, =0x8010665
BX R4

new_code: 'What this code does is basically setting the double battle bit.
PUSH {R7}
MOV R7, #1 ' see the line up
ORR R1, R7
POP {R7}
STR R1, [R2]'----------Rest of the routine
LDR R1, =0x2023E82
MOV R0, #0xF
STRB R0, [R1]
LDR R4, =0x8010665
BX R4


Presto! With var 8009 with value 0xF set, you can now have double battles. Any double battles: Wild, trainer, wireless, safari, blah blah blah.

~Sonic1

Team Fail
June 3rd, 2011, 02:42 PM
At 01065c put a branch to this routine:~

.thumb
.align 2

main:
LDR R5, =0x20370CA ' var 8009 adress. Chose this one because its not used often
LDRB R5, [R5]
CMP R5, #0xF 'If var 8009 is 0xF then go to new code. Else continue original code.
BEQ new_code
STR R1, [R2]
LDR R1, =0x2023E82
MOV R0, #0xF
STRB R0, [R1]
LDR R4, =0x8010665
BX R4

new_code: 'What this code does is basically add 1 to the current value in r1, setting the double battle bit
ADD R1, #1 ' see the line up
STR R1, [R2]'----------Rest of the routine
LDR R1, =0x2023E82
MOV R0, #0xF
STRB R0, [R1]
LDR R4, =0x8010665
BX R4


Presto! With var 8009 with value 0xF set, you can now have double battles. Any double battles: Wild, trainer, wireless, safari, blah blah blah.

~Sonic1

Ooh goody. Now, all that needs to be done is to write a routine that allows a wireless double battle to work!

Especially if each trainer tries to catch the same Pokemon.

Edit: Someone made a really good point on that video. I'll have to see to it. It is using surf to kill both opposing Pokemon. But, I don't think anything special will happen.

Jambo51
July 10th, 2011, 06:23 PM
Ooh goody. Now, all that needs to be done is to write a routine that allows a wireless double battle to work!

Especially if each trainer tries to catch the same Pokemon.

Edit: Someone made a really good point on that video. I'll have to see to it. It is using surf to kill both opposing Pokemon. But, I don't think anything special will happen.

As you may have realised by now, it makes absolutely no difference if you KO them both at the same time as the game runs the checks properly.

I've managed to iron out most of the bugs with my routines now. The only problem now is that I can't find what tile the player is standing on, and as such, can't work out probabilities for how often they should occur.

I was trying to cook up a way for normal grass tiles to have a 1 in 20 chance or something, with "special" grass tiles having a much higher chance. If anyone could point me in the right direction for where to get a tile ID in the RAM/ROM, I will finish this hack off, and get it posted on here for all and sundry to use.

Also, 100th post! :D

Darthatron
July 11th, 2011, 12:08 AM
As you may have realised by now, it makes absolutely no difference if you KO them both at the same time as the game runs the checks properly.

I've managed to iron out most of the bugs with my routines now. The only problem now is that I can't find what tile the player is standing on, and as such, can't work out probabilities for how often they should occur.

I was trying to cook up a way for normal grass tiles to have a 1 in 20 chance or something, with "special" grass tiles having a much higher chance. If anyone could point me in the right direction for where to get a tile ID in the RAM/ROM, I will finish this hack off, and get it posted on here for all and sundry to use.

Also, 100th post! :D
I believe you have to read the X/Y position of the player from the RAM, then manually load the tile ID from the ROM based on that.

Jambo51
July 13th, 2011, 09:32 AM
Here we have a newer update of the routines:

http://www.youtube.com/watch?v=pPUWIWztYrA

It's not perfect. You can't run from the battle, and you can only catch one of the Pokémon, but the music plays on winning the battle correctly now.

Pingouin_7
July 13th, 2011, 11:29 AM
Weird.
I got my hands on a FireRed rom and when I checked 02022B4C it was already set to 03 for some reason.
Then when I edited it to 01, it started some kind of double battle with only one Pokémon on the right.

When I sent two Pokémon, one of them acted normal, but the second Pokéball flew all the way up to the wild Pokémon and some kind of glitchy line of mess appeared near my Pokémon's HP bar.
The game froze after the battle.

Liquid Twilight
July 22nd, 2011, 04:59 AM
Wow. I glanced at this thread a day or two ago and I thought it would take you all a lot longer to get a almost fully functioning wild double battle going.

Now, I have no knowledge about anything you guys have done and I wouldn't know where to start implementing but in regards to running could you not run a check at the beginning of the escape routine to check if it is a double battle and if it is use a modified version of the runaway script.

E.g.

The formula for the normal Run routine is ((Speed of your pokemon) x 32 / (speed opponent) divided by 4, mod 256) plus 30 times (amount of escape attempts).

Edit: I forgot to add this would require the run command to be executed before any attacks happen and would require the battle to finish if successful ... but I imagine you all knew that already.

Also ...

In regards to a capture could you not force the routine to treat the captured pokemon as knocked out and then proceed with the battle as normal. Would this not enable the other pokemon to be captured? or does the game only allow for 1 capture per battle.

As I said, I have no knowledge of this sort of thing so please don't kill me, I'm just trying to help.

However for a wild double battle could it not be ((Speed of both player pokemon divide by 2) x32 / (speed of opponents) divide by 8, mod 256) plus 30 times (amount of escape attempts)

Thus effectively averaging out the wild pokemon to trainers pokemon ratio. If you need me to clarify the formula, just ask.

jabberjabber8
August 19th, 2011, 11:53 PM
I have been away for some time (just over 2 months) when I left we were painfully close to managing this but by the looks of it there has not been a post in this thread for months...

Does that mean wild double battles have been perfected or does it just mean we have given up?

Jambo51
April 26th, 2012, 07:11 PM
EDIT: Interesting. the video decided to stop working. Look down a couple of posts. Spherical Ice reposted it for me.

This is the latest on Double Wild Battles! Looking pretty good IMO, :D.

~Anbuja
May 11th, 2012, 10:31 PM
v/hA0T2C7IGJk

This is the latest on Double Wild Battles! Looking pretty good IMO, :D.

I don't know if this is just me or not, but i can't watch the videos ;s

It says theyre removed.

Spherical Ice
May 12th, 2012, 01:03 AM
hA0T2C7IGJk

I believe this is what Jambo meant to post, haha.

ShinyDragonHunter
August 19th, 2012, 06:40 PM
Would it be possible to generate a double wild battle with another trainer?
Like in DPPt, you can team up with Riley and fight two wild Pokémon with Riley on your side.

Herpahermaderp
October 18th, 2012, 11:00 AM
So, Jambo, are you going to share your double battle ASM? lol