The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.


Advertise here

Reply
 
Thread Tools
  #26    
Old May 31st, 2011, 02:07 PM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet

Advertise here
Quote:
Originally Posted by sonic1 View Post

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.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote
  #27    
Old May 31st, 2011, 02:19 PM
sonic1's Avatar
sonic1
ASM is my life now...
 
Join Date: May 2008
Location: Portugal
Age: 19
Gender: Male
Nature: Timid
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
__________________

My Site (UNDER CONSTRUCTION):

(mage by Xryo)

PORTUGUESE USER
Sou o Dark rayquaza da antiga myutsu.net


My Laptop SPECS:


Credits to Eagledelt for the wonderfull sign :D

Reply With Quote
  #28    
Old May 31st, 2011, 02:48 PM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Quote:
Originally Posted by sonic1 View Post
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.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote
  #29    
Old June 1st, 2011, 08:01 AM
slawter666
 
Join Date: Sep 2008
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.
__________________
Reply With Quote
  #30    
Old June 1st, 2011, 01:35 PM
TheDarkShark
Metal Headed Hacker
 
Join Date: May 2010
Location: Germany
Gender: Male
Nature: Calm
@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...).
__________________
There are two things every Rom-Hacker should learn:
1. Don't give away everything you know!

Reply With Quote
  #31    
Old June 2nd, 2011, 02:51 PM
slawter666
 
Join Date: Sep 2008
Quote:
Originally Posted by TheDarkShark View Post
@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? However he removed how he did it (although it might still be in some quotes, I haven't checked).
__________________
Reply With Quote
  #32    
Old June 2nd, 2011, 11:20 PM
Meta Paradox
Researching FireRed...
 
Join Date: Apr 2011
Gender: Male
Nature: Serious
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?
__________________
Meta Paradox On The Web:
http://metaparadox.webs.com/
Reply With Quote
  #33    
Old June 3rd, 2011, 03:39 AM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Quote:
Originally Posted by Meta Paradox View Post
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.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote
  #34    
Old June 3rd, 2011, 05:22 AM
POKEMONMASTER260
 
Join Date: Jun 2009
Is it possible to implement this in a Ruby ROM hack, instead of just a memory hack?
__________________
I don't use, "uber," Pokemon, I don't calculate stat values, I don't use cheating devices, I don't breed my way to perfection, and I don't care about natures. I catch my Pokemon the way they are, and treat them like individuals instead of brainless drones. If you use this philosophy, copy & paste this into your signature.
Reply With Quote
  #35    
Old June 3rd, 2011, 09:16 AM
miksy91's Avatar
miksy91
A GB/C Rom Hacker since 2010
 
Join Date: Oct 2008
Location: A small country in the North
Gender: Male
Nature: Relaxed
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).
__________________
My Rom Hack



Hacks I support





Learn how to hack GB/C games:

Check my GameBoy/Color hacking videos in Youtube
-The video set uses Pokemon Silver (U) rom for demonstrations
Reply With Quote
  #36    
Old June 3rd, 2011, 02:36 PM
sonic1's Avatar
sonic1
ASM is my life now...
 
Join Date: May 2008
Location: Portugal
Age: 19
Gender: Male
Nature: Timid
At 01065c put a branch to this routine:~
Code:
.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
__________________

My Site (UNDER CONSTRUCTION):

(mage by Xryo)

PORTUGUESE USER
Sou o Dark rayquaza da antiga myutsu.net


My Laptop SPECS:


Credits to Eagledelt for the wonderfull sign :D


Last edited by sonic1; May 1st, 2012 at 02:51 AM. Reason: Modified code for compatibility with double trainer battles.
Reply With Quote
  #37    
Old June 3rd, 2011, 02:42 PM
Team Fail's Avatar
Team Fail
The fine line between in|sanity
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
Quote:
Originally Posted by sonic1 View Post
At 01065c put a branch to this routine:~
Code:
.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.
__________________

Pairs:
Kevin, Echidna
Follow me on Twitter! @TeamFail
Alt 1, リザードン
Miiverse
Pokémon Hackers Online
Alt 2: Jack Cayman



[04:20.39] <@GoGo> I WILL INSERT WITH PLEASURE
[04:20.45] <@GoGo> shut it Bela

[05:41.55] <Team_Fail> Blue Spider is interesting, but #MEHMasterRace
[05:42.20] <diegoisawesome> Team_Fail: Sounds like a bunch of unmotivated people that still want to try to take over the world

Last edited by Team Fail; June 4th, 2011 at 07:15 PM.
Reply With Quote
  #38    
Old July 10th, 2011, 06:23 PM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Quote:
Originally Posted by Team Fail View Post

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
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote
  #39    
Old July 11th, 2011, 12:08 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by Jambo51 View Post
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.
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote
  #40    
Old July 13th, 2011, 09:32 AM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
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.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

Last edited by Jambo51; April 26th, 2012 at 07:22 PM.
Reply With Quote
  #41    
Old July 13th, 2011, 11:29 AM
Pingouin_7
This account is now inactive
 
Join Date: Oct 2008
Age: 20
Gender: Male
Nature: Hardy
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.
Reply With Quote
  #42    
Old July 22nd, 2011, 04:59 AM
Liquid Twilight's Avatar
Liquid Twilight
Super Geek
 
Join Date: Apr 2011
Location: New Bark Town
Age: 23
Gender: Male
Nature: Timid
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.

Last edited by Liquid Twilight; July 22nd, 2011 at 05:06 AM. Reason: Adding more
Reply With Quote
  #43    
Old August 19th, 2011, 11:53 PM
jabberjabber8's Avatar
jabberjabber8
../\..
 
Join Date: Mar 2011
Location: England
Gender: Male
Nature: Rash
Send a message via Windows Live Messenger to jabberjabber8 Send a message via Skype™ to jabberjabber8
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?
__________________


Rumble rock is back, expect a BETA soon.
Reply With Quote
  #44    
Old April 26th, 2012, 07:11 PM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
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.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

Last edited by Jambo51; May 12th, 2012 at 02:30 AM.
Reply With Quote
  #45    
Old May 11th, 2012, 10:31 PM
~Anbuja's Avatar
~Anbuja
Let's Keep It Simple
 
Join Date: Oct 2010
Location: In Snorlax Stomach
Gender: Male
Nature: Lonely
Send a message via Skype™ to ~Anbuja
Quote:
Originally Posted by Jambo51 View Post


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.
__________________
Reply With Quote
  #46    
Old May 12th, 2012, 01:03 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice


I believe this is what Jambo meant to post, haha.
__________________
Reply With Quote
  #47    
Old August 19th, 2012, 06:40 PM
ShinyDragonHunter
Unhatched Egg
 
Join Date: Nov 2010
Gender: Male
Nature: Calm
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.
Reply With Quote
  #48    
Old October 18th, 2012, 11:00 AM
Herpahermaderp's Avatar
Herpahermaderp
I liek Mudkipz
 
Join Date: Jul 2012
Location: USA
Age: 16
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Herpahermaderp
So, Jambo, are you going to share your double battle ASM? lol
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 11:12 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 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 - 2014 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.