The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

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.


Reply
 
Thread Tools
  #101    
Old June 4th, 2014, 03:10 AM
KDS
 
Join Date: Jul 2013
Age: 19
Gender: Male
Found Jambo's callasm method (link here) in battle scripts by seeing Chaos Rush's roost effect post.

So made two effects using the callasm method and Tlachti's decimal damage manipulation ASM code, which is found here.

1. Knock Off (Better Alternative)
Code:
#dynamic 0x(YourOffset)
#freespacebyte 0xFF

#org @start
jumpifbyte 0x0 0x02023D6C 0x0 @slot1
jumpifbyte 0x0 0x02023D6C 0x1 @slot2
jumpifbyte 0x0 0x02023D6C 0x2 @slot3
jumpifbyte 0x0 0x02023D6C 0x3 @slot4

#org @slot1
jumpifhalfword 0x1 0x02023C12 0x0 @knock
goto 0x081D6926

#org @slot2
jumpifhalfword 0x1 0x02023C6A 0x0 @knock
goto 0x081D6926

#org @slot3
jumpifhalfword 0x1 0x02023CC2 0x0 @knock
goto 0x081D6926

#org @slot4
jumpifhalfword 0x1 0x02023D1A 0x0 @knock
goto 0x081D6926

#org @knock
setbyte 0x2023E85 0x36
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
callculatedamage
cmdF8  0x([Offset to 1.5x damage asm]+1)
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x0
setbyte 0x2023FD8 0x0
cmd49 0x0 0x0
end
This knock off script is much better it as does not required base power change (set to 65), and better AI understanding (not perfect though) and also does not give techician mons a undesirable boost as mine first script does, but requires the ability to insert ASM and repointing tables.
--
2. Metal Burst
Code:
#dynamic 0x720000
#freespacebyte 0xFF

#org @start
jumpifhalfword B_== 0x2023D4A 0x44 0x81D7433
attackcanceler
counterdamagecalculator @specialpass
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
damagecalc2
cmd69
cmdF8 0x([Offset to 0.75x damage asm]+1)
goto 0x81D6934

#org @specialpass
mirrorcoatdamagecalculator 0x81D7DF0
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
damagecalc2
cmd69
cmdF8 0x([Offset to 0.75x damage asm]+1)
goto 0x81D6934
Understanding Doesnt's point on mapping new effects to similar old effects so that AI can use them in a better way, this script is meant to replace the original counter script (so change the counter's original pointer in the effect table to the inserted scripts's location). It branches to counter's effect if the move ID is of counter, otherwise it executes metal burst's effect. This also requires Jambo's callasm method.
--
The way of inserting these two codes is:
i.) First use Jambo's callasm method, if already done then skip this step.
ii.) Insert this in command.bsh by opening in notepad, if already done then skip this step also
Code:
#command cmdF8 0xF8 0x1 "Offset of routine" 0x4
#command cmd69 0x69 0x0
#command cmd98 0x98 0x1 "Byte" 0x1
iii). View Tlachtli's ASM routines and change 0x020241F0 to 0x02023d50 in the last line before compiling to make them working for FR.
iv) Then insert the compiled decimal multiplier ASM routines using an Hex Editor.
v) Then insert the battle scripts using BSP.
--
3. Soak (no callasm required):
Code:
#dynamic 0x720000
#freespacebyte 0xFF

#org @start
attackcanceler
accuracycheck 0x1D695E 0x0
attackstring
ppreduce
jumpifsecondarystatus 0x0 0x1000000 0x81D7DF2
attackanimation
waitanimation
jumpifbyte 0x0 0x02023D6C 0x0 @slot1
jumpifbyte 0x0 0x02023D6C 0x1 @slot2
jumpifbyte 0x0 0x02023D6C 0x2 @slot3
jumpifbyte 0x0 0x02023D6C 0x3 @slot4

#org @slot1
setbyte 0x2023C05 0xB
setbyte 0x2023C06 0xB
goto 0x81D694E

#org @slot2
setbyte 0x2023C5D 0xB
setbyte 0x2023C5E 0xB
goto 0x81D694E

#org @slot3
setbyte 0x2023CB5 0xB
setbyte 0x2023CB6 0xB
goto 0x81D694E

#org @slot4
setbyte 0x2023D0D 0xB
setbyte 0x2023C06 0xB
goto 0x81D694E
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 11:51 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 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.
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.