Community

The PokéCommunity

We are still working on a better slogan!

Visit Index



Advertise here

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Notices

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.

Post Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #151    
Old August 25th, 2014, 01:12 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice

Advertise here
Quote:
Originally Posted by Artemis64 View Post
And, can I suggest some improvements to the organisation of this thread? Firstly, divide the animations up into Ruby, Emerald and FireRed animations, as Ruby and Sapphire animations might not be cross compatible due to pointer issues and Sapphire is rarely hacked anyways.
This is a good idea, but I really don't think dividing Ruby and Sapphire is worth it as Sapphire is hacked so rarely that any posts that are for it will almost definitely specify that.
Quote:
Originally Posted by Artemis64 View Post
Secondly, choose the animations based on how closely they resemble their 5th/6th gen counterparts instead of allowing multiple versions of the same animation to proliferate.
While this is a good idea in practice, it would undoubtedly cause a lot of drama and would take a lot of time to test each one individually and then compare with the official one; it's far easier to simply give the user the choice of multiple options if they are unsatisfied. It also removes any subjectivity from the thread, which, again, can help avoid drama and the likes.
However, it might be worth adding a line to the OP asking people to include screenshots or .gifs showing the animation so that people can get a better feel for what they're adding before they do.
Quote:
Originally Posted by Artemis64 View Post
Thirdly, with the permission of the hackers, put the animation bytes themselves into the first post rather than linking to the post containing the bytes.
I really, really don't want to do this, because it's just a really shaky way of doing things, because if just one byte is changed, the OP will be completely outdated, whereas linking to posts means that edits will always be kept and the OP will thus be up to date more often - it's not like clicking the posts takes that much more time anyway, so I don't really see why this is such an issue.
Quote:
Originally Posted by Artemis64 View Post
Lastly, set aside a section aside for particle replacements and attacks that require new particles. Divide this section up into two portions, one where for replacements for existing particles (easily done using UnLZ), and one for moves that require new particles altogether (more difficult, requires hex knowledge as well as repointing/expansion of the particle table).
This is another great suggestion, I'll get to doing it soon. For now, I'm going to just add your contributions in the old format of the thread, but I will get around to revamping the thread layout (again) to fit your suggestions.

Last edited by Spherical Ice; August 25th, 2014 at 01:20 AM.
  #152    
Old August 26th, 2014, 08:32 PM
MrDollSteak's Avatar
MrDollSteak
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 19
Gender: Male
Quote:
I really, really don't want to do this, because it's just a really shaky way of doing things, because if just one byte is changed, the OP will be completely outdated, whereas linking to posts means that edits will always be kept and the OP will thus be up to date more often
I agree completely, and on that note I'd once again recommend removing all the codes that are currently in the OP that I (11bayerf1 or MrDollSteak) made, because I have either already fixed it, or someone else has, or I plan on fixing it.

On that note, here is an updated Fire Fang, Ice Fang, Thunder Fang Battle Script.

Spoiler:
It replaces Battle Script 31 (May cause flinching) so just put this in free space and change the
pointer of BS31 to point to this script.
Also note that 0x1AF, 0x1B0 and 0x1B1 are the indexes for Fire Fang, Ice Fang and Thunder Fang
in my rombase, so just change those to yours.

Code:
#dynamic 0x800000
#freespacebyte 0xFF

#org @start
setbyte 0x2023E85 0x8
jumpifhalfword 0x0 0x2023D4A 0x1AF @firefang
jumpifhalfword 0x0 0x2023D4A 0x1B0 @icefang
jumpifhalfword 0x0 0x2023D4A 0x1B1 @thunderfang
goto 0x81D6900

#org @firefang
call @effect
setbyte 0x2023E85 0x3
seteffectwithchancetarget
goto 0x81D6947

#org @icefang
call @effect
setbyte 0x2023E85 0x4
seteffectwithchancetarget
goto 0x81D6947

#org @thunderfang
call @effect
setbyte 0x2023E85 0x5
seteffectwithchancetarget
goto 0x81D6947

#org @effect
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c BANK_TARGET
waitstate
graphicalhpupdate BANK_TARGET
datahpupdate BANK_TARGET
critmessage
waitmessage DELAY_1SECOND
resultmessage
waitmessage DELAY_1SECOND
return


I've also added Acid Spray to this post: http://www.pokecommunity.com/showpos...&postcount=115
It hooks into the same battle script as Fiery Dance and Charge Beam, so you may want to ammend that in the OP thanks!

Last edited by MrDollSteak; August 26th, 2014 at 08:52 PM.
  #153    
Old August 26th, 2014, 11:24 PM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Quote:
Originally Posted by MrDollSteak View Post
I agree completely, and on that note I'd once again recommend removing all the codes that are currently in the OP that I (11bayerf1 or MrDollSteak) made, because I have either already fixed it, or someone else has, or I plan on fixing it.

On that note, here is an updated Fire Fang, Ice Fang, Thunder Fang Battle Script.

Spoiler:
It replaces Battle Script 31 (May cause flinching) so just put this in free space and change the
pointer of BS31 to point to this script.
Also note that 0x1AF, 0x1B0 and 0x1B1 are the indexes for Fire Fang, Ice Fang and Thunder Fang
in my rombase, so just change those to yours.

Code:
#dynamic 0x800000
#freespacebyte 0xFF

#org @start
setbyte 0x2023E85 0x8
jumpifhalfword 0x0 0x2023D4A 0x1AF @firefang
jumpifhalfword 0x0 0x2023D4A 0x1B0 @icefang
jumpifhalfword 0x0 0x2023D4A 0x1B1 @thunderfang
goto 0x81D6900

#org @firefang
call @effect
setbyte 0x2023E85 0x3
seteffectwithchancetarget
goto 0x81D6947

#org @icefang
call @effect
setbyte 0x2023E85 0x4
seteffectwithchancetarget
goto 0x81D6947

#org @thunderfang
call @effect
setbyte 0x2023E85 0x5
seteffectwithchancetarget
goto 0x81D6947

#org @effect
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c BANK_TARGET
waitstate
graphicalhpupdate BANK_TARGET
datahpupdate BANK_TARGET
critmessage
waitmessage DELAY_1SECOND
resultmessage
waitmessage DELAY_1SECOND
return


I've also added Acid Spray to this post: http://www.pokecommunity.com/showpos...&postcount=115
It hooks into the same battle script as Fiery Dance and Charge Beam, so you may want to ammend that in the OP thanks!
Done!

The only effect bytes that are still left inline are that of pawell6's and itari's, so if you guys could either repost the respective codes or give me permission to remove them from the OP that'd be appreciated!
  #154    
Old August 26th, 2014, 11:58 PM
MrDollSteak's Avatar
MrDollSteak
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 19
Gender: Male
Quote:
Originally Posted by Spherical Ice View Post
Done!

The only effect bytes that are still left inline are that of pawell6's and itari's, so if you guys could either repost the respective codes or give me permission to remove them from the OP that'd be appreciated!
I'm going to post an updated Flare Blitz here that uses Double-Edge's battle script (198), it will also unthaw the user when used, which I don't think Jambo's does.

I'm not 100% sure on Pawell6's and itari's. I don't know about permissions but I'll write up a BSP version of their moves, apart from the really buggy ones like U-Turn and Dragon Tail because those'll likely need ASM.

EDIT: It seems that to unthaw, you need battle script 125, so I'll hook Flare Blitz into that instead. The AI may not realise it has recoil, but I feel that being able to unfreeze the user is more significant.

Flare Blitz for FireRed

Spoiler:

Replace battle script 125 with this, note that 0x1B2 is the index for Flare Blitz in my rombase, so just make a note of that and change it.
This allows for a burn chance, defrosts the user, and does 1/3 recoil.
Code:
#dynamic 0x800000
#freespacebyte 0xFF

#org @start
setbyte 0x2023E85 0x3
jumpifhalfword 0x0 0x2023D4A 0x1B2 @flareblitz
goto 0x81D6900

#org @flareblitz
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c BANK_TARGET
waitstate
graphicalhpupdate BANK_TARGET
datahpupdate BANK_TARGET
critmessage
waitmessage DELAY_1SECOND
resultmessage
waitmessage DELAY_1SECOND
seteffectwithchancetarget
setbyte 0x2023E85 0xE6
seteffectwithchancetarget
goto 0x81D6947

Last edited by MrDollSteak; August 30th, 2014 at 06:44 PM.
  #155    
Old August 30th, 2014, 10:50 PM
KDS
 
Join Date: Jul 2013
Age: 20
Gender: Male
Some new effects:
1. Crush Grip: Just use the callasm statement after the announcement of attack and before the damage calculation.
Spoiler:

ASM:
Code:
.text
.align 2
.thumb
.thumb_func
.global crushgrip

main:
push {lr}
ldr r0, targetBank
ldrb r0, [r0]
ldr r1, battleData
mov r2, #0x58
mul r0, r2
add r3, r0, r1
ldrh r0, [r3, #0x28]
mov r2, #0x78
mul r0, r2
ldrh r1, [r3, #0x2c]
bl divide
mov r1, #0x1
add r1, r0
ldr r2, basePower
strb r1, [r2]
pop {r0}
bx r0

divide:
ldr r2, divider
bx r2

.align 2
targetBank: .word 0x02023D6C
battleData: .word 0x02023BE4
divider: .word 0x081E4019
basePower: .word 0x02023F50


2. Topsy Turvy
Spoiler:

Script:
Code:
#org @main
attackcanceler
attackstring
ppreduce
callasm 0x8DDDDDD+1
attackanimation
waitanimation
setword 0x203C020 0x8CCCCCC
printstring 0x184
waitmessage 0x40
goto 0x81D694E
ASM at DDDDDD:
Code:
.text
.align 2
.thumb
.thumb_func
.global topsyturvy

main:
push {lr}
ldr r0, targetBank
ldrb r0, [r0]
ldr r1, battleData
mov r2, #0x58
mul r0, r2
add r2, r0, r1
add r2, #0x19
mov r0, #0x0
mov r1, #0x6
loop: 
add r3, r2, r0
ldrb r4, [r3]
cmp r4, #0x6
beq loopend
cmp r4, #0x6
bgt greater
sub r5, r1, r4
lsl r5, #0x1
add r4, r5
strb r4, [r3]
b loopend

greater:
sub r5, r4, #0x6
lsl r5, #0x1
sub r4, r5
strb r4, [r3]

loopend:
add r0, #0x1
cmp r0, #0x7
blt loop
pop {r0}
bx r0

.align 2
targetBank: .word 0x02023D6C
battleData: .word 0x02023BE4
String at CCCCCC:
Code:
FD 10 B4 E7 00 E7 E8 D5 E8 E7 00 D7 DC D5 E2 DB D9 E7 00 EB D9 E6 D9 FE E6 D9 EA D9 E6 E7 D9 D8 AB FF


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

Last edited by KDS; August 31st, 2014 at 01:37 AM. Reason: Removed the 4th one. not correct and not needed.
  #156    
Old August 31st, 2014, 12:15 AM
MrDollSteak's Avatar
MrDollSteak
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 19
Gender: Male
Quote:
4. Elemental Fangs (alternate method) - This uses the random function to select the flinch or (burn,paralyse,freeze) effect. This code executes fire fang.
Spoiler:

Script:
Code:
#org @main
callasm 0x8EEEEEE
goto 0x81D6926
ASM:
Code:
.text
.align 2
.thumb
.thumb_func
.global fangs

main:
push {lr}
bl rand
mov r1, #0x1
and r0, r1 
cmp r0, #0x1
beq flinch
mov r3, #0x3 //Change to 0x4 for ice fang or 0x5 for thunder fang.
b end

flinch:
mov r3, #0x8

end:
ldr r1, effectChoose
strb r3, [r1]
pop {r0}
bx r0 

rand:
ldr r2, randGen
bx r2

.align 2
effectChoose: .word 0x02023E85
randGen: .word 0x08044EC9
The problem with this implementation is that it can't select both. The fang moves can flinch and cause status at the same time, which this code doesn't allow for.
  #157    
Old August 31st, 2014, 01:30 AM
KDS
 
Join Date: Jul 2013
Age: 20
Gender: Male
Oh, I didn't realize this. Then this implementation is not needed.
  #158    
Old August 31st, 2014, 02:15 AM
Artemis64
 
Join Date: Mar 2014
Gender: Male
Quote:
Originally Posted by dreamengine View Post
Yeah no problem. I posted something on Chaos Rush's thread about that so might wanna check that out. Also I honestly don't have my BG tilemaps anymore sadly, but I can still add the moves if you want.




Fusion Flare/Blue Flare I probably messed up a pointer while copying it over. I'll take a look again.
Lunar Dance - Like this?
Spoiler:
00 D2 27 00 D3 27 00 2F 27 0C 00 10 02 24 7B 3E 08 02 05 01 00 01 00 00 00 10 00 00 00 05 02 34 37 3E 08 02 02 78 00 38 00 03 49 60 07 08 03 05 00 00 10 00 10 00 00 00 01 00 19 CC 00 00 04 1E 02 64 37 3E 08 28 02 F4 FF 00 00 04 1E 02 64 37 3E 08 28 02 E8 FF 00 00 04 1E 02 64 37 3E 08 28 02 15 00 00 00 04 1E 02 64 37 3E 08 28 02 00 00 00 00 04 1E 02 64 37 3E 08 28 02 0A 00 00 00 04 14 03 C1 5F 0A 08 02 00 05 0E 71 C3 1C 08

Iron Head - Aight
Head Smash - Lol okay it kinda just made sense to me you know head...smash...headbutt...hehe
Grass Knot - I realize that xD I'll think of something if someone doesn't first
Ominous Wind - I couldn't figure out how to change the pallete of the redness
Spoiler:
14 02 17 00 15 28 03 21 AA 0B 08 05 05 15 28 00 00 06 00 06 00 1F 00 03 11 48 0B 08 05 01 01 00 03 A5 DA 0A 08 06 02 06 00 1F 00 1B E9 00 C0 3F 02 00 04 04 03 01 D8 0A 08 05 00 04 0C 02 50 74 3E 08 28 04 0A 00 00 09 60 00 01 00 04 0A 02 50 74 3E 08 28 04 5A 00 00 08 60 00 01 00 04 0A 02 50 74 3E 08 28 04 32 00 00 0A 60 00 01 00 04 0A 02 50 74 3E 08 28 04 14 00 00 09 60 00 01 00 04 0A 02 50 74 3E 08 28 04 46 00 C0 07 60 00 01 00 04 0A 02 50 74 3E 08 28 04 00 00 00 0B 60 00 01 00 04 0A 02 50 74 3E 08 28 04 3C 00 00 0A 60 00 01 00 05 15 17 08

Poison Jab - I just didn't think a normal punch or karate chop looked all that great
LCCool95, The way to change the redness is to change the 06 00 06 00 1F 00 to 06 00 06 00 XX XX and the 06 02 06 00 1F 00 to 06 02 06 00 XX XX, XX XX referring to the purple color in reverse hex.

Quote:
Originally Posted by Shadowraze View Post
Sorry guys, If I haven't updated the thread for a while I was busy with other things (aka watching SNK). LOL

Just finished updating the main post! Now make more of those awesome effect and animations. :3

Also here's a better Ominous Wind animation. :3

Ominous Wind - Shadowraze (I just basically took Heat Wave's Animation and then added the backgroundd color and made it purple the one just like in Giga Drain. :3
Spoiler:
02 24 7B 3E 08 02 05 01 00 04 00 00 00 0E 00 28 2C 05 00 15 28 03 21 AA 0B 08 05 05 15 28 00 00 06 00 06 00 1F 00 03 11 48 0B 08 05 01 01 00 03 A5 DA 0A 08 06 02 06 00 1F 00 1B E9 00 C0 3F 02 00 04 04 03 01 D8 0A 08 05 00 04 0C 02 50 74 3E 08 28 04 0A 00 00 09 60 00 01 00 04 0A 02 50 74 3E 08 28 04 5A 00 00 08 60 00 01 00 04 0A 02 50 74 3E 08 28 04 32 00 00 0A 60 00 01 00 04 0A 02 50 74 3E 08 28 04 14 00 00 09 60 00 01 00 04 0A 02 50 74 3E 08 28 04 46 00 C0 07 60 00 01 00 04 0A 02 50 74 3E 08 28 04 00 00 00 0B 60 00 01 00 04 0A 02 50 74 3E 08 28 04 3C 00 00 0A 60 00 01 00 02 24 7B 3E 08 02 05 01 00 04 00 0E 00 00 00 28 2C 05 0B 03 0D 08


Also, lately I've been making a documentation of the pallete used in the particles here's the current list that I have. :3

Palletes
Spoiler:
00 97 27 = Light Brown
00 9F 27 = Black
00 A4 27 = Blue
00 74 27 = Yellow
00 2D 27 = Light Yellow
00 9D 27 = Yellow
00 35 27 = Light Violet
00 99 27 = Light Brown
00 9A 27 = Light Brown
00 19 27 = Grey
00 15 27 = Orange with some blue colors
00 B2 27 = Black
00 AC 27 = Black with some purple colors
00 48 27 = Light Yellow
00 2F 28 = Green
00 5A 27 = Black
00 24 27 = Red Orange
00 B3 27 = Orange w/ White
00 B1 27 = Black
00 A6 27 = Black and Purple
00 2B 27 = Light Yellow
00 9B 27 = Black
The proper way to change the redness is to change the 06 00 06 00 1F 00 to 06 00 06 00 XX XX and the 06 02 06 00 1F 00 to 06 02 06 00 XX XX, XX XX referring to the purple color in reverse hex.
  #159    
Old August 31st, 2014, 02:30 AM
Artemis64
 
Join Date: Mar 2014
Gender: Male
Some Ruby animations:
Flame Charge:
Spoiler:
00 2D 27 0A 02 0C 0C 08 1C A8 00 C0 14 0F 0E E9 39 1D 08 0E E9 39 1D 08 03 8D 1F 0E 08 02 06 0A 00 08 00 02 00 00 00 0E 00 FF 7F 05 0B 02 0D 02 F8 1F 3C 08 02 05 00 00 18 00 00 00 00 00 06 00 04 04 03 7D 7E 0A 08 02 05 01 00 05 00 00 00 08 00 01 00 03 91 97 07 08 03 05 01 00 1F 00 0C 00 01 00 01 00 19 91 00 3F 0E A2 11 1D 08 04 07 02 E0 1F 3C 08 02 03 00 00 00 00 09 00 05 0B 03 08

Night Slash:
Spoiler:
14 00 16 00 C7 27 02 38 6E 3D 08 82 03 01 00 F8 FF 00 00 19 88 00 3F 04 04 02 38 6E 3D 08 82 03 01 00 08 00 00 00 03 A1 7F 0A 08 02 05 01 00 04 00 00 00 12 00 01 00 19 88 00 3F 05 0E F3 61 1D 08 08

Water Shuriken:
Spoiler:
14 09 16 03 59 3A 0E 08 05 04 00 F7 00 00 01 00 FF FF 00 A4 27 00 AA 27 00 97 27 00 B0 27 00 AB 27 0A 03 28 01 0C 0C 08 0E 00 DF 24 08 03 7D 7E 0A 08 05 05 01 00 05 00 00 00 32 00 01 00 0E 00 DF 24 08 0E 00 DF 24 08 0E 00 DF 24 08 0E 00 DF 24 08 05 02 D8 B4 3D 08 02 04 00 00 00 00 01 00 00 00 19 88 00 3F 05 0B 03 0D 04 00 0E 2B 62 1D 08 08 19 8F 00 C0 02 E4 A3 3D 08 02 07 0E 00 F4 FF 00 00 F4 FF 0F 00 00 00 00 00 02 E4 A3 3D 08 02 07 1A 00 08 00 0C 00 08 00 0F 00 00 00 00 00 04 03 19 8F 00 C0 02 E4 A3 3D 08 02 07 0E 00 F4 FF 00 00 F4 FF 0F 00 01 00 00 00 02 E4 A3 3D 08 02 07 1A 00 08 00 0C 00 08 00 0F 00 01 00 00 00 04 03 19 8F 00 C0 02 E4 A3 3D 08 02 07 0E 00 F4 FF 00 00 F4 FF 0F 00 02 00 00 00 02 E4 A3 3D 08 02 07 1A 00 08 00 0C 00 08 00 0F 00 02 00 00 00 04 03 19 8F 00 C0 02 E4 A3 3D 08 02 07 0E 00 F4 FF 00 00 F4 FF 0F 00 03 00 00 00 02 E4 A3 3D 08 02 07 1A 00 08 00 0C 00 08 00 0F 00 03 00 00 00 04 03 0F 0A 03 28 01 0C 0C 08 02 18 93 3D 08 02 06 14 00 00 00 00 00 00 00 28 00 E7 FF 19 7C 00 C0 05 03 A1 7F 0A 08 05 05 01 00 01 00 00 00 08 00 01 00 02 D8 B4 3D 08 04 04 00 00 00 00 01 00 02 00 02 30 93 3D 08 02 05 00 00 F1 FF 00 00 0F 00 37 00 19 8E 00 3F 04 0A 02 30 93 3D 08 02 05 0F 00 EC FF 00 00 0F 00 32 00 19 8E 00 3F 04 0A 02 30 93 3D 08 02 05 F1 FF F6 FF 00 00 0A 00 2D 00 19 8E 00 3F 05 0B 03 0D 0E F3 61 1D 08 08

Fire Fang:
Spoiler:
00 9B 27 00 97 27 00 2D 27 0A 01 0C 0C 08 19 A1 00 3F 02 D0 B1 3D 08 02 06 00 00 E0 FF 00 00 00 00 33 03 0A 00 02 D0 B1 3D 08 02 06 00 00 20 00 04 00 00 00 CD FC 0A 00 04 0A 02 A8 B4 3D 08 02 04 00 00 00 00 01 00 02 00 03 7D 7E 0A 08 05 05 01 00 00 00 04 00 07 00 01 00 05 0B 01 0D 0B 03 08

Dragon Pulse:
Spoiler:

00 B4 27 00 2D 27 00 21 28 0A 02 0C 0C 08 1C A8 00 C0 14 0F 0E ZZ YY XX 08 0E ZZ YY XX 08 0E ZZ YY XX 0804 01 02 F8 1F 3C 08 02 05 00 00 18 00 00 00 00 00 06 00 04 04 03 7D 7E 0A 08 02 05 01 00 05 00 00 00 08 00 01 00 03 91 97 07 08 03 05 01 00 1F 00 0C 00 01 00 01 00 19 91 00 3F 0E A2 11 1D 08 04 07 02 E0 1F 3C 08 02 03 00 00 00 00 09 00 05 08
At offset XX YY ZZ:
02 CC BB AA 08 02 07 00 00 1C 00 10 02 1E 00 0D 00 32 00 00 00 04 02 02 CC BB AA 08 02 07 00 00 20 00 E0 01 14 00 10 00 D2 FF 00 00 04 02 02 CC BB AA 08 02 07 00 00 21 00 40 02 14 00 08 00 2A 00 00 00 04 02 02 CC BB AA 08 02 07 00 00 1F 00 90 01 19 00 0B 00 D6 FF 00 00 04 02 02 CC BB AA 08 02 07 00 00 1C 00 00 02 19 00 10 00 2E 00 00 00 04 02 02 CC BB AA 08 02 07 00 00 21 00 D0 01 1E 00 0F 00 CE FF 00 00 04 02 0F 08 04 20 03 8D 1F 0E 08 02 06 0A 00 08 00 02 00 00 00 0E 00 00 50 05 0B 02 0D 03 A1 7F 0A 08 02 05 00 00 03 00 00 00 02 00 01 00 0E 48 7E 1C 08 0E 48 7E 1C 08 04 10 03 89 8B 0A 08 05 05 00 00 06 00 00 08 02 00 01 00 05 08
At offset AA BB CC:
2D 27 21 28 34 DF 37 08 E0 95 3D 08 00 00 00 00 10 29 1E 08 E5 CF 0D 08

Seed Bomb:
Spoiler:
00 D6 27 00 BF 27 00 16 27 19 A7 00 C0 02 28 76 3D 08 82 06 0A 00 00 00 00 00 00 00 19 00 E0 FF 05 03 A1 7F 0A 08 02 05 01 00 04 00 00 00 10 00 01 00 02 28 78 3D 08 84 04 06 00 05 00 01 00 00 00 19 B1 00 3F 04 03 02 28 78 3D 08 84 04 F0 FF F1 FF 01 00 00 00 19 B1 00 3F 04 03 02 28 78 3D 08 84 04 10 00 FB FF 01 00 00 00 19 B1 00 3F 04 03 02 28 78 3D 08 84 04 F4 FF 12 00 01 00 00 00 19 B1 00 3F 04 03 02 28 78 3D 08 84 04 00 00 05 00 01 00 00 00 19 B1 00 3F 04 03 05 08

Drain Punch:
Spoiler:
00 9F 27 00 A3 27 04 01 00 2F 27 00 97 27 0A 03 2A 01 0C 0C 08 04 01 02 A8 9F 3D 08 02 03 EC FF 0F 00 0C 00 05 02 A8 9F 3D 08 02 04 00 00 00 00 01 00 02 00 19 B4 00 3F 04 02 03 7D 7E 0A 08 05 05 01 00 00 00 05 00 05 00 01 00 05 02 C4 B3 3D 08 02 05 01 00 01 00 00 00 07 00 00 00 05 0E AE F5 1C 08 05 04 0F 0E F5 5E 1D 08 05 02 C4 B3 3D 08 02 05 01 00 01 00 07 00 00 00 00 00 05 0B 03 0D 08

Ice Fang:
Spoiler:
00 9B 27 00 9D 27 00 9F 27 00 97 27 0A 01 0C 0C 08 19 A1 00 3F 02 D0 B1 3D 08 02 06 00 00 E0 FF 00 00 00 00 33 03 0A 00 02 D0 B1 3D 08 02 06 00 00 20 00 04 00 00 00 CD FC 0A 00 04 0A 02 A8 B4 3D 08 02 04 00 00 00 00 01 00 02 00 03 7D 7E 0A 08 05 05 01 00 00 00 04 00 07 00 01 00 05 0B 01 0D 04 01 0E 36 5C 1D 08 04 05 03 39 2A 0E 08

Energy Ball:
Spoiler:
00 C0 27 00 D2 27 00 D3 27 04 0F 1F 59 B0 12 08 07 A8 00 C0 FF 3F 00 05 00 05 00 00 00 05 00 02 ZZ YY XX 08 82 03 10 00 10 00 08 00 05 19 9F 00 3F 03 A1 7F 0A 08 02 05 01 00 04 00 00 00 08 00 01 00 05 08
At offset XX YY ZZ:
C0 27 B0 27 94 DF 37 08 04 29 1E 08 00 00 00 00 A4 AE 3D 08 41 DF 0D 08

Since I'm not hacking Ruby anymore, I'm not going to support these, but if any of you want to, you can use these in any way you want.
  #160    
Old September 7th, 2014, 03:35 AM
MrDollSteak's Avatar
MrDollSteak
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 19
Gender: Male
I've finally gotten around to making U-turn and Volt Switch for Fire Red through Battle Script Pro, which has removed the bugs from the original code!

U-Turn and Volt Switch

Spoiler:

This implementation hijacks battle script 127 (Baton Pass), so just remove that and replace it with a pointer to this script.

Code:
#dynamic 0x800000
#include moves.bsh

#org @main
jumpifhalfword 0x0 move MOVE_BATONPASS 0x81D7995

#org @uturn
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c BANK_TARGET
waitstate
graphicalhpupdate BANK_TARGET
datahpupdate BANK_TARGET
critmessage
waitmessage DELAY_1SECOND
resultmessage
waitmessage DELAY_1SECOND
seteffectwithchancetarget
faintpokemon BANK_TARGET 0x0 0x0
jumpifcannotswitch 0x81 0x81D694E
goto 0x81D79A0


I've also finally gotten my Miracle Eye implementation for Fire Red written up.
This uses the same move effect as Foresight (113)

Miracle Eye

Spoiler:
The first thing you'll need to do is replace the Set Foresight command with this routine.

Miracle Eye I

Code:
.text
.align 2
.thumb
.thumb_func
.global miracleye

main:
	ldrb r0, [r4]
	mov r1, #0xC1
	cmp r0, #0x0
	beq user
	b target
user:
	ldr r0, .usermoveloc
	ldrh r0, [r0]
	cmp r0, r1
	bne miracleye
	b foresight
target:
	ldr r0, .targetmoveloc
	ldrb r0, [r0]
	cmp r0, r1
	bne miracleye
foresight:
	ldr r0, .return
	bx r0
miracleye:
	ldr r1, .bank
	ldr r0, .halfwordloader
	ldrb r2, [r0]
	mov r0, #0x58
	mul r2, r0
	add r1, #0x50
	add r2, r2, r1
	ldr r0, [r2]
	mov r1, #0x1A
	lsl r1, r1, #0x1A
	orr r0, r1
	str r0, [r2]
	ldr r1, .scriptloc
	ldr r0, [r1]
	add r0, #0x1
	str r0, [r1]
	bx r14

.align 2
.usermoveloc: .word 0x2023DC6
.targetmoveloc: .word 0x2023DC4
.return: .word 0x802AAA5
.bank: .word 0x2023BE4
.halfwordloader: .word 0x2023D6C
.scriptloc: .word 0x2023D74
The Set Foresight command is located at 0x02AAA5 in the rom, so just search for that pointer and replace it with a pointer to the routine above.
It's not the most optimised as I wrote it when I was just starting Assembly, and I'd probably rewrite it to use 2023D4A, but it gets the job done.
This routine allows for a new word marker to be loaded into the ram location that controls moves such as Imprison and Foresight effects. It may overlap an existing one but I can't see any noticeable side effects, so if anyone finds anything, let me know and I'll load a new word.

The next thing you'll need to do is reformat your type effectiveness table. Nothing too difficult just swap the Dark immunity to Psychic moves (0E 11 00) and the first entry in your table (which should be 00 05 05).

Miracle Eye II (This routine deals with loading the type table)

Code:
.text
.align 2
.thumb
.thumb_func
.global miracleye

check:
	ldr r0, r5
	ldrb r1, [r2]
	mov r2, #0x58
	mul r1, r2
	add r0, #0x50
	add r0, r0, r1
	ldr r2, r4
	ldr r0, [r0]
	mov r1, #0x80
	lsl r1, r1, #0x18
	and r0, r1
	cmp r0, #0x0
	beq noeye
miracleyes:
	mov r0, #0x41
	ldr r1, .typetableskip
	add r0, r3, r1
	mov r3, #0x3
	mov r1, r1
	b return
noeye:
	mov r0, #0x041
	ldr r1, .typetable
	add r0, r3, r1
	ldrb r0, [r0]
	mov r1, r1
return:
	ldr r0, .return
	bx r0

	
.align 2
.typetableskip:        .word 0x0824F053
.typetable:        .word 0x0824F050
.return:        .word 0x0801E941
Insert 00 48 00 47 XX+1 XX XX 08 at 0x1E938 where XX XX XX is the location of this routine.
If you have expanded your type table you'll need to replace the registers with the new location of your type table,
and the offset of the entry just past the Psychic immunity. It basically checks if the Miracle Eye word is set, and if it is
it skips the first entry (which is why the Psychic immunity was moved there).

Last edited by MrDollSteak; September 14th, 2014 at 07:00 PM. Reason: Added Miracle Eye
  #161    
Old September 18th, 2014, 11:35 AM
HidoranBlaze's Avatar
HidoranBlaze
 
Join Date: Apr 2013
Age: 18
Gender: Male
So I made a battle script for Acrobatics (my very first one), and it works! Here's the code.
(This is for Emerald by the way.)

ASM at 0xAAAAAA:
Code:
.text
.align 2
.thumb
.thumb_func

CheckItem:
push {r0-r4}
ldr r1, BattleData
ldr r0, CurPokeIndex
ldrb r0, [r0]
mov r2, #0x58
mul r2, r0
add r1, #0x2E
add r1, r2
ldrh r0, [r1]
cmp r0, #0x0
beq PowerUp
b End

PowerUp:
ldr r3, Multiplier
mov r4, #0x2
strb r4, [r3]
b End

End:
pop {r0-r4}
bx lr

.align 2
BattleData:	.word 0x02024084
CurPokeIndex:	.word 0x0202420B
Multiplier:	.word 0x02024482
Battle Script:
Code:
#dynamic 0x800000
#freespace 0xFF

#org @start
attackcanceler
accuracycheck 0x82D8A5E 0x0
attackstring
ppreduce
callasm 0x8AAAAAA+1
calculatedamage	
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
goto 0x82D8A47
Credits to Tlachtli, for the Emerald offsets.
Also, thanks to ipatix, for helping me when I was having a bug with this.

Last edited by HidoranBlaze; September 18th, 2014 at 11:43 AM. Reason: forgot to add +1, whoops!
  #162    
Old 4 Weeks Ago, 10:06 AM
DoesntKnowHowToPlay's Avatar
DoesntKnowHowToPlay
some loser
 
Join Date: Jan 2012
Taunt's duration is controlled by the byte at x2bfe2; change it to 4 for BW's length.

To fix Encore at 4 turns, insert 00 00 00 00 at x29c66 and x29c76.

To fix Disable at 4 turns, insert 00 00 00 00 at x29b2e and x29b3e.

Yet Another Fire Red Hack

Physical/Special Split
  #163    
Old 4 Weeks Ago, 06:31 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Ominous Wind animation [FR]
Spoiler:
Code:
00 1F 28 1B 7D 00 C0 3F 02 00 19 DD 00 00 04 00 0A 03 29 04 00 03 3D A8 0B 08 0A 05 01 00 00 00 00 00 04 00 00 00 03 4D B9 0B 08 02 00 21 07 01 00 AA BB CC 08 14 02 16 03 2D B8 0B 08 05 04 00 06 00 00 00 00
At CCBBAA (for scrolling BG):
Code:
14 02 16 03 2D B8 0B 08 05 04 00 FA 00 00 00 00 FF FF 13 7E 3F 1D 08
OR

At CCBBAA (for static BG):
Code:
14 02 16 13 7E 3F 1D 08
  #164    
Old 3 Weeks Ago, 03:17 AM
KDS
 
Join Date: Jul 2013
Age: 20
Gender: Male
1. Scald - Chance to burn foe, defrosts the user and defrosts the target also(Gen VI).
Spoiler:

Hook this script with effect 125 to defrost the user
Code:
#org @scald
jumpifsecondarystatus 0x0 0x1000000 0x81D6929
setbyte 0x2023E85 0x3
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x0
jumpifstatus 0x0 0x20 @thawfoe
goto 0x81D694E

#org @thawfoe
setbyte 0x2023E85 0x4
clearstatus 0x0
jumpifbyte 0x0 0x02023D6C 0x0 @slot1
jumpifbyte 0x0 0x02023D6C 0x1 @slot2
jumpifbyte 0x0 0x02023D6C 0x2 @slot3
jumpifbyte 0x0 0x02023D6C 0x3 @slot4

#org @slot1
bicbyte 0x20242D4 0xFF
goto @thawdisp

#org @slot2
bicbyte 0x202407C 0xFF
goto @thawdisp

#org @slot3
bicbyte 0x2024338 0xFF
goto @thawdisp

#org @slot4
bicbyte 0x20240E0 0xFF
goto @thawdisp

#org @thawdisp
cmd98 0x0
pause 0x40
setword 0x203C020 0x8CCCCCC
printstring 0x184
waitmessage 0x40
goto 0x81D694E
String at CCCCCC:
Code:
FD 10 00 EB D5 E7 00 D8 D9 DA E6 E3 E7 E8 D9 D8 AB FF


2. Incinerate - Destroys the target's berry completely.
Spoiler:

Code:
#org @incinerate
jumpifsecondarystatus 0x0 0x1000000 0x81D6929
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
callasm 0x(offset+1)
pause 0x40
setword 0x203C020 0x8DDDDDD
printstring 0x184
waitmessage 0x40
faintpokemon 0x0 0x0 0x8000000
goto 0x81D694E
ASM: (If berries are expanded then the bolded part needs to be changed)
Code:
.text
.align 2
.thumb
.thumb_func
.global incinerate

main:
push {lr}
ldr r0, targetBank
ldrb r0, [r0]
ldr r1, battleData
mov r2, #0x58
mul r2, r0
add r1, r2
ldrh r3, [r1, #0x2e]
cmp r3, #0x85
blt gotoend
cmp r3, #0xAF
bgt gotoend
mov r3, #0x0
strh r3, [r1, #0x2e]
mov r1, #0xC
cmp r0, #0x0
beq slot1
cmp r0, #0x1
beq slot2
cmp r0, #0x2
beq slot3
cmp r0, #0x3
beq slot4

slot1:
ldr r0, userData
b bclear 

slot2:
ldr r0, foeData
b bclear

slot3:
ldr r0, partnerData
b bclear

slot4:
ldr r0, foePartnerData

bclear:
bl clear
b end

gotoend:
ldr r1, scriptPointer
ldr r2, endScript
str r2, [r1, #0x0]
end:
pop {r0}
bx r0

clear:
ldr r2, blank
ldr r5, encryptPoke
bx r5

.align 2
targetBank: .word 0x02023D6C
battleData: .word 0x02023BE4
blank: .word 0x0202423E
encryptPoke: .word 0x0804037D
userData: .word 0x02024284
partnerData: .word 0x020242E8
foeData: .word 0x0202402C
foePartnerData: .word 0x02024090
endScript: .word 0x081D6940
scriptPointer: .word 0x02023D74
String at CCCCCC:
Code:
FD 10 B4 E7 00 D6 D9 E6 E6 ED 00 EB D5 E7 00 D6 E9 E6 E2 E8 00 E9 E4 AB FF

Last edited by KDS; 3 Weeks Ago at 03:23 AM.
  #165    
Old 1 Week Ago, 02:59 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
I made a more violent Flame Charge animation for FireRed:


Code:
00 2D 27 00 37 27 00 97 27 19 8F 00 C0 03 F9 A7 0B 08 0A 05 02 00 04 00 00 00 08 00 7F 02 03 F9 89 09 08 05 05 00 00 00 00 02 00 0F 00 01 00 02 38 74 3E 08 02 07 00 00 1C 00 10 02 1E 00 0D 00 32 00 00 00 04 02 02 38 74 3E 08 02 07 00 00 20 00 E0 01 14 00 10 00 D2 FF 00 00 04 02 02 38 74 3E 08 02 07 00 00 21 00 40 02 14 00 08 00 2A 00 00 00 04 02 02 38 74 3E 08 02 07 00 00 1F 00 90 01 19 00 0B 00 D6 FF 00 00 04 02 02 38 74 3E 08 02 07 00 00 1C 00 00 02 19 00 10 00 2E 00 00 00 04 02 02 38 74 3E 08 02 07 00 00 21 00 D0 01 1E 00 0F 00 CE FF 00 00 04 02 02 38 74 3E 08 02 07 00 00 1C 00 10 02 1E 00 0D 00 32 00 00 00 04 02 03 9D 94 09 08 05 07 00 00 E8 FF 08 00 17 00 0A 00 28 00 0A 00 04 23 02 3C 7B 3E 08 02 07 1F 00 03 00 01 00 00 00 0A 00 00 00 00 00 02 08 7C 3E 08 04 04 F6 FF 00 00 01 00 00 00 19 86 00 3F 04 01 02 9C 4E 3D 08 02 05 01 00 F0 FF 00 00 00 00 04 00 05 02 38 74 3E 08 02 07 00 00 20 00 E0 01 14 00 10 00 D2 FF 00 00 04 02 02 38 74 3E 08 02 07 00 00 21 00 40 02 14 00 08 00 2A 00 00 00 04 02 02 38 74 3E 08 02 07 00 00 1F 00 90 01 19 00 0B 00 D6 FF 00 00 04 02 02 38 74 3E 08 02 07 00 00 1C 00 00 02 19 00 10 00 2E 00 00 00 04 02 02 38 74 3E 08 02 07 00 00 21 00 D0 01 1E 00 0F 00 CE FF 00 00 03 D1 8C 09 08 02 05 01 00 04 00 00 00 0C 00 01 00 05 04 02 02 84 4E 3D 08 02 03 00 00 00 00 05 00 04 03 02 84 4E 3D 08 02 03 01 00 00 00 07 00 05 0B 03 0D 08 03 F9 A7 0B 08 0A 05 02 00 04 00 08 00 00 00 7F 02 05 08
  #166    
Old 1 Week Ago, 09:53 AM
KDS
 
Join Date: Jul 2013
Age: 20
Gender: Male
Quote:
Originally Posted by MrDollSteak View Post
I've finally gotten around to making U-turn and Volt Switch for Fire Red through Battle Script Pro, which has removed the bugs from the original code!

U-Turn and Volt Switch

Spoiler:

This implementation hijacks battle script 127 (Baton Pass), so just remove that and replace it with a pointer to this script.

Code:
#dynamic 0x800000
#include moves.bsh

#org @main
jumpifhalfword 0x0 move MOVE_BATONPASS 0x81D7995

#org @uturn
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c BANK_TARGET
waitstate
graphicalhpupdate BANK_TARGET
datahpupdate BANK_TARGET
critmessage
waitmessage DELAY_1SECOND
resultmessage
waitmessage DELAY_1SECOND
seteffectwithchancetarget
faintpokemon BANK_TARGET 0x0 0x0
jumpifcannotswitch 0x81 0x81D694E
goto 0x81D79A0
You should not hook uturn to effect 127 at all, because effect 127 is hardcoded to pass stat boost changes, statuses like ingrain,cursed etc. Just like 125 is for defrosting.
The script is mainly resonpsible for switching pokemon.

I tested it in your rombase with a bulbasaur having u-turn and ingrain, it passed the ingrain status to pidgey using uturn. But when i changed the id of the script it did not pass ingrain. .

Last edited by KDS; 1 Week Ago at 10:09 AM.
  #167    
Old 1 Week Ago, 03:16 PM
MrDollSteak's Avatar
MrDollSteak
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 19
Gender: Male
Quote:
Originally Posted by KDS View Post
You should not hook uturn to effect 127 at all, because effect 127 is hardcoded to pass stat boost changes, statuses like ingrain,cursed etc. Just like 125 is for defrosting.
The script is mainly resonpsible for switching pokemon.

I tested it in your rombase with a bulbasaur having u-turn and ingrain, it passed the ingrain status to pidgey using uturn. But when i changed the id of the script it did not pass ingrain. .
That's interesting! Thanks for that.
The only reason I hooked it into there was so the AI knew how to use it.

Though now with Knizz having found the AI ASM table, I may just hook it into a new effect slot and copy the 127 AI behaviour to that one. Cheers!
  #168    
Old 2 Days Ago, 10:15 PM
looneyman1's Avatar
looneyman1
The Psycho Pokemon
 
Join Date: Sep 2013
Gender: Male
Nature: Jolly
Is there a means to make Hidden Power with a fixed base power of 60 in a third gen hack yet? It gets aggrivating to have to use an EV calculator over and over and over and over again to find how strong the move's base power will be in addition to type.
  #169    
Old 2 Days Ago, 10:22 PM
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Effect: Flame Charge for Ruby. Haven't fully tested it yet, but it works anyway. :/
Code:
2E 21 4D 02 02 D1 28 14 6F 1D 08
Post Reply
Quick Reply

Sponsored Links


Advertise here
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 01:49 PM.

About Us
© 2002 - 2014 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.

Copyright
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 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. Header artwork by Jordanice of deviantART.

Social Media
If you would like to stay up-to-date with us on the go, when we're down, or other such things, follow us on social media sites--most notibly Twitter, Facebook, and Google Plus--by clicking on the links provided.

Design presented by Peitharchia. Special thanks to Hiroshi Sotomura and Ausaudriel.