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)

DizzyEgg April 5th, 2016 3:43 AM

Fun fact: STAB doesn't actually affect the move power. It affects the damage directly after the move power and attacker/defender stats, but before the type multipliers. Posting this, because everywhere on web you can read that stab multiplies the move base power by 1.5, it doesn't. At least, not in gen3. :P

64smashmaster3ds April 5th, 2016 2:59 PM

Quote:

Originally Posted by GoGoJJTech (Post 7699003)
I know a few of you were looking for this, but track 83 (53 in hex) plays the low HP sound. Hacking this could mean that we could have BW's low HP song playing as a fanfare.

The low HP sound for Emerald is located at track 90 (not sure what hex). Hoping to put together the BW's critical damage as well. But would the battle theme pause when the low HP song starts and the battle music resume at the same track before the low HP song?

GoGoJJTech April 5th, 2016 3:35 PM

Quote:

Originally Posted by 64smashmaster3ds (Post 9192250)
The low HP sound for Emerald is located at track 90 (not sure what hex). Hoping to put together the BW's critical damage as well. But would the battle theme pause when the low HP song starts and the battle music resume at the same track before the low HP song?

No.

Spherical Ice April 8th, 2016 7:22 AM

Quote:

Originally Posted by DoesntKnowHowToPlay (Post 8498158)
Supposedly someone else documented this, but I couldn't find it in the thread index so I'm posting it again.

FR's Vs. Seeker table is at x45318C. Each entry is 16 (0x10) bytes, as follows:

0x0: half-word, denotes the trainer's ID in the first fight with them
0x2: up to five half-words denoting rematch IDs. FFFF is used as filler if more is coming, 0000 to terminate early.
0xC: half-word, seems to always be 3.
0xE: half-word, ranges from x15 to x41. Never seemed to be read in my tests. Appears to scale with trainer's levels in the base game (and by extension position).

The table has xDD entries and no terminator; the (a?) limiter is at x10d09c.

Looks like there's another limiter at x10CEE4, which is a part of special 0x3A.

Spherical Ice April 8th, 2016 11:35 AM

I haven't seen this documented anywhere: special 0x96 will set the flag named in var 0x8004.

For example, the following code:

setvar 0x8004 0x29D
special 0x96

Is equivalent to:

setflag 0x29D

Gamer2020 April 8th, 2016 11:43 AM

Quote:

Originally Posted by AkameTheBulbasaur (Post 9182559)
The Lightest and Smallest Tables have a limiter of 386 (or 0x181), so if the tables are extended they will have to be changed. The Type Mode Table does not have a limiter and ends at FF followed by anything that's not 00 (as FF 00 is an index number for a Pokemon.) I haven't looked into the Alphabetical Table much, but it doesn't appear to have a limiter either. I don't know how it measures the size of the table but the unused entries at the beginning might have something to do with it.


Alphabet does seem to have a limiter?
Code:

ROM:08103682 loc_8103682:                            @ CODE XREF: sub_8103518+102j
ROM:08103682                                        @ sub_8103518+122j
ROM:08103682                MOVS    R0, #1
ROM:08103684                ADD    R8, R0
ROM:08103686                MOVS    R0, #0x19A
ROM:0810368A                CMP    R8, R0
ROM:0810368C                BLE    loc_810360C
ROM:0810368E                B      loc_8103906
ROM:0810368E @ ---------------------------------------------------------------------------
ROM:08103690 off_8103690:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+F0r
ROM:08103694 off_8103694:    .long Pokedex_Alphabetical_Mode
ROM:08103694                                        @ DATA XREF: sub_8103518:loc_810360Cr
ROM:08103698 off_8103698:    .long pokemon_names    @ DATA XREF: sub_8103518+13Er


So does Type mode?
Code:

ROM:08103722 loc_8103722:                            @ CODE XREF: sub_8103518+1A2j
ROM:08103722                                        @ sub_8103518+1C2j
ROM:08103722                MOVS    R0, #1
ROM:08103724                ADD    R8, R0
ROM:08103726                MOVS    R0, #0x19A
ROM:0810372A                CMP    R8, R0
ROM:0810372C                BLE    loc_81036A4
ROM:0810372E                B      loc_8103906
ROM:0810372E @ ---------------------------------------------------------------------------
ROM:08103730 off_8103730:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+188r
ROM:08103734 off_8103734:    .long Pokedex_Type_Mode @ DATA XREF: sub_8103518:loc_81036A4r
ROM:08103738 off_8103738:    .long pokemon_names    @ DATA XREF: sub_8103518+1DEr


I might as well post these as well.
Code:

ROM:08103856 loc_8103856:                            @ CODE XREF: sub_8103518+2D6j
ROM:08103856                                        @ sub_8103518+2F6j
ROM:08103856                MOVS    R0, #1
ROM:08103858                ADD    R8, R0
ROM:0810385A                LDR    R0, =0x181
ROM:0810385C                CMP    R8, R0
ROM:0810385E                BLE    loc_81037E0
ROM:08103860                B      loc_8103906
ROM:08103860 @ ---------------------------------------------------------------------------
ROM:08103862                .align 4
ROM:08103864 off_8103864:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+2C4r
ROM:08103868 off_8103868:    .long Pokedex_Smallest_Mode
ROM:08103868                                        @ DATA XREF: sub_8103518:loc_81037E0r
ROM:0810386C off_810386C:    .long pokemon_names    @ DATA XREF: sub_8103518+312r
ROM:08103870 dword_8103870:  .long 0x181            @ DATA XREF: sub_8103518+342r


Code:

ROM:081037BA loc_81037BA:                            @ CODE XREF: sub_8103518+23Aj
ROM:081037BA                                        @ sub_8103518+25Aj
ROM:081037BA                MOVS    R0, #1
ROM:081037BC                ADD    R8, R0
ROM:081037BE                LDR    R0, =0x181
ROM:081037C0                CMP    R8, R0
ROM:081037C2                BLE    loc_8103744
ROM:081037C4                B      loc_8103906
ROM:081037C4 @ ---------------------------------------------------------------------------
ROM:081037C6                .align 4
ROM:081037C8 off_81037C8:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+228r
ROM:081037CC off_81037CC:    .long Pokedex_Lightest_Mode
ROM:081037CC                                        @ DATA XREF: sub_8103518:loc_8103744r
ROM:081037D0 off_81037D0:    .long pokemon_names    @ DATA XREF: sub_8103518+276r
ROM:081037D4 dword_81037D4:  .long 0x181            @ DATA XREF: sub_8103518+2A6r



Spherical Ice April 8th, 2016 12:08 PM

Quote:

Originally Posted by Sea Dragon (Post 9188765)
Fix Shedinja's evolution for expanded evolution table:
@13e3f6 change 80 to c0
@13e3fa change 4450 to 0000
Explanation:
Spoiler:
increasing the number of evolutions per pokemon may break Shedinja's ("spawn a second") evolution because of the way it searches the evolution table. The equation it uses must be modified to make sure it points to the right offset.

0813e3f4 4650 mov r0, r10 *evolving pokemons index in r0 (nincada = 12d)
0813e3f6 0080 lsl r0, r0, #0x02 *shifts r0 left by 0x02 (=4b4) - shift by 0x03 instead (=968)
0813e3f8 9002 str r0, [sp, #0x8]
0813e3fa 4450 add r0, r10 *adds pokemons index (4b4+12d=5e1) -remove this
0813e3fc 00c7 lsl r7, r0, #0x03 *shifts r0 by 0x03 and puts it in r7 (this should be the number of bytes from the beginning of the evolution table to nincadas evolution: default = 2f08, expanded =4b40)

0813e3fe 4956 ldr r1, [$0813e558] (=$08AAAAAA) *location of your evolution table
0813e400 19c9 add r1, r1, r7
0813e402 4688 mov r8, r1
0813e404 8808 ldrh r0, [r1, #0x0]
0813e406 280d cmp r0, #0xd
0813e408 d000 beq $0813e40c
0813e40a e09c b $0813e546

Bitwise calculator: http://www.miniwebtool.com/bitwise-calculator/bit-shift/

This change works for 8 evolutions. If you have more then it likely uses a similar pattern (shift bytes by a higher number and alternate whether or not you add the pokemon's index).

Same principles apply for FireRed, but the offsets are as follows:

@ CE762 change 80 00 to C0 00 (00 01 if you expanded to 16 evolution methods, etc.)
@ CE766 change 44 50 to 00 00

esperance April 9th, 2016 12:31 PM

Braille Encoding
I didn't see it documented in the index, and I'm not sure if this has been posted before. In the Gen 3 games braille text uses a special encoding, which I've listed below:
Code:

00=
01=A
04=,
03=C
05=B
06=I
07=F
09=E
0B=D
0D=H
0E=J
0F=G
11=K
13=M
15=L
16=S
17=P
19=O
1B=N
1D=R
1E=T
1F=Q
2C=.
2E=W
31=U
33=X
35=V
39=Z
3B=Y

FF=\x


0xFF terminates a braille string, while 0x00 is a space character. I'm not sure what other values not listed will show (if anything).

Telinc1 April 9th, 2016 12:46 PM

Quote:

Originally Posted by Youmu (Post 9197061)
Braille Encoding
I didn't see it documented in the index, and I'm not sure if this has been posted before. In the Gen 3 games braille text uses a special encoding, which I've listed below:
-snip-
0xFF terminates a braille string, while 0x00 is a space character. I'm not sure what other values not listed will show (if anything).

This is probably common knowledge, but having it here doesn't hurt. Braille strings don't support the \p, \n and \l control codes, so to display multiline braille strings, the braille2 command together with special 0x1B2 is used. braille2 calculates the length of a braille string and sets 0x8006 to it. special 0x1B2 displays an arrow (you know, the one which is always used in messages) at the coordinates specified by 0x8005 and 0x8006 (0x8005 is set 0x82 = 130 at the beginning of braille scripts). To see how GameFreak used these, open up script 0x163BAB from FireRed.

DoesntKnowHowToPlay May 2nd, 2016 4:35 PM

To change the Zigzagoon you fight in Emerald immediately after picking your starter to a different mon, change the 0x90 at x32706 to half the index number of the mon you want. If you want a mon who index number isn't a multiple of two, simply put its (single-byte) index number there and replace the x49 at x32708 with an x00. To change the mon to a non-even index number that is greater than one byte, learn ASM and do your own stuff now that you have the relevant offset.

To change its level, change the x2 at x32714 to the desired value.

Zeturic May 13th, 2016 7:54 AM

No Healing Eggs [FR]

When healing at a Pokemon Center, the healing machine will light up with the number of Pokemon in your party. Starting in DP, eggs don't count - if you have two Pokemon and an egg, in RSEFRLG, you get three lights, in DP, you get two.

To get this behavior in FR, all you need to do is:

Code:

0x08083B8E: 08 F0 D5 FA


Spoiler:
0x08083B8C
is a function called as part of
doanimation 0x19
(the healing machine). At
0x08083B8E
, that function branch-links to call another function at
0x08083BD1
, which itself counts the number of Pokemon in the party.

0x0808C13C
is a built-in function to count Pokemon (and not eggs), so basically I just changed the target of the branch-link to this function.


Pokeblock Research [EM]

This may already be known, but I looked and couldn't find it. If this is known already, I apologize.

In Emerald, the contents of the Pokeblock Case are stored starting at
[0x03005D8C] + 0x848
. It is encrypted using the Security Key. Information on the Security Key, and how to disable it for Emerald can be found here.

The Pokeblock Case has room for 40 Pokeblocks, each in the same 8-byte format:

Spoiler:
Code:

0x00: Color
0x01: Spicy
0x02: Dry
0x03: Sweet
0x04: Bitter
0x05: Soul
0x06: Feel
0x07: unk_0x07




I believe
unk_0x7
is either just padding or some sort of terminator. In my experimentation, it was always
0x03
. The available colors are:

Spoiler:
Code:

0x01 - Red
0x02 - Blue
0x03 - Pink
0x04 - Green
0x05 - Yellow
0x06 - Purple
0x07 - Indigo
0x08 - Brown
0x09 - Light Blue
0x0a - Olive
0x0b - Gray
0x0c - Black
0x0d - White
0x0e - Gold




How could you use this? Well, I guess you could use this to, say, make NPCs that give out Pokeblocks, but seeing as most hacks don't feature contests anyway, that seems unlikely.

It's actually more useful for Emerald hacks that don't use the Pokeblock Case at all. The space reserved for the Pokeblock Case is persistent; it will be saved and loaded. If you don't use the Pokeblock case, you have
(8 bytes/pokeblock) * (40 pokeblocks) = 320
bytes to persistently store whatever you want.

Constant Base Power For Hidden Power [FR]

Starting with XY, Hidden Power's base power was fixed at 60. Prior to this, it varied between 30 and 70, based on the Pokemon's IVs. To force the game to read the base power from the move data table, null out the strh at
0x0802B722
:

Code:

0x0802B722: C0 46


After you've done that, HP will use the base power in the table as its base power. Unfortunately, in a vanilla FR it is listed as
0x01
, so it will be very weak until you change it. Open your ROM in an attack editor (for example, the one bundled with PGE) and change the base power to 60 (as in XY).

For a final tweak, you may want to edit Hidden Power's description to remove the part that says its power varies, since that's no longer true.

Unhidden Power [FR]

Calculates the type (not power) of Hidden Power, so it displays as its actual type instead of always as a Normal-type move.

Disable "The Pokemon Stopped Evolving." [FR]

FR has a feature that if you attempt to evolve a Pokemon into something not in the Kanto Dex (and you don't have the National Dex), it will mysteriously stop evolving. You could just give the player the National Dex at the beginning of the game, but if you don't want to do that, you can easily disable this.

Basically, this will turn some conditional jumps into unconditional jumps, and remove some checks. No free space required.

Code:

0x08043156: 02 E0
0x080CE90C: 1C E0
0x080CF566: 17 E0
0x08126C26: C0 46 C0 46 C0 46 C0 46
0x08126C4C: 08 E0


Disable Item Removal During Trade With Held Item Evolutions [FR]

Trade With Held Item evolutions, such as Onix into Steelix, remove the required held item. As part of the above, I realized you could easily disable this entirely (and, yes, it is compatible with the above) by nulling out a call to
pokemon_setattr
. The held item will still be required, it just won't be removed. Why you would want to do this I don't really know, but if you do, I'm putting it here.

Code:

0x0804316A: C0 46 C0 46


Disable Trade Restrictions [FR]

FR has three distinct types of trade restrictions:
  • You can't trade or be traded an egg (even an egg of a Kanto Pokemon)
  • You can't trade in a Pokemon not in the Kanto Dex (even from another FRLG)
  • You can't trade with RSE

Normally, the first two restrictions are lifted after getting the National Dex, while trading with RSE is unlocked by the Sevii Island stuff in the post-game.

This removes all three of those restrictions.

Code:

0x08009754: C0 46 01 20
0x0800975C: C0 46 01 20
0x0804FA4E: C0 46 01 20



Reshiram white as snow May 18th, 2016 8:35 AM

Do anyone now how to make the Pokemon not lose HP in overworld when it is poisoned? How to disable electricity type Pokemon be paralyzed? And how to change the weather ability such as snow warning, drought from infinty turns to 5 turns? (Emerald)

Reshiram white as snow May 18th, 2016 8:57 AM

Quote:

Originally Posted by GoGoJJTech (Post 9092590)


I guess I'm just on a roll, huh?
I'll post the code to Github when I learn how to use it (and the code for follow me as well)

How to make double wild battle?

Le pug May 21st, 2016 4:34 AM

Quote:

Originally Posted by Touched (Post 8444386)
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.

anyone know the pointer to call that allows you to open up the name player feature? i dont want to name the player but if the intro is skipped, later on I want to have it to where the player sets his name

Epsilon May 26th, 2016 7:01 AM

Quote:

Originally Posted by Gamer2020 (Post 9195789)
Alphabet does seem to have a limiter?
Code:

ROM:08103682 loc_8103682:                            @ CODE XREF: sub_8103518+102j
ROM:08103682                                        @ sub_8103518+122j
ROM:08103682                MOVS    R0, #1
ROM:08103684                ADD    R8, R0
ROM:08103686                MOVS    R0, #0x19A
ROM:0810368A                CMP    R8, R0
ROM:0810368C                BLE    loc_810360C
ROM:0810368E                B      loc_8103906
ROM:0810368E @ ---------------------------------------------------------------------------
ROM:08103690 off_8103690:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+F0r
ROM:08103694 off_8103694:    .long Pokedex_Alphabetical_Mode
ROM:08103694                                        @ DATA XREF: sub_8103518:loc_810360Cr
ROM:08103698 off_8103698:    .long pokemon_names    @ DATA XREF: sub_8103518+13Er


So does Type mode?
Code:

ROM:08103722 loc_8103722:                            @ CODE XREF: sub_8103518+1A2j
ROM:08103722                                        @ sub_8103518+1C2j
ROM:08103722                MOVS    R0, #1
ROM:08103724                ADD    R8, R0
ROM:08103726                MOVS    R0, #0x19A
ROM:0810372A                CMP    R8, R0
ROM:0810372C                BLE    loc_81036A4
ROM:0810372E                B      loc_8103906
ROM:0810372E @ ---------------------------------------------------------------------------
ROM:08103730 off_8103730:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+188r
ROM:08103734 off_8103734:    .long Pokedex_Type_Mode @ DATA XREF: sub_8103518:loc_81036A4r
ROM:08103738 off_8103738:    .long pokemon_names    @ DATA XREF: sub_8103518+1DEr


I might as well post these as well.
Code:

ROM:08103856 loc_8103856:                            @ CODE XREF: sub_8103518+2D6j
ROM:08103856                                        @ sub_8103518+2F6j
ROM:08103856                MOVS    R0, #1
ROM:08103858                ADD    R8, R0
ROM:0810385A                LDR    R0, =0x181
ROM:0810385C                CMP    R8, R0
ROM:0810385E                BLE    loc_81037E0
ROM:08103860                B      loc_8103906
ROM:08103860 @ ---------------------------------------------------------------------------
ROM:08103862                .align 4
ROM:08103864 off_8103864:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+2C4r
ROM:08103868 off_8103868:    .long Pokedex_Smallest_Mode
ROM:08103868                                        @ DATA XREF: sub_8103518:loc_81037E0r
ROM:0810386C off_810386C:    .long pokemon_names    @ DATA XREF: sub_8103518+312r
ROM:08103870 dword_8103870:  .long 0x181            @ DATA XREF: sub_8103518+342r


Code:

ROM:081037BA loc_81037BA:                            @ CODE XREF: sub_8103518+23Aj
ROM:081037BA                                        @ sub_8103518+25Aj
ROM:081037BA                MOVS    R0, #1
ROM:081037BC                ADD    R8, R0
ROM:081037BE                LDR    R0, =0x181
ROM:081037C0                CMP    R8, R0
ROM:081037C2                BLE    loc_8103744
ROM:081037C4                B      loc_8103906
ROM:081037C4 @ ---------------------------------------------------------------------------
ROM:081037C6                .align 4
ROM:081037C8 off_81037C8:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+228r
ROM:081037CC off_81037CC:    .long Pokedex_Lightest_Mode
ROM:081037CC                                        @ DATA XREF: sub_8103518:loc_8103744r
ROM:081037D0 off_81037D0:    .long pokemon_names    @ DATA XREF: sub_8103518+276r
ROM:081037D4 dword_81037D4:  .long 0x181            @ DATA XREF: sub_8103518+2A6r



So have you found the offsets of these limiters?

azurile13 May 26th, 2016 10:29 AM

Quote:

Originally Posted by Epsilon (Post 9258043)
So have you found the offsets of these limiters?

The cmp r8, r0.

r0 has the limit in all four screenshots.

GoGoJJTech May 26th, 2016 10:48 AM

Quote:

Originally Posted by azurile13 (Post 9258257)
The cmp r8, r0.

r0 has the limit in all four screenshots.

You keep beating me to the answer in each thread >.>

Anyway, the routines are right there, but they aren't actually "MOV r0, #0x19A" because 0x19A is over a byte. You wouldn't see that in the rom, you'd see an lsl operation that basically doubles a value to get 0x19A.
It'd look like:
MOV r0, #0xCD
LSL r0, r0, #1

~SAGE May 28th, 2016 12:51 PM

Quote:

Originally Posted by MrDollSteak (Post 7691854)
I've just got some very quick offsets for Pokedex hacking.

I'm not sure whether it's already been posted, I don't think so, as I had to discover these on my own.

I've found 2 limiters for the Kantodex that are quite useful, which when combined with Jambo51's already posted offsets, can allow for the Kantodex to act as a national dex.

Even though Jambo already found the limiter for the Kantodex itself, it would still not display the correct seen/caught numbers as they were still limited to 150 as were the habitats.

By changing the number 96 at the offset: 104BF2
You can extend the limit to the seen/caught text. Eg. changing 96 to FA will allow for a max of 250 seen/caught Pokemon.

By changing the number 97 at the offset: 106828
You can extend the number of Pokemon that will be correctly featured in the habitat pages. Eg. changing 97 to FA will allow for the first 250 Pokemon in your pokedex to be displayed in the habitat pages before receiving the national dex.

This can be helpful as it stops people from having to give the national dex at the start of the game.

I'll just repost Jambo's limiters from his thread here

0x10352C - mov r1, #0x97
0x1035F6 - cmp r0, #0x96

Just change those 2 bytes at that offset to the number of Pokemon you want in.




I have a question
I had expanded the pokedex of my rom
but i can't reach to view the habitat's pages correctly

what i should to do?

Zeturic June 1st, 2016 1:27 PM

Disable Trade Restrictions [EM]

Emerald has the same trade restrictions as FR.
  • You can't trade or be traded an egg (even of a Hoenn Pokemon)
  • You can't trade or be traded a Pokemon not in the Hoenn Dex (even from another RSE)
  • You can't trade with FRLG

All three of these are unlocked by enabling the National Dex. However, if you want to disable those restrictions without giving out the National Dex:

Code:

0x08009684: C0 46 01 20
0x0800968C: C0 46 01 20
0x08079138: C0 46 01 20
0x0807A62E: C0 46 01 20


Constant Base Power For Hidden Power [EM]

Just null out the relevant strh.

Code:

0x080544D0: C0 46


Just as in Fire Red, the move data table lists HP's base power as 0x01 (that's so the game displays hyphens for the power). To avoid excessively weak Hidden Powers, change its base power in an attack editor.

Telinc1 June 4th, 2016 6:45 AM

NOPing out the bl at 0x080BD614 (bl sub_8055F48) will disable the bicycle music (in layman terms, put C0 46 C0 46 at BD614).
A bl to the same location (sub_8055F48) also exists at 0x080CA650, which is part of sp157_activate_bike. I haven't tested nuking that, though.

GoGoJJTech July 7th, 2016 10:42 PM

Quote:

Originally Posted by AkameTheBulbasaur (Post 9311854)
I figured out something while I was importing music from PMD Red Rescue Team into Fire Red. I found that the music I inserted would be far too soft, but I didn't know how to make it louder.

I learned that the beginning of each track starts with "bc 00" and somewhere, not too far after that is "bd" followed by another byte. This byte is the instrument the track uses (If the track uses multiple instruments during its loop there will be multiple "bd"s). "Be" changes the "force", which is how intensely the instruments play. There are usually many of these per track as well, depending on the type of song.

"BC 00 BB 40 BD 18 C2 2C BF 5E BE 3B"

This is an example of what it might look like. For me I just changed the value after "be" to whichever value I wanted (usually 70-80 or 46-50 in hex). This technically isn't the true volume of the track, but it gave me the desired result.

I didn't look into what BC and BF meant or the rest of the structure, but it was something that I thought might be useful for somebody who is importing songs from other games and can't find a better way to change the "volume".

Sorry to burst your bubble, but this isn't really research and it's certainly not development. If you look in MPlayDef.s it'll show you each of the command names and they're all very suggestive of what they do except for the library ones (but you don't need to know those since.. they're libraries and not present in all games)

i0Bjhansen0 July 8th, 2016 10:39 PM

Quote:

Originally Posted by kleenexfeu (Post 9001424)
For Emerald

The game displays the default sprite, icon and base stats for Deoxys




01 BC 00 47 at 0x8034C32 for the sprite.

C0 46 C0 46 C0 46 C0 46 at 0x8068A2C for the stats.

C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 0x80D3030 for the icon.

Not sure if I can ask this here, but can someone port this to Fire Red if it hasn't been done already? I would like Deoxys to be normal forme.

AkameTheBulbasaur July 9th, 2016 12:44 AM

Quote:

Originally Posted by i0Bjhansen0 (Post 9313122)
Not sure if I can ask this here, but can someone port this to Fire Red if it hasn't been done already? I would like Deoxys to be normal forme.

The base stats for Deoxys actually used by FireRed are at 0x25E086. You can edit them to be normal forme manually there.

The Front sprite is at 0xE3958C and the Back sprite is at 0xE39D70. They're both two frames, so if you want to edit the sprite you'll have to change both frames. Frame 1 is Normal Forme and Frame 2 is Attack Forme. So if you wanted Normal form you'd just have to change the second one to also be Normal Forme. If you wanted Defense or Speed Formes you'd have to change both frames to be those or it will just show up as Attack Forme by default. Deoxys is the only Pokemon that has two frames for their sprite by default in FireRed. If you change the sprite for one frame it won't really change it (or at the very least it won't if you only change the first one.)

The Normal Form icon is at 0xE3A388. Like the sprite, the Icon has twice as many frames as the rest (in this case four instead of two) although the game obviously only uses the last two frames. This is not too difficult to edit either. NSE will show you all four frames, and you can go from there. If you want other Formes you will need to edit all of the frames, same as the sprite.

BluRose July 9th, 2016 6:50 AM

Quote:

Originally Posted by AkameTheBulbasaur (Post 9313212)
The base stats for Deoxys actually used by FireRed are at 0x25E086. You can edit them to be normal forme manually there.
Spoiler:


The Front sprite is at 0xE3958C and the Back sprite is at 0xE39D70. They're both two frames, so if you want to edit the sprite you'll have to change both frames. Frame 1 is Normal Forme and Frame 2 is Attack Forme. So if you wanted Normal form you'd just have to change the second one to also be Normal Forme. If you wanted Defense or Speed Formes you'd have to change both frames to be those or it will just show up as Attack Forme by default. Deoxys is the only Pokemon that has two frames for their sprite by default in FireRed. If you change the sprite for one frame it won't really change it (or at the very least it won't if you only change the first one.)

The Normal Form icon is at 0xE3A388. Like the sprite, the Icon has twice as many frames as the rest (in this case four instead of two) although the game obviously only uses the last two frames. This is not too difficult to edit either. NSE will show you all four frames, and you can go from there. If you want other Formes you will need to edit all of the frames, same as the sprite.

Code:

0x0825E086 (0x38 bytes; 0x1C x 2):
38 00 3E 00 44 00 4A 00 50 00 56 00 5C 00 61 00
67 00 6D 00 73 00 78 00 7E 00 83 00 88 00 8E 00
93 00 98 00 9D 00 A2 00 A7 00 AB 00 B0 00 B5 00
B9 00 BD 00 C1 00 C5 00

Decimal conversion of the first 12 bytes:
56 00 62 00 68 00 74 00 80 00 86 00


To assume that there is a 00 byte in between each actual stat, the base stats shown are:
HP: 56
Attack: 62
Defense: 68
Speed: 74
Sp. Attack: 80
Sp. Defense: 86

Actual:
HP: 50
Attack: 180
Defense: 20
Speed: 150
Sp. Attack: 180
Sp. Defense: 20

Point being, you sure that the base stats are located at 0x0825E086?
Unless if I'm totally off in understanding this...?

EDIT: Sprites and Icons are correct, though <3
EDIT2: Normal Doexys' Base Stats are at 0x0825745C, but this doesn't matter.
"32 B4 14 96 B4 14" doesn't exist in the ROM, however... Does the ROM use multipliers to change the base stats...?
EDIT3: "32 00 B4 00 14 00 96 00 B4 00 14 00" exists in the ROM at 0x0825E026 with a pointer located at 0x08044704. I don't have IDA or anything to check it out, though, so...

i0Bjhansen0 July 9th, 2016 9:44 AM

Quote:

Originally Posted by AkameTheBulbasaur (Post 9313212)
The base stats for Deoxys actually used by FireRed are at 0x25E086. You can edit them to be normal forme manually there.

The Front sprite is at 0xE3958C and the Back sprite is at 0xE39D70. They're both two frames, so if you want to edit the sprite you'll have to change both frames. Frame 1 is Normal Forme and Frame 2 is Attack Forme. So if you wanted Normal form you'd just have to change the second one to also be Normal Forme. If you wanted Defense or Speed Formes you'd have to change both frames to be those or it will just show up as Attack Forme by default. Deoxys is the only Pokemon that has two frames for their sprite by default in FireRed. If you change the sprite for one frame it won't really change it (or at the very least it won't if you only change the first one.)

The Normal Form icon is at 0xE3A388. Like the sprite, the Icon has twice as many frames as the rest (in this case four instead of two) although the game obviously only uses the last two frames. This is not too difficult to edit either. NSE will show you all four frames, and you can go from there. If you want other Formes you will need to edit all of the frames, same as the sprite.

So for the sprites, are they compressed or can I just put the normal forme over the attack forme and not have to worry about ruining code behind it?

Quote:

Originally Posted by BluRose (Post 9313489)
Code:

0x0825E086 (0x38 bytes; 0x1C x 2):
38 00 3E 00 44 00 4A 00 50 00 56 00 5C 00 61 00
67 00 6D 00 73 00 78 00 7E 00 83 00 88 00 8E 00
93 00 98 00 9D 00 A2 00 A7 00 AB 00 B0 00 B5 00
B9 00 BD 00 C1 00 C5 00

Decimal conversion of the first 12 bytes:
56 00 62 00 68 00 74 00 80 00 86 00


To assume that there is a 00 byte in between each actual stat, the base stats shown are:
HP: 56
Attack: 62
Defense: 68
Speed: 74
Sp. Attack: 80
Sp. Defense: 86

Actual:
HP: 50
Attack: 180
Defense: 20
Speed: 150
Sp. Attack: 180
Sp. Defense: 20

Point being, you sure that the base stats are located at 0x0825E086?
Unless if I'm totally off in understanding this...?

EDIT: Sprites and Icons are correct, though <3
EDIT2: Normal Doexys' Base Stats are at 0x0825745C, but this doesn't matter.
"32 B4 14 96 B4 14" doesn't exist in the ROM, however... Does the ROM use multipliers to change the base stats...?
EDIT3: "32 00 B4 00 14 00 96 00 B4 00 14 00" exists in the ROM at 0x0825E026 with a pointer located at 0x08044704. I don't have IDA or anything to check it out, though, so...

There's a lot of stuff here. I'm assuming that at 0x25e026 those are what you believe the stats to be? I'm going to check it out.


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.