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)

kearnseyboy6 August 28th, 2014 7:04 PM

Quote:

Originally Posted by GoGoJJTech (Post 8418318)
Instead of manipulating the whole game engine just for that, copy the time from when you start the event, then get the current time and subtract, then you have the total time between the start and end of the event.

That's what I plan to do, but Emerald already has a function that does that, wondering if FR has one

GoGoJJTech August 28th, 2014 7:20 PM

Quote:

Originally Posted by kearnseyboy6 (Post 8418322)
That's what I plan to do, but Emerald already has a function that does that, wondering if FR has one

FR doesn't have an instance of this sort of timer, and there are no specials on it, so chances are, there is no function currently available that does 100% of what you want.

daniilS August 29th, 2014 2:13 AM

Quote:

Originally Posted by kearnseyboy6 (Post 8418322)
That's what I plan to do, but Emerald already has a function that does that, wondering if FR has one

Short answer: JPAN's engine.

kearnseyboy6 September 1st, 2014 4:50 AM

Hmm, well you probably want '[buffer1] fainted' which I found at 1a5476. The pointer to this is at 0xA05E4. That's all I know as of now

Touched September 1st, 2014 5:13 AM

The routine you want is here 080A0618 (FireRed). Specifically, the code at 080A0648 is concerned with subtracting HP from the poisoned Pokemon. Check knizz's IDA Pro database for more info.

daniilS September 1st, 2014 6:11 AM

Routine should be ready soon.

Danny0317 September 1st, 2014 6:21 AM

For emerald, to disable the need to have the first gym flag to use cut from the menu, it's at 0x1B5514. I'm trying to find surf, but I'm having some trouble. If anyone wants to help, the badge message, it's at 0x5E97FC.
Out of all the HMs that can be found from the menu, I find the most useless one... lol

Edit: Huh, this is pretty weird... For strength and rock smash it says something about not being able to use it there (omw to a rock smash rock, but for surf it says the badge stuff...)
Edit2: I CAN use rock smash from the menu... idk why though, I disabled the cut flag need..

Danny0317 September 1st, 2014 9:42 AM

Sorry for double post, but I made a doanimation list for emerald. Here it is:

emerald doanimations (I did this w/o audio, sorry)
0 - freeze
1 - cut
2 - cut tree
3 - freeze
4 - animation in grass
6 - shows weedle or butterfree
8 - Surf Wailmer appears under the player
9 - player GETS on the Wailmer
a - "poof" under the player
b - "poof" the NPC you call it from
c - grass animation below player
d - biggest WTF ever
e - water drop?
10- Small animation
12- grass animation
13- grass starts shaking
14- ^same but more intense
15- does a weird animation
16- blue animation
17- stars below the player
18- weird ugly things appear on the player
19- nurse joy, shows your pokemon and and the machine healing
1b- kinda looks like cut
1e- fly animation
1f- actually takes you flying
20- get off the bird and land
23- WTF
26- dig animation
2b- player raises pokeball, moves forward
2d- weird, glitchy thing appears in top left corner
31- sand (?) appears below the player
32- water (?) appears below the player
33- sweet scent (I think)
34- weird tiles animate
35- bubbles appear on the player
37- dust (?) falls from the sky
38- animating vines
39- weird animation
3a- also cut
3c- weird animation
3d- different weird animation
3e- weird version of healing pokemon
3f- teleport

daniilS September 1st, 2014 9:54 AM

Alright, it's done!

Code:

Type 01 at 080A0524, 080A064E and 080A0656 for the new HP check.
Type 02 E0 at 080A04CE to prevent friendship reducing.
Type 6B 02 at 081A8E04 to terminate the whiteout script.
Finally, insert FD0200E7E9E6EADDEAD9D800E8DCD900E4E3DDE7E3E2DDE2DBADFECEDCD900E4E3DDE7E3E200DAD5D8D9D800D5EBD5EDABFB somewhere in your ROM (or any other custom message using [buffer1]) and place a pointer to where you inserted it at 080A05E4.


That's it!

Touched September 9th, 2014 8:55 AM

So, I looked into adding more field moves. Turns out there are four (three in Emerald) tables that need to be expanded and repointed.

Code:

BPEE

08615D7E: Moves that can be field moves, terminated by 0xE
08615D9C: Field moves routine list. Pointer, then a word value. Set to D for a normal field move
08615C08: Pointer pairs. First pointer is text, second is routine. Always 081B5471 for field moves
081B344E: Sentinel value for 08615D7E (currently 0xC Guillotine)

Same structure in FireRed
BPRE

0845A76E: Moves that can be field moves, terminated by 0xC
0845A788: Routine list for field moves
0845A618: Menu List. (Pointer pairs). Second is always 081245A5 for field moves.
0845A37C: Descriptions for field moves
08122A3C: Sentinel value for the table at 0845A76E (currently 0xE - Swords Dance)


You can't use Guillotine as a field move in FireRed (move ID 0xC) and Swords Dance in Emerald (0xE), unless you change the sentinel. I don't know why its not zero, but I posted the offset of the compare to this value (sentinel value). If you want to use those moves you can just change that to something else.

Make sure you repoint ALL references to those.

Derlo September 9th, 2014 1:07 PM

Storage System (Bill's PC)
 
Was trying to find a way to decrease the number of boxs in Storage System (Bill's PC) to use the free RAM for some routines.
I found a routine in 0x04c0a0 that loads at 0x02029314 the beginning of the spaces of Boxs.
However I could not find the limiting amount of boxs going from 01-14.
If someone can help find a way to let only active 10 boxs would greatly help!

xconspirisist September 9th, 2014 4:33 PM

How is generation 1 block tile membership stored in RAM?
 
Hi folks, I'm having quite a lot of success decoding the pokemon map from RAM, I've managed to dump block ID's for pallet town starting at about 0xC6EA, and I've also managed to decode the collision data (finally, this took ages to work out - just tile IDs). But what is really bugging me is I've not yet found out how to decode which 4 tiles make up a block. Map editors and tools can read the ROM, but I'm trying to work out the location in RAM. I'm sure it's been found - does anyone know?

Shiny Quagsire September 10th, 2014 2:41 PM

Quote:

Originally Posted by xconspirisist (Post 8431790)
Hi folks, I'm having quite a lot of success decoding the pokemon map from RAM, I've managed to dump block ID's for pallet town starting at about 0xC6EA, and I've also managed to decode the collision data (finally, this took ages to work out - just tile IDs). But what is really bugging me is I've not yet found out how to decode which 4 tiles make up a block. Map editors and tools can read the ROM, but I'm trying to work out the location in RAM. I'm sure it's been found - does anyone know?

It's not done in the RAM, unless you (technically) count the VRAM. If you look at the map viewer you can see exactly the location of each tile in each layer. Of course then you have to find which of the 3 layers it's in and then properly format it, but from my 3 layer tile hack I did I'm fairly sure there's no sort of buffer in RAM anywhere.

EDIT: Might have derped up a bit (thought you were talking about Gen III), although I'm fairly certain that it is applicable still. Chances are it's unlikely that they have the entire map tilemap buffered, but I could be wrong considering it's Yellow and not Gen III.

Sierraffinity September 10th, 2014 2:44 PM

Quote:

Originally Posted by Shiny Quagsire (Post 8432827)
It's not done in the RAM, unless you (technically) count the VRAM. If you look at the map viewer you can see exactly the location of each tile in each layer. Of course then you have to find which of the 3 layers it's in and then properly format it, but from my 3 layer tile hack I did I'm fairly sure there's no sort of buffer in RAM anywhere.

Looking at his post history and that RAM offset he posted, I'm pretty sure he's talking about Yellow.

Danny0317 September 10th, 2014 3:01 PM

(EM)

Flag 88b = player is on bike and can't dismount (thanks Touched for telling me to test it :D)

0x1ad5d8 = pointer to script for not having an item registered in bag. Repoint and make your own script and you can have stuff like this :)
http://i.snag.gy/2Udx8.jpg

ThomasWinwood September 15th, 2014 4:41 PM

Quote:

Originally Posted by DoesntKnowHowToPlay (Post 8024909)
Ditto's unique ability to breed with everything despite being genderless is a property of its egg group, but it won't actually produce the right eggs if you give something outside of slot x84 the Ditto egg group- you'll just get a bunch of Bulbasaur if there's no female involved. To fix this, change the byte at x4062A from x84 to the slot you want to behave like Ditto.

There is a typographical error in this paragraph - the offset should be x4602A.

In addition, I've gone through and found the equivalent Emerald offsets for this stuff.
Quote:

Ditto's unique ability to breed with everything despite being genderless is a property of its egg group, but it won't actually produce the right eggs if you give something outside of slot x84 the Ditto egg group- you'll just get a bunch of Bulbasaur if there's no female involved. To fix this, change the byte at x70816 from x84 to the slot you want to behave like Ditto.

While I'm pointing out breeding quirks that are of no use to anyone:

An egg that would hatch as the byte at x70858 (normally x1D, female nidoran) has a 50% chance to instead hatch as the byte at x7086E (normally x20, male nidoran).

Furthermore, an egg that would normally hatch as the word at x708C4 (normally x183, Illumise) has a 50% chance of hatching as twice the byte at x70888 (normally xC1, half of Volbeat's index number).

Volbeat and male Nidoran family members do not produce their female counterparts when breeding with Ditto in Gen 3.

There's a second Ditto check at x70894 - this one doesn't affect the child's species but it probably is important for inheritance.

If an egg would hatch to be double the byte at x7074C (xB4, half of Wynaut's index number) and a parent is not holding the item at x7077C and x70780 (xDD, Lax Incense), the baby will become the byte at x70784 (xCA, Wobbuffet).

If an egg would hatch to be double the byte at x70754 (xAF, half of Azurill's index number) and a parent is not holding the item at x70792 and x70796 (xDC, Sea Incense), the baby will become the byte at x7079A (xB7, Marill).

Azurill's index number is constructed a second time at 7078A- I'm not exactly sure *why* it's needed but if the baby's index number doesn't match it the game won't consider changing it to a Marill.

Le pug September 21st, 2014 12:18 AM

Skip Birch Intro for Pokemon Emerald


It'll skip the entire intro, except there is a 1 second start-up in beginning. My advice for you is to edit to where no song is playing for the intro and the top colors above birch are blackened and it'll look like nothing was ever there. Otherwise, figure out how to take that little part out since it hasn't been found yet.

Go to 0x308AC and replace the B1 08 03 08 to 31 16 03 08 and you're set! That's it!

Here's a gif of it in use for Pokemon: Fat Kid
http://i.imgur.com/hr0zDhQ.gif


Credit goes to Touched.

Touched September 21st, 2014 1:12 AM

Quote:

Originally Posted by Le pug (Post 8444249)
Skip Birch Intro for Pokemon Emerald


It'll skip the entire intro, except there is a 1 second start-up in beginning. My advice for you is to edit to where no song is playing for the intro and the top colors above birch are blackened and it'll look like nothing was ever there. Otherwise, figure out how to take that little part out since it hasn't been found yet.

Go to 0x308AC and replace the B1 08 03 08 to 31 16 03 08 and you're set! That's it!

Here's a gif of it in use for Pokemon: Fat Kid
http://i.imgur.com/hr0zDhQ.gif


Credit goes to Touched.

In addition to changing that pointer, you can:

Disable Music
08030872: 00

Disable Background
08030882: 00 00 00 00

This will not set the player's name. It will just be blank.

tzujm33 September 21st, 2014 3:08 AM

Wow thats great, i always disliked the Intro! However it would be good, if there would be another way to name the player.

Touched September 21st, 2014 3:31 AM

There is

Code:

.text
.align 2
.thumb_func

main:
        push {lr}
        ldr r0, player_data
        ldr r0, [r0]
        ldr r1, chosen_name
        bl strcpy
        pop {pc}

strcpy:
        ldr r2, =(0x08008BA0 + 1)
        bx r2

.align 2
player_data: .word 0x03005D90
chosen_name: .word 0xDEADBEEF


That's untested, but you can callasm that, set the pointer that says 0xDEADBEEF to the pointer to a name of your choice (in Emerald). It must be 7 characters long and end in FF.

Danny0317 September 22nd, 2014 5:30 PM

Since this isn't big enough for a tutorial, I guess I'll post it here. If you wanna remove the thing in EM where Prof shows you a pokemon, and says, this is a pokemon, for some reason, then do this:
Write FF FF FF 09 at 30A20. (that disables the msgbox in the intro, and the animation. Next, go to introeditor (I think it was) and make the pokemon that birch sends out a (?). Lastly, make that image transparent with the tool of your choice. The reason you have to do that is because the Pokemon shows up after naming yourself, so technically it'll be there, but transparent.

Le pug September 26th, 2014 4:39 PM

THIS IS FOR EMERALD ONLY. So I don't have the actual ASM file anymore but credit goes to shinyquag for this one for helping me figure out how to get this to work.

So if you're like me and you want to add or remove menu items from the start menu, like how I removed the player's name from this screenie:
http://i.snag.gy/ZZW4j.jpg

you need to copy and CTRL B WRITE the following bytes to 0x9F53A:
Code:

00 20 00 00 00 00 01 20 00 00 00 00 02 20 FF F7 B2 FF 03 20 00 00 00 00 05 20 FF F7 AC FF 06 20 FF F7 A9 FF 07 20 FF F7 A6 FF 01 BC 00 47 00 B5 01 20 FF F7 A0 FF 02 20 FF F7 9D FF 0A 48 FE F7 0A F9 00 06 00 0E 01 28 02 D1 03 20 FF F7 93 FF 09 20 FF F7 90 FF 06 20 FF F7 8D FF 07 20 FF F7 8A FF 01 BC 00 47 62 08 00 00 00 B5 01 20 FF F7 82 FF 02 20 FF F7 7F FF 0A 48 FE F7 EC F8 00 06 00 0E 01 28 02 D1 03 20 FF F7 75 FF 04 20 FF F7 72 FF 06 20 FF F7 6F FF 07 20 FF F7 6C FF 01 BC 00 47 62 08 00 00 00 B5 00 20 FF F7 64 FF 01 20 FF F7 61 FF 04 20 FF F7 5E FF 06 20 FF F7 5B FF 07 20 FF F7 58 FF 01 BC 00 47 00 B5 01 20 FF F7 52 FF 0C 20 FF F7 4F FF 04 20 FF F7 4C FF 0A 20 FF F7 49 FF 0B 20 FF F7 46 FF 06 20 FF F7 43 FF 07 20 FF F7 40 FF 01 BC 00 47 00 B5 01 20 FF F7 3A FF 04 20 FF F7 37 FF 06 20 FF F7 34 FF 07 20 FF F7 31 FF 01 BC 00 47 00 00 30 B5 83 B0 15 4C 16 48 63 F7 90 FE 20 70 20 78 64 F7 92 F8 20 78 00 21 F7 F0 C6 FE 11 48 12 49 09 78 01 22 02 23 69 F7 21 FB 10 4D 10 49 28 1C 69 F7 2C FC 20 78 01 21 00 91 FF 21 01 91 00 21 02 91 01 21 2A 1C 00 23 64 F7 98 FF 20 78 02 21 63 F7 D8 FF 03 B0 30 BC 01 BC 00 47 0C 76 03 02 08 05 51 08 C4 1C 02 02 4C A0 03 02 C4 1F 02 02 FF E6 5E 08 30 B5 83 B0 04 48 00 68 04 49 40 18 00 88 07 28 0A D1 03 4C 03 48 09 E0 90 5D 00 03 B2 0C 00 00 0D 76 03 02 38 05 51 08 18 4C 19 48 63 F7 44 FE 20 70 16 4C 20 78 64 F7 45 F8 20 78 00 21 F7 F0 79 FE 14 48 14 4A 15 49 09 68 15 4B C9 18 09 88 89 00 89 18 09 68 69 F7 3F FA 12 4D 12 49 28 1C 69 F7 DA FB 20 78 01 21 00 91 FF 21 01 91 00 21 02 91 01 21 2A 1C 00 23 64 F7 46 FF 20 78 02 21 63 F7 86 FF 03 B0 30 BC 01 BC 00 47 0D 76 03 02 30 05 51 08 C4 1C 02 02 10 05 51 08 90 5D 00 03 B2 0C 00 00 C4 1F 02 02 16 E7 5E 08 10 B5 00 00 00 20 00 28 0B D0 0E 4C 20 78 00 21 F8 F0 74 FC 20 78 02 21 63 F7 64 FF 20 78 63 F7 EF FE 0A F1 53 FB 00 06 00 28 07 D0 06 4C 20 78 00 21 F8 F0 63 FC 20 78 63 F7 E2 FE 10 BC 01 BC 00 47 00 00 0C 76 03 02 0D 76 03 02 F0 B5 57 46 4E 46 45 46 E0 B4 83 B0 80 46 0E 1C 02 78 11 48 81 46 11 49 8A 46 11 48 12 06 14 16 25 18 28 78 C3 00 48 46 04 30 18 18 01 68 0D 48 17 1C 81 42 18 D1 F8 F0 07 F9 00 06 00 0E 29 78 C9 00 49 44 09 68 23 01 09 33 1B 04 1B 0C 08 22 FA F0 08 FC 20 E0 00 00 40 05 51 08 C4 1F 02 02 10 76 03 02 8D FC 09 08 49 46 58 18 01 68 50 46 69 F7 56 FB F8 F0 E8 F8 00 06 00 0E 21 01 09 31 09 06 09 0E 00 91 FF 21 01 91 00 21 02 91 01 21 52 46 08 23 64 F7 BC FE 80 20 40 04 39 18 0A 0E 09 16 05 48 00 78 81 42 08 DA 01 3E 00 2E B4 D1 41 46 0A 70 00 20 04 E0 0F 76 03 02 40 46 02 70 01 20 03 B0 38 BC 98 46 A1 46 AA 46 F0 BC 02 BC 08 47 00 00 10 B5 83 B0 05 48 00 21 41 56 02 1C 05 29 73 D8 88 00 03 49 40 18 00 68 87 46 00 00 19 76 03 02 B8 F8 09 08 D0 F8 09 08 D8 F8 09 08 E4 F8 09 08 0C F9 09 08 30 F9 09 08 4C F9 09 08 10 78 01 30 10 70 59 E0 FF F7 B2 FD 00 49 2F E0 19 76 03 02 F7 F0 5E FD 06 48 00 78 F8 F0 6A F8 00 06 00 0E 00 21 F7 F0 81 FD 03 49 00 20 48 70 1E E0 00 00 0F 76 03 02 19 76 03 02 00 00 00 20


Now what this will do will allow to call to the battle frontier menu and bag via setflag 0x88C. Obviously to cancel out the effects go back to the standard menu, use clearflag 0x88C.


**This used to have the ability to use clearflag 0x860 etc to remove the items like Save or Exit, etc but I don't have the ASM anymore so I can only provide this as it removes the Player slot and PokeNav, Pokemon, and PokeDex menu items. Sorry! Feel free to research and post the fixings of that.

Glitch Kitty September 27th, 2014 9:25 AM

Would it be possible to have a pokemon evolve by gender in 3rd gen?...I wanted to make wurmple evolve on level 7 based on gender instead of personality values but noticed that in editors such as G3HS it doesn't exist...

daniilS September 27th, 2014 1:01 PM

Quote:

Originally Posted by Glitch Kitty (Post 8451123)
Would it be possible to have a pokemon evolve by gender in 3rd gen?...I wanted to make wurmple evolve on level 7 based on gender instead of personality values but noticed that in editors such as G3HS it doesn't exist...

http://www.pokecommunity.com/showthread.php?t=329357

lsmash October 5th, 2014 5:30 AM

Does anyone know how the game generates pokemons for a wild battle?


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.