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)

Lemz January 20th, 2019 2:00 PM

Is there a routine to implement double wild battles in FR? I haven't seen this mechanic posted in the index.

BluRose January 20th, 2019 8:49 PM

Quote:

Originally Posted by Lemz (Post 9970092)
Is there a routine to implement double wild battles in FR? I haven't seen this mechanic posted in the index.

check this out

eildonp January 30th, 2019 5:24 AM

[FR] A friend told me he figured out how to switch between world maps in the fly menu in Fire Red, just like the town map menu.
This allows you to fly between the world maps.

Just replace the first two bytes at 0xC004C with 00 00, this will make the switch button appear above the cancel button.

He hasn't fully checked for possible bugs, however he believes there is none.

Edit: The switch button works exactly the same way as the town map one, meaning you must unlock it first.

Criminon February 14th, 2019 2:11 PM

Remove Mail Data from Items [FR]

Hello Everyone,

I started the process to remove Mail items from my game, and I noticed something odd. Even when removing all of the Mail data from the items, and essentially turning them into held items, the game still recognized them as Mail.

I'm assuming there is a table somewhere with these. Using the link below, I have looked through the hex to try to find any errors with the program I was using to edit:

Item Data Structure Gen III

C0 E9 E6 00 CA D5 E8 D7 DC FF E9 E6 FF 00 82 00 F4 01 00 00 60 6B 3D 08 00 00 01 04 39 22 0A 08 00 00 00 00 00 00 00 00 00 00 00 00

This is the item below. Nothing in here links back to mail, however it still displays the mail icon, etc. I have also tried also searching for a table, unfortunately with no luck.

https://i.ibb.co/J2ZMr64/Pokemon-Shine-1550179168587.png
https://i.ibb.co/S0HL1k0/Screenshot-21.png
https://i.ibb.co/GfDSHWD/Screenshot-22.png

EDIT:

Placing C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 980FA will completely remove the check for Mail Items making these act as normal items. (Items 0x79 - 0x84 will then be cleared up and function as standard items)

Credits to Skeli for finding this. (Thank you man!)

rubenturen February 18th, 2019 8:05 AM

Quote:

Originally Posted by BluRose (Post 9487628)
gen vi exp share system (em):

4A4BE - 02 21
4A594 - 01 22
4A634 - 01 20

ok this should be finalized
no more crap from me ahaha

This may be a old post but I have a problem

It works but all the other Pokemon get 0 exp

Caption Faclon March 10th, 2019 5:57 AM

Disable Item Usage [EM]
At 0x31BC10, put 05 B9

BluRose March 20th, 2019 11:41 AM

Quote:

Originally Posted by rubenturen (Post 9981149)
This may be a old post but I have a problem

It works but all the other Pokemon get 0 exp

like it awards them the exp but then you look at it outside of the battle, and it shows that no pokemon were awarded exp?

rubenturen March 21st, 2019 9:38 AM

Quote:

Originally Posted by BluRose (Post 9995533)
like it awards them the exp but then you look at it outside of the battle, and it shows that no pokemon were awarded exp?

no, it shows (inside the battle) that the others than the ones you used got 0 exp.
but it did show that it got exp just it sayed 0.

DemICE March 27th, 2019 5:50 AM

so I've been looking at the contents and... do we really not know the offset for Fire Red's experience gain formula? there is for Emerald but not for Fire Red. All i need is add a multiplier to it xd

Super Versekr Dark April 6th, 2019 8:02 PM

Quote:

Originally Posted by Criminon (Post 9979581)
Remove Mail Data from Items [FR]

Hello Everyone,

I started the process to remove Mail items from my game, and I noticed something odd. Even when removing all of the Mail data from the items, and essentially turning them into held items, the game still recognized them as Mail.

I'm assuming there is a table somewhere with these. Using the link below, I have looked through the hex to try to find any errors with the program I was using to edit:

Item Data Structure Gen III

C0 E9 E6 00 CA D5 E8 D7 DC FF E9 E6 FF 00 82 00 F4 01 00 00 60 6B 3D 08 00 00 01 04 39 22 0A 08 00 00 00 00 00 00 00 00 00 00 00 00

This is the item below. Nothing in here links back to mail, however it still displays the mail icon, etc. I have also tried also searching for a table, unfortunately with no luck.

https://i.ibb.co/J2ZMr64/Pokemon-Shine-1550179168587.png
https://i.ibb.co/S0HL1k0/Screenshot-21.png
https://i.ibb.co/GfDSHWD/Screenshot-22.png

EDIT:

Placing C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 980FA will completely remove the check for Mail Items making these act as normal items. (Items 0x79 - 0x84 will then be cleared up and function as standard items)

Credits to Skeli for finding this. (Thank you man!)

Remove Mail Data from Items [Ruby]

A2F2E: C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46

Super Versekr Dark April 15th, 2019 4:41 PM

Adding New Evolution Methods[Ruby]

Spoiler:
Based on:

https://www.pokecommunity.com/showpost.php?p=8487017&postcount=1

FR: 0x42FC0

Ruby: 0x3F588

--------------------------------------------------

Limiter:

FR: 0x42FAA

Ruby: 0x3F574

--------------------------------------------------

Table:

FR: 0x42FC4

Ruby: 0x3F58C

copy 3C bytes

--------------------------------------------------


Routine by FamiliaWerneck:

Spoiler:
.text
.align 2
.thumb
.thumb_func
.global LevelItemEvo

Main:
mov r0, r8
mov r5, r2
mov r10, r3
bl Decrypt
mov r2, r5
mov r5, #0x0
mov r3, r10
mov r10, r0
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r1, r0, r3
ldrb r0, [r1, #0x2]
mov r2, r10
mov r10, r1

Level10:
mov r1, r9
cmp r1, #0x9
bhi Level10SilverPowder
Level12:
cmp r1, #0xB
bhi Level12BeigeBelt
Level20:
cmp r1, #0x13
bhi Level20DeepSeaTooth
Level30:
cmp r1, #0x1D
bhi Level30RazorFang
Level40:
cmp r1, #0x27
bhi Level40Magnet
Level50:
cmp r1, #0x31
bhi Level50MetalCoat
mov r2, #0x0
b ArgumentCheck

Level10SilverPowder:
cmp r2, #0xBC
bne Level10PoisonBarb
mov r2, #0x1
b ArgumentCheck
Level10PoisonBarb:
cmp r2, #0xD3
bne Level12
mov r2, #0x2
b ArgumentCheck

Level12BeigeBelt:
cmp r2, #0xItemId
bne Level12RedBelt
mov r2, #0x3
b ArgumentCheck
Level12RedBelt:
cmp r2, #0xItemId
bne Level12BlueBelt
mov r2, #0x4
b ArgumentCheck
Level12BlueBelt:
cmp r2, #0xItemId
bne Level12OvalStone
mov r2, #0x5
b ArgumentCheck
Level12OvalStone:
cmp r2, #0xItemId
bne Level20
mov r2, #0x6
b ArgumentCheck

Level20DeepSeaTooth:
cmp r2, #0xC0
bne Level20DeepSeaScale
mov r2, #0x7
b ArgumentCheck
Level20DeepSeaScale:
cmp r2, #0xC1
bne Level30
mov r2, #0x8
b ArgumentCheck

Level30RazorFang:
cmp r2, #0xItemId
bne Level30RazorClaw
mov r2, #0x9
b ArgumentCheck
Level30RazorClaw:
cmp r2, #0xItemId
bne Level30MetalCoat
mov r2, #0xA
b ArgumentCheck
Level30MetalCoat:
cmp r2, #0xC7
bne Level30UpGrade
mov r2, #0xB
b ArgumentCheck
Level30UpGrade:
cmp r2, #0xDA
bne Level30KingRock
mov r2, #0xC
b ArgumentCheck
Level30KingRock:
cmp r2, #0xBB
bne Level30WhippedDream
mov r2, #0xD
b ArgumentCheck
Level30WhippedDream:
cmp r2, #0xItemId
bne Level30Sachet
mov r2, #0xE
b ArgumentCheck
Level30Sachet:
cmp r2, #0xItemId
bne Level40
mov r2, #0xF
b ArgumentCheck

Level40Magnet:
cmp r2, #0xD0
bne Level40DragonScale
mov r2, #0x10
b ArgumentCheck
Level40DragonScale:
cmp r2, #0xC9
bne Level40MetalCoat
mov r2, #0x11
b ArgumentCheck
Level40MetalCoat:
cmp r2, #0xC7
bne Level40Electirizer
mov r2, #0x12
b ArgumentCheck
Level40Electirizer:
cmp r2, #0xItemId
bne Level40Magmarizer
mov r2, #0x13
b ArgumentCheck
Level40Magmarizer:
cmp r2, #0xItemId
bne Level40ReaperCloth
mov r2, #0x14
b ArgumentCheck
Level40ReaperCloth:
cmp r2, #0xItemId
bne Level40KingRock
mov r2, #0x15
b ArgumentCheck
Level40KingRock:
cmp r2, #0xBB
bne Level40DubiousDisc
mov r2, #0x16
b ArgumentCheck
Level40DubiousDisc:
cmp r2, #0xItemId
bne Level40PrismScale
mov r2, #0x17
b ArgumentCheck
Level40PrismScale:
cmp r2, #0xItemId
bne Level50
mov r2, #0x18
b ArgumentCheck

Level50MetalCoat:
cmp r2, #0xC7
bne Level50Protector
mov r2, #0x19
b ArgumentCheck
Level50Protector:
cmp r2, #0xItemId
bne WrongItem
mov r2, #0x1A
b ArgumentCheck

Decrypt:
mov r1, #0xC
ldr r2, DecryptPoke
bx r2

WrongItem:
mov r2, #0x0
b ArgumentCheck

ArgumentCheck:
mov r1, r10
mov r10, r5
cmp r0, r2
bne NoEvo
b Evo

NoEvo:
ldr r2, NoEvolution
mov pc, r2

Evo:
ldrh r0, [r1, #0x4]
ldr r2, Evolution
mov pc, r2

.align 2
NoEvolution: .word 0x0803F726
Evolution: .word 0x0803F7A4
DecryptPoke: .word 0x0803CB61


Male:

Spoiler:
main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrb r2, [r3, #0x2]
mov r0, r8
bl decrypt2
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r1, r2
blt exit
mov r0, r8
mov r1, #0xFF
ldr r0, [r0, #0x0]
and r1, r0
mov r0, r8
bl decrypt
mov r11, r0
pop {r0-r7}
mov r5, r11
ldr r2, pokemondata
mov r4, #0x1C
mul r5, r4
add r5, r5, r2
ldrb r5, [r5, #0x10]
cmp r1, r5
blt exit
mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
exit: pop {r0-r7}
ldr r0, noevo
bx r0
decrypt: push {r0-r7}
mov r1, #0xB
ldr r2, decryptpoke
bx r2
decrypt2: push {r0-r7}
mov r1, #0x38
ldr r2, decryptpoke
bx r2
.align
levelcheckloc: .word 0x0803F62D
noevo: .word 0x0803F727
decryptpoke: .word 0x0803cb61
pokemondata: .word 0x081FEC18*

Pokemon Data: change offset if expanded


Female:

Spoiler:
main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrb r2, [r3, #0x2]
mov r0, r8
bl decrypt2
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r1, r2
blt exit
mov r0, r8
mov r1, #0xFF
ldr r0, [r0, #0x0]
and r1, r0
mov r0, r8
bl decrypt
mov r11, r0
pop {r0-r7}
mov r5, r11
ldr r2, pokemondata
mov r4, #0x1C
mul r5, r4
add r5, r5, r2
ldrb r5, [r5, #0x10]
cmp r1, r5
bge exit
mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
exit: pop {r0-r7}
ldr r0, noevo
bx r0
decrypt: push {r0-r7}
mov r1, #0xB
ldr r2, decryptpoke
bx r2
decrypt2: push {r0-r7}
mov r1, #0x38
ldr r2, decryptpoke
bx r2
.align
levelcheckloc: .word 0x0803F62D
noevo: .word 0x0803F727
decryptpoke: .word 0x0803cb61
pokemondata: .word 0x081FEC18*

Pokemon Data: change offset if expanded


Move:

Spoiler:
.text
.align 2
.thumb
.thumb_func
.global Evomove

main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrh r2, [r3, #0x2]
mov r0, r8
mov r5, #0x0
loop:
mov r1, #0xD
add r1, r1, r5
bl decrypt
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r1, r2
beq true
cmp r5, #0x3
beq exit
add r5, #0x1
b loop

decrypt:
push {r0-r7}
ldr r2, decryptpoke
bx r2
true:
mov r9, r3
pop {r0-r7}
mov r1, r9
ldr r0, levelcheckloc
bx r0
exit:
pop {r0-r7}
ldr r0, noevo
bx r0

.align
levelcheckloc: .word 0x0803F62D
noevo: .word 0x0803F727
decryptpoke: .word 0x0803cb61

Super Versekr Dark April 17th, 2019 2:43 PM

EV-enhancing items (Power Items)[Ruby]
[/SIZE]

The routine now does not require any new Held Effect Item Byte. The new power items are tied to Macho Brace's Held Item Effect Byte. (Thanks to MrDollSteak for giving the idea.)
The type of EV gain is now differentiated by the Second Held Effect Byte (the byte just after the Primary Held Effect Byte in the Item Table).
There is no need to code the Speed Drop explicitly for Power Items.

Usage is now like this by using the following parameters in the Item Table:
Primary Byte | Secondary Byte | Item Name
0x18 | 0x0 | Macho Brace
0x18 | 0x1 | Power Weight
0x18 | 0x2 | Power Bracer
0x18 | 0x3 | Power Belt
0x18 | 0x4 | Power Anklet
0x18 | 0x5 | Power Lens
0x18 | 0x6 | Power Band

Also, there are additional byte changes mentioned in the Spoiler to limit the EVs for each stat from 255 to 252 to avoid wastage of EVs by normal battling.

For Ruby:

Spoiler:
.text
.align 2
.thumb
.thumb_func

Main:
push {r2}
mov r0, r8 /*Load pokemon slot no*/
mov r1, #0xC
mov r2, #0x0
bl Decrypter /* Load pokemon's item */
lsl r0, r0, #0x10
lsr r0, r0, #0x10
pop {r2} /* Restore Pokerus Factor*/
cmp r0, #0xAF
beq EnigmaBerry
add r3, r0, #0x0
bl GetItemEffect /* Get Held Item's Effect Byte*/
lsl r0, r0, #0x18
lsr r0, r0, #0x18
cmp r0, #0x18
bne NoPowerItem
add r0, r3, #0x0
bl GetSecondEffectByte
lsl r0, r0, #0x18
lsr r0, r0, #0x18
cmp r0, #0x0
beq MachoBrace
add r1, r6, #0x1 /*Load a Power Item's Secondary Effect Byte*/
cmp r1, r0 /*Match items*/
bne NoPowerItem /*No Power Item or No Match for that particular stat*/
lsl r2, r2, #0x2
add r4, r4, r2 /* Add 4 EVs or 8 (due to Pokerus) */
NoPowerItem:
ldr r3, =0x0803FFB9
bx r3

EnigmaBerry:
ldr r3, =0x0803FF6F
bx r3

MachoBrace:
ldr r3, =0x0803FFB5
bx r3

Decrypter:
ldr r3, =0x0803CB61
bx r3

GetItemEffect:
ldr r1, =0x080A993D
bx r1

GetSecondEffectByte:
ldr r1, =0x080A9961
bx r1

/*At 3FF58: 04 1C 54 43 00 49 08 47 XX+1 XX XX 08 00 00 00 00 00 00 00 00 00 00*/
/*At 3FFDC && 3FFE2: FC to limit EV growth for each stat to 252 */

tkim June 14th, 2019 7:55 PM

Quote:

Originally Posted by kleenexfeu (Post 8989821)
Soul Dew works in the Battle Frontier for [email protected] :

C0 46 C0 46 at 0x806979E & 0x80697D4

Has anybody tested this? I couldn't understand the routines.

MobAcc June 15th, 2019 9:27 AM

Does anyone know how to change the world maps for maps 2-4 in fire red?

Voliol July 7th, 2019 6:54 AM

The newdex order in Crystal(U) is at offset 40D60.

RichterSnipes July 10th, 2019 3:15 PM

Quote:

Originally Posted by azurile13 (Post 9090677)
I don't know if this has been posted before, but whatevs. It came to my attention today that the bag in FireRed crashes if a "main" pocket has more than 42 items (the normal max for regular items). I had always assumed the malloc was done based on a multiple of the numbers inputted at the routine beginning 0x08099E44, because the TM pocket works fine even with over 100 items, but apparently the berry/TM cases mean they run off of something different. Anyhow, to allow for sufficient malloc requests, change ".equ largest_pocket_size" to your new max and insert this:
Spoiler:
Code:

.equ largest_pocket_size,        CHANGE THIS LINE
.equ largest_pocket_size_plus_one, largest_pocket_size + 1
.equ strings_size,        largest_pocket_size_plus_one * 19

.org 0x08002B9C
malloc:
        push {lr}
        mov r1, r0

.org 0x081083F4
main:
        push {r4, lr}
        ldr r4, =(0x0203AD18)
        mov r0, #largest_pocket_size_plus_one
        lsl r0, r0, #0x3
        bl malloc
        str r0, [r4, #0x0]
        cmp r0, #0x0
        beq return
        ldr r0, =strings_size
        bl malloc
        str r0, [r4, #0x4]
        cmp r0, #0x0
        beq return
        mov r0, #0x1

return:
        pop {r4}
        pop {r1}
        bx r1


EDIT: I haven't done much testing. I've only thrown like 60 items into the general items pocket before I got bored & assumed this routine was the only problem.

Info on 0x08099E44: http://www.pokecommunity.com/showpost.php?p=9014911&postcount=2018

Does this modification have any notable side effects? And what limits does it have? I can't imagine that it's a no-strings-attached enhancement. The more in-depth bag expansion codes in the ASM Resource Thread either take over space dedicated for the "Previously" system or rewrite the save function altogether to utilize JPAN's Save Block Recycle hack.

dGxx July 12th, 2019 8:18 PM

Hi everyone, I got a quick question I'm sure after all these years you might have an answer. I'll try to make it as small as possible. Here it is:

I wanna be able to give whatever pokemon I choose to a person and or whatever is on my top slot, and that person will give me another one right back. For example, I want to give a person my charizard and I want that person to give me back another Charizard with obviously different stats, I have an idea on how to implement it on my hack, i just dont know how i could script it or what or which vars to use. Thanks guys

Voliol July 15th, 2019 3:03 PM

@dGxx what game are you using as your base?

Either way here are the indexes for your team data in the gen III games: https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_data_structure_in_Generation_III#Data_location
The part of the Pokémon data that has the species id is hidden behind encryption though, so you'll have to unencrypt it. Dunno exactly how to do that, parts of the solution might be on this page: https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_data_substructures_in_Generation_III

Voliol July 16th, 2019 2:43 AM

Quote:

Originally Posted by Voliol (Post 10041670)
The newdex order in Crystal(U) is at offset 40D60.

Here is a fuller list, I don't think I've missed any:
Spoiler:
Gold(U): 40D60
Silver(U): 40D60
Crystal(U): 40D60

Gold(JP): 40C2C
Silver(JP): 40C2C
Crystal(JP): 40C2C

Gold(G): 40D5A
Silver(G): 40D5A
Crystal(G): 40D59

Gold(F): 40D68
Silver(F): 40D68
Crystal(F): 40D68

Gold(ES): 40D62
Silver(ES): 40D62
Crystal(ES): 40D64

Gold(I): 40D71
Silver(I): 40D71
Crystal(I): 40D71

Note that German and Spanish Crystal have different offsets from their corresponding GS pair, otherwise the offset within a given language is all the same.

Peter_BimBals July 17th, 2019 5:27 AM

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


The code explaining the above byte changes is:

Spoiler:
Code:

.gba
.thumb
.open "firered.gba", 0x8000000

// trade item removal
.org 0x08043156
b 0x0804315E

// all three
.org 0x080CE90C
b 0x080CE948

// trade
.org 0x080CF566
b 0x080CF598

// stone
.org 0x08126C26
nop
nop
nop
nop

// stone
.org 0x08126C4C
b 0x08126C60

.close





Hey, I'm new at coding and whilst making a minor edit hack for Pokemon Leaf Green, I had a few questions regarding this; Firstly, and this might be a dumb question, am I able to simply change out the text from firered to leafgreen? Secondly, where would I put this script? I've only writen one script and have had only a few days of experience in writing scripts. Thank you in advance ~

Zeturic July 17th, 2019 10:09 AM

Quote:

Originally Posted by Peter_BimBals (Post 10044894)
Quote:

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


The code explaining the above byte changes is:

Spoiler:
Code:

.gba
.thumb
.open "firered.gba", 0x8000000

// trade item removal
.org 0x08043156
b 0x0804315E

// all three
.org 0x080CE90C
b 0x080CE948

// trade
.org 0x080CF566
b 0x080CF598

// stone
.org 0x08126C26
nop
nop
nop
nop

// stone
.org 0x08126C4C
b 0x08126C60

.close




Hey, I'm new at coding and whilst making a minor edit hack for Pokemon Leaf Green, I had a few questions regarding this; Firstly, and this might be a dumb question, am I able to simply change out the text from firered to leafgreen? Secondly, where would I put this script? I've only writen one script and have had only a few days of experience in writing scripts. Thank you in advance ~

It's not a script, it's ASM written for armips. But beyond that, I wasn't expecting people to literally assemble the code with armips, you would just make the listed byte changes in a hex editor (the armips code does exactly those byte changes); it was just there as an explanation and documentation.

LG's offsets are not the same as FR. To port it from FR to LG, you'd have to find the LG equivalent of each FR offset listed (0x08043156, 0x080CE90C, etc). I don't know the LG equivalents, and I have no inclination to look them up. Nobody hacks or researches LG because there's really no point; you could turn FR into a clone of LG with minimal effort and from a gameplay perspective that'd be identical but you're not needlessly handicapping yourself by actually starting from LG. If you want to use a Kanto-based game as your base, I strongly advise that you use FR.

Peter_BimBals July 17th, 2019 10:40 AM

Alright, Thank you for responding. Truth be told, I just had the LG ROM already on my computer and wanted to mess around with it, I didn't know the two were different beyond version exclusives and title screen. I'll try looking it up because I've put in a bit of work already, but if I can't find anything I'll get an FR ROM and start over. That much shouldn't be too hard.

RichterSnipes July 21st, 2019 1:00 PM

Faster Game Saving [FR]

Starting with Gen II, attempting to update the save on your current file would tell you that "There is already a save file. Is it OK to overwrite?" This needless extra step remained until Gen V, when it reverted the process back to one step.

To skip this step and save after just one prompt, change the byte at 0x6F874 from 0A to 56. This only applies to saving over your current profile. If you start a new game and try to save over the old profile, you'll still receive the extended overwrite warning.

Explanation: The subroutine at 0x6F86C gets loaded if the game detects there's already a save file. First it checks if the profile is different from the current one. If it's the same profile, it branches to 0x6F88C. This is indicated in hex by 0A D1. After branching, it'll load the "There is already a saved file" text string and corresponding subroutine.

What this change does is make the game branch instead to 0x6F924, which bypasses the already-present save subroutine and skips straight to saving the game.

I'm still not that good at ASM. If anything needs correcting, feel free to do so!

dGxx July 28th, 2019 6:31 AM

I made a script with the help of some asm made by FBI, he had a custom wild battle asm that helped me create a very cool and desirable event where I give away a pokemon and in return I would get a perfect iv pokemon right back. I made this for FIRE RED obviously and here is the script I made and I need some help with one thing for perfection's sake.

Spoiler:


//this script will test the release imperfect/fight perfect pokemon script

#dyn 0x752000

#org @main
lock
faceplayer
msgbox @msg-ask
callstd MSG_YESNO
compare LASTRESULT NO
if == jump @end
msgbox @whichpoke-msg
callstd MSG_NORMAL
fadescreen FADEOUT_BLACK
special 0x9f // store a pokemon from a selection screen
waitspecial
compare 0x8004 0x6 //if player presses B, it cancels selection screen
if >= jump @canceled
special2 0x8005 0xBA // takes pk's id no. AND stores it in 0x8005
compare 0x8005 0x95 // if player chose a dragonite, it continues
if == jump @choseright
jump @end2 //if player didn't choose a dragonite, it ends

#org @choseright
msgbox @msg-take
callstd MSG_NOCLOSE
checksound
cry 0x8005 0x0
msgbox @msg-ok
callstd MSG_NORMAL
waitcry
copyvar 0x8004 0x8005
special 0xbb // removes the selected pkmn from party
call @fightpokemon
release
end

#org @canceled
msgbox @msg-cancel
callstd MSG_NOCLOSE
release
end

#org @end
msgbox @msg-saidno
callstd MSG_NOCLOSE
release
end

#org @end2
msgbox @not-poke
callstd MSG_NOCLOSE
release
end

#org @fightpokemon
setflag 0x807
special BATTLE_PIXELLATE
setvar 0x40FF 0x1
call @shinyornot
setvar 0x8000 0x93 // dratini
setvar 0x8001 0x5 // level 5
setvar 0x8002 0x0 //item
setvar 0x8003 0x1 // first attack (1 - pound)
setvar 0x8004 0x0 // second attack
setvar 0x8005 0x0 // third attack
setvar 0x8006 0x0 // fourth attack
setvar 0x8007 0x1f //ivs
setvar 0x8008 0x1f //
setvar 0x8009 0x1f
setvar 0x800a 0x1f
setvar 0x800b 0x1f
setvar 0x800c 0x1f
setvar 0x800d 0x1f //ivs
callasm 0x8780201
waitspecial
clearflag 0x807
fadescreen FADEOUT_BLACK
//disappear 0x //person no.
//setflag 0x //flag of person id
waitbutton
fadescreen FADEIN_BLACK
setvar 0x8003 0x0 // needs to be set back to 0 or else shinies appear after giveaway(thanks to HACKMEW's shinyzer)
setvar 0x40FF 0x0
return

#org @shinyornot
random 2
compare LASTRESULT 1
if == call @shiny
compare LASTRESULT 0
if == call @notshiny
return

#org @shiny
applymovement PLAYER @p
pauseevent 0x0
setvar 0x800f 0x1
return

#org @notshiny
setvar 0x800f 0x0
return

// strings
#org @not-poke
= That's not a Dragonite!\nCome again!

#org @msg-cancel
= Ok, come again!

#org @msg-saidno
= Come back with a Dragonite!

#org @msg-ok
= OK, I'm done!

#org @msg-take
= OK, I got your \v\h02!

#org @msg-ask
= It needs a Dragonite!\nWant to give Dragonite away?

#org @whichpoke-msg
= Choose a Dragonite!

#org @p
m say_:) end



Now, what I need help with is that I used special 0xbb. It is supposed to store the pokemon I selected into daycare, how I do I delete the daycare stored pokemon so there is no choice of getting it back, the whole point I made this was to get rid of the imperfect pokemon to fight a perfect version of it to re-raise. Thanks guys!

Super Versekr Dark August 2nd, 2019 6:35 PM

Pointer to expand object effect tables and limiter:

For Ruby:

Table:

AXVE- 0x1FCDE4

Limiters:

0x0803E2F8: 00 00 00 00

For Fire Red:

Table:

BPRE- 0x2528BC

Limiters:

0x08042508: 00 00 00 00

0x0804152C: 00 00 00 00

Credits to: JPAN


Dr. Seuss August 3rd, 2019 8:43 PM

Update the AI Priority move effects table [FR]
If you open a trainer editor and you edit aany trainer, you'll notice there's an option for "Trainer AI". By default, most of trainers are set in 0, and important trainers like Gym Leaders have this set to 7. There's a good explanation about how to setup the trainer AI in this post made by Samu from Whack a Hack forums (In spanish). Well, the point of this post is not that research.

If you set the trainer AI to 7, any trainer with that AI will start the battle giving priority to some moves that set the battle, like poisoning your Pokémon, increasing their speed, attack stats, etc. There is a table of move effects located at 0x81DBAA7 with a set of 0x37 move effects that have priority over other move effects during the beggining of the battle. The table has the following entries.

Code:

        .byte EFFECT_ATTACK_UP
        .byte EFFECT_DEFENSE_UP
        .byte EFFECT_SPEED_UP
        .byte EFFECT_SPECIAL_ATTACK_UP
        .byte EFFECT_SPECIAL_DEFENSE_UP
        .byte EFFECT_ACCURACY_UP
        .byte EFFECT_EVASION_UP
        .byte EFFECT_ATTACK_DOWN
        .byte EFFECT_DEFENSE_DOWN
        .byte EFFECT_SPEED_DOWN
        .byte EFFECT_SPECIAL_ATTACK_DOWN
        .byte EFFECT_SPECIAL_DEFENSE_DOWN
        .byte EFFECT_ACCURACY_DOWN
        .byte EFFECT_EVASION_DOWN
        .byte EFFECT_CONVERSION
        .byte EFFECT_LIGHT_SCREEN
        .byte EFFECT_SPECIAL_DEFENSE_UP_2
        .byte EFFECT_FOCUS_ENERGY
        .byte EFFECT_CONFUSE
        .byte EFFECT_ATTACK_UP_2
        .byte EFFECT_DEFENSE_UP_2
        .byte EFFECT_SPEED_UP_2
        .byte EFFECT_SPECIAL_ATTACK_UP_2
        .byte EFFECT_SPECIAL_DEFENSE_UP_2
        .byte EFFECT_ACCURACY_UP_2
        .byte EFFECT_EVASION_UP_2
        .byte EFFECT_ATTACK_DOWN_2
        .byte EFFECT_DEFENSE_DOWN_2
        .byte EFFECT_SPEED_DOWN_2
        .byte EFFECT_SPECIAL_ATTACK_DOWN_2
        .byte EFFECT_SPECIAL_DEFENSE_DOWN_2
        .byte EFFECT_ACCURACY_DOWN_2
        .byte EFFECT_EVASION_DOWN_2
        .byte EFFECT_REFLECT
        .byte EFFECT_POISON
        .byte EFFECT_PARALYZE
        .byte EFFECT_SUBSTITUTE
        .byte EFFECT_LEECH_SEED
        .byte EFFECT_MINIMIZE
        .byte EFFECT_CURSE
        .byte EFFECT_SWAGGER
        .byte EFFECT_CAMOUFLAGE
        .byte EFFECT_YAWN
        .byte EFFECT_DEFENSE_CURL
        .byte EFFECT_TORMENT
        .byte EFFECT_FLATTER
        .byte EFFECT_WILL_O_WISP
        .byte EFFECT_INGRAIN
        .byte EFFECT_IMPRISON
        .byte EFFECT_TEETER_DANCE
        .byte EFFECT_TICKLE
        .byte EFFECT_COSMIC_POWER
        .byte EFFECT_BULK_UP
        .byte EFFECT_CALM_MIND
        .byte EFFECT_CAMOUFLAGE


The pointer of this table is located at 0x81DBA96 so you can repoint the table and add new entries to the table so trainers with a high Ai might use moves on this table firstly.

El Diabeetus August 9th, 2019 9:22 PM

Quote:

Originally Posted by lsmash (Post 8311049)
I combined my work with the one from Doesnt. As a result, there are less bytes to write into freespace.
So, here's what to do to give exp points when you catch a pokemon:
1-The bytes to put into freespace: 2E E0 3F 02 02 00 2E 0C 3C 02 02 00 2E 0D 3C 02 02 00 23 00 F1 63 9A 1D 08 28 58 9A 1D 08

2-The bytes to replace at 1D9A53: 41 XX XX XX 08 (XX = pointer to the code above).

3-Just like Doesnt wrote earlier, replace the bytes at 15A68 with A1 5A 01 08.

It should work without problems, as I tested it before posting.

Thanks to Doesnt for telling me how to fix a music issue.

Is there a way to get around Rattata appearing as the captured Pokémon if you have an extended Dex?

colonelsalt September 1st, 2019 1:13 PM

[FR] Suppress Pokédex screen on new Pokémon capture
To prevent the Pokédex screen/animation from showing after catching a new Pokémon, nop the 22 bytes at 0x106B7A (that is, up to and including 0x106B8F). This will jump straight to the nickname prompt after a new Pokémon is caught (but will still show the "Pokémon X was added to the Pokédex" text if left unedited).

Burtle September 23rd, 2019 3:57 PM

Change Vs Seeker Step Requirement (FR)
Change 0x0810C50E to your number in hex

Joseph 91 October 30th, 2019 8:37 AM

Quote:

Originally Posted by El Diabeetus (Post 10055086)
Is there a way to get around Rattata appearing as the captured Pokémon if you have an extended Dex?

To prevent Rattata from appearing in the Pokedex and appearing the new captured Pokémon, you must expand the Habitats Table using a Hexadecimal editor and add each new Pokémon in the Habitats ... You can use PGE to add each new Pokémon to the habitats.

To find out where the Habitats table is located, and to learn more about it, go to the Froosty The_learner post.
FIRE RED habitat editing: https://www.pokecommunity.com/showthread.php?t=379667

DarkCyborg November 27th, 2019 3:50 PM

Making the EVs more "RBY/GSC-like" on FireRed

RBY and GSC are known for supporting "full EV spread", as the 510 EV limit didn't existed at the time. Bringing back the old Stat Exp system would be a very hard task, but I found a way to simulate the full EVs from past gens by limitting the max EV to 63 and reducing the EV divider from 4 to 1 (of course, removing the 510 EV limit would be a better solution, but I haven't found a way to do that with binary hacking).

This solution works on FireRed.

Step 1) Limit the EV cap to 63

From Touched's tutorial:
Address 0x0439FC = 0x3F (63)
Address 0x043A02 = 0x3F (63)

Step 2) Change EV divider to 1

I owe this one to Mr.Pkmn posting the hex addresses to do that. In that case, he shows how to change the EV divider from 4 to 2.

To make it 1, I have made some tests to find a value that A) stats would be correctly divided by 1 and B) would not screw up the stats (this one is dedicated to the HP EV divider).

The values I found are completely empirical, I have no idea of why they have worked and I haven't found any glitches until now (I have not tested link battles on my hack yet).

Here are the changes:

Address 0x03E582 = 0x02 (HP)
Address 0x03E5CE = 0x0F (ATK)
Address 0x03E614 = 0x0F (DEF)
Address 0x03E65A = 0x0F (SPD)
Address 0x03E6A0 = 0x0F (SAT)
Address 0x03E6E6 = 0x0F (SDE)


Credits:
- Touched
- Mr.Pkmn
________________

KNOWN PROBLEMS:

About that 63 limit... well, a Pokémon won't get past it by gaining EV by battle. However, Vitamins (HP Up, Protein, etc.) will completely ignore that, so your HP can reach 100 EV with HP Up (and the same for other stats).
For now, the best solution I have is to remove the access to every vitamin from the game with AdvanceMap, so you'll get EVs only by battle. I really don't know how to change the max EV you can get with vitamins (default = 100).

Zeturic January 18th, 2020 8:34 PM

Static Levels For In-Game Trades [FR]

EDIT: Since this is just a simple byte change, I'm keeping this up, but I suggest you use this instead, which allows for this and more.

Prior to Gen V, Pokemon you receive from in-game trades will be at the same level as the Pokemon you traded. From Black and White onwards, however, they come at a particular level. To get that in FR, simply make the following change:

Code:

0x08053B5E: 3A 20 28 5C C0 46 C0 46 C0 46 C0 46 C0 46


To actually set the level for a particular Pokemon, you'll need a hex editor and a calculator. In an unmodified FR 1.0 ROM, sIngameTrades is stored at 0x0826CF8C. Each in game trade takes 0x3C bytes, and the level is stored at offset 0x3A from the start of the struct. So you'll need to calculate
0x0826CF8C + 0x3C * id + 0x3A
, where id is the index of the in-game trade you're modifying (e.g. Reyley's Mimien is 0, and Norma's Tangela is 7). Pull up the resulting address in a hex editor, and modify that byte to set the level for that Pokemon.

Since this uses some of the padding bytes in the existing struct which were zeroed out (because they were originally unused), you'll need to set levels for all of them or they'll come at level 0.

If you have any problems, let me know.

ME604 February 10th, 2020 12:36 PM

Would anyone be able to provide or point me to a tutorial (inside or out of this thread) on extending the regional dex limit (past 255) or creating a completely custom regional dex in Fire Red?

mgriffin February 10th, 2020 12:55 PM

Quote:

Originally Posted by ME604 (Post 10124382)
Would anyone be able to provide or point me to a tutorial (inside or out of this thread) on extending the regional dex limit (preferably past 255) or creating a completely custom regional dex in Fire Red?

Not past 255, but this thread from earlier this week might help.

Spherical Ice February 15th, 2020 9:19 AM

[FR] Remove TM/HM PP replenishing
If you want to port the behaviour of TMs/HMs' interaction with PP from Gen V+ to FireRed, where teaching a move retains its current PP, assemble and insert the following routine:

Code:

.thumb

.equ free_space, 0x @ Replace with your desired address
.equ move_data, 0x250C04 @ Replace with the address of your move data
.equ rom, 0x08000000

.org 0x124F48, 0xFF
branch1:
    ldr r1, =(rom + hack1 + 1)
    bx r1
.pool

.org 0x125FC4, 0xFF
branch2:
    ldr r1, =(rom + hack2 + 1)
    bx r1
.pool

.org 0x1260B4, 0xFF
branch3:
    ldr r1, =(rom + hack3 + 1)
    bx r1
.pool

.org free_space, 0xFF
hack1:
    mov r1, r0
    lsl r1, r1, #0x10
    lsr r1, r1, #0x10
    mov r0, r5
    mov r2, r4
    bl set_move_and_pp
    ldr r0, =(rom + 0x124F56 + 1)
    bx r0
.pool

hack2:
    mov r0, r9
    ldrh r1, [r0, #0xE]
    mov r0, r6
    mov r2, r5
    bl set_move_and_pp
    ldr r0, =(rom + 0x125FD0 + 1)
    bx r0
.pool

hack3:
    mov r2, r0
    lsl r2, r2, #0x18
    lsr r2, r2, #0x18
    mov r0, r4
    mov r1, r5
    bl set_move_and_pp
    ldr r0, =(rom + 0x1260C2 + 1)
    bx r0
.pool

set_move_and_pp:
    push {r4,r5,lr}
    sub sp, sp, #4
    mov r5, r0
    mov r4, r2
    mov r0, sp
    strh r1, [r0]
    lsl r4, r4, #0x18
    lsr r4, r4, #0x18
    mov r1, r4
    add r1, #0xD
    mov r0, r5
    mov r2, sp
    bl pokemon_setattr

    add r4, #0x11
    mov r0, r5
    mov r1, r4
    bl pokemon_getattr
    lsl r0, r0, #0x18
    lsr r3, r0, #0x18

    mov r0, sp
    ldrh r0, [r0]
    lsl r2, r0, #1
    add r2, r2, r0
    lsl r2, r2, #2
    ldr r0, =(rom + move_data + 4) @ move_data.pp
    add r2, r2, r0
    ldrb r0, [r2]

    cmp r3, r0
    blt dont_change_pp

    mov r0, r5
    mov r1, r4
    bl pokemon_setattr

dont_change_pp:
    add sp, sp, #4
    pop {r4,r5}
    pop {r0}
    bx r0
.pool

pokemon_getattr:
    ldr r3, =(rom + 0x3FBE8 + 1)
    bx r3
.pool

pokemon_setattr:
    ldr r3, =(rom + 0x4037C + 1)
    bx r3
.pool


EDIT 1st June 2020: Added two other hooks which are needed to ensure the same behaviour is applied when the player skips the TM learning animation.

Super Versekr Dark February 27th, 2020 11:30 AM

Choice Specs [Ruby]

Spoiler:
FR: 08 98 01 28 04 D0 02 28 06 D0 78 08 3F 18 03 E0 40 46 43 08 1B 18 98 46 00 48 00 47 59 EF 03 08

3EF4A: 01 48 00 47 00 00 XX+1 XX XX 08

RB: 08 98 01 28 04 D0 02 28 06 D0 78 08 3F 18 03 E0 40 46 43 08 1B 18 98 46 00 48 00 47 F1 BC 03 08

3BCE2: 01 48 00 47 00 00 XX+1 XX XX 08


Choice Scarf [Ruby]

Spoiler:
XX XX XX 08 = Item Data

FR: 18 2E 12 D0 1D 2E 13 D1 E0 8D 10 B4 09 4C 00 04 00 0C 2C 21 48 43 00 19 C0 7C 10 BC 02 28 07 D1 42 46 51 08 52 18 90 46 02 E0 42 46 52 08 90 46 01 49 08 47 XX XX XX 08 47 4E 01 08

14E3C: 00 49 08 47 XX+1 XX XX 08

RB: 18 2E 12 D0 1D 2E 13 D1 E0 8D 10 B4 09 4C 00 04 00 0C 2C 21 48 43 00 19 C0 7C 10 BC 02 28 07 D1 42 46 51 08 52 18 90 46 02 E0 42 46 52 08 90 46 01 49 08 47 XX XX XX 08 5F 31 01 08

13154: 00 49 08 47 XX+1 XX XX 08


Light Ball [Ruby]

Spoiler:
RB: At 3BDB8: 00 49 08 47 XX XX XX 08 00 00 00 00 00 00 00 00 00 00

Rutina:

RB: 53 46 2D 2B 09 D0 41 2B 0C D1 30 88 68 38 00 04 00 0C 01 28 06 D8 04 49 08 47 30 88 19 28 01 D1 01 49 08 47 01 49 08 47 CB BD 03 08 CF BD 03 08


I don't have the routine since I took the data from the mrdollsteak database and adapted it to ruby

Super Versekr Dark March 3rd, 2020 6:30 PM

Quote:

Originally Posted by Lunos (Post 9895240)
This information seems to be important enough and it's not mentioned in the main post, so I just took the liberty of bringing it here.

Forcing the Set Battle Style in Fire Red

Source.

Forcing the Set Battle Style in [Ruby]

1D8CFB: 28 66 8D 1D 08

kalarie May 15th, 2020 2:07 PM

Didn't see this documented anywhere, so I thought I should share it here.

On the credits section in Fire Red:
The maps shown in the credits section are determined by a table at 0x414588. It's a table with 13 pointers, starting at 0x4143e8. Every entry has a length of 0x20.

The bytes that determine the starting point are as follows:
0x3 = The map bank
0x5 = The map number
0x9 = X starting coordinate
0xB = Y starting coordinate

Byte 0x11 to 0x14 of the entry determines the direction in which the camera moves:
00 00 01 00 = Down
00 00 FF FF = Up
01 00 00 00 = Right
FF FF 00 00 = Left
01 00 FF FF = Up-right Diagonally
01 00 01 00 = Down-right Diagonally
FF FF FF FF = Up-left Diagonally
FF FF 01 00 = Down-left Diagonally

That's all.

Credits to Spherical Ice.

RichterSnipes May 31st, 2020 1:56 PM

Quote:

Originally Posted by Spherical Ice (Post 10126157)
[FR] Remove TM/HM PP replenishing
If you want to port the behaviour of TMs/HMs' interaction with PP from Gen V+ to FireRed, where teaching a move retains its current PP, assemble and insert the following routine:

Spoiler:
Code:

.thumb

.equ free_space, 0x @ Replace with your desired address
.equ move_data, 0x250C04 @ Replace with the address of your move data
.equ rom, 0x08000000

.org 0x124f48, 0xFF
branch:
    ldr r1, =(rom + hack + 1)
    bx r1
.pool

.org free_space, 0xFF
hack:
    mov r1, r0
    lsl r1, r1, #0x10
    lsr r1, r1, #0x10
    mov r0, r5
    mov r2, r4
    bl set_move_and_pp

return:
    ldr r0, =(rom + 0x124F56 + 1)
    bx r0   

.pool

set_move_and_pp:
    push {r4,r5,lr}
    sub sp, sp, #4
    mov r5, r0
    mov r4, r2
    mov r0, sp
    strh r1, [r0]
    lsl r4, r4, #0x18
    lsr r4, r4, #0x18
    mov r1, r4
    add r1, #0xD
    mov r0, r5
    mov r2, sp
    bl pokemon_setattr

    add r4, #0x11
    mov r0, r5
    mov r1, r4
    bl pokemon_getattr
    lsl r0, r0, #0x18
    lsr r3, r0, #0x18

    mov r0, sp
    ldrh r0, [r0]
    lsl r2, r0, #1
    add r2, r2, r0
    lsl r2, r2, #2
    ldr r0, =(rom + move_data + 4) @ move_data.pp
    add r2, r2, r0
    ldrb r0, [r2]

    cmp r3, r0
    blt dont_change_pp

    mov r0, r5
    mov r1, r4
    bl pokemon_setattr

dont_change_pp:
    add sp, sp, #4
    pop {r4,r5}
    pop {r0}
    bx r0
.pool

pokemon_getattr:
    ldr r3, =(rom + 0x3FBE8 + 1)
    bx r3
.pool

pokemon_setattr:
    ldr r3, =(rom + 0x4037C + 1)
    bx r3
.pool



There's an issue with this ASM routine, and it's similar to something I recall happening years ago with a different piece of ASM code.

If you press the B button to cancel out of the TM/HM "learning" animation, the PP amount for the taught move is completely filled up. I'm guessing that's not intended behavior?

Spherical Ice May 31st, 2020 11:36 PM

Quote:

Originally Posted by RichterSnipes (Post 10164905)
There's an issue with this ASM routine, and it's similar to something I recall happening years ago with a different piece of ASM code.

If you press the B button to cancel out of the TM/HM "learning" animation, the PP amount for the taught move is completely filled up. I'm guessing that's not intended behavior?

Ah, I missed two other places where I need to hook. This is the updated routine, I have edited my original post with this too:

Code:

.thumb

.equ free_space, 0x @ Replace with your desired address
.equ move_data, 0x250C04 @ Replace with the address of your move data
.equ rom, 0x08000000

.org 0x124F48, 0xFF
branch1:
    ldr r1, =(rom + hack1 + 1)
    bx r1
.pool

.org 0x125FC4, 0xFF
branch2:
    ldr r1, =(rom + hack2 + 1)
    bx r1
.pool

.org 0x1260B4, 0xFF
branch3:
    ldr r1, =(rom + hack3 + 1)
    bx r1
.pool

.org free_space, 0xFF
hack1:
    mov r1, r0
    lsl r1, r1, #0x10
    lsr r1, r1, #0x10
    mov r0, r5
    mov r2, r4
    bl set_move_and_pp
    ldr r0, =(rom + 0x124F56 + 1)
    bx r0
.pool

hack2:
    mov r0, r9
    ldrh r1, [r0, #0xE]
    mov r0, r6
    mov r2, r5
    bl set_move_and_pp
    ldr r0, =(rom + 0x125FD0 + 1)
    bx r0
.pool

hack3:
    mov r2, r0
    lsl r2, r2, #0x18
    lsr r2, r2, #0x18
    mov r0, r4
    mov r1, r5
    bl set_move_and_pp
    ldr r0, =(rom + 0x1260C2 + 1)
    bx r0
.pool

set_move_and_pp:
    push {r4,r5,lr}
    sub sp, sp, #4
    mov r5, r0
    mov r4, r2
    mov r0, sp
    strh r1, [r0]
    lsl r4, r4, #0x18
    lsr r4, r4, #0x18
    mov r1, r4
    add r1, #0xD
    mov r0, r5
    mov r2, sp
    bl pokemon_setattr

    add r4, #0x11
    mov r0, r5
    mov r1, r4
    bl pokemon_getattr
    lsl r0, r0, #0x18
    lsr r3, r0, #0x18

    mov r0, sp
    ldrh r0, [r0]
    lsl r2, r0, #1
    add r2, r2, r0
    lsl r2, r2, #2
    ldr r0, =(rom + move_data + 4) @ move_data.pp
    add r2, r2, r0
    ldrb r0, [r2]

    cmp r3, r0
    blt dont_change_pp

    mov r0, r5
    mov r1, r4
    bl pokemon_setattr

dont_change_pp:
    add sp, sp, #4
    pop {r4,r5}
    pop {r0}
    bx r0
.pool

pokemon_getattr:
    ldr r3, =(rom + 0x3FBE8 + 1)
    bx r3
.pool

pokemon_setattr:
    ldr r3, =(rom + 0x4037C + 1)
    bx r3
.pool


Thanks for letting me know, and if there is anything else I've missed please let me know!

RichterSnipes June 1st, 2020 6:46 PM

Quote:

Originally Posted by Spherical Ice (Post 10165099)
Ah, I missed two other places where I need to hook. This is the updated routine, I have edited my original post with this too:

Spoiler:
Code:

.thumb

.equ free_space, 0x @ Replace with your desired address
.equ move_data, 0x250C04 @ Replace with the address of your move data
.equ rom, 0x08000000

.org 0x124F48, 0xFF
branch1:
    ldr r1, =(rom + hack1 + 1)
    bx r1
.pool

.org 0x125FC4, 0xFF
branch2:
    ldr r1, =(rom + hack2 + 1)
    bx r1
.pool

.org 0x1260B4, 0xFF
branch3:
    ldr r1, =(rom + hack3 + 1)
    bx r1
.pool

.org free_space, 0xFF
hack1:
    mov r1, r0
    lsl r1, r1, #0x10
    lsr r1, r1, #0x10
    mov r0, r5
    mov r2, r4
    bl set_move_and_pp
    ldr r0, =(rom + 0x124F56 + 1)
    bx r0
.pool

hack2:
    mov r0, r9
    ldrh r1, [r0, #0xE]
    mov r0, r6
    mov r2, r5
    bl set_move_and_pp
    ldr r0, =(rom + 0x125FD0 + 1)
    bx r0
.pool

hack3:
    mov r2, r0
    lsl r2, r2, #0x18
    lsr r2, r2, #0x18
    mov r0, r4
    mov r1, r5
    bl set_move_and_pp
    ldr r0, =(rom + 0x1260C2 + 1)
    bx r0
.pool

set_move_and_pp:
    push {r4,r5,lr}
    sub sp, sp, #4
    mov r5, r0
    mov r4, r2
    mov r0, sp
    strh r1, [r0]
    lsl r4, r4, #0x18
    lsr r4, r4, #0x18
    mov r1, r4
    add r1, #0xD
    mov r0, r5
    mov r2, sp
    bl pokemon_setattr

    add r4, #0x11
    mov r0, r5
    mov r1, r4
    bl pokemon_getattr
    lsl r0, r0, #0x18
    lsr r3, r0, #0x18

    mov r0, sp
    ldrh r0, [r0]
    lsl r2, r0, #1
    add r2, r2, r0
    lsl r2, r2, #2
    ldr r0, =(rom + move_data + 4) @ move_data.pp
    add r2, r2, r0
    ldrb r0, [r2]

    cmp r3, r0
    blt dont_change_pp

    mov r0, r5
    mov r1, r4
    bl pokemon_setattr

dont_change_pp:
    add sp, sp, #4
    pop {r4,r5}
    pop {r0}
    bx r0
.pool

pokemon_getattr:
    ldr r3, =(rom + 0x3FBE8 + 1)
    bx r3
.pool

pokemon_setattr:
    ldr r3, =(rom + 0x4037C + 1)
    bx r3
.pool




Thanks for letting me know, and if there is anything else I've missed please let me know!

That seemed to do the trick. Thank you so much! This is an incredibly helpful complement to the hacks using infinite TMs.

__fred__40 June 7th, 2020 3:17 AM

In Fire Red,at 3C68DC the 18 stands for the width of the area lightened up by flash

AkameTheBulbasaur June 20th, 2020 9:13 AM

The table that determines which stats are boosted/nerfed by different natures is at 0x252B48 in FireRed and 0x31E818 in Emerald.

Each entry is five bytes long (one for each stat excluding HP). If the byte is 0x1 if it’s boosted, 0xFF if it’s nerfed and 0x0 if it is unaffected. The first entry is all zeroes (Hardy nature, which is neutral). The second entry is 00 01 FF 00 00, which boosts Attack and lowers Defence (Lonely nature).

The table that contains the names of all the natures is at 0x463E60 in FireRed and at 0x61CB50 in Emerald.

__fred__40 June 22nd, 2020 4:53 AM

In Fire Red,
at 416738 change
BC CF D3 FF CD BF C6 C6 FF

to

BC E9 ED FF CD D9 E0 E0 FF

to decapitalise the "BUY" and "SELL" text for the pokemart menu,or if you are using HMA then just go to the offset and you'll be able to change the text manually

AkameTheBulbasaur June 22nd, 2020 11:54 PM

To update Synchronise so that the opponent becomes Badly Poisoned when they Badly Poison you, put 06 instead of 02 at 0x1B404 and at 0x1B48A.

This changes MOV r0, #0x2 to MOV r0, #0x6. Therefore instead of changing the Bad Poison effect to the regular Poison effect, it replaces the Bad Poison effect with the Bad Poison effect (essentially leaving it the way it was before).

MagallanesX July 1st, 2020 2:24 PM

Can someone help guide me to a tutorial or create a tutorial where I may achieve something closely related to this pseudocode? I know how to implement it on Ruby, but I want to implement it on ASM in Emerald and Fire Red.

Pseudocode:
It applies to all encounters and Pokemon trainer battles both NPC and Gym
1. Check party pokemon's levels.

2. Select the highest level pokemon in your team.

3. Generate a pokemon wild or trainer based on the highest level pokemon possed. The limit would be two levels above or below. For example: You have a level 15 Mudkip. The Pokemon generated would range from level 13 to 17.

4. Check how many badges you posses. Depending on the badge, the trainer will have a different set of people whose level match according to step 3.

5. If the trainer possesses a Pokemon which has a level at or exceeding its evolutionary level, evolve the pokemon. For example: A grunt has a level 25 Zubat and Ratatta. Make the game have them become a Golbat and Raticate because they exceed their evolution levels of 22 and 20.

Optional: With number 5 in place, is there a way I can have the trainer analyze your Pokemon party's type and then randomly pick a non legendary Pokemon from a provided list of pokemon of that type to own?
Or can I set the trainer to pick a Pokemon from a type group randomly?
Example:
My team: Spinarak 16 & Mudkip 15
Bug/Poison, Ground/Water
Battler generates: Drowzee 15 and Paras 16
Second Example:
Bug catcher: generates bug types from level 14 to 18 (due to Spinarak's level) from only bug type pokemon.
So one run he could have a Butterfree 18 and Dustox 15 but another run a Pinsir 16 and Beedrill 17.



I am looking to make an open world game with replayability.

Dreamaker July 12th, 2020 8:41 PM

Quote:

Originally Posted by MrDollSteak (Post 9862027)
A quick edit to the IV System that will basically automatically set all wild Pokemon IVs to 30 or 31. I originally found it based on some original findings by azurile13 to set all IVs to 31 only.

EDIT: Wait it isn't quite that simple unfortunately, will need branching to handle probably.

Fire Red
Spoiler:
4087E
21 78 01 20 01 40 1E 20 08 18 00 00 00 00 00 00

40892
21 78 01 20 01 40 1E 20 08 18 00 00 00 00 00 00

408AC
21 78 01 20 01 40 1E 20 08 18 00 00 00 00 00 00 00 00

408C2
22 78 01 20 02 40 1E 20 10 18 00 00 00 00 00 00

408DC
21 78 01 20 01 40 1E 20 08 18 00 00 00 00 00 00

408F4
21 78 01 20 01 40 1E 20 08 18 00 00 00 00 00 00 00 00


Emerald
Spoiler:
6B14A
21 78 01 20 01 40 1E 20 08 18 00 00 00 00 00 00

6B15E
21 78 01 20 01 40 1E 20 08 18 00 00 00 00 00 00

6B178
21 78 01 20 01 40 1E 20 08 18 00 00 00 00 00 00 00 00

6B18E
22 78 01 20 02 40 1E 20 10 18 00 00 00 00 00 00

6B1A8
21 78 01 20 01 40 1E 20 08 18 00 00 00 00 00 00

6B1C0
21 78 01 20 01 40 1E 20 08 18 00 00 00 00 00 00 00 00

Amazing

Dreamaker July 22nd, 2020 6:37 AM

Would it be possible to exchange the effect of Metal Powder for Quick Powder?

Metal Powder:
If held by a Ditto, doubles its Defense stat. It does not work when Ditto is transformed.

Quick Powder:
If held by a Ditto, doubles its Speed stat. It does not work when Ditto is transformed.

In short, would anyone know which Byte to change Defense to Speed? Or even ASM codes for a new item?

AkameTheBulbasaur July 27th, 2020 10:11 AM

To make Wild Pokemon use AI scripts, (and therefore be as smart as a Trainer's Pokemon), put 97 21 at 0x385C0 and 24 20 at 0x106658.

Explanation:
The game has different Battle Types that are stored 0x02022B4C. For example, 0x1 is a Double Battle, 0x8 is a Trainer Battle, 0x4 is a Wild Encounter, etc. It works as a bitfield, so in a Double Trainer Battle, the Battle Type is 0xD (0x8 + 0x4 + 0x1).

As far as I can tell, 0x20 is unused, or at the very least it doesn't seem to affect Wild Battles much when set, so I changed the "mov r0, #0x4" at 0x10658 (where the game sets the Wild Encounter bit) to "mov r0, #0x24" so that it sets Battle Type 0x20 as well.

Later on, the game will AND the current Battle Type with 0x498 and if it's not equal to zero, it will eventually do the whole AI thing. 0x498 includes Battle Types 0x8 (Trainer Battle), 0x10 (Oak Tutorial Battle), 0x80 (Safari Zone Battle - uses AI Scripts to run away), and 0x400 (Old Man Catching Tutorial).

We changed "mov r1, #0x93" to "mov r1, #0x97". After moving 0x93 to r1, it bit-shifts-left by three (aka multiplies it by 8). By changing it to 0x97, it ensures that Battle Type 0x20 is included in the number it performs the AND operation with.

I tested this with SetWildBattle. I haven't fully tested it with random encounters but they should work the same.

Pyxal July 30th, 2020 9:54 AM

[FireRed]
Not sure whether this has been posted or not, but the position of the PokéBall in Oak's introduction has two coordinates. The X and Y values are at 0x12FA50 and 0x12FA52 respectively. They're each one byte.

-Originally found by the salvation phoenix on Discord.

Black_Fragrant September 5th, 2020 12:46 AM

Quote:

Originally Posted by Spherical Ice (Post 9195507)
Looks like there's another limiter at x10CEE4, which is a part of special 0x3A.

0300 seems to be the bank of the map, 1500-4100 are the number of the maps that the trainers are in.

btw can you help me identify some other limiters? i can really use some help getting this to work

Raduziel September 5th, 2020 12:04 PM

Quote:

Originally Posted by Zeturic (Post 9705315)
Remove flag check for running [FR]

Code:

0x0805BA3A: 01 20 C0 46


Combine this with the Run Inside Buildings hack, and you'll get the same running mechanics as Gen VI and Gen VII (as in, run anywhere and start out with the ability to run).

I've tried this but withou success:

https://i.imgur.com/AzNdtY2.png

I also tried zeroing those values (saw another post where it says that).

When I start a new game I can't run, neither inside my house or outdoors. What am I doing wrong?

Thanks!

Zeturic September 5th, 2020 2:05 PM

Quote:

Originally Posted by Raduziel (Post 10204858)
I've tried this but withou success:

https://i.imgur.com/AzNdtY2.png

I also tried zeroing those values (saw another post where it says that).

When I start a new game I can't run, neither inside my house or outdoors. What am I doing wrong?

Thanks!

It works on an unmodified ROM, so some change you've added is to blame. My guess would be CFRU, which (based on a search of the repo) also modifies the functions responsible for running and has an equivalent
FLAG_RUNNING_ENABLED
build-time option.

Raduziel September 5th, 2020 2:46 PM

Quote:

Originally Posted by Zeturic (Post 10204888)
It works on an unmodified ROM, so some change you've added is to blame. My guess would be CFRU, which (based on a search of the repo) also modifies the functions responsible for running and has an equivalent
FLAG_RUNNING_ENABLED
build-time option.

Thanks for answering, I'll see if I can work around this.

Raduziel September 6th, 2020 7:36 AM

Done and done. All I had to do was comment a line in CFRU, thanks again for the insightful comment, Zeturic.

Raduziel September 9th, 2020 11:37 AM

Quote:

Originally Posted by GoGoJJTech (Post 8182332)
nop the 8 bytes at 080484 to make trainerbattle 0x9 not have oak's text
found by knizz

Hi, can I have a little more info about this hex editing?

I'm interested in turning off Oak's text during the first rival battle. I've zeroed this offset:

Code:

00080480    00 29 03 D0 00 00 00 00 00 00 00 00 05 49 06 48


But Oak's text still appears. Any insight?

Ok, solved. I'm using CFRU and had to comment a line before installing.

angelkof September 10th, 2020 10:58 AM

Quote:

Originally Posted by Shufflejoy (Post 8319450)
I'm having a problem with this and I'm unsure of how to fix it. Here's the relevant battle script, and the pointer I entered into it.

https://dl.dropbox.com/s/54z7q2zjnc5eqiw/Capture.PNG

I've also tried formatting the pointer as 60C0EC08, 08ECC061, and 08ECC060. No changes, except for more oddities when I had formatted the pointers differently.

1. If the thrown Pokeball fails, my game freezes.
2. When the Pokemon is caught, Torchic does gain experience, but after the Pokedex information screen, I'm taken to a party select window, with the battle victory music still playing in the background. Torchic is the only Pokemon in the party, and I am unable to exit the window.

At xECC060, I've pasted the second string of bytes exactly as you've posted:

https://dl.dropboxusercontent.com/s/5f3bk2ie0uj5ath/Capture2.PNG

I have also tried omitting the bytes at x3DE7C, with no change.

If anyone could help me figure out what I have done wrong, I'd really appreciate it.

I don't understand what to put in the xx xx xx, and does repoint is the same as replace?

Pyxal September 27th, 2020 12:35 AM

The main post has been updated for easier navigation.
If any link is dead, goes to the wrong URL or is in the wrong section, please contact a Fan Games moderator to fix it.

Lunos November 14th, 2020 1:35 AM

Quote:

Originally Posted by sonic1 (Post 7087946)
To anyone who is interested, callasm 0x09FC91 to name yourself in overworld.
FireRed Only.

~Sonic1

Was this added to the main post? I couldn't find it myself by Ctrl+F'ing words like "player's name", "player's" or "overworld".
It should totally be added as "Setting the Player's name" in the FireRed section, imo.

Pyxal November 14th, 2020 9:05 PM

Quote:

Originally Posted by Lunos (Post 10230753)
Was this added to the main post? I couldn't find it myself by Ctrl+F'ing words like "player's name", "player's" or "overworld".
It should totally be added as "Setting the Player's name" in the FireRed section, imo.

It already is present. Under Scripting Research > FireRed > Naming the player from the over world.

Dreamaker November 23rd, 2020 5:42 PM

I need a little help with a hack for Fire Red.

When I change these values, wild Pokémon will always be IVs 0.

Offset: 03DCD0
Original Values:
07 F0 FA F8
Modified Values:
00 20 1E E0

Offset: 03DD1A
Original Values:
07 F0 D5 F8
Modified Values:
00 20 1E E0

Remembering that the original values is between 0 ~ 31.

I would like them to be:
0 ~ 1
or
30 ~ 31

👍

Kertra December 4th, 2020 11:09 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.

The limiter is at 0x10D1BC. The one you introduced does not extend the table.

Pyxal December 8th, 2020 12:02 AM

[FireRed]
To skip the Game Freak Presents and intro fight, put 15 89 07 at 0xEC5D0.

Dory_33 December 12th, 2020 5:20 PM

Quote:

Originally Posted by BluRose (Post 9487628)
gen vi exp share system (em):

4A4BE - 02 21
4A594 - 01 22
4A634 - 01 20

ok this should be finalized
no more crap from me ahaha

Hey, buddy. I am new at this. is this code a cheat? or how can i add this to my game?

Pyxal December 13th, 2020 12:09 PM

Quote:

Originally Posted by Dory_33 (Post 10243759)
Hey, buddy. I am new at this. is this code a cheat? or how can i add this to my game?

Isn't a "cheat"; it's a modification or change in your ROM which, if you want, you can use.

partys over December 21st, 2020 5:39 PM

Base Stats In Red/Blue/Yellow

Hey! I randomly opened this thread in the rom hacking help section and was surprised to not see a good answer. I thought telling someone to just hack firered instead was kinda dumb, so I said to myself surely there's a tool for editing base stats. I did some googling, went to sketendo, and I couldn't find anywhere that had a tool for editing pokemon. Then I tried googling for offset(s) of the pokemon table, couldn't find anything in 10 seconds, got lazy and just decided to look up the Pokemon's stats in hex in HxD. I got them! Through looking at the data, I found that the stats table starts at 0x383df (the same in Red/Blue/Yellow) ordered from Bulbasaur to Mewtwo. The stats are in this order: HP, Attack, Defense, Speed, Special. I was confused for a sec because I thought special would be before speed, but it isn't and even bulbepedia knew this. In between the stats of different Pokemon, there was consistently 0x18 bytes of filler, so I decided to make a script to find where each pokemon's stats would be. I just started at 0x383df and went up 1C bytes (I thought it'd be 0x18 + 0x5 = 0x1D, but I forgot computing starts at 0) and got the location of every pokemon's stats but mew. Mew I heard was added to the game super last minute, and the only instance of 0x64 x 5 is at 0x425C in Red/Blue and 0x39447 in Yellow.

Tldr I used a script to find where the base stats of each pokemon in RBY is and here is the results, which I later verified.
Spoiler:
1: Bulbasaur 2D 31 31 2D 41 @ 0x383df (table starts here)
2: Ivysaur 3C 3E 3F 3C 50 @ 0x383fb
3: Venusaur 50 52 53 50 64 @ 0x38417
4: Charmander 27 34 2B 41 32 @ 0x38433
5: Charmeleon 3A 40 3A 50 41 @ 0x3844f
6: Charizard 4E 54 4E 64 55 @ 0x3846b
7: Squirtle 2C 30 41 2B 32 @ 0x38487
8: Wartortle 3B 3F 50 3A 41 @ 0x384a3
9: Blastoise 4F 53 64 4E 55 @ 0x384bf
10: Caterpie 2D 1E 23 2D 14 @ 0x384db
11: Metapod 32 14 37 1E 19 @ 0x384f7
12: Butterfree 3C 2D 32 46 50 @ 0x38513
13: Weedle 28 23 1E 32 14 @ 0x3852f
14: Kakuna 2D 19 32 23 19 @ 0x3854b
15: Beedrill 41 50 28 4B 2D @ 0x38567
16: Pidgey 28 2D 28 38 23 @ 0x38583
17: Pidgeotto 3F 3C 37 47 32 @ 0x3859f
18: Pidgeot 53 50 4B 5B 46 @ 0x385bb
19: Rattata 1E 38 23 48 19 @ 0x385d7
20: Raticate 37 51 3C 61 32 @ 0x385f3
21: Spearow 28 3C 1E 46 1F @ 0x3860f
22: Fearow 41 5A 41 64 3D @ 0x3862b
23: Ekans 23 3C 2C 37 28 @ 0x38647
24: Arbok 3C 55 45 50 41 @ 0x38663
25: Pikachu 23 37 1E 5A 32 @ 0x3867f
26: Raichu 3C 5A 37 64 5A @ 0x3869b
27: Sandshrew 32 4B 55 28 1E @ 0x386b7
28: Sandslash 4B 64 6E 41 37 @ 0x386d3
29: NidoranF 37 2F 34 29 28 @ 0x386ef
30: Nidorina 46 3E 43 38 37 @ 0x3870b
31: Nidoqueen 5A 52 57 4C 4B @ 0x38727
32: NidoranM 2E 39 28 32 28 @ 0x38743
33: Nidorino 3D 48 39 41 37 @ 0x3875f
34: Nidoking 51 5C 4D 55 4B @ 0x3877b
35: Clefairy 46 2D 30 23 3C @ 0x38797
36: Clefable 5F 46 49 3C 55 @ 0x387b3
37: Vulpix 26 29 28 41 41 @ 0x387cf
38: Ninetales 49 4C 4B 64 64 @ 0x387eb
39: Jigglypuff 73 2D 14 14 19 @ 0x38807
40: Wigglytuff 8C 46 2D 2D 32 @ 0x38823
41: Zubat 28 2D 23 37 28 @ 0x3883f
42: Golbat 4B 50 46 5A 4B @ 0x3885b
43: Oddish 2D 32 37 1E 4B @ 0x38877
44: Gloom 3C 41 46 28 55 @ 0x38893
45: Vileplume 4B 50 55 32 64 @ 0x388af
46: Paras 23 46 37 19 37 @ 0x388cb
47: Parasect 3C 5F 50 1E 50 @ 0x388e7
48: Venonat 3C 37 32 2D 28 @ 0x38903
49: Venomoth 46 41 3C 5A 5A @ 0x3891f
50: Diglett A 37 19 5F 2D @ 0x3893b
51: Dugtrio 23 50 32 78 46 @ 0x38957
52: Meowth 28 2D 23 5A 28 @ 0x38973
53: Persian 41 46 3C 73 41 @ 0x3898f
54: Psyduck 32 34 30 37 32 @ 0x389ab
55: Golduck 50 52 4E 55 50 @ 0x389c7
56: Mankey 28 50 23 46 23 @ 0x389e3
57: Primeape 41 69 3C 5F 3C @ 0x389ff
58: Growlithe 37 46 2D 3C 32 @ 0x38a1b
59: Arcanine 5A 6E 50 5F 50 @ 0x38a37
60: Poliwag 28 32 28 5A 28 @ 0x38a53
61: Poliwhirl 41 41 41 5A 32 @ 0x38a6f
62: Poliwrath 5A 55 5F 46 46 @ 0x38a8b
63: Abra 19 14 0F 5A 69 @ 0x38aa7
64: Kadabra 28 23 1E 69 78 @ 0x38ac3
65: Alakazam 37 32 2D 78 87 @ 0x38adf
66: Machop 46 50 32 23 23 @ 0x38afb
67: Machoke 50 64 46 2D 32 @ 0x38b17
68: Machamp 5A 82 50 37 41 @ 0x38b33
69: Bellsprout 32 4B 23 28 46 @ 0x38b4f
70: Weepinbell 41 5A 32 37 55 @ 0x38b6b
71: Victreebel 50 69 41 46 64 @ 0x38b87
72: Tentacool 28 28 23 46 64 @ 0x38ba3
73: Tentacruel 50 46 41 64 78 @ 0x38bbf
74: Geodude 28 50 64 14 1E @ 0x38bdb
75: Graveler 37 5F 73 23 2D @ 0x38bf7
76: Golem 50 6E 82 2D 37 @ 0x38c13
77: Ponyta 32 55 37 5A 41 @ 0x38c2f
78: Rapidash 41 64 46 69 50 @ 0x38c4b
79: Slowpoke 5A 41 41 0F 28 @ 0x38c67
80: Slowbro 5F 4B 6E 1E 50 @ 0x38c83
81: Magnemite 19 23 46 2D 5F @ 0x38c9f
82: Magneton 32 3C 5F 46 78 @ 0x38cbb
83: Farfetch’d 34 41 37 3C 3A @ 0x38cd7
84: Doduo 23 55 2D 4B 23 @ 0x38cf3
85: Dodrio 3C 6E 46 64 3C @ 0x38d0f
86: Seel 41 2D 37 2D 46 @ 0x38d2b
87: Dewgong 5A 46 50 46 5F @ 0x38d47
88: Grimer 50 50 32 19 28 @ 0x38d63
89: Muk 69 69 4B 32 41 @ 0x38d7f
90: Shellder 1E 41 64 28 2D @ 0x38d9b
91: Cloyster 32 5F B4 46 55 @ 0x38db7
92: Gastly 1E 23 1E 50 64 @ 0x38dd3
93: Haunter 2D 32 2D 5F 73 @ 0x38def
94: Gengar 3C 41 3C 6E 82 @ 0x38e0b
95: Onix 23 2D A0 46 1E @ 0x38e27
96: Drowzee 3C 30 2D 2A 5A @ 0x38e43
97: Hypno 55 49 46 43 73 @ 0x38e5f
98: Krabby 1E 69 5A 32 19 @ 0x38e7b
99: Kingler 37 82 73 4B 32 @ 0x38e97
100: Voltorb 28 1E 32 64 37 @ 0x38eb3
101: Electrode 3C 32 46 8C 50 @ 0x38ecf
102: Exeggcute 3C 28 50 28 3C @ 0x38eeb
103: Exeggutor 5F 5F 55 37 7D @ 0x38f07
104: Cubone 32 32 5F 23 28 @ 0x38f23
105: Marowak 3C 50 6E 2D 32 @ 0x38f3f
106: Hitmonlee 32 78 35 57 23 @ 0x38f5b
107: Hitmonchan 32 69 4F 4C 23 @ 0x38f77
108: Lickitung 5A 37 4B 1E 3C @ 0x38f93
109: Koffing 28 41 5F 23 3C @ 0x38faf
110: Weezing 41 5A 78 3C 55 @ 0x38fcb
111: Rhyhorn 50 55 5F 19 1E @ 0x38fe7
112: Rhydon 69 82 78 28 2D @ 0x39003
113: Chansey FA 05 05 32 69 @ 0x3901f
114: Tangela 41 37 73 3C 64 @ 0x3903b
115: Kangaskhan 69 5F 50 5A 28 @ 0x39057
116: Horsea 1E 28 46 3C 46 @ 0x39073
117: Seadra 37 41 5F 55 5F @ 0x3908f
118: Goldeen 2D 43 3C 3F 32 @ 0x390ab
119: Seaking 50 5C 41 44 50 @ 0x390c7
120: Staryu 1E 2D 37 55 46 @ 0x390e3
121: Starmie 3C 4B 55 73 64 @ 0x390ff
122: Mr. Mime 28 2D 41 5A 64 @ 0x3911b
123: Scyther 46 6E 50 69 37 @ 0x39137
124: Jynx 41 32 23 5F 5F @ 0x39153
125: Electabuzz 41 53 39 69 55 @ 0x3916f
126: Magmar 41 5F 39 5D 55 @ 0x3918b
127: Pinsir 41 7D 64 55 37 @ 0x391a7
128: Tauros 4B 64 5F 6E 46 @ 0x391c3
129: Magikarp 14 0A 37 50 14 @ 0x391df
130: Gyarados 5F 7D 4F 51 64 @ 0x391fb
131: Lapras 82 55 50 3C 5F @ 0x39217
132: Ditto 30 30 30 30 30 @ 0x39233
133: Eevee 37 37 32 37 41 @ 0x3924f
134: Vaporeon 82 41 3C 41 6E @ 0x3926b
135: Jolteon 41 41 3C 82 6E @ 0x39287
136: Flareon 41 82 3C 41 6E @ 0x392a3
137: Porygon 41 3C 46 28 4B @ 0x392bf
138: Omanyte 23 28 64 23 5A @ 0x392db
139: Omastar 46 3C 7D 37 73 @ 0x392f7
140: Kabuto 1E 50 5A 37 2D @ 0x39313
141: Kabutops 3C 73 69 50 46 @ 0x3932f
142: Aerodactyl 50 69 41 82 3C @ 0x3934b
143: Snorlax A0 6E 41 1E 41 @ 0x39367
144: Articuno 5A 55 64 55 7D @ 0x39383
145: Zapdos 5A 5A 55 64 7D @ 0x3939f
146: Moltres 5A 64 5A 5A 7D @ 0x393bb
147: Dratini 29 40 2D 32 32 @ 0x393d7
148: Dragonair 3D 54 41 46 46 @ 0x393f3
149: Dragonite 5B 86 5F 50 64 @ 0x3940f
150: Mewtwo 6A 6E 5A 82 9A @ 0x3942b

Messy source code here https://repl.it/@domc/DodgerblueWearableRar#findings.txt and here https://repl.it/@domc/MindlessIntentWatchdog#main.py


Super Versekr Dark December 25th, 2020 2:49 PM

[Ruby]

Pokemons receive EXP after capturing

Spoiler:
1D9ED3: 41 XX XX XX 08

XXXXXX

2E 0F 60 01 02 00 2E A8 4A 02 02 00 2E 0D 3C 02 02 00 23 00 F1 E3 9E 1D 08 28 D8 9E 1D 08

13DE0: F9 3D 01 08


https://www.mediafire.com/convkey/aac1/cik0m5fnl26xvjtzg.jpg

https://www.mediafire.com/convkey/b5ed/59osr9sqfkun8gpzg.jpg

dearman4 January 1st, 2021 8:11 PM

Using Dizzy's Hacked Engine to Check a Pokemon's Level
 
Recently I wanted to have a way to check a pokemon's level for an NPC dialog to branch off depending on if your pokemon was leveled beyond a certain point. I couldn't find a way to do this in Emerald so I figured out a way to do it myself using Dizzy's Hacked Engine and figured I should post it in case others want to do something similar.
Spoiler:
#freespace 0xFF
#dynamic 0x800000
#org @start
lockall
setvar 0x8004 0x0
setvar 0x8005 0x0
special2 0x8006 0x225
buffernumber 0x0 0x8006
msgbox @msg MSG_NORMAL '"LEVEL: [buffer1]."
goto @test

#org @test
setvar 0x8004 0x0
copyvar 0x8005 0x8006
special2 0x8006 0x225
releaseall
end

#org @msg
= LEVEL: [buffer1].

Now this is a really basic script that just tells you a pokemon's level, you'd need to compare the result to a predetermined value and can go from there pretty easily.

Li Yun February 6th, 2021 3:55 AM

Expand object effect tables and limiter - Emerald
Offset: 0x06BE74, Change A5 28 3B D8 to 00 00 00 00

Video:

jirachiwishmaker February 17th, 2021 6:52 AM

[Emerald] Receive the National Dex Directly Without Modifying the Script

Go to 0x9D42C, put 01 20 70 47.

Credits: Sagiri and Lunos

[Emerald] Fire Red Style Fishing (Remove having to reel in while Fishing)

From 0x8CA20 to 0x8CA62, replace them with the following bytes.

Spoiler:
10 B5 84 B0 04 1C 11 49 03 A8 02 22 5C F2 D2 FC 00 F0 A2 FA 60 89 01 30 00 22 60 81 00 04 00 14 13 28 25 DD 62 81 0C 20 21 5E 0E 23 E0 5E 81 42 0E DB 20 89 41 1C 21 81 22 8C 20 23 E0 5E 00 28 01 D0 48 1C 20 81 50 1C 20 84 11 E0 A8 75 49 08 0C 20 23 5E DB 06 1B 0E 01 20 00 90 01 92 02 92 00 20 01 21 03 AA 77 F7 A3 FD A0 89 01 30 A0 81 00 20 04 B0 10 BC 02 BC 08 47 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


From 0x8CB6C to 0x8CBA3, replace with the following bytes.

Spoiler:
01 89 03 31 01 81 00 20 70 47 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


Credit: All belong to NobodySociety (originally from: https://www.pokecommunity.com/showpost.php?p=10228943&postcount=1)

[Emerald] Berry Trees No Longer Disappear Until the Player Picks Them

Go to 0xE17DE, put 04.

From 0xE1870 to 0xE191B, replace with the following bytes.

Spoiler:
F0 B5 07 1C 00 22 0D 49 D0 00 0D 4B C0 18 09 68 0C 18 20 78 56 1C 00 28 2E D0 61 78 7F 20 08 40 00 28 29 D0 80 20 08 40 00 28 25 D1 3D 1C 00 2D 22 D0 61 88 A9 42 05 DD 48 1B 1C E0 8C 5D 00 03 9C 16 00 00 6D 1A 20 78 00 F0 60 F9 60 80 20 1C FF F7 82 FF 00 28 0F D0 61 78 7F 20 08 40 05 28 02 D1 60 88 80 00 60 80 00 2D 05 D0 60 88 01 1C A8 42 E7 DD 40 1B 60 80 32 1C 7F 2A C3 DD F0 BC 01 BC 00 47 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


Credit: All belong to Buffel Saft (originally from: https://www.pokecommunity.com/showpost.php?p=10142996&postcount=63)

Momoro June 6th, 2021 6:52 PM

Quote:

Originally Posted by jirachiwishmaker (Post 8319526)
I was facing the same problem a few days ago. Repoint the battle script at 0x2DBD84 is not means to replace the original one with the new one directly in the address.

Firstly, you can place all the machine code in 0xECC060 like this:
http://www.pokecommunity.com/attachment.php?attachmentid=72469&stc=1&d=1403844557


Then replace the two pointers here from 84 BD 2D 08 to 60 C0 EC 08:
http://www.pokecommunity.com/attachment.php?attachmentid=72470&stc=1&d=1403844557

http://www.pokecommunity.com/attachment.php?attachmentid=72471&stc=1&d=1403844557

Finally, replace the bytes at 0x3DE7C with B5 DE 03 08. It may working properly now.

(even though this post is old) The attachments no longer exist, so could you elaborate on which pointers to change? And how would I place all the machine code in 0xECCC060? (the attachment, too, is gone) Thanks 🙂

agsmgmaster64 August 7th, 2021 2:36 PM

Quote:

Originally Posted by Zeturic (Post 9898988)
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).

This doesn't fix ones for when you use the PC, but i found the offsets to fix them. Just put 00 on those offsets.

[FR]
Code:

0x08093DE8
0x08093DEC


Also Emerald equivalents if you want to get rid of them there also. Same thing, put 00 on those offsets.

[Em]
Code:

0x081B2C1C
0x081B2C20
0x0807422E
0x08074232
0x081C27E4
0x081C27E8
0x08093DE8
0x08093DEC



ScyrousFX August 15th, 2021 5:36 AM

Double underwater movement speed [EM]

In the vanilla game, moving around underwater is painfully slow (it's the same speed as walking). Doubling the movement speed matches that of running and surfing, which players have grown accustomed to.

At 0x08AF4E, replace 05 4C 21 78 08 20 08 40 00 28 06 D0 28 1C 00 F0 EC FB 29 E0 00 00 90 75 03 02 10 20 08 40 00 28 1F D1 with 07 4C 21 78 08 20 08 40 00 28 03 D1 10 20 08 40 00 28 06 D0 28 1C 00 F0 E8 FB 25 E0 00 00 90 75 03 02.

Credits: me

Disable random PokéNav calls from trainers [EM]

Every so often, trainers will interrupt your adventure, giving you a call to tell you about the incredible level 3 Zigzagoon they just caught. These calls have no effect on trainer rematches and serve no hidden purpose. All of the match call dialogue can still be accessed if you initiate the calls yourself via the PokéNav menu, meaning nothing is lost when random calls are disabled. Additionally, this has no effect on story-related calls.

To disable random PokéNav calls from trainers, make the following changes:

At 0x195E8E, replace 01 with 00.

At 0x195EAC, replace 02 with 00.

The byte at 0x195EAC controls the match call chance when the Pokémon in your first party slot has the LightningRod ability (by default, it doubles the base chance).

Credits: me

Fix Pokéblock throw bug in Safari Zone [EM]

In Ruby/Sapphire/Emerald, instead of the escape factor having a minimum value of 1 (5% chance to flee) like the catch factor, the game is coded to set the escape factor to 1 if it would become negative due to a thrown Pokéblock. This means it is possible for the player to throw Pokéblocks such that a Pokémon's escape factor becomes exactly 0, and the Pokémon will have a 0% chance to escape. This can be fixed with a single byte change.

At 0x03F0CB, replace D2 with D8.

Credits: pret/pokeemerald #bugfix

Prof. Leon Dias September 5th, 2021 5:08 PM

Quote:

Originally Posted by Spherical Ice (Post 8071787)
This is probably something you could find by yourself but it's nice to have it in one place I guess.

0xE991F8 - Trainer Card Tileset
0x3CC6F0 - Trainer Card Front Tilemap
0x3CC984 - Trainer Card Back Tilemap
0x3CCEC8 - Trainer Card Background Tilemap
0x3CD5E8 - Badges
0x3CC368 - Trainer Card Stickers
0xE99198 - Palettes (first is the Trainer Card itself (and the stickers? I think), then the background for males, then the background for females)

Wanted to add to this:
I found the palettes for the trainer card with a different amount of stars.
0 stars- E99198
1 star- 3CD050
2 stars- 3CD110
3 stars- 3CD1D0
4 stars- idk, but probably around there.

This should help people who want to customize the trainer card further.

OPPAIDAISUKI September 28th, 2021 8:52 AM

Upon reading all the Research Database here.... there is still one thing i really wanted to know and how to do it.... it was how to fix the trainer fixing... i hope you can share your guide or tutorials sir on how to implement this on Fire Red..i already have some tools.... thanks in advance sirs!!!...

Yave Yu October 22nd, 2021 12:34 AM

Does anyone know how to make X Item (e.g. X Attack) raise by 2 instead of 1 in EM? I searched the forum but no correct result :(

Yave Yu October 22nd, 2021 3:45 AM

How can I do these thing:
Use a healing item like Potion to a Pokemon and not back to bag automaticly like BW in FR or EM? And how to remove (or skip) FR's item using animation?
Use any HM moves without ask, just do it directly (e.g. cut tree directly) like Unbound.

Entaro Ceraphenine November 24th, 2021 10:43 AM

For FireRed:
Changing the byte at 0x56150 from 0x01 to 0x00 makes it so that the game will never override surf music. It should also work for bike music since the checks for both music are done simultaneously but I have not checked the case for the bike music.

ScripNewbie December 8th, 2021 2:10 AM

Edit Color In Textbox
 
Fire Red
Hello i know everyone know about this but i just found a way to change the color in color textbox like:

Spoiler:
Pksv Example:
\c\h01\h04- RED
\c\h01\h06- GREEN


Spoiler:
XSE Example:
[Red_fr]- RED
[Green_fr]-GREEN


Spoiler:
You can literally edit that color!
1. Open APE and your rom
2. Go to offset 471DEC(not compressed)
Spoiler:
And edit it, careful thou i don't know if it affect anything inside the game but i'm pretty sure it's safe to edit, just to be safe just edit the 4,5,6,7,8,9 index.


If you change index 4 it will the change the:
\c\h01\h04 in PKSV
[Red_fr] in XSE
If you change the index 4 into green,
the command \c\h01\h04, [Red_fr] will be a green color in textbox.

Pyxal December 11th, 2021 4:06 AM

Quote:

Originally Posted by ScripNewbie (Post 10438703)
Hello i know everyone know about this but i just found a way to change the color in color textbox like

Pksv Example:
\c\h01\h04- Red
\c\h01\h06- Green

You can literally edit that color!
Open APE and your rom there
Go to offset 471DEC(not compressed)
And edit it, careful thou i don't know if it affect anything inside the game but i'm pretty sure it's safe to edit, just to be safe just edit the 4,5,6,7,8,9 index
If you change index 4 it will the change the \c\h01\h04..
Example you edit the 4rth index to green the command
\c\h01\h04 will be a green color in textbox.
I know almost all of you know about this but maybe some of them not so, there you go.

Merged your thread with this one, since you just state a small thing. And please write which game this is for, thanks!

ScripNewbie December 13th, 2021 12:31 AM

Quote:

Originally Posted by Spacewalker (Post 10439993)
Merged your thread with this one, since you just state a small thing. And please write which game this is for, thanks!

Thanks for doing that!
Can i request a thing?
Do you know an asm that calls a script, i mean asm that calls a script not script that calls asm.
Because i can't figure out what to do in cfru (void*), it's asking an asm not the script itself, but i want to run some script on it, thanks if you know!

Pyxal December 13th, 2021 4:31 AM

Quote:

Originally Posted by ScripNewbie (Post 10440684)
Thanks for doing that!
Can i request a thing?
Do you know an asm that calls a script, i mean asm that calls a script not script that calls asm.
Because i can't figure out what to do in cfru (void*), it's asking an asm not the script itself, but i want to run some script on it, thanks if you know!

I don't understand your question, sorry. D:
Can you elaborate a little more?

ScripNewbie December 13th, 2021 6:35 AM

Quote:

Originally Posted by Spacewalker (Post 10440718)
I don't understand your question, sorry. D:
Can you elaborate a little more?

Thanks Spacewalker for responding!
What i mean is, Asm that calls a script

Example: the script is in offset 0x8850001 and i wanna call it via asm.

My attempt on this is:
Spoiler:
.text
.align 2
.thumb
.thumb_func

main:
push {r0, r1, lr}
ldr r0 =(0x8850001)
ldr r1 =(0x20370D0)
add r0, r0, r1
strh r1, r0, r1
pop {r0, r1, lr}

.align 2

I don't know if it's right, I only have a little bit of knowledge on asm :(
but it compiles perfectly fine in cmd, but when i use callasm 0x8860001(where i put the asm) it didn't call the script in 0x8850001

Blah December 13th, 2021 8:47 PM

Likely there's a more elegant solution for this, but I don't know what you're talking about:
Quote:

Because i can't figure out what to do in cfru (void*), it's asking an asm not the script itself, but i want to run some script on it, thanks if you know!
To answer your question, try:
Quote:

.text
.align 2
.thumb

main:
ldr r1, =(0x8069AE4|1)
ldr r0, =(0x8850001)
bl linkr1

linkr1:
bx r1

.align 2
Good luck.

ScripNewbie December 15th, 2021 12:11 AM

Quote:

Originally Posted by FBI (Post 10440983)
Likely there's a more elegant solution for this, but I don't know what you're talking about:


To answer your question, try:


Good luck.

OHHH, FBI!
Thanks for this and all your amazing work! You can say im your biggest fan!
Thanks i will try this!

Update:
Spoiler:
This is really working Thank you FBI your my saviour! I almost lost hope.

ScripNewbie December 15th, 2021 5:49 AM

I tried your code and try to expand it, but i didn't have any idea what's gone wrong in my writing.

The code:
Spoiler:
.text
.align 2
.thumb
.thumb_func

main:
push {r0-r3, lr}
mov r0, #0x90
lsl r0, r0, #0x4
add r0, r0, #0x2A @flag 92A
ldr r1, =(0x806E6D0 +1) @checkflag
bl linker
cmp r0, #0x1 @check if set
beq set
b end

Set:
ldr r3, =(0x8069AE4 +1)
ldr r2, =(0x8850001) @my script
bl bxr3
b end

bxr3:
bx r3

linker:
bx r1

end:
pop {r0-r3, pc}

.align 2

My Script:
Spoiler:
#dyn 0x740000
#org @1
setflag 0x92A
callasm 0x8860001 'where i put my asm+1
end

The thing is, it's not working, if you somehow just somehow have time to help i will appreciate it, but if you don't that's ok.

agsmgmaster64 December 15th, 2021 3:28 PM

Quote:

Originally Posted by AkameTheBulbasaur (Post 10173899)
To update Synchronise so that the opponent becomes Badly Poisoned when they Badly Poison you, put 06 instead of 02 at 0x1B404 and at 0x1B48B.

This changes MOV r0, #0x2 to MOV r0, #0x6. Therefore instead of changing the Bad Poison effect to the regular Poison effect, it replaces the Bad Poison effect with the Bad Poison effect (essentially leaving it the way it was before).

There's a little issue with the offsets there, 0x1B48A should be used instead of 0x1B48B since 0x1B48A is the one that has a 02 on it.
In case you guys like Emerald, here's the equivalents as well: 0x43CF4, 0x43D78

Blah December 16th, 2021 2:08 PM

Quote:

Originally Posted by ScripNewbie (Post 10441454)
.align 2
.thumb

main:
push {lr}
ldr r0, =(0x92A)
ldr r1, =(0x806E6D0 +1) @checkflag
bl linker1
cmp r0, #0x1 @check if set
bne end
ldr r0, =(0x8850001) @my script
ldr r1, =(0x8069AE4 +1)
bl linker1

end:
pop {pc}

linker1:
bx r1

.align 2

Above is fixed. You're making some fundamental mistakes.
1. Don't need to push low registers
2. Parameters for functions start from r0

It sounds like you're using CFRU, I'd encourage you to write this function in C instead and cast your function as an argument to whatever the callback you're trying to use is.

BigBoiOnCampus December 21st, 2021 4:17 AM

Is there any info anywhere on porting the Gen 5 EXP system to firered? Liquid Crystal had it like 10 years ago so I assume it must be somewhere out there.

rhythmmk January 18th, 2022 9:27 AM

Is there a way to find the offsets of all the 'pre-arranged' pokemon encounters in Emerald? I believe the total list is;

- Starters
- Zigzagoon (fighting Birch)
- Zigzagoon (Wally fighting Ralts)
- Ralts (Wally catching)
- Kecleon
- Wynaut (egg)
- Castform
- Regis
- Fossils
- Rayquaza
- Groudon
- Kyogre
- [email protected]
- Beldum
- Gen 2 starter
- Sudowoodo
- Voltorbs
- All the event pokemon

So far from searching, I have managed to find the offset for the Zigzagoon fighting Birch as x32706. And that's all I've found.

Is there a way to search scripts to find these offsets? Search hex? Is there a list somewhere? All help appreciated.

Thanks.

Prof. Leon Dias April 10th, 2022 6:35 PM

I've never seen anything about changing the Prof. Oaks Pokedex Ratings for FireRed.
After doing some digging and with the help of Decomps here is what I've found.

Prof. Oak and the Oak's PC scripts call for specials 0xD4 and 0xD5, which then figure out the Dex Seen and Caught values. The game then checks to see if the amount caught is under a certain value, up to 151 in vanilla. You can actually expand this to 255 but no further, so if you're making a hack with an expanded Regional Dex do mind this limitation and plan your text accordingly.

Here are some offsets to help you customize your Pokedex Ratings:
REMEMBER! Changing these amounts can't go higher than 0xFF (255)

0xCA430 = 0x09, in vanilla it leads to text if you own less than 10 Pokemon
0xCA436 = 0x13, in vanilla it leads to text if you own 10-19 Pokemon
0xCA448 = 0x1D, in vanilla it leads to text if you own 20-29 Pokemon
0xCA454 = 0x27, in vanilla it leads to text if you own 30-39 Pokemon
0xCA460 = 0x31, in vanilla it leads to text if you own 40-49 Pokemon
0xCA46C = 0x3B, in vanilla it leads to text if you own 50-59 Pokemon
0xCA478 = 0x45, in vanilla it leads to text if you own 60-69 Pokemon
0xCA484 = 0x4F, in vanilla it leads to text if you own 70-79 Pokemon
0xCA490 = 0x59, in vanilla it leads to text if you own 80-89 Pokemon
0xCA49C = 0x63, in vanilla it leads to text if you own 90-99 Pokemon
0xCA4A8 = 0x6D, in vanilla it leads to text if you own 100-109 Pokemon
0xCA4B4 = 0x77, in vanilla it leads to text if you own 110-119 Pokemon
0xCA4C0 = 0x81, in vanilla it leads to text if you own 120-129 Pokemon
0xCA4CC = 0x8B, in vanilla it leads to text if you own 130-139 Pokemon
0xCA4D8 = 0x95, in vanilla it leads to text if you own 140-149 Pokemon
0xCA4DC = 0x96, it leads to text if you've completed the Kanto Pokedex (150, Mew is not required)

Change those accordingly. Additionally, here are the Text Locations:

Under 10 = 0x1A6D17
10-19 = 0x1A6D6D
20-29 = 0x1A6DDF
30-39 = 0x1A6E36
40-49 = 0x1A6EA4
50-59 = 0x1A6F0B
60-69 = 0x1A6F71
70-79 = 0x1A6FAB
80-89 = 0x1A6FF1
90-99 = 0x1A7031
100-109 = 0x1A7063
110-119 = 0x1A70A5
120-129 = 0x1A70D8
130-139 = 0x1A7108
140-149 = 0x1A7137
150/151 = 0x1A7175

I recommend using Hex Maniac to edit and repoint that text and stay away from A-Text at all costs! These should be useful if you've made a custom pokedex or a region where Professor Oak isn't your regions professor. (Or if you got rid of the Aides who give out items at a certain dex completion rate).

Akiak June 15th, 2022 2:20 PM

Cleanse Tag Modifiers

This is the result of my decomp research trying to buff Cleanse Tag to be a little less useless. In vanilla it reduces wild encounters by 2/3.

FireRed

At 0831E6, change 20 68 40 00 03 21 (2/3) to 20 68 00 00 03 21 (1/3) or 20 68 00 00 02 21 (1/2).

Emerald

At 0B5B00, change 20 68 40 00 03 21 (2/3) to 20 68 00 00 03 21 (1/3) or 20 68 00 00 02 21 (1/2).

Yave Yu June 15th, 2022 4:35 PM

Battle “X Item” increase by 2:

FireRed:
0x25282E: 02
0x25283F: 02
0x252850: 02
0x252837: 20
0x252848: 20

Emerald:
0x31E4C2: 02
0x31E4D3: 02
0x31E4E4: 02
0x31E4CB: 20
0x31E4DC: 20

However that string still keeping vanilla one (not “sharply rose” but simply “rose”).

Yave Yu June 15th, 2022 5:32 PM

FireRed Skip item using animation:
Put 41 46 00 F0 0E F8 at 0x12538E
Put 00 F0 0B F8 at 0x12587E
Put 41 46 00 F0 0C F8 at 0x126332
Put 00 F0 03 F8 at 0x126BCA
FireRed Skip TM learning animation:
Put 00 F0 0E FA at 0x11CA2C
Put 00 00 at 0x11CE6E
Put 00 F0 40 at 0x125BC4

Yave Yu June 15th, 2022 6:32 PM

Faster battle intro (like Unbound):

FireRed:
Put 03 at 0x11DA6, 0x3253E, 0x37DBA, 0xEA0A4, 0x158468, 0x1585C2
Put FD at 0x32418, 0x38058, 0xD632C, 0xDDA94, 0xE9FA0, 0x1583EC
Put DB D0 at 0xBC5E5, 0xBC8DD, 0xBCB57, 0xBCE2D

Emerald:
Put 03 at 0x3981E, 0x5B9A6, 0x669C4, 0x1889A4
Put FD at 0x5B78C, 0x5B854, 0x61ADC, 0x66B80
Put DB D0 at 0x118455, 0x11874D, 0x1189CB, 0x118CA1

agsmgmaster64 June 23rd, 2022 1:25 PM

Quote:

Originally Posted by Yave Yu (Post 10516827)
Faster battle intro (like Unbound):

So there's a few missing offsets for Emerald, more importantly for trainers and Wally/Steven/Safari Zone backsprites. I managed to find these missing offsets however, with the help of pokeemerald. The ones I found will be bolded.

Emerald:
Put 03 at 0x3981E, 0x5B9A6, 0x669C4, 0x1889A4, 0x61844
Put FD at 0x5B78C, 0x5B854, 0x61ADC, 0x66B80, 0x1598D0, 0x169F84, 0x18BED4, 0x18BF9C, 1BD48C, 1BD5AC
Put DB D0 at 0x118455, 0x11874D, 0x1189CB, 0x118CA1

Stay? July 3rd, 2022 2:27 PM

Fire Red PC Boxes Use More Wallpaper's Fix

Offset=0x08C836
Original=03
Modified=FF

Credits For Spherical Ice & Stay hydrated 緯俺な.

Note: Spherical Ice had found the address of the PC Boxes but the Offset to modify was wrong, it didn't do anything and I started to investigate a bit and managed to have the 14 Different Wallpaper's on the PC.

Panda Face October 15th, 2022 7:37 PM

For Emerald: How to make the several kinds of state combine at the same time? Such as if a pokemon poisoned, the foe pokemon used thunder wave, that pokemon change into paralyze state or both poisoned and paralyze combine together?

The Falansh October 15th, 2022 9:34 PM

Quote:

Originally Posted by Panda Face (Post 10560749)
How to make the several kinds of state combine at the same time? Such as if a pokemon poisoned, the foe pokemon used thunder wave, that pokemon change into paralyze state or both poisoned and paralyze combine together?

For?

Panda Face October 15th, 2022 9:40 PM

Emerald


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.