![]() |
Wild double / triple battles
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. |
Quote:
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. |
Quote:
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? |
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...
|
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 |
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 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 |
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 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 |
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 |
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. |
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 |
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. |
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 |
Quote:
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 |
Quote:
|
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 |
Quote:
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. |
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.
|
@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...).
|
Quote:
Could a (roughly) 256 colour background could be done using a similar method to Black Charizard's 256/240 colour Titlescreen? However he removed how he did it (although it might still be in some quotes, I haven't checked). |
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?
|
Quote:
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. |
Is it possible to implement this in a Ruby ROM hack, instead of just a memory hack?
|
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). |
| All times are GMT -8. The time now is 8:59 AM. |
![]()
© 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.