Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Reload this Page Development: Move Resource Thread

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
  #276    
Old 3 Days Ago (03:05 AM).
KDS's Avatar
KDS KDS is offline
 
Join Date: Jul 2013
Age: 20
Gender: Male
Posts: 210
Quote originally posted by DizzyEgg:
Hm. You're right. Could you tell me what's the location of dexMapper in FR? I have troubles finding it myself
Compare the Pokemon expansion tutorial for FR and Emerald. You will be able to find it.
Reply With Quote
  #277    
Old 3 Days Ago (04:44 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Age: 17
Gender: Male
Nature: Quiet
Posts: 118
Quote:
Compare the Pokemon expansion tutorial for FR and Emerald. You will be able to find it.
Found it.

Quote originally posted by KDS:
Some new effects:
3. Final Gambit:
Spoiler:

Script:
Code:
#org @main
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
cmd6
bicbyte 0x2023DCC 0x6
callasm 0x08750051
cmd69
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
faintpokemon 0x0 0x0 0x8000000
jumpifbyte 0x0 0x02023DCC 0x8 0x81D694E
setuserhptozero
graphicalhpupdate 0x1
datahpupdate 0x1
faintpokemon 0x1 0x0 0x8000000
goto 0x81D694E
ASM at 0x8750050:
Code:
.text
.align 2
.thumb
.thumb_func
.global finalgambit

main:
push {lr}
ldr r0, userBank
ldrb r0, [r0]
ldr r1, battleData
mov r2, #0x58
mul r0, r2
add r2, r0, r1
add r2, #0x28
ldrb r0, [r2]
ldr r2, damage
strb r0, [r2]
pop {r0}
bx r0

.align 2
userBank: .word 0x02023D6C
battleData: .word 0x02023BE4
damage: .word 0x02023D50
You made a typo there. Instead of userBank(...6B) you gave the offset for targetbank(...6C). And that means this move will always deal damage equal to target's current HP.
__________________
Summertime
Reply With Quote
  #278    
Old 2 Days Ago (11:52 PM).
Artemis64 Artemis64 is offline
 
Join Date: Mar 2014
Location: Singapore
Gender: Male
Nature: Hasty
Posts: 76
Quote originally posted by Urnighter:
Noob here, how did you get that background for the battle scene? It looks very nice. Any link to where/how I can do the same?
That's a battle platform (arena, background, etc.) for grassy battles that I created.
Reply With Quote
  #279    
Old 2 Days Ago (12:32 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Age: 17
Gender: Male
Nature: Quiet
Posts: 118
Quote originally posted by MrDollSteak:
I haven't contributed here in awhile (sad I know) but I'm here to bring an updated Struggle, as well as a Head Smash 1/2 recoil effect.

To make Head Smash work just give it the same move effect as Take Down (NOT Double-Edge), as the check for the move is contained in the 1/4 recoil damage effect.

Struggle and Head Smash

Spoiler:
Fire Red
Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
.global struggleheadsmash

FailSafe:
    ldr r1, .DamageLoc
    add r0, r1, #0x4
    ldrb r0, [r0]
    cmp r0, #0x0
    bge GetMoveID
    add r0, #0x3
GetMoveID:
    push {r0-r1}
    ldr r0, .MoveIndex
    ldrb r0, [r0] /tht
StruggleCheck:
    cmp r0, #0xA5
    bne HeadSmashCheck
StruggleRecoil:
    pop {r0-r1}
    mov r0, #0x58
    ldr r4, .UserBank
    ldrb r4, [r4]
    mul r4, r0
    mov r0, r8
    add r0, r0, r4
    ldrh r0, [r0, #0x2C]
    asr r0, r0, #0x2
    b Return
HeadSmashCheck:
    ldr r1, .HeadSmashIndex
    cmp r0, r1
    bne NormalRecoil
HeadSmashRecoil:
    pop {r0-r1}
    asr r0, r0, #0x1
    b Return
NormalRecoil:
    pop {r0-r1}
    asr r0, r0, #0x2
Return:
    ldr r4, .Return
    bx r4

.align 2
.DamageLoc: .word 0x02023D50
.MoveIndex: .word 0x02023D4A
.UserBank: .word 0x02023D6B
.HeadSmashIndex: .word 0x000001C9
.Return: .word 0x08020AFB

#Insert 00 48 00 47 xx xx xx 08 at 08020AEC
1C9 refers to the move index of Head Smash as taken from Bulbapedia so just replace this with whatever index your Head Smash is.

Emerald
Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
.global struggleheadsmash

FailSafe:
    ldr r1, .DamageLoc
    add r0, r1, #0x4
    ldrb r0, [r0]
    cmp r0, #0x0
    bge GetMoveID
    add r0, #0x3
GetMoveID:
    push {r0-r1}
    ldr r0, .MoveIndex
    ldrb r0, [r0]
StruggleCheck:
    cmp r0, #0xA5
    bne HeadSmashCheck
StruggleRecoil:
    pop {r0-r1}
    mov r0, #0x58
    ldr r4, .UserBank
    ldrb r4, [r4]
    mul r4, r0
    mov r0, r8
    add r0, r0, r4
    ldrh r0, [r0, #0x2C]
    asr r0, r0, #0x2
    b Return
HeadSmashCheck:
    ldr r1, .HeadSmashIndex
    cmp r0, r1
    bne NormalRecoil
HeadSmashRecoil:
    pop {r0-r1}
    asr r0, r0, #0x1
    b Return
NormalRecoil:
    pop {r0-r1}
    asr r0, r0, #0x2
Return:
    ldr r4, .Return
    bx r4

.align 2
.DamageLoc: .word 0x020241F0
.MoveIndex: .word 0x020241EA
.UserBank: .word 0x0202420B
.HeadSmashIndex: .word 0x000001C9
.Return: .word 0x0804939F

#Insert 00 48 00 47 xx xx xx 08 at 08049390
1C9 refers to the move index of Head Smash as taken from Bulbapedia so just replace this with whatever index your Head Smash is.
Fire Red routine, line 17(emerald one too). Please change ldrb to ldrh because now it won't work if Head Smash's index is higher than 0xFF.
__________________
Summertime
Reply With Quote
  #280    
Old 19 Hours Ago (10:07 AM).
Urnighter Urnighter is offline
 
Join Date: Jan 2015
Posts: 8
Quote originally posted by Artemis64:
That's a battle platform (arena, background, etc.) for grassy battles that I created.
Anywhere they can be downloaded? Have you made any more? That one looks great!
Reply With Quote
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
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 05:09 AM.