• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Quick Research & Development Thread

Wobb

Wynaut
331
Posts
11
Years
DPPt Berry Info
Berries are found in itemdata/nuts_data.narc

00 - Berry Size (cm). There will be a decimal point before the last digit of the number in decimal. (Ex: 0x7E -> 126 -> 12.6 cm)
01 - ???
02 - Firmness:
Spoiler:

03 - ???
04 - Hours per Stage (There are 4 stages)
05 - Moisture drain rate without Mulch. When a Berry is planted, the moisture is 100. Every 60 minutes, the moisture decreases by this amount, with the soil changing color, until it reaches 0, where the soil is gray.
06 - Spiciness
07 - Dryness
08- Sweetness
09 - Bitterness
0A - Sourness
0B - Smoothness
 
Last edited:

Ephraim225

Freaky Frillish Guy
161
Posts
10
Years
Ribbon Data

So I researched this on a whim. This applies to all the GBA games but FRLG never displays ribbon data anyhow and it doesn't look like anyone documented it, so here we are. Normally Ribbon data is impossible to check or edit because it's encrypted and the decrypt function can't do anything with it in particular for some reason. But if you disable encryption completely (as seen here) then you can check or edit ribbons in your ASM codes much more easily.

The game uses four bytes to track a Pokémon's ribbons. They are the last four bytes of the "Misc" data subsection. Individual bits are used to track Ribbons from the contests as well as some additional ribbons. For contest ribbons, 3 bits are used to track how many ribbons from each category that Pokémon has. You can normally only get 4 ribbons in each category, but if you set all the bits for one category to 1 the game can show up to 7 ribbons from one category (which will lead to duplicate ribbons.) There are 32 possible ribbons to get but you can technically edit a Pokémon to have up to 47 (which will crash the game at the ribbon viewer.)

Bits 1~3: Cool contest ribbons
Bits 4~6: Beauty contest ribbons
Bits 7~9: Cute contest ribbons
Bits 10~12: Smart contest ribbons
Bits 13~15: Tough contest ribbons
Bit 16: League Champion ribbon
Bit 17: Lv. 50 Battle Tower ribbon
Bit 18: Lv. 100 Battle Tower ribbon
Bit 19: Artist ribbon
Bit 20: Effort ribbon
Bits 21~27: These ribbons have no description. I believe they are mostly unused aside from the ribbons that come from the GCN games.
Bits 28~32 DON'T track ribbon data, they're for something else.

So, a Pokémon that has all possible ribbons with no duplicates would have 07 FF C9 24 in those four bytes.
 

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
Tested some sounds in FireRed, I want to test more but I don't know how to find more sounds, if anyone can help me that's great. After 15A there seems to be no more sounds they all generate silence, so Idk where to go :(

Spoiler:

You can hear / see all the sounds in Fire Red in the following video. Also, I've added the sound 0x## for each so if you want to just listen for some sounds you want for a script then just throw it in a script, they are compatible:

[hd]16kq82y91UE[/hd]

And since I'm posting that one, might as well post my Emerald version as well:

[hd]NovD5qHerAo[/hd]
 
788
Posts
17
Years
  • Age 29
  • Seen today
Wonder Trade with NPC Trainers [FR]

Basically, this is a WT system that uses the NPC trainer data as the pool of potential trades. It picks a random trainer, and a random slot from that trainer's party, and that's what you get traded.

In case it's not obvious, this includes the actual trade animation, and the Pokémon in question will keep the NPC trainer's OT ID and OT Name, as well as any held item and custom moves it may have assigned to it.

Additionally, if the Pokémon you receive evolves by trade, it will evolve when you get it. Trade + Held Item evolutions would work as well, but I doubt there are many NPC trainers that have Scythers with Metal Coats (for example).

A few things to keep in mind if you decide to use this:

  • You could end up with a Nat'l Dex Pokémon early. You'll probably want to enable foreign Pokémon trading and evolution, assuming you aren't simply giving out the Nat'l Dex at the beginning of the game.
  • Some NPC trainers such as Giovanni have names that are too long to fit in the OT Name field. These trainers are excluded from the pool.
  • Any Pokémon that isn't included in a team of an eligible trainer can't be received at all.
  • It is possible to get the same Pokémon multiple times.
  • You'll probably trade with a lot of people named GRUNT, unless you blacklist all such trainers.

Nidoran Gender Symbol [FR]

I don't know if this bothers anyone else, but I never liked how the Nidorans get special treatment with regards to the gender symbol (because it's part of their name, they don't have one, unless you nickname them).

You can get rid of this but putting 00 at all of the following locations:

Code:
0x08136238
0x0813623C
0x081218E4
0x081218E8
0x08049718
0x0804971C

You'll probably want to remove the gender symbols from their species names if you use this, or else it'd essentially be duplicated (once in their name, and then the standard one every Pokémon gets).

Edit: agsmgmaster64 found a few offsets I missed, as well as the Emerald equivalents. See here.
 
Last edited:
232
Posts
12
Years
  • Seen Sep 10, 2019
In Gen 3, Protect/Detect/Endure are bugged. The game is supposed to read the probability from a table which has only 4 entries, thus reading garbage data after the 4th consecutive protect.

To get the correct behavior (like gen 5+, no cap) replace the bytes at 0x26FB6 with this (FR):
Code:
01 7A 14 88 CC 40 1D F0 84 FF 21 1C

If you ever manage to get off 16 consecutive protects, it will fail the next one because of precision .

I'm having trouble understanding the routine behind this, may you go more into depth about your solution? Could I also add the cap of 12.5% without having to repoint the routine?

edit: I tested your fix and it doesn't work as you intended. I was able to use Protect without fail after passing 16 successes.
 
Last edited:

Mr.Pkmn

Ordinary ASM Magician
53
Posts
15
Years
  • Seen Nov 17, 2023
I'm having trouble understanding the routine behind this, may you go more into depth about your solution? Could I also add the cap of 12.5% without having to repoint the routine?

edit: I tested your fix and it doesn't work as you intended. I was able to use Protect without fail after passing 16 successes.

1) Loads the number of consecutive protects (n)
2) Loads the first entry of the protect probability table (0xFFFF or 100%)
3) Shifts to the right n bits from the probability. Equivalent to a division of 2^n

If you used 17 protects, you would remove 17 bits from a 16 bit number, making it zero.
However you're right because the game checks if the protect probability is greater or equal than the random number, giving a 1/65535 chance of not failing protect.
 
81
Posts
7
Years
  • Age 30
  • Seen yesterday
I need help with this:


I have been modifying the routine of Chacha Dinosaur, well I suppose that here they could help me to finish it since then I already have the pointers, I do not know if they can help me and in that way we help rom hackers of ruby;)

EV-enhancing items (Power Items)

Spoiler:
 
5,256
Posts
16
Years
00 00 00 00 00 00 00 00 00 00 00 00 at x82980 will enable wilds in the Tanoby Ruins chambers (maps 2.27 to 2.34) irrespective of if the Tanoby Key puzzle has been solved (i.e. flag 0x849 is set).

At x3CA71C, there is a list of bytes which correspond to the Unown forme for each slot for the wilds of the Tanoby Ruins chambers. There are twelve bytes for each chamber, and six chambers in total. The bytes range from 00 to 1B (dec 27), and the first 26 (00 to dec 25) bytes follow the order of the alphabet (A-Z), with 1A (dec 26) being ! and 1B (dec 27) being ?. The byte order matches the probability listing for the Grass wilds of a map, so the 12th byte has a 1% chance of appearing, and so on.

The routine at x829FC is how it determines which chamber to use (by subtracting 27 from the map number at x82A42), so you can change this to be whichever map number your first Unown chamber is on. The lsls around this area (x82A4A) are used to multiply the (map number - 27) by six, as there are six chambers, so change that arithmetic if you have a different number of chambers. This is why, as Squeetz points out here https://www.pokecommunity.com/showthread.php?p=9578348#post9578348, the game will crash if the map number is not between 27 and 34 when spawning Unown.
 
Last edited:
760
Posts
15
Years
  • Seen yesterday
I haven't seen this documented anywhere, so I thought I should post it here.

Every Overworld Sprite has a data address with 0x24 bytes of data. (See for example https://www.pokecommunity.com/showthread.php?p=3674554#post3674554 or JPAN's Hacked Engine Manual)

The 14th byte (That was a mystery) determines what kind of footprints will appear when walking on sand. The byte should be either value 0x00 (No Footprints), 0x01 (Footprints) or 0x02 (Bicycle). Any other value will cause the game to freeze when stepping on sand.

To Illustrate:
No Footprints (00).gif Footprints (01).gif Bicycle (02).gif
 
222
Posts
6
Years
  • Age 22
  • Seen Nov 18, 2023
I actually found the other half of this that changes things to greyscale without doing any division or other crazy ASM. It's one RAM location:
Code:
0x02036E28
So just wrote a 0x1 to that offset for greyscale, and 0x2 for sepia (I think...). To reset, set it to 0x0.

Small thing and I know this is like 6 years late but if you put this in a mapscript you will need to set it as 01 (setmaptile script) or it won't change the colors before loading the map. Now even if people save and quit while the "shader" is active it will still be there when they come back, provided you make a decent map script that loads from a flag...
 

AtecainCorp.

Rejishan awake...
1,377
Posts
15
Years
POKEMON RUBY RELATED
I found limiter related to pokemons in the Contests. So for rid off limiter from contests.
Adress - B278C
In there change 9b 01 to new number related to SLOTS. Not same Pokemon in dex. But Slots. That makes formes even working with contests. In my case for be sure about All pokes i repleace 9b 01 with ff 04... And prest. It works.

2.PNG
 
81
Posts
7
Years
  • Age 30
  • Seen yesterday
I found the offsets from Pok?mon Emerald (BPEE) for changing the level of Pok?mon when they hatch from eggs.

Code:
08070A38: [B]XX[/B] 22
08071414: [B]XX[/B] 22
081C3200: [B]XX[/B] 21

Thanks to Jambo51 for finding the FireRed offsets and making it easy to find the Emerald offsets.

WynautEgg_zpsa5254b85.png


Pok?mon Ruby:

08042132: XX 22
08042954: XX 22
080A2050: XX 21

Credits to: veganime

42068 -- seems to fix the move set
A080C -- fix met lvl

fen9Cr3.png
 
Last edited:
3
Posts
5
Years
  • Age 28
  • Seen Nov 17, 2019
I have tried to look for the the location of the amount of pokemon in both the Kanto and National dexes in Firered but I'm coming up blank. I want to be able to read it out of the ROM and use it in a data parser. I'm slightly overwhelmed by the sheer amount of data in the ROM. Any help would be appreciated.
I've tried looking through the forums, but I might've missed information about this.
 
81
Posts
7
Years
  • Age 30
  • Seen yesterday
The Great And Powerful Lucky Egg
Bag_Lucky_Egg_Sprite.png


The check for the Lucky Egg is at:

FireRed: 0x21DBA
Emerald: 0x4A67A

The byte that determines the experience multiplier is at:

FireRed: 0x21DC2
Emerald: 0x4A682

In the vanilla games, this byte has a value of 0x96, or 150 is decimal.

This gives a multiplier of 1.5.

So if you want to change the amount of experience the Lucky Egg gives you, just follow these three easy steps!

1. Choose a value that you want to multiply the gained experience by (It will have to be less than 2.5 without using ASM).

2. Take away the decimal point (so 1.5 would be 150, 2.0 would be 200).

3. Convert that value to hex (so 1.5 is 0x96, 2.5 is 0xFA) and put that value at the offset listed above.

The Great And Powerful Lucky Egg

The check for the Lucky Egg is at:

FireRed: 0x21DBA
Emerald: 0x4A67A
Ruby: 0x20386

The byte that determines the experience multiplier is at:

FireRed: 0x21DC2
Emerald: 0x4A682
Ruby: 0x2038E
 
760
Posts
15
Years
  • Seen yesterday
EDIT: To enable all Sevii Islands' catchmaps to show up in the Pokedex, regardless of whether the worldmapflags are set:

Replace the bytes at 0x0CC206 with:
FF 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

To align the word 'Area' with the new dimensions replace the byte at 0x452207 with:
06

To remove the 'Area Unknown' make the image transparent and replace the byte at 0x10673C with:
FC

Credits to: Spherical Ice
 
Last edited:

PurpleOrange

still don't know what I'm doing
367
Posts
10
Years
Here are some mystery gift scripts that are found in the ROM of firered/leagreen and emerald as well as some quirks about them.

Although these are in the game, these scripts are never used. The events that were actually distributed set an almost identical script (albeit with different offsets) to RAM instead.

(This is a long post so I've put it in a spoiler.)
Spoiler:
 
Last edited:

Jaizu

Average rom hacker
282
Posts
14
Years
In Fire Red, the Behavior Type 93 in a block just calls a script that shows a text which says:
It's a blueprint of some sort.
It's filled with diagrams and text.

The offset for that text is 1C0FD8 and the pointer is at 1A763E
You can look for the script a few bytes before and you will see that the script offset is 1A763C.
Just open the offset with XSE and replace it with a call, so you can make your own scripts in the tiles, like the Headbutt script.
A Headbutt script can be found here: https://www.pokecommunity.com/showthread.php?t=163607
I personally use the second one.

NGCz0w5.png

hmuKhEe.png
FfuxT8T.png
 
Back
Top