The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking > Binary Hack Research & Development
Reload this Page Quick Research & Development Thread

Notices
For all updates, view the main page.

Binary Hack Research & Development Got a well-founded knack with your binary Pokémon hacks? Love reverse-engineering them? For the traditional Pokémon ROM hacker, this is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Ad Content
Reply
 
Thread Tools
  #1101   Link to this post, but load the entire thread.  
Old January 20th, 2019 (2:00 PM).
Lemz's Avatar
Lemz Lemz is offline
 
Join Date: Dec 2018
Posts: 1
Is there a routine to implement double wild battles in FR? I haven't seen this mechanic posted in the index.
Reply With Quote
  #1102   Link to this post, but load the entire thread.  
Old January 20th, 2019 (8:49 PM).
BluRose BluRose is offline
blu rass
 
Join Date: Apr 2014
Location: michigan tech
Age: 22
Gender: Male
Nature: Timid
Posts: 812
Quote:
Originally Posted by Lemz View Post
Is there a routine to implement double wild battles in FR? I haven't seen this mechanic posted in the index.
check this out
__________________
heyo check out my github:

BluRosie
highlights:
battle engine for heartgold
various feature branches in heart gold (fairy type, odd egg, mud slopes)

i'm a big part of the development team of pokemon firegold! all the code that i develop for that hack is also on my github

also on discord: BluRose#0412
Reply With Quote
  #1103   Link to this post, but load the entire thread.  
Old January 30th, 2019 (5:24 AM). Edited January 30th, 2019 by eildonp.
eildonp eildonp is offline
 
Join Date: Jan 2019
Posts: 1
[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.
Reply With Quote
  #1104   Link to this post, but load the entire thread.  
Old February 14th, 2019 (2:11 PM). Edited February 15th, 2019 by Criminon.
Criminon's Avatar
Criminon Criminon is offline
Forever Spriting
 
Join Date: Aug 2012
Location: California
Gender: Male
Nature: Timid
Posts: 264
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.





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!)
__________________
Unbound Team / Crown Team
Reply With Quote
  #1105   Link to this post, but load the entire thread.  
Old February 18th, 2019 (8:05 AM).
rubenturen's Avatar
rubenturen rubenturen is offline
Also Known as: Canned Brain
 
Join Date: Dec 2018
Location: —Denmark
Gender: Male
Nature: Jolly
Posts: 52
Quote:
Originally Posted by BluRose View Post
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
__________________
I’m working on a ROM hack called pokemon penny.
It is a hack of emerald.





Sry, im not very good at typing the english Language.
This is the best Pokemon. FIGHT ME!!!
Reply With Quote
  #1106   Link to this post, but load the entire thread.  
Old March 10th, 2019 (5:57 AM).
Caption Faclon's Avatar
Caption Faclon Caption Faclon is offline
 
Join Date: Mar 2019
Posts: 13
Disable Item Usage [EM]
At 0x31BC10, put 05 B9
__________________
Reply With Quote
  #1107   Link to this post, but load the entire thread.  
Old March 20th, 2019 (11:41 AM).
BluRose BluRose is offline
blu rass
 
Join Date: Apr 2014
Location: michigan tech
Age: 22
Gender: Male
Nature: Timid
Posts: 812
Quote:
Originally Posted by rubenturen View Post
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?
__________________
heyo check out my github:

BluRosie
highlights:
battle engine for heartgold
various feature branches in heart gold (fairy type, odd egg, mud slopes)

i'm a big part of the development team of pokemon firegold! all the code that i develop for that hack is also on my github

also on discord: BluRose#0412
Reply With Quote
  #1108   Link to this post, but load the entire thread.  
Old March 21st, 2019 (9:38 AM).
rubenturen's Avatar
rubenturen rubenturen is offline
Also Known as: Canned Brain
 
Join Date: Dec 2018
Location: —Denmark
Gender: Male
Nature: Jolly
Posts: 52
Quote:
Originally Posted by BluRose View Post
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.
__________________
I’m working on a ROM hack called pokemon penny.
It is a hack of emerald.





Sry, im not very good at typing the english Language.
This is the best Pokemon. FIGHT ME!!!
Reply With Quote
  #1109   Link to this post, but load the entire thread.  
Old March 27th, 2019 (5:50 AM). Edited March 27th, 2019 by DemICE.
DemICE's Avatar
DemICE DemICE is offline
 
Join Date: May 2013
Location: Lappet Town
Age: 35
Gender: Male
Nature: Modest
Posts: 134
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
Reply With Quote
  #1110   Link to this post, but load the entire thread.  
Old April 6th, 2019 (8:02 PM). Edited March 3rd, 2020 by Super Versekr Dark.
Super Versekr Dark Super Versekr Dark is offline
 
Join Date: Jan 2017
Gender: Male
Posts: 79
Quote:
Originally Posted by Criminon View Post
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.





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
Reply With Quote
  #1111   Link to this post, but load the entire thread.  
Old April 15th, 2019 (4:41 PM). Edited March 3rd, 2020 by Super Versekr Dark.
Super Versekr Dark Super Versekr Dark is offline
 
Join Date: Jan 2017
Gender: Male
Posts: 79
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
Reply With Quote
  #1112   Link to this post, but load the entire thread.  
Old April 17th, 2019 (2:43 PM). Edited March 3rd, 2020 by Super Versekr Dark.
Super Versekr Dark Super Versekr Dark is offline
 
Join Date: Jan 2017
Gender: Male
Posts: 79
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 */
Reply With Quote
  #1113   Link to this post, but load the entire thread.  
Old June 14th, 2019 (7:55 PM).
tkim's Avatar
tkim tkim is offline
 
Join Date: May 2011
Posts: 232
Quote:
Originally Posted by kleenexfeu View Post
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.
Reply With Quote
  #1114   Link to this post, but load the entire thread.  
Old June 15th, 2019 (9:27 AM).
MobAcc MobAcc is offline
 
Join Date: Jun 2019
Posts: 15
Does anyone know how to change the world maps for maps 2-4 in fire red?
Reply With Quote
  #1115   Link to this post, but load the entire thread.  
Old July 7th, 2019 (6:54 AM).
Voliol's Avatar
Voliol Voliol is offline
 
Join Date: Nov 2012
Posts: 263
The newdex order in Crystal(U) is at offset 40D60.
__________________
"I See now that the circumstances of one's birth are irrelevant.
It is what you do with the gift of life that determines who you are.
"

- Mewtwo
Reply With Quote
  #1116   Link to this post, but load the entire thread.  
Old July 10th, 2019 (3:15 PM).
RichterSnipes's Avatar
RichterSnipes RichterSnipes is offline
Not even a nibble...
 
Join Date: Oct 2011
Location: USA
Age: 30
Gender: Male
Nature: Modest
Posts: 507
Quote:
Originally Posted by azurile13 View Post
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.
__________________
My hacks:


Reply With Quote
  #1117   Link to this post, but load the entire thread.  
Old July 12th, 2019 (8:18 PM).
dGxx dGxx is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 46
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
Reply With Quote
  #1118   Link to this post, but load the entire thread.  
Old July 15th, 2019 (3:03 PM).
Voliol's Avatar
Voliol Voliol is offline
 
Join Date: Nov 2012
Posts: 263
@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
__________________
"I See now that the circumstances of one's birth are irrelevant.
It is what you do with the gift of life that determines who you are.
"

- Mewtwo
Reply With Quote
  #1119   Link to this post, but load the entire thread.  
Old July 16th, 2019 (2:43 AM). Edited July 16th, 2019 by Voliol.
Voliol's Avatar
Voliol Voliol is offline
 
Join Date: Nov 2012
Posts: 263
Quote:
Originally Posted by Voliol View Post
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.
__________________
"I See now that the circumstances of one's birth are irrelevant.
It is what you do with the gift of life that determines who you are.
"

- Mewtwo
Reply With Quote
  #1120   Link to this post, but load the entire thread.  
Old July 17th, 2019 (5:27 AM).
Peter_BimBals's Avatar
Peter_BimBals Peter_BimBals is offline
 
Join Date: Feb 2017
Gender: Male
Posts: 2
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 ~
Reply With Quote
  #1121   Link to this post, but load the entire thread.  
Old July 17th, 2019 (10:09 AM). Edited July 17th, 2019 by Zeturic.
Zeturic's Avatar
Zeturic Zeturic is offline
 
Join Date: Mar 2007
Posts: 787
Quote:
Originally Posted by Peter_BimBals View Post
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.
Reply With Quote
  #1122   Link to this post, but load the entire thread.  
Old July 17th, 2019 (10:40 AM).
Peter_BimBals's Avatar
Peter_BimBals Peter_BimBals is offline
 
Join Date: Feb 2017
Gender: Male
Posts: 2
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.
Reply With Quote
  #1123   Link to this post, but load the entire thread.  
Old July 21st, 2019 (1:00 PM).
RichterSnipes's Avatar
RichterSnipes RichterSnipes is offline
Not even a nibble...
 
Join Date: Oct 2011
Location: USA
Age: 30
Gender: Male
Nature: Modest
Posts: 507
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!
__________________
My hacks:


Reply With Quote
  #1124   Link to this post, but load the entire thread.  
Old July 28th, 2019 (6:31 AM).
dGxx dGxx is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 46
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!
Reply With Quote
  #1125   Link to this post, but load the entire thread.  
Old August 2nd, 2019 (6:35 PM).
Super Versekr Dark Super Versekr Dark is offline
 
Join Date: Jan 2017
Gender: Male
Posts: 79
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

Spoiler:






Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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