Male
Seen January 10th, 2019
Posted May 4th, 2017
216 posts
6.4 Years
Spoiler:
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)
#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
#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
#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):
#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
Here is the knock off effect for emerald

Spoiler:
#dynamic 0xYouroffset
#freespacebyte 0xFF

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

#org @slot1
jumpifhalfword 0x1 0x020240C2 0x0 @knock
goto 0x082D8A26

#org @slot2
jumpifhalfword 0x1 0x0202411A 0x0 @knock
goto 0x082D8A26

#org @slot3
jumpifhalfword 0x1 0x02024172 0x0 @knock
goto 0x082D8A26

#org @slot4
jumpifhalfword 0x1 0x020241CA 0x0 @knock
goto 0x082D8A26

#org @knock
setbyte 0x2024335 0x36
attackcanceler
accuracycheck 0x82D8A5E 0x0
attackstring
ppreduce
calculatedamage
callasm 0x8yourroutine+1
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x8000000
setbyte 0x2024488 0x0
cmd49 0x0 0x0
end