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
Click here to go to the first staff post in this thread.  
Thread Tools
  #526    
Old July 15th, 2014, 08:57 PM
Tlachtli's Avatar
Tlachtli
Crit happens.
 
Join Date: Jan 2012
Location: Faraway place
Age: 23
Gender: Male
Nature: Modest

Advertise here
Does anyone know the byte(s) to change in Emerald to increase the number of usable sound channels? I've been looking everywhere, but can't seem to find the post it was in.
__________________
Pokemon Sigma Σmerald:

A Gen 3 remake de-make, (soon to be) featuring many Gen VI mechanics
Reply With Quote
  #527    
Old July 15th, 2014, 10:52 PM
mamamama
 
Join Date: Feb 2014
Quote:
Originally Posted by Tlachtli View Post
Does anyone know the byte(s) to change in Emerald to increase the number of usable sound channels? I've been looking everywhere, but can't seem to find the post it was in.
Put B0 B5 00 03 10 at 0x86B49C4 to increase the playable tracks from 10 to 16

Put CC at 0x82E0105 increase the 5 DirectSound limit.
Reply With Quote
  #528    
Old July 17th, 2014, 05:23 PM
kearnseyboy6's Avatar
kearnseyboy6
Aussie's Toughest Mudder
 
Join Date: Dec 2008
In case anyone had not of thought of this, replicating the repeating trainer battles on warp in BW2 is as easy as setting their trainer flag, or clearing flag 0x5XX
__________________
HOLIDAYING CURRENTLY!!
Reply With Quote
  #529    
Old July 22nd, 2014, 06:57 AM
Tlachtli's Avatar
Tlachtli
Crit happens.
 
Join Date: Jan 2012
Location: Faraway place
Age: 23
Gender: Male
Nature: Modest
Quote:
Originally Posted by Chaos Rush View Post


XY added a feature that gives experience points when you catch pokemon. To duplicate this in Emerald, do the following:

Repoint the battle script at x2dbd84 to point to this:

2A 00 08 42 02 02 05 00 92 BD 2D 08 60 0B 10 0B 01 F1 XX XX XX XX 2E 90 44 02 02 00 2E AC 40 02 02 00 2E AD 40 02 02 00 23 00 10 0F 01 3A 2E 32 43 02 02 00 F2 10 0D 01 3A 2E 32 43 02 02 00 F3 C2 BD 2D 08 F0 13 7A C9 5C 08 12 40 00 28 C3 BD 2D 08

where XX XX XX XX is a pointer to:

2E 90 44 02 02 00 2E AC 40 02 02 00 2E AD 40 02 02 00 23 00 10 0D 01 3A 2E 32 43 02 02 00 F3 C2 BD 2D 08 F0 13 7A C9 5C 08 12 40 00 28 C3 BD 2D 08

To let the player's mons evolve from this experience, replace the bytes at x3DE7C with B5 DE 03 08.

credit obviously goes to DoesntKnowHowToPlay for doing this first on FireRed lol
I believe I've found an interesting bug with this. Under normal circumstances it works fine: you battle, catch, gain xp, display Pokedex entry:


However if you level up from that xp, it causes the Pokedex to go wonky:


EDIT: Found another small graphical bug, too. Learning a move on level-up after successfully catching a Pokemon will cause the wild Poke's sprite to re-appear after exiting the move learning screen. Unimportant in the long run, as the battle ends right after.
__________________
Pokemon Sigma Σmerald:

A Gen 3 remake de-make, (soon to be) featuring many Gen VI mechanics

Last edited by Tlachtli; July 28th, 2014 at 11:08 AM.
Reply With Quote
  #530    
Old July 22nd, 2014, 03:56 PM
Alisa180
 
Join Date: May 2014
Gender: Female
I recently started ASM hacking. My first goal is to expand on Jambo51's pre-battle Mugshot routine hack and allow actual mugshots (rather then just sized-up sprites).

After lots of reading, research, and digging through ASM and hex data, I felt confident enough to try something. And jackpot!

If Jambo51's mugshot routine is installed, at location 0808386E, the data at r4 corresponds to the opponent Trainer sprite loaded into the mugshot. In this case, my byte was 6D corresponding to the Rocket sprite. If you change the byte here to a byte corresponding to a different Trainer sprite (In my case, I changed it to 6B, corresponding to the Scientist sprite), then the game will load the new sprite into the mugshot WITHOUT changing the opponent Trainer sprite!

I'd post screenshots, but I'm not allowed to post links yet.

This can be used as a starting point for a routine that can call opponent mugshots like in later generations. One can insert a routine at this point to call an image to replace the pre-battle mugshot. I'm still figuring out what part of the code actually resizes the sprite, but once I do, the potential routine can be written to skip over that part of the code.

Now to learn more ASM so I can actually try writing said routine.
Reply With Quote
  #531    
Old July 23rd, 2014, 07:32 AM
Shiny Quagsire's Avatar
Shiny Quagsire
どないやねん, ヤドン
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
Quote:
Originally Posted by Tlachtli View Post
I believe I've found an interesting bug with this. Under normal circumstances it works fine: you battle, catch, gain xp, display Pokedex entry:


However if you level up from that xp, it causes the Pokedex to go wonky:
It looks to me like BG0 is just a bit offset. I bet there's a battle script command to fix that, but I can't be certain.
__________________



Reply With Quote
  #532    
Old July 25th, 2014, 11:29 PM
Alisa180
 
Join Date: May 2014
Gender: Female
After several days of digging through and fiddling with the mugshot routine, I managed to produce THIS:



I got this by replacing 0F 48 at offset 080838B2 with 00 00. This confirms for me that the routine cuts the sprites in half before re-sizing them. The sprites are tilted oddly enough, but I can work with it if I have to.
Reply With Quote
  #533    
Old July 27th, 2014, 08:04 PM
Dark Sneasel's Avatar
Dark Sneasel
Community Supporter
 
Join Date: Jun 2013
Location: Miami, FL
Age: 14
Gender: Male
Nature: Hasty
Hate to be "that guy," but does anyone know the offset for the wailmer (I think it is) in Emerald that the player surfs on? I tried looking around in NSE, around the OW area, and couldn't find it. However in VBA in the OAM viewer it was there. Sorry if this is the wrong place.
__________________
My stuff:
Controllable Boats in Gen 3 Games
Pokémon Fluorite Version (Beta 1 Released)
Pokémon Emerald Specials
Change Player OW in script
Making a tag battle script
G3HS extended Pokemon in the wild
Starting out with Rom Hacking? Click here
#SlowDownFigi

http://chat.linkandzelda.com:9090/?c...overy,fluorite
^Coolest irc... ever
Reply With Quote
  #534    
Old July 28th, 2014, 01:45 AM
Windsong
—the dream is dead
 
Join Date: Dec 2007
Location: Germany
Age: 21
Gender: Male
Nature: Quiet
Quote:
Originally Posted by Dark Sneasel View Post
Hate to be "that guy," but does anyone know the offset for the wailmer (I think it is) in Emerald that the player surfs on? I tried looking around in NSE, around the OW area, and couldn't find it. However in VBA in the OAM viewer it was there. Sorry if this is the wrong place.
This one? You can find it at 004F5498~

__________________
あなたがいつか消えて行くの?
working on something
Reply With Quote
  #535    
Old July 29th, 2014, 11:06 AM
daniilS's Avatar
daniilS
busy trying to do stuff not done yet
 
Join Date: Aug 2013
Age: 15
Gender: Male
Applymovement 0x9F in FireRed makes the character look left and right. I haven't seen this before, so maybe it's interesting to know.
__________________

Thanks to JPAN, Jambo51, Shiny Quagsire and knizz for teaching me almost everything I know about hacking, through tutorials or in person.
Reply With Quote
  #536    
Old July 29th, 2014, 11:32 AM
Dark Sneasel's Avatar
Dark Sneasel
Community Supporter
 
Join Date: Jun 2013
Location: Miami, FL
Age: 14
Gender: Male
Nature: Hasty
Trying out some movements in Emerald because I have nothing better to do

0x4F - Player runs in place, facing down doesn't seem to stop, even with 0xFE after.
0x50 -0x53 - nothing.
0x5A and 0x5B -player faces up, 0xFE doesn't cancel the effects
0x5e - After it finishes when you walk right, it uses the walk left sprite.
0x68 - same as 0x4F
0x69 - same, but runs facing up instead
0x6A - same, but runs facing left instead
0x6B - same, but runs facing right instead
0x6C - seems to be walking in place, facing down
0x6D - seems to be walking in place, facing up
0x6E - seems to be walking in place, facing left
0x6F - seems to be walking in place, facing right
0x9B - player starts flying and does something cool http://imgur.com/qhLqOel

EDIT: I forgot to add another applymovement, my bad. 0x5F cancels the effect of 0x5E.
__________________
My stuff:
Controllable Boats in Gen 3 Games
Pokémon Fluorite Version (Beta 1 Released)
Pokémon Emerald Specials
Change Player OW in script
Making a tag battle script
G3HS extended Pokemon in the wild
Starting out with Rom Hacking? Click here
#SlowDownFigi

http://chat.linkandzelda.com:9090/?c...overy,fluorite
^Coolest irc... ever

Last edited by Dark Sneasel; July 31st, 2014 at 09:53 PM.
Reply With Quote
  #537    
Old July 31st, 2014, 02:47 AM
daniilS's Avatar
daniilS
busy trying to do stuff not done yet
 
Join Date: Aug 2013
Age: 15
Gender: Male
Here's a preview of the stuff in my upcoming Movement Documentation:
A piece of asm that makes you run-jump off ledges if B is pressed and you are not on a bike. It just annoyed me that when you were running you would still walk-jump off them, so I came up with a fix.

Code:
.text
.align 2
.thumb
.thumb_func
.global jump_2_with_sound_new

main:
	push {r4, lr}
	mov r4, r0
	mov r0, #0xA
	bl +0x16090
	mov r0, r4
	bl +0x7ED4
	ldr r1, buttonz
	ldrb r1, [r1]
	mov r4, #0x2
	and r1, r4
	beq next
	ldr r1, walkrun
	ldrb r1, [r1]
	cmp r1, #0x2
	beq next
	add r0, #0x70
next:
	mov r1, #0x8
	bl -0x218
	pop {r4, pc}

.align 2
buttonz:	.word 0x0300311C
walkrun:	.word 0x02037078

/*insert at 0805C23C*/
EDIT: fixed a typo.
__________________

Thanks to JPAN, Jambo51, Shiny Quagsire and knizz for teaching me almost everything I know about hacking, through tutorials or in person.

Last edited by daniilS; August 1st, 2014 at 12:28 AM. Reason: derp
Reply With Quote
  #538    
Old August 1st, 2014, 07:05 PM
Dark Sneasel's Avatar
Dark Sneasel
Community Supporter
 
Join Date: Jun 2013
Location: Miami, FL
Age: 14
Gender: Male
Nature: Hasty
Not sure if this could be of use to anyone, but I found this in emerald. sadly, it has no checkflag, I was trying to find a way to make you be able to use surf without the badge, but then again, maybe this could be useful to someone?

'---------------
#org 0x271EA0
checkattack 0x39
compare LASTRESULT 0x6
if 0x1 goto 0x8271ED6
bufferpartypokemon 0x0 LASTRESULT
setanimation 0x0 LASTRESULT
lockall
msgbox 0x8272FD6 MSG_YESNO '"The water is dyed a deep blue[.]\n..."
compare LASTRESULT 0x0
if 0x1 goto 0x8271ED5
msgbox 0x827300D MSG_KEEPOPEN '"[buffer1] used SURF!"
doanimation 0x9
releaseall
end

'---------------
#org 0x271ED6
end

'---------------
#org 0x271ED5
releaseall
end


'---------
' Strings
'---------
#org 0x272FD6
= The water is dyed a deep blue[.]\nWould you like to SURF?

#org 0x27300D
= [buffer1] used SURF!
__________________
My stuff:
Controllable Boats in Gen 3 Games
Pokémon Fluorite Version (Beta 1 Released)
Pokémon Emerald Specials
Change Player OW in script
Making a tag battle script
G3HS extended Pokemon in the wild
Starting out with Rom Hacking? Click here
#SlowDownFigi

http://chat.linkandzelda.com:9090/?c...overy,fluorite
^Coolest irc... ever
Reply With Quote
  #539    
Old August 3rd, 2014, 02:06 PM
DJTiKi's Avatar
DJTiKi
The Pokémon Idealist
 
Join Date: Mar 2014
Location: Fight Club
Gender: Male
Nature: Adamant
Send a message via Skype™ to DJTiKi
So I want to implement a feature, which has a ZERO requirement for HM's. Of course, I wanted the things like Surf, Cut, etc. to still be available, at least in the overworld. I do believe that Pokémon, uses a something of a "check move" command, to initate the HM Overworld Exploring process. But since, we are removing HM's, what about a TM/HM Compatibility Check, to see if it could learn the moves, rather than if it haves the HM. It makes more sense that Pokémon can use HM's without their moves. All Water Pokémon can use Surf and Waterfall, not even having to use the HM's given.

The dynamic offsets for the TMHM Compatibilty Table follows as so:
BPRE(Fire Red)- 43C68
AXVE(Ruby)- 403B0
BPEE(Emerald)- 6E048

I'm pretty sure that is absolutely useless, but wanted to post something other than my ideas. I may start looking over Move Tutors, since they need to look into TMHM Compatibilty to teach moves. I'll edit this post with future findings.
__________________
Unexpectedly taking a break from ROM Hacking for NOW

HEY YOU! Yes, you. Had an idea for a Pokémon game, or anything in general for new games? Don't hack, but want to put your ideas out there? Or perhaps, you just want to talk about it? Well, do I have a treat for you. Just come on by to the Idea Exchange thread here. And yes, it's so good that I wrote a paragraph for it.

Links For All The Things:
DJTiKi's Guide To Planning Your Awesome ROM Hack! Planning For Dummies
Pokémon Serenity Escape
The Idea Exchange Thread- Inspiring Bigger Things!
A (Very) Short Dictionary To ROM Hacking Lingo!
Reply With Quote
  #540    
Old August 3rd, 2014, 02:25 PM
Deokishisu's Avatar
Deokishisu
Mr. Magius
 
Join Date: Feb 2006
Location: If I'm online, it's a safe bet I'm at a computer.
Gender: Male
Nature: Relaxed
Quote:
Originally Posted by DJTiKi View Post
So I want to implement a feature, which has a ZERO requirement for HM's. Of course, I wanted the things like Surf, Cut, etc. to still be available, at least in the overworld. I do believe that Pokémon, uses a something of a "check move" command, to initate the HM Overworld Exploring process. But since, we are removing HM's, what about a TM/HM Compatibility Check, to see if it could learn the moves, rather than if it haves the HM. It makes more sense that Pokémon can use HM's without their moves. All Water Pokémon can use Surf and Waterfall, not even having to use the HM's given.

The dynamic offsets for the TMHM Compatibilty Table follows as so:
BPRE(Fire Red)- 43C68
AXVE(Ruby)- 403B0
BPEE(Emerald)- 6E048

I'm pretty sure that is absolutely useless, but wanted to post something other than my ideas. I may start looking over Move Tutors, since they need to look into TMHM Compatibilty to teach moves. I'll edit this post with future findings.
I've had something exactly like this implemented in my hack for quite some time, where if a Pokemon is capable of learning a HM, it can use it in the field. I just did it the lazy way and scripted cut trees/rock smash rocks/surf script/etc. to check your party for a list of pokemon compatible with the moves. It will prefer Pokemon that know the move before choosing one that doesn't but can learn. It's inelegant, and lazy, but it works and is indistinguishable graphically from using HM moves in the field normally. I haven't come up with a solution for Fly, and since I'm on the fence about including it as a field move, I've not really tried. Ideally, the option for Fly in the party menu would appear after obtaining the badge and its HM, as that would be conceivably the earliest the player would be able to use it if they're not trading. But, that begs the question, do teleport and dig get the same treatment? Would having them available at no cost with a Pokemon that can learn it in your party make the game too easy?

EDIT: I suppose if you were really lazy, you could have the person that gives you Fly give you a Flight Map key item, or something, that checks the party for a Pokemon capable of using Fly before callasm-ing the flight map and letting you select a location.

Last edited by Deokishisu; August 3rd, 2014 at 02:32 PM.
Reply With Quote
  #541    
Old August 3rd, 2014, 02:42 PM
DJTiKi's Avatar
DJTiKi
The Pokémon Idealist
 
Join Date: Mar 2014
Location: Fight Club
Gender: Male
Nature: Adamant
Send a message via Skype™ to DJTiKi
Quote:
Originally Posted by Deokishisu View Post
I've had something exactly like this implemented in my hack for quite some time, where if a Pokemon is capable of learning a HM, it can use it in the field. I just did it the lazy way and scripted cut trees/rock smash rocks/surf script/etc. to check your party for a list of pokemon compatible with the moves. It will prefer Pokemon that know the move before choosing one that doesn't but can learn. It's inelegant, and lazy, but it works and is indistinguishable graphically from using HM moves in the field normally. I haven't come up with a solution for Fly, and since I'm on the fence about including it as a field move, I've not really tried. Ideally, the option for Fly in the party menu would appear after obtaining the badge and its HM, as that would be conceivably the earliest the player would be able to use it if they're not trading. But, that begs the question, do teleport and dig get the same treatment? Would having them available at no cost with a Pokemon that can learn it in your party make the game too easy?
The usage of Fly, would be a tough one. The main problem with this is the limitations, bound by Badges. I belive there is ASM, for turning the HM's to TM's, so I'd use that. So maybe, if we remove the option for badge orientated limitations, then this could be looked around. Funny you say that, about the scripts, because I thought of the same thing. xD

In terms of making the game easier. In my game, having the access to Dig and Teleport, wouldn't make much of a deference. But if we are talking hacks as a whole, it would make it easier. But that means, the player can focus more on the design aspects of the region, without worrying about placing many barriers. Also another issue, may be that you can go anywhere. Being how, most progression barriers, are HM overworld limits. So this is more of an implematation, more focused to an open setting, than a linear one. So yes, it would definetly make an 8 badge journey hacks, more easier. But it's also a convience to hackers, making more open-orientated game, like me , who would love a feature like this, as both a player and hacker,
__________________
Unexpectedly taking a break from ROM Hacking for NOW

HEY YOU! Yes, you. Had an idea for a Pokémon game, or anything in general for new games? Don't hack, but want to put your ideas out there? Or perhaps, you just want to talk about it? Well, do I have a treat for you. Just come on by to the Idea Exchange thread here. And yes, it's so good that I wrote a paragraph for it.

Links For All The Things:
DJTiKi's Guide To Planning Your Awesome ROM Hack! Planning For Dummies
Pokémon Serenity Escape
The Idea Exchange Thread- Inspiring Bigger Things!
A (Very) Short Dictionary To ROM Hacking Lingo!
Reply With Quote
  #542    
Old August 3rd, 2014, 11:15 PM
daniilS's Avatar
daniilS
busy trying to do stuff not done yet
 
Join Date: Aug 2013
Age: 15
Gender: Male
I'd rather go with a type check. So you'd need a grass or bug type for cut, a fighting type for rock smash, a flying type for fly, and so on.
__________________

Thanks to JPAN, Jambo51, Shiny Quagsire and knizz for teaching me almost everything I know about hacking, through tutorials or in person.
Reply With Quote
  #543    
Old August 4th, 2014, 03:22 AM
Le pug's Avatar
Le pug
Creator of Pokémon: Discovery
Community Supporter
 
Join Date: Aug 2013
Location: Le bed
Age: 21
Gender: Male
Nature: Bold
Alright so me and DarkSneasel were trying to find a way to checkpokemon in your party for events in Emerald...

so I looked at all the different in-game trading scripts and I figured out this script:

Spoiler:
#org @event
lock
setvar 0x8008 0x1
copyvar 0x8004 0x8008
special2 LASTRESULT 0xFF
copyvar 0x8009 LASTRESULT
special 0xA2
waitstate
copyvar 0x800A 0x8004
compare 0x8004 0xFF
if 0x1 goto @noaa
copyvar 0x8005 0x800A
special2 LASTRESULT 0x102
copyvar 0x800B LASTRESULT
comparevars LASTRESULT 0x8009
if 0x1 goto @noaa
msgbox @talk 0x6
release
end

#org @noaa
msgbox @talk3 0x6
release
end

#org @talk3
= YOU HAVE THE VOLBEAT

#org @talk
= You have nothing!


This script won't go through with the script unless you select from your party a volbeat. Here is a video rep of it:
https://www.dropbox.com/s/lb4kj8h1quelcz7/here.AVI

So I noticed that what actually should change it is the 0x8008 var. There are 4 different in-game trading scripts. Check out the difference between three of them:

For volbeat:
Spoiler:
setvar 0x8008 0x0
copyvar 0x8004 0x8008
special2 LASTRESULT 0xFF
copyvar 0x8009 LASTRESULT
msgbox 0x82159E8 MSG_YESNO '"Huh? My POKéMON is cute?\nSure, I ..."
compare LASTRESULT 0x0
if 0x1 goto 0x82159BD
special 0xA2
waitstate
copyvar 0x800A 0x8004
compare 0x8004 0xFF
if 0x1 goto 0x82159BD
copyvar 0x8005 0x800A
special2 LASTRESULT 0x102
copyvar 0x800B LASTRESULT
comparevars LASTRESULT 0x8009
if 0x5 goto 0x82159C7
copyvar 0x8004 0x8008
copyvar 0x8005 0x800A
special 0x100
special 0x101
waitstate
msgbox 0x8215A77 MSG_KEEPOPEN '"Eheheh[.]\nPlease be good to my PO..."
setflag 0x99
release
end


For Ralts:
Spoiler:
setvar 0x8008 0x1
copyvar 0x8004 0x8008
special2 LASTRESULT 0xFF
copyvar 0x8009 LASTRESULT
msgbox 0x821637B MSG_YESNO '"Wrooooaaar! I need it!\nI have to ..."
compare LASTRESULT 0x0
if 0x1 goto 0x821633D
special 0xA2
waitstate
copyvar 0x800A 0x8004
compare 0x8004 0xFF
if 0x1 goto 0x821633D
copyvar 0x8005 0x800A
special2 LASTRESULT 0x102
copyvar 0x800B LASTRESULT
comparevars LASTRESULT 0x8009
if 0x5 goto 0x8216347
copyvar 0x8004 0x8008
copyvar 0x8005 0x800A
special 0x100
special 0x101
waitstate
bufferpokemon 0x0 0x8009
msgbox 0x8216440 MSG_KEEPOPEN '"Oh, yeah, right on!\p[buffer1], we..."
setflag 0x9B
release
end


For Skitty:
Spoiler:
setvar 0x8008 0x3
copyvar 0x8004 0x8008
special2 LASTRESULT 0xFF
copyvar 0x8009 LASTRESULT
msgbox 0x826508D MSG_YESNO '"My POKéMON is a [buffer2].\nDo you..."
compare LASTRESULT 0x0
if 0x1 goto 0x826506B
special 0xA2
waitstate
copyvar 0x800A 0x8004
compare 0x8004 0xFF
if 0x1 goto 0x826506B
copyvar 0x8005 0x800A
special2 LASTRESULT 0x102
copyvar 0x800B LASTRESULT
comparevars LASTRESULT 0x8009
if 0x5 goto 0x8265075
copyvar 0x8004 0x8008
copyvar 0x8005 0x800A
special 0x100
special 0x101
waitstate
msgbox 0x8265128 MSG_KEEPOPEN '"Oh, it's adorable!\nThank you!\lI ..."
setflag 0x9C
release
end


So we're trying to figure out how to make this fully functional so the hacker can change what pokemon it's looking for. I'm pretty sure it's in 0x8008 var. So if anyone has any more clues, it'd be awesome to help out!
__________________
Need help inserting tiles into AdvanceMap to have customized tiles for your hack?
• Check out my tutorial, Inserting Tiles Into AdvanceMap For Dummies
Click here to find out how to remove clouds from the Emerald titlescreen
• Check out the most updated Emereld Decapitalization Patch around by clicking here
Reply With Quote
  #544    
Old August 4th, 2014, 05:31 AM
DoesntKnowHowToPlay's Avatar
DoesntKnowHowToPlay
some loser
 
Join Date: Jan 2012
Requested mons for trades are in the trade data. The format isn't documented anywhere that I know of, but if you search the ROM for the nicknames/OTs of the traded mons you'll find the structs which contain that, as well as what mons you recieve.

It's almost certainly possible to repoint and expand this, too. If you can figure out what more than five or so of the parts of that table do please write it down, I'm sure a lot of people could put it to use.
__________________

Yet Another Fire Red Hack

Physical/Special Split
Reply With Quote
  #545    
Old August 4th, 2014, 09:11 AM
Le pug's Avatar
Le pug
Creator of Pokémon: Discovery
Community Supporter
 
Join Date: Aug 2013
Location: Le bed
Age: 21
Gender: Male
Nature: Bold
Quote:
Originally Posted by DoesntKnowHowToPlay View Post
Requested mons for trades are in the trade data. The format isn't documented anywhere that I know of, but if you search the ROM for the nicknames/OTs of the traded mons you'll find the structs which contain that, as well as what mons you recieve.

It's almost certainly possible to repoint and expand this, too. If you can figure out what more than five or so of the parts of that table do please write it down, I'm sure a lot of people could put it to use.
Well I found that DOTS the Ralts is at 338ED0 ... no repoints go to it or any of the following also:
PLUSES the Volbeat at 338F0C and 338F84 for MEOWOW the Meowth

Edit: still researching around ... but I found that at 338F44 is the appropriate "82 01" which is Volbeat's pokemon number. Changed it to 81 01 to see if it would now register to look for Castform and it worked!

edit 2: so i used the program Trader Advanced ... there is an option to add more trades to the game. When I added more and tested to see if the var 8008 would allow the player to search for the pokemon in his party and it worked. So for a checkpokemoninyourparty command all you need:

This script:
Spoiler:
setvar 0x8008 0x(your number from Trader Advance minus one)
copyvar 0x8004 0x8008
special2 LASTRESULT 0xFF
copyvar 0x8009 LASTRESULT
special 0xA2
waitstate
copyvar 0x8005 0x8004
special2 LASTRESULT 0x102
copyvar 0x800B LASTRESULT
comparevars LASTRESULT 0x8009
if 0x1 goto @continuewithscript


and download Trader Advanced and add as many as you want and change what pokemon each number checks for :D

credits go to me for the research... mr_mako helped out by suggesting the program Trader Advanced and of course the maker of T.A. ty for the program
__________________
Need help inserting tiles into AdvanceMap to have customized tiles for your hack?
• Check out my tutorial, Inserting Tiles Into AdvanceMap For Dummies
Click here to find out how to remove clouds from the Emerald titlescreen
• Check out the most updated Emereld Decapitalization Patch around by clicking here

Last edited by Le pug; August 4th, 2014 at 01:49 PM.
Reply With Quote
  #546    
Old August 5th, 2014, 01:31 PM
Dark Sneasel's Avatar
Dark Sneasel
Community Supporter
 
Join Date: Jun 2013
Location: Miami, FL
Age: 14
Gender: Male
Nature: Hasty
If anyone ever wants to make a tag battle script in Emerald, here's something that can help you

#dynamic 0xE40000
#org @start
lock
special 0x28
fadescreen 0x1
special 0x2A
waitstate
compare LASTRESULT 0x0
if 0x5 goto @yes
special 0x29
goto @end

#org @yes
special 0xFB
setvar 0x8004 0x2
setvar 0x8005 0x4
special 0xEA
setvar 0x8004 0x8
setvar 0x8005 0x0
special 0xEF
waitstate
setvar 0x8004 0x6
special 0xEA
special 0x29
copyvar 0x8000 LASTRESULT
compare 0x8000 0x1
if 0x1 goto @continue
fadescreen 0x1
special 0xCB
waitstate
goto @continue

#org @end
release
end
__________________
My stuff:
Controllable Boats in Gen 3 Games
Pokémon Fluorite Version (Beta 1 Released)
Pokémon Emerald Specials
Change Player OW in script
Making a tag battle script
G3HS extended Pokemon in the wild
Starting out with Rom Hacking? Click here
#SlowDownFigi

http://chat.linkandzelda.com:9090/?c...overy,fluorite
^Coolest irc... ever

Last edited by Dark Sneasel; August 6th, 2014 at 11:33 AM.
Reply With Quote
  #547    
Old August 6th, 2014, 12:02 PM
itari's Avatar
itari
Community Supporter
 
Join Date: Mar 2010
Location: 渦潮隠れの里
Age: 17
Gender: Female
Nature: Relaxed

Check/Count a Specific Pokémon Species in the Party (FR/LG/Em)


So I'm not sure if there is a way to do this by scripting in these games, and I saw that trading-style thing post just a few above, but I wrote up a quick bit of ASM code to count the number of a specific species of Pokémon in the party, as a bit of practice for myself, and I thought I would share it.

The reason I wrote is so that it could be mainly used as a checkpartypokemon-like command in a script.

It works for FireRed and LeafGreen with no changes, works for Emerald by performing the changes given, and will probably work with any game as long as you find the matching offsets.

Anyway, here's the ASM for FR/LG:
Code:
.text
.align 2
.thumb
.thumb_func
.global CountPartyPokemonSpecies

main:
	push {r0-r7, lr}
	mov r5, #0x0 @ This means fail
	ldr r6, var
	ldr r7, party_amount
	ldrb r4, [r7] @ Get Pokemon count from r7
	cmp r4, #0x0
	beq exit
	ldrh r3, [r6] @ Get the species to check
	cmp r3, #0x0
	beq exit @ Don't allow Missingno. This doesn't limit the species from going up, though.
	mov r7, #0x0
loop:
	ldr r0, first_pokemon @ Offset of first Pokemon
	mov r1, #0x64 @ Length of Pokemon RAM data
	mul r1, r1, r7 @ r7 holds current index
	add r0, r0, r1
	bl decrypt_poke_species @ Get this specific species.
	mov r9, r0
	pop {r0-r7}
	cmp r9, r3
	bne next
	add r5, r5, #0x1 @ Increase the counter
next:
	add r7, r7, #0x1 @ Increase party index
	cmp r7, r4 @ And compare against the number in the party
	blo loop @ I could use a bls here?
exit:
	str r5, [r6, #0x10] @ Store the result (r5) in r6 (the var -- 0x800D)
	pop {r0-r7, pc} @ Return

decrypt_poke_species:
	push {r0-r7}
	mov r1, #0xB @ This is the index for the Pokemon species.
	ldr r2, decrypt_poke @ Call the Pokemon decryption code
	bx r2
	
.align 2
party_amount:
	.word 0x02024029
first_pokemon:
	.word 0x02024284
var: @ Got this beauty from HackMew.
	.word 0x020270B8 + (0x8004 * 2)
decrypt_poke:
	.word 0x0803FBE9
And to work for Emerald, you need only change the end stuff:
Code:
.align 2
party_amount:
	.word 0x020244E9
first_pokemon:
	.word 0x020244EC
var: @ Got this beauty from HackMew.
	.word 0x020275D8 + (0x8004 * 2)
decrypt_poke:
	.word 0x0806A519
Some of it is based off some stuff from HackMew's Pokemon take away code, so yeah.

And of course, here's a sample script explaining how to use it:
Code:
#dynamic 0x800000

#include stdpoke.rbh

#org @start
lock
faceplayer
bufferpokemon 0x0 PKMN_MAGIKARP
setvar 0x8004 PKMN_MAGIKARP // Change this to the species you want
callasm 0x08XXXXXX // This is the offset of the routine + 1
compare LASTRESULT 0x1 // The count is stored in 0x800D
if B_>= goto @some // It will be 0 if there is none, or 1-6 for the count
msgbox @m1 MSG_KEEPOPEN // It also counts eggs, so yeah...
release
end

#org @some
buffernumber 0x1 LASTRESULT
msgbox @m2 MSG_KEEPOPEN
release
end

#org @m1
= You don't have any [buffer1]!

#org @m2
= Wow! You have [buffer2] [buffer1]!

I hope someone finds this useful, even if for just an example for beginners to learn from.
Enjoy~!

EDIT: I added Emerald, although I didn't test it.
EDIT 2: I tested the Emerald code, and it works.
__________________
Touhou Puppet Play: Sapphire

SubscriptAdvanced SongType Effectiveness EditorTilemap CreatorPython IPS Patcher

Last edited by itari; August 12th, 2014 at 12:41 PM. Reason: Adding Emerald code.
Reply With Quote
  #548    
Old August 7th, 2014, 09:55 PM
Dark Sneasel's Avatar
Dark Sneasel
Community Supporter
 
Join Date: Jun 2013
Location: Miami, FL
Age: 14
Gender: Male
Nature: Hasty
writebytetooffset 0x2 0x2037590 in Emerald makes you go fast (mach bike fast). Thanks kboy6 for helping me find that =).
Anyways, when you use the bike, that's what happens. However, when I do the writebytetooffset 0x2 0x2037590 your speed changes, but not OW. I'm gonna try to figure something out to make the sprite change, once I do, I'll post that here =)
__________________
My stuff:
Controllable Boats in Gen 3 Games
Pokémon Fluorite Version (Beta 1 Released)
Pokémon Emerald Specials
Change Player OW in script
Making a tag battle script
G3HS extended Pokemon in the wild
Starting out with Rom Hacking? Click here
#SlowDownFigi

http://chat.linkandzelda.com:9090/?c...overy,fluorite
^Coolest irc... ever
Reply With Quote
  #549    
Old August 13th, 2014, 05:18 AM
Hiroshi Sotomura's Avatar
Hiroshi Sotomura
 
Join Date: Sep 2003
Location: Melbourne, Australia
Age: 24
Gender: Male
Nature: Lax
Quote:
Originally Posted by Dark Sneasel View Post
writebytetooffset 0x2 0x2037590 in Emerald makes you go fast (mach bike fast). Thanks kboy6 for helping me find that =).
Anyways, when you use the bike, that's what happens. However, when I do the writebytetooffset 0x2 0x2037590 your speed changes, but not OW. I'm gonna try to figure something out to make the sprite change, once I do, I'll post that here =)
Why not build on this—could this be invoked to speed up bike-riding in FireRed, I wonder? By having this automatically execute in place of how it currently works?

Since it works in Emerald, I imagine the same could be done (to a different offset) in Ruby/Sapphire.

By the way, has anyone figured out exactly how HM badge limits are done?
__________________
Hiroshi Sotomura

That's Our Switch.
Pre-Service Teacher. Tech Guy. Web Designer. PokéCommunity Administrator. Wanderer. Novice Hockey Player. rijonAdventures Developer. #westjournal. Views are my own.
Reply With Quote
  #550    
Old August 13th, 2014, 05:22 AM
Magic's Avatar
Magic
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Quote:
Originally Posted by Hiroshi Sotomura View Post
By the way, has anyone figured out exactly how HM badge limits are done?
I saw this post just yesterday. Should be able to work off the offset given?
__________________
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 10:06 PM.


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.