The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Research & Development (https://www.pokecommunity.com/forumdisplay.php?f=195)
-   -   Quick Research & Development Thread (https://www.pokecommunity.com/showthread.php?t=205158)

Kawaii Shoujo Duskull February 19th, 2014 6:43 PM

Info on the scripting command "cry" here, about the effect.

Cry
0x0: normal.
0x1: normal but cut short.
0x2: higher pitch than normal.
0x3: higher pitch than normal, with a bit of echo, like pokemon on the overworld is roaring.
0x4: short reversed cry.
0x5: low cry
0x6: hard normal pitch cry, sort of like a roar.
0x7: short lower cry.
0x8: normal pitch but just a tiny bit short I think?
0x9: slightly lower than normal but not by much.
0xA: lower than the last one.
0xB: short lower.
0xC: short lower.
0xD:normal?
0xE:normal?
0xF: normal?


I just remembered I had this saved in a text file on my laptop. I'll have to re-test this though, I might have had a few of those wrong(the ones marked with ? at the end). Also gonna have to test and see if it could go past 0xF. I have a feeling that this may have something to do with certain bits being set, though I'm not too sure since I don't know about any routine behind this.
If anybody else has any info to add to this, then please do. Or if this has been covered already, let me know. ^^

Kawaii Shoujo Duskull February 20th, 2014 3:55 PM

Quote:

Originally Posted by Merak (Post 8102253)




Hmm...
I think if enough was put into it, it could be possible. If I understand correctly, a routine could be created to use the RNG each step to give a chance of shaking grass, dark water, or the clouds. The routine would need to check if one such event is already active though. It would also need to reset after the player enters a battle or leaves the map, or other similar instances. Finally, it would need to check if the player is on the set tile and--if yes--generate a wild encounter or give an item.
Resetting after leaving a map wouldn't be a problem since I think it would most likely do that on its own. I don't know how a routine would check if an event is already going though, and I really don't have a clue how the RNG or whatnot work in the GBA pokemon games.


I know my input isn't much of a help, sorry. :P

Just had another thought. Using the same command and using ASM and all that, I think it could be possible to make it so that when the player walks, it plays a sound dependant on the type of tile they step onto, like in HG/SS. I don't know if its been done yet or if its been done another way or not, but I just thought it could be possible to do it using this info.

GoGoJJTech February 20th, 2014 4:26 PM

Quote:

Originally Posted by Merak (Post 8105744)


Just had another thought. Using the same command and using ASM and all that, I think it could be possible to make it so that when the player walks, it plays a sound dependant on the type of tile they step onto, like in HG/SS. I don't know if its been done yet or if its been done another way or not, but I just thought it could be possible to do it using this info.

It has been done by tile behaviors and asm, (a mix of both) but I think it'd be easy

Spherical Ice February 21st, 2014 4:56 AM

Quote:

Originally Posted by tajaros (Post 7422715)
Ok, I found this over at the pokahacking forum and it seems to be useful for legendary events! So I did not discovered this credits to Steven and Casta for some Info about this.

So ever wanted to make your game like a movie or something like that. xD Well you can you can now make something look like this.

http://desmond.imageshack.us/Himg689/scaled.php?server=689&filename=95903110.png&res=landing

So how to do it huh? Pretty easy just put this in your script.

Ruby:


Fire red:


Emerald:


Just include them in every script that you want it only goes away after a warp to another place. That's all. :D

Credits:
Steven
Casta

Warping is not necessary to reset this; for FireRed, just use

Code:

writebytetooffset 0xff 0x4000044
writebytetooffset 0x0 0x4000045


On that note, does anyone know if it is possible to reset the grayscale/sepia filters without warping?

knizz February 21st, 2014 7:04 AM

Quote:

Originally Posted by Spherical Ice (Post 8106702)
On that note, does anyone know if it is possible to reset the grayscale/sepia filters without warping?

for a full reload of palettes and blocksets call 08055148 (mapdata_load_assets_to_gpu_and_full_redraw)

if you only want to reload the palettes you can call 08059AD8 with the pointer to the mapdata-header in r0.
Code:

push {lr}
ldr r0, current_mapheader
ldr r0, [r0, #0]
bl 08059AD8
pop {pc}
.align 4
current_mapheader: .word 0x02036DFC


Code:

02036E28 = 0: normal colors
02036E28 = 1: grayscale
02036E28 = 2: sepia


(none of this was tested, can anyone confirm this?)

Spherical Ice February 21st, 2014 7:34 AM

Quote:

Originally Posted by knizz (Post 8106815)
for a full reload of palettes and blocksets call 08055148 (mapdata_load_assets_to_gpu_and_full_redraw)

if you only want to reload the palettes you can call 08059AD8 with the pointer to the mapdata-header in r0.
Code:

push {lr}
ldr r0, current_mapheader
ldr r0, [r0, #0]
bl 08059AD8
pop {pc}
.align 4
current_mapheader: .word 0x02036DFC


Code:

02036E28 = 0: normal colors
02036E28 = 1: grayscale
02036E28 = 2: sepia


(none of this was tested, can anyone confirm this?)

Hm, this still necessitates warping unless I'm doing something wrong.

knizz February 21st, 2014 7:59 AM

Quote:

Originally Posted by Spherical Ice (Post 8106846)
Hm, this still necessitates warping unless I'm doing something wrong.

Try calling 08070474 afterwards.
EDIT: calling 08055148 alone works for me.

HidoranBlaze March 5th, 2014 4:07 PM

I was able to find the battle animation background table for Emerald.
The table starts at 0x525D54 and ends at 0x525E97. The structure is the same as FireRed's. We can now have custom battle animation backgrounds for Emerald as well by repointing and expanding this table.

kearnseyboy6 March 7th, 2014 2:36 AM

in applymovement #raw 0x69 will play all the rocksmash, tree frames, its in their respective scripts so don't be fooled by the 'mov69' description.

CMooney91 March 7th, 2014 5:36 PM

Hey everybody,

Is it possible to implement a choice in the intro to pick a character? Like, instead of "Are you a boy or girl?" and you pick a gender, could it be "Are you a boy or a girl?" And then it asks you to pick one of three archetypes per say?

HidoranBlaze March 7th, 2014 5:49 PM

Quote:

Originally Posted by CMooney91 (Post 8132507)
Hey everybody,

Is it possible to implement a choice in the intro to pick a character? Like, instead of "Are you a boy or girl?" and you pick a gender, could it be "Are you a boy or a girl?" And then it asks you to pick one of three archetypes per say?

Definitely, it would require some modification to the intro ASM routine though.

CMooney91 March 7th, 2014 5:55 PM

Thanks for the reply!

Sounds like it's above my head. I'm relatively new to rom hacking. thanks though!

GOLDstandard March 8th, 2014 4:58 PM

Can anyone point me in the direction of research about breeding or the game's pokemon generation routine? I searched the forum and couldnt find anything

Kawaii Shoujo Duskull March 9th, 2014 3:55 PM

Update on my small bit of research into the "cry" command.


What is already known:
cry 0xXX 0xYY
XX = pokemon index number.
YY = effect on the cry.


The first parameter didn't need researching(obviously) so I researched the second(the cry effect).
Here's what I've found:
Cry
Code:

0x0: normal.
0x1: normal but cut short.
0x2: Higher pitch, like the pokemon is loud.
0x3: higher pitch than normal, with a bit of echo, like pokemon on the overworld is roaring.
0x4: reversed cry.
0x5: low cry like pokemon faints.
0x6: harsh normal cry, like the pokemon is roaring loudly.
0x7: short lower cry.
0x8: slightly higher than normal.
0x9: short reversed cry.
0xA: pretty much normal I think.
0xB: lower cry.
0xC: short lower cry cut slightly short.
0xD: Normal.
0xE:normal.
0xF: normal.
0x10-0xFF: assumed to all play the cry as a normal cry.


I haven't noticed anything relevant in terms of bits here, so it looks like that's all there is to it.


After doing that bit of research, I decided to take a look at the playsong command's second parameter. So far as I've found there, it does absolutely nothing. I only looked at 0x0-0xF though, so there's a lot of room for me to be proved wrong there.


That's about it for now. Hope this helps somebody. :)

destinedjagold March 19th, 2014 9:03 PM

Quote:

Originally Posted by Merak (Post 8135701)
After doing that bit of research, I decided to take a look at the playsong command's second parameter. So far as I've found there, it does absolutely nothing. I only looked at 0x0-0xF though, so there's a lot of room for me to be proved wrong there.

The playsong's second parameter does have a difference though, as far as I've noticed.
if we use 0x0, the song will no longer play after a battle.
if we use 0x1, the song will still be played after a battle.

Kawaii Shoujo Duskull March 20th, 2014 5:38 PM

Ah I see. Thanks for pointing that out, it could be pretty helpful. ^^

Chaos Rush March 26th, 2014 10:58 PM

So lately I've been studying ASM a bit and gonna try and finally get it down. I've managed to locate parts of the START menu's code simply by finding their text pointer, and then the pointer to that table of pointers, and then looking at the surrounding code in VBA's disassembler. Whenever I saw something such "mov r2, #0x8", I wondered what would happen if I had a different value load into that register. As a result, I've figured this out so far:

0x0806EF94 = X positioning of [name] in the START menu.
Change it and you can reposition [name]:
http://i.imgur.com/HWEpZe8.png

0x0806EFD0 = the font used in the START menu.
00 gives you the smaller font. Any other value doesn't seem to do anything.
http://i.imgur.com/3vhCUhy.png

0x0806EFD4 = X positioning of the text in the START menu (except [name])
The default value is 08. This is what it looks like if you change it to 00:
http://i.imgur.com/VpItE5B.png
(Changing it to FF/giving longer text strings will NOT magically make the menu box's width longer unlike the multichoice boxes that the script engine uses)

0x0806F0DE = relative X positioning of cursor in START menu
0x0806F0E0 = relative Y positioning of cursor in START menu
By positioning, I don't mean the actual selection within the start menu, I mean the actual pixel coordinates of the cursor within the start menu.

None of this info is useful yet, but eventually I would like to port Emerald's START menu look onto FireRed because I find it more aesthetically pleasing.

But that's not all I found!

At 0x083A7344 is a table that basically controls the START menu itself. The format of the table goes like this:
[XX XX XX 08][YY YY YY 08]
XX XX XX 08 = pointer to text string within START menu (such as POKéDEX, POKéMON, BAG, etc.)
YY YY YY 08 = pointer to the routine of aforementioned function. Yes, I'm serious. You can literally switch around your START menu like this:
http://i.imgur.com/1ci5ayY.png
Notice how POKéMON is in the first slot like in B/W/B2/W2/X/Y, not POKéDEX like in Gens I-IV. And no, I did not just switch the text string pointer, I switched around the function pointers too. Don't believe me? Try it yourself! It's fun!

Here's the table at 0x083A7344 in detail:
41627D = POKéDEX text string
06F411 = POKéDEX routine (+1)

415A66 = POKéMON text string
06F44D = POKéMON routine (+1)

416285 = BAG text string
06F481 = BAG routine (+1)

41628E = [name] text string
06F4B5 = Trainer Card routine (+1)

416291 = SAVE text string
06F4E9 = SAVE routine (+1)

416296 = OPTION text string
06F4FD = OPTION routine (+1)

41629D = EXIT text string
06F541 = EXIT routine (+1)

4162A2 = RETIRE text string (Safari Zone)
06F555 = RETIRE routine(+1)

41628E = [name] text string
06F56D = ??? (+1) (fadescreen then freezes the game, I'm assuming its for the alternate Trainer Card shown during Link Battles/Trades)

Unfortunately I haven't been able to find what dictates how many entries the START menu gets, but hopefully with this knowledge, it will be a lot easier to implement something like the a PokéGear onto FireRed. Not to mention that these offsets are the actual routines used for the Pokédex, party screen, bag, Trainer Card, Save menu, and Options. I'm not joking lol, if you literally put this in a script:
Code:

//---------------
#dynamic 0x800000
#org @main
callasm 0x806F411 //this is the Pokédex routine offset from the START menu table
end


It will open up the Pokédex. You can literally use callasm and use any of the offsets from the table and it will load up that function!

So say, you wrote a custom PokéGear code. You can edit one of the function pointers in the table to your new code and voila, you'll have a PokéGear within your START menu. Of course, what would be more ideal is if we could figure out how to expand the number of entries the START menu gets. I'm sure it wouldn't be that hard, the thing is that I have no idea how to find the routine that the game uses when you actually press the START button.

Whatshouldyoucallme March 27th, 2014 12:15 AM

Nice find Chaos Rush!
Really fun to switch it, but note that the flag to active the Menu will be different.
~Original~
setflag 0x828 - Activates Pokemon Menu
setflag 0x829 - Activates Pokedex Menu

~Switched(Pokedex and Pokemon Menu)~
setflag 0x829 - Activates Pokemon Menu
setflag 0x828 - Activates Pokedex Menu
(If we doesn't change that will cause Oak give you pokedex when you choose a pokemon :D)

GoGoJJTech April 4th, 2014 6:48 AM

nop the 8 bytes at 080484 to make trainerbattle 0x9 not have oak's text
found by knizz

Whatshouldyoucallme April 6th, 2014 10:44 PM

I personally thought that block editing with A-map one-by-one was not a clever way.
Esspecially when we trying to redo the whole tileset.

When using block editor in A-map, the [offset:]slot will show the block offset when your mouse move on any block.
Go to hex editor and go to that offset(I use grass as example)and you will see something like this:

6E 02 6F 02 4C 02 4D 02 00 00 00 00 00 00 00 00

Copy and paste this code to the next offset and save.
Go back to A-map, now you will see the next block after the grass will become grass.

The code is actually how tile arranged on the block,

6E02 6F02
4C02 4D02

6E 02-> 02 6E which will be the tile no. 26E
6F 02-> 02 6F which will be the tile no. 26F
4C 02-> 02 4C which will be the tile no. 24C
4D 02-> 02 4D which will be the tile no. 24D

And changing the 0 to something else not higher than 12(C IN HEX) will change the pallete of that tile.

ThomasWinwood April 12th, 2014 2:39 AM

Quote:

Originally Posted by JPAN (Post 6078341)
I found something that bugs a lot of people, the fact HM moves cannot be deleted, can be easily erased on Fire Red.

I found the Emerald equivalents of the routines detailed in this post from earlier in the thread at 0x6E7CC and 0x1B6D14 respectively. It's not too difficult to extrapolate from there to the changes to disable HMs being undeletable.

Shiny Quagsire April 12th, 2014 12:28 PM

You can change the color filter used by flashbacks by changing the byte at 080572B0 to something else. So if sepia flashbacks are your thing then you can change it to 02, or alternatively you can have color flashbacks with 00.

EDIT: Apparently there's another address, 08057274, that needs tweaking as well. Same procedure, just different address.

sp13 April 13th, 2014 6:05 AM

Just a quick little thing I just discovered about music editing with Sappy. Not sure if this has been covered before (probably), but felt like posting it in case anyone else ran into the same problem.

If you have a .s file where one or more of the tracks sounds all "wavy" (not quite sure how to describe it, but where the notes bend all the time instead of just playing normally), here's how to fix it:

- look at the track details of each track of your song in Sappy
- if the last number (should be an indigo color in sappy 2006) is anything other than 0, that is what is causing the bending
- open the .s file in notepad and navigate to the data for that track
- at the beginning of the track's data, you should see things like VOICE, VOL, PAN, etc.
- the one that controls the bending is MOD
- simply remove the line with the MOD byte and save the .s file

That removes the weird bending.

Not sure if this is even news but hope this helps someone. :P

Wobbu April 13th, 2014 6:14 AM

Quote:

Originally Posted by sp13 (Post 8196346)
Just a quick little thing I just discovered about music editing with Sappy. Not sure if this has been covered before (probably), but felt like posting it in case anyone else ran into the same problem.

If you have a .s file where one or more of the tracks sounds all "wavy" (not quite sure how to describe it, but where the notes bend all the time instead of just playing normally), here's how to fix it:

- look at the track details of each track of your song in Sappy
- if the last number (should be an indigo color in sappy 2006) is anything other than 0, that is what is causing the bending
- open the .s file in notepad and navigate to the data for that track
- at the beginning of the track's data, you should see things like VOICE, VOL, PAN, etc.
- the one that controls the bending is MOD
- simply remove the line with the MOD byte and save the .s file

That removes the weird bending.

Not sure if this is even news but hope this helps someone. :P

You can also remove modulations from the actual midi with Anvil Studio's event editor. If you do it that way, the modulations won't appear again in case you have to remake your S file. But S files are useful for finding how many modulations are in each track if you use notepad and the search feature :D

sp13 April 13th, 2014 6:32 AM

Quote:

Originally Posted by Wobbu (Post 8196354)
You can also remove modulations from the actual midi with Anvil Studio's event editor. If you do it that way, the modulations won't appear again in case you have to remake your S file. But S files are useful for finding how many modulations are in each track if you use notepad and the search feature :D

Doing it straight from Anvil sounds really handy! I didn't think to do that because I could never actually hear the modulations when listening through Anvil, only when opening in Sappy.


All times are GMT -8. The time now is 8:53 AM.


Like our Facebook Page Follow us on Twitter © 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.