Binary Hack Research & DevelopmentGot a well-founded knack with your binary Pokémon hacks? Love reverse-engineering them? For the traditional Pokémon ROM hacker, 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!
And heres my take on a Dragon Rush animation. Since the 4th/5th gen animations are kind of generic, my one is also. Its just the slam animation with Blaze Burn/Hydro Cannon's "solarize" like effect.
The recharging stones part from the Ancient Power's animation then blast from the Rock Blast animation with an attack background like it was shown in D/P/Pt/HG/SS. The animation almost looks like from the games but I would make a particle of the Rock Wrecker soon.
But first, you need to have the attack backgrounds expanded. If you don't know how, read this thread: http://www.pokecommunity.com/showthread.php?t=281520. If you do, you need to have the image, palette, and tilemap inserted in game. To where you have inserted it, replace XX with that value (example: 1B is the background). The image, palette, and tilemap are in the zip in the attachment below. Credits to MrDollSteak for the Rock Wrecker background. Sorry to rip from your ROM Base since it is an open resource anyway. :3
PS : I wanted to created an effect like Judgment, but I don't know if there is a function to set the attack's type. And I don't remember the function to check the held object. Also, is it possible to change the ratio of drained HP in the drain effect, in order to make Oblivion Wing ? Thanks.
Didn't test the other, but U-turn doesn't take in count Shadowtag ability. A jumpifability 0x0 0x17 should be enough I guess
And it fail if you have only one pokemon
EDIT : Nope, I still can switch in double battle. And the move completely fail in one vs one. It's a progress I guess..
Tested your command out on Emerald and got some weird result. Since the final command on the Emerald Battle Command Table is F8, and I use F9 for callasm, I set cureprimarystatus as FA.
When I tried to attack a sleeping opponent with Wake-Up Slap, the game froze when the battle script reached cureprimary status.
I pretty much copy pasted all your stuff so it should be all right. I did not forget to put +1 at asm offsets either.
EDIT: Scald just completely glitches out before the attack-animation. This is unlikely to be due to the command though.
#231Link to this post, but load the entire thread.
April 22nd, 2015 (2:33 AM).
Trainer 781
Guest
Posts: n/a
Quote:
Originally Posted by mamamama
Tested your command out on Emerald and got some weird result. Since the final command on the Emerald Battle Command Table is F8, and I use F9 for callasm, I set cureprimarystatus as FA.
When I tried to attack a sleeping opponent with Wake-Up Slap, the game froze when the battle script reached cureprimary status.
I pretty much copy pasted all your stuff so it should be all right. I did not forget to put +1 at asm offsets either.
EDIT: Scald just completely glitches out before the attack-animation. This is unlikely to be due to the command though.
Weird.
Shouldn't happen. I have tested this on emerald too and it is working fine. I recommend to cross-check everything.
Quick question: I'm trying to get your Psycho Shift to work, but I just get "the move failed" every time. When I tried to complie the script, BSP wouldn't let me include "#include std.bsh" -- could that be the reason?
What does std.bsh do and would you know how I can get BSP to compile with it?
#234Link to this post, but load the entire thread.
April 25th, 2015 (2:13 AM).
Trainer 781
Guest
Posts: n/a
Quote:
Originally Posted by mamamama
Quick question: I'm trying to get your Psycho Shift to work, but I just get "the move failed" every time. When I tried to complie the script, BSP wouldn't let me include "#include std.bsh" -- could that be the reason?
What does std.bsh do and would you know how I can get BSP to compile with it?
If you have probleMs with the include statement then remove it and replace every instance BANK_TARGET with 0x0 and BANK_USER with 0x1
Just callasm this routine before the attackcanceler in battle script. Pm if there is bug/problem/other
I think it's not optimized but whatever, it works. I'll see if I can change it
I actually got this and Judgement without the help of your second routine.
It is also displaying the correct outcome and the proper effectiveness sound is playing.
(I used Tackle and Move Effect ID 1 for this).
The problem lies with the placement of the 1st routine.
The battle script should be:
Move type changing routines should be placed before the attack canceler because it contains checks for abilities like Flash Fire, Water Absorb etc. The original battle script wouldn't account for this.
Also this might be the reason why the outcome might not be properly handled.
Judgment should a script like that of Weatherball i.e callasm then goto the regular attack routine.
Also the fail address pointer in the 1st routine should be (0x081D7DF2 - 0x5). Even though with the original value it is working. It might not be the case with other scripts.
While branching to custom scripts with callasm command, 0x5 must be subtracted from their offset, because callasm always adds 0x5 to the script pointer regardless of the branch.
Did any1 find a way to make Bind etc. do 1/8 damage as opposed to 1/16? I know it's been found for Rough skin so I guess it would only require a byte change or two.
#238Link to this post, but load the entire thread.
May 9th, 2015 (1:33 AM).
Trainer 781
Guest
Posts: n/a
Quote:
Originally Posted by kleenexfeu
[/spoiler]
Got a problem here. I put my routine before the attackcanceler as you adviced, water/volt absorb didn't work, but levitate did. Do I have to callasm (myroutine - 0x5 +1) or (myroutine - 0x5) or just (myroutine +1) as usual ? I didn't get what you said in your last post.
Hmm, I'll like into the volt absorb thingy if I have time.
Routine+1 is correct. (The -5 is for an alternate script. It is used if the routine specified in the callasm command can branch to more than one different battle scripts.)
Accuracy checker should be there in thd battle script. If you want infinite accuracy you can just set the move accuracy to zero using an editor.
Hmm, I'll like into the volt absorb thingy if I have time.
Routine+1 is correct. (The -5 is for an alternate script. It is used if the routine specified in the callasm command can branch to more than one different battle scripts.)
Accuracy checker should be there in thd battle script. If you want infinite accuracy you can just set the move accuracy to zero using an editor.
Thank's, so that's what I did.
For the accuracy, I just followed the Jambo51's advice in his tutorial. Because set accuracy to zero make the move always miss, but set it to 255 will make it never miss. The problem is I don't like seeing accuracy = 255 in move description, it doesn't look legit at all.
Would be great to have a routine that make appear "---" instead of "255" but anyway. Would be cool if you find a way to fix absorb ability
#240Link to this post, but load the entire thread.
May 11th, 2015 (9:08 AM).
Trainer 781
Guest
Posts: n/a
Quote:
Originally Posted by kleenexfeu
Thank's, so that's what I did.
For the accuracy, I just followed the Jambo51's advice in his tutorial. Because set accuracy to zero make the move always miss, but set it to 255 will make it never miss. The problem is I don't like seeing accuracy = 255 in move description, it doesn't look legit at all.
Would be great to have a routine that make appear "---" instead of "255" but anyway. Would be cool if you find a way to fix absorb ability
Actually it seems that the absorb abilities are called from the accuracy checker command. So you need to include the accuracy checker as well.
To set the move accuracy to display --- , you need to set the accuracy to 0.
Judgment has 100% accuracy according to bulbapedia not infinite.
Also, you can reduce Judgement's battle script to 2 lines only.
I.e 1. callasm offset
2. goto basic damage script
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
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
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):
You are using the wrong RAM pointer for Base power.
Instead of 020244E0, use 02024400.
I ported Chaos Rush's Natural gift to Emerald and used the same offsets as you do except for this Base power change, so I assume it should work for Judgement as well. When setting power in G3T/PGE, just set it as 0 and the routine will calculate it for you.
EDIT: Tried to change mine to 020244E0 and the Base Power no longer worked.
You are using the wrong RAM pointer for Base power.
Instead of 020244E0, use 02024400.
I ported Chaos Rush's Natural gift to Emerald and used the same offsets as you do except for this Base power change, so I assume it should work for Judgement as well. When setting power in G3T/PGE, just set it as 0 and the routine will calculate it for you.
EDIT: Tried to change mine to 020244E0 and the Base Power no longer worked.
Oh thanks to pointing me. But since then I made a new routine (few post above), far more simple than the chaos Rush one. And since a power of 100 is displayed for Judgment, it's much more approriated IMO. Though don't hesitate to post the good Natural Gift routine :)
.Outcome: .word 0x0202427C
.TypeChart: .word 0x08XXXXXX /*make sure you replace this with the offset of your own type chart*/
.BattleData: .word 0x02024084
.TargetBank: .word 0x0202420C
.MemAddress: .word 0x0202449C
MoveTable: Using my own, triple checked and it's correct
BasePower 02024400
EffectTable: 82D86A8 (Using original one)
Copy pasted you script and added +1 on each ASM. Changed Setbytes to 0x202448C and 0x202448D.
Everything seems to be correct, Me First correctly fails if the opponent uses a status move and it copies the attack of the opponent, but it can't perform the move effect. When I tried copying Mega Drain for example the move just fails, when I copy Tackle the game throws a Pokeball (similar glitch that happens when a move effect is wrong). Is there something wrong with the Move Effect Table offset or some slip-up in the ASM? Did anyone use Chaos Rush's code in Fire Red and get it to work?
Just callasm this routine before the attackcanceler in battle script. Pm if there is bug/problem/other
I think it's not optimized but whatever, it works. I'll see if I can change it
Edited, thanks KDS
Quote:
Originally Posted by KDS
Spoiler:
Only problem in 2 lines.
1. mul r2,r0 should be mul r0,r2 (this can spoil the results)
2. ldrh r0, [r1] is redundant not needed.
I actually got this and Judgement without the help of your second routine.
It is also displaying the correct outcome and the proper effectiveness sound is playing.
(I used Tackle and Move Effect ID 1 for this).
The problem lies with the placement of the 1st routine.
The battle script should be:
Move type changing routines should be placed before the attack canceler because it contains checks for abilities like Flash Fire, Water Absorb etc. The original battle script wouldn't account for this.
Also this might be the reason why the outcome might not be properly handled.
Judgment should a script like that of Weatherball i.e callasm then goto the regular attack routine.
Also the fail address pointer in the 1st routine should be (0x081D7DF2 - 0x5). Even though with the original value it is working. It might not be the case with other scripts.
While branching to custom scripts with callasm command, 0x5 must be subtracted from their offset, because callasm always adds 0x5 to the script pointer regardless of the branch.
That that the routine judgment won't work for a move that is not 0x0 type and you want to change to 0x0 type. Exemple : You have an fire (0xA) attack that uses this routine, and your primary type is normal(0x0), then the attack won't be changed to normal. This is because the MemAddress if by default 0, so set 0 at this place doesn't change anything. I don't know how to fix it atm but it's not a huge issue since every attack that are supposed to change type are normal by default. Just wanted to note
#249Link to this post, but load the entire thread.
May 19th, 2015 (9:23 AM).
Trainer 781
Guest
Posts: n/a
Quote:
Originally Posted by kleenexfeu
That that the routine judgment won't work for a move that is not 0x0 type and you want to change to 0x0 type. Exemple : You have an fire (0xA) attack that uses this routine, and your primary type is normal(0x0), then the attack won't be changed to normal. This is because the MemAddress if by default 0, so set 0 at this place doesn't change anything. I don't know how to fix it atm but it's not a huge issue since every attack that are supposed to change type are normal by default. Just wanted to note
Yes this happens because the 'type effectiveness calculator' command first checks the content of the dynamic memory location allocated for the type. If its content is zero, then it starts retrieving the type from the move table.
So in a nutshell, the content of the loc is 0x0 if you use a normal type mon, and then it reads from the move table picking up the fire type changing it to fire.
And I don't see the point of changing this unless you are going for a truly wacky custom move.