Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Reload this Page More TMs/HMs

Notices
For all updates, view the main page.

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. 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!
Research & Development programs in this forum are subject to moderator approval before they are displayed.



Reply
 
Thread Tools
  #26    
Old January 15th, 2015 (05:33 AM).
Taの境界's Avatar
Taの境界
 
Join Date: Jan 2015
Nature: Adamant
Quote originally posted by Lance32497:
Can anyone port it in firered?
Sorry sir, I should mention that is for fire red, so someone should port it in emerald.

Quote originally posted by LCCoolJ95:
Hey Tara, is that whole little tutorial for Fire Red or for Emerald?
Fire Red
Reply With Quote
  #27    
Old January 15th, 2015 (06:14 AM).
daniilS's Avatar
daniilS
busy trying to do stuff not done yet
 
Join Date: Aug 2013
Age: 15
Gender: Male
Quote originally posted by Taの境界:
[...]
Every works fine but the animation when you forget move to learn new TM(thought it is pointless) will kill the game.
[...]
So it works fine when you're not overwriting an existing move?
__________________
Reply With Quote
  #28    
Old January 15th, 2015 (08:15 AM).
Taの境界's Avatar
Taの境界
 
Join Date: Jan 2015
Nature: Adamant
Quote originally posted by daniilS:
So it works fine when you're not overwriting an existing move?
Yes, it works fine, without animation at the poke hp bar screen with message box shown: [pokemon] learned [move]!
Reply With Quote
  #29    
Old January 15th, 2015 (11:50 AM).
HidoranBlaze's Avatar
HidoranBlaze
 
Join Date: Apr 2013
Age: 18
Gender: Male
Quote originally posted by Taの境界:
Notes: BUG found, so use this at your own risk.
Also this is for Fire Red
1.First you need to create new TM, but once you create one, you need to follow it with another one until all are added.
If you don't want to overlap the previous item, item extension should be consider.

To remove the limiter for item extension
Spoiler:

0809a8ae = 00 00 00 00
08098998 = your total item number index


Then repoint the item data(3DB028) and image & palette pointer(3D4294) like what you did in pokemon expansion.

2.After that repoint the TM/HM table at 45A80C, it should be 0x74 bytes long.
Then add whatever move you want to have for new TM.

3.Fix the TM move index routine
Spoiler:

.text
.align 2
.thumb
.thumb_func
.global TM_index

main:
mov r1, #0xBB @(new first TM item index-1) divide by two, if it is an even number change the bhi to bge
lsl r1, r1, #0x1
cmp r0, r1
bhi newtm

mov r1, #0x90
lsl r1, r1, #0x1
add r1, r1, #0x1
sub r0, r0 ,r1
lsl r0, r0, #0x1
b exit

newtm:
add r1, r1, #0x1
sub r0, r0, r1
lsl r0, r0, #0x1
add r0, r0, #0x74

exit:
ldr r1, tm_table
add r0, r0, r1
ldrh r0, [r0]
bx lr

.align
tm_table: .word 0x08EEEEEE

125A78: 00 49 08 47 FF FF FF 08, FF FF FF 08 = first asm location+1
tm_table is what you repoint at step 2.

4.Fix the No.# things
Spoiler:

.text
.align 2
.thumb
.thumb_func
.global tm_name

main:
mov r0, #0xBB @(new first TM item index-1) divide by two, if it is an even number change the bhi to bge
lsl r0, r0, #0x1
cmp r6, r0
bhi new_tm

mov r0, #0xA9
lsl r0, r0, #0x1
cmp r6, r0
bls old_tm

ldr r1, temp
ldr r0, return1
bx r0

new_tm:
ldr r1, text_no
mov r0, r5
bl refresh

ldr r4, ram
ldr r0, value
ldr r1, return3
bx r1

old_tm:
ldr r1, return2
bx r1

refresh:
ldr r2, routine
bx r2

.align
text_no: .word 0x08416226
routine: .word 0x08008DA5
temp: .word 0x08463178
return1: .word 0x08131D65
return2: .word 0x08131DA5
ram: .word 0x02021CD0
value: .word 0xFFFFFEBC
return3: .word 0x08131DB1


131D5A: 01 48 00 47 00 00 FF FF FF 08, FF FF FF 08 = second asm location+1

5.Fix the compatibility
Spoiler:

.text
.align 2
.thumb
.thumb_func
.global tm_compact_hack

main:
mov r3, r1
cmp r4, #0x56 @the number of item between last HM and new TM+ 0x3a
bge newtm

check:
cmp r4, #0x1f
bls first_32
cmp r4, #0x3f
bls first_64
cmp r4, #0x5f
bls first_96

after_96:
mov r0, r4
sub r0, #0x60
mov r2, #0x1
lsl r2, r0
ldr r0, table
lsl r1, r1, #0x4
add r0, #0xC

get_offset:
add r1, r1, r0
ldr r0, [r1]
and r0, r2
b exit

newtm:
sub r4, #0x1C @the number of item between last HM and new TM
b check

first_64:
mov r0, r4
sub r0, #0x20
mov r2, #0x1
lsl r2, r0
ldr r0, table
lsl r1, r1, #0x4
add r0, #0x4
b get_offset

first_96:
mov r0, r4
sub r0, #0x40
mov r2, #0x1
lsl r2, r0
ldr r0, table
lsl r1, r1, #0x4
add r0, #0x8
b get_offset

first_32:
mov r1, #0x1
lsl r1, r5
ldr r2, table
lsl r0, r3, #0x4
add r0, r0, r2
ldr r0, [r0]
and r0, r1

exit:
pop {r4-r5}
pop {r1}
bx r1

.align
table: .word 0x08DDDDDD


43C40: 00 48 00 47 FF FF FF 08, FF FF FF 08 = third asm location+1
table refer to your pokemon TM/HM compatibility table


Format:
It works exactly the same as vanilla fire red, but two more line added, so it supports up to 128 TM/HM.
Now each entry cost you 16 bytes, so the old compatibility table is dead.

Spoiler:

Example:
If you want to learn TM 11,27,67,98.

Binary:
1-32:00000100000000000000010000000000
33-64:00000000000000000000000000000000
65-96:00000000000000000000010000000000
97-128:00000000000000000000001000000000

Then convert each line into hex,
Hex:[04 00 04 00] [00 00 00 00] [00 00 04 00] [00 00 02 00]



Every works fine but the animation when you forget move to learn new TM(thought it is pointless) will kill the game.
Also the sequence for the new TMs is not right.
Nice work! I was actually working on TM expansion as well, but gave up due to lack of motivation and graphics bugs, so I'm glad someone decided to step up to the plate! I'll see what I can do about porting this to EM, but it'll probably take a while, since I have school and other fun stuff.
Reply With Quote
  #30    
Old January 17th, 2015 (01:11 AM). Edited January 17th, 2015 by Taの境界.
Taの境界's Avatar
Taの境界
 
Join Date: Jan 2015
Nature: Adamant
Put 00 00 at 0x11CE6E will stop the animation to learn TM directly in fire red, instead of pushing b button.
Then put 00 F0 0E FA at 0x11CA2C to skip the whole set of animation directly.

Edit: Both must be done to disable it.
Reply With Quote
  #31    
Old January 17th, 2015 (02:03 AM).
Lance32497's Avatar
Lance32497
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Quote originally posted by Taの境界:
Put 00 00 at 0x11CE6E will stop the animation to learn TM directly in fire red, instead of pushing b button.
Then put 00 F0 0E FA at 0x11CA2C to skip the whole set of animation directly.

Edit: Both must be done to disable it.
I hope Karatekid will add Expansion of TM function in his G3HS tool :v *hey! I'm so lazy!*
__________________
My Threads

Reply With Quote
  #32    
Old January 17th, 2015 (02:35 AM). Edited January 17th, 2015 by Taの境界.
Taの境界's Avatar
Taの境界
 
Join Date: Jan 2015
Nature: Adamant
I probably miss something out , this animation come out very randomly, fortunately not an issue.
Pokemon FireRed TM_01.png

Also when you use the old TM without overwrite a move, it will show something like this if you apply what I said in previous post.
Pokemon FireRed TM_01 (2).png
It ends very quickly, not a big issue, but I will take some time to fix it.
Edit: Put 00 00 00 00 00 00 00 00 00 00 00 00 44 E0 at 0x11CD9E to fix this.
Reply With Quote
  #33    
Old February 8th, 2015 (07:50 AM).
AkimotoBubble
 
Join Date: Aug 2014
Gender: Male
Quote originally posted by Taの境界:
I probably miss something out , this animation come out very randomly, fortunately not an issue.
Attachment 74186

Also when you use the old TM without overwrite a move, it will show something like this if you apply what I said in previous post.
Attachment 74187
It ends very quickly, not a big issue, but I will take some time to fix it.
Edit: Put 00 00 00 00 00 00 00 00 00 00 00 00 44 E0 at 0x11CD9E to fix this.
This is nice,And if then put on Emerald what is code?
__________________
i am bubble,and sorry my english is not good ......
Reply With Quote
Reply
Quick Reply

Sponsored Links
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 UTC -8. The time now is 01:46 AM.