Advertiser Content

Development Creating New Battle Animations Page 6

Started by Chaos Rush June 2nd, 2012 12:43 PM
  • 54454 views
  • 149 replies
Male
Singapore
Seen June 26th, 2018
Posted June 18th, 2018
87 posts
5.8 Years
For Ruby hackers, the command to clear background is 0E F3 61 1D 08 before you add the 08 byte at the end.
Most of Chaos Rush's commands work, except for any command with an "08" (pointer) inside.

Edit: I found the commands. They are:
14 XX 17 03 59 3A 0E 08 05 04 00 00 00 YY 0Z 00 00 FF FF (Scrolling BG Left-to-Right)
14 XX 17 03 59 3A 0E 08 05 04 00 00 00 YY FZ 00 00 FF FF (Scrolling BG Right-to-Left)

Now, I would like some help with finding the Psychic Background command for Ruby.


Age 23
Male
Seen July 6th, 2019
Posted October 26th, 2016
253 posts
6.6 Years
If a person experienced in Emerald animations would help me with this, I would be very grateful.
I'm trying to make a new animation, with the Dark background and the slash animation, but the game freezes every time the animation finishes. I did add an extra 08 and everything, and I'm pretty sure I found the right commands, so I'm not really sure what's going wrong. I really want to squash this bug so I can move on to implementing custom backgrounds in Emerald.
Anyways, here's my code:
14 00 17 00 C7 27 02 2C 2D 59 08 82 03 01 00 F8 FF 00 00 19 88 00 3F 04 04 02 2C 2D 59 08 82 03 01 00 08 00 00 00 03 D1 52 0D 08 02 05 01 00 04 00 00 00 12 00 01 00 19 88 00 3F 05 FF 0E DD 7C 2D 08 08
EDIT: Nvm I realized what went wrong. It's funny how one byte changes everything.
Seen March 24th, 2015
Posted May 8th, 2014
9 posts
6 Years
If a person experienced in Emerald animations would help me with this, I would be very grateful.
I'm trying to make a new animation, with the Dark background and the slash animation, but the game freezes every time the animation finishes. I did add an extra 08 and everything, and I'm pretty sure I found the right commands, so I'm not really sure what's going wrong. I really want to squash this bug so I can move on to implementing custom backgrounds in Emerald.
Anyways, here's my code:
14 00 17 00 C7 27 02 2C 2D 59 08 82 03 01 00 F8 FF 00 00 19 88 00 3F 04 04 02 2C 2D 59 08 82 03 01 00 08 00 00 00 03 D1 52 0D 08 02 05 01 00 04 00 00 00 12 00 01 00 19 88 00 3F 05 FF 0E DD 7C 2D 08 08
EDIT: Nvm I realized what went wrong. It's funny how one byte changes everything.
What was the one byte that went wrong? I want to use this code too, and I'm getting the same problem you were having.
Age 23
Male
Seen July 6th, 2019
Posted October 26th, 2016
253 posts
6.6 Years
What was the one byte that went wrong? I want to use this code too, and I'm getting the same problem you were having.
Ah my apologies, I didn't see this. It's been a while since I made this code, but I believe the FF byte near the end caused the problem; just take that out and you should be fine, I think.
Seen March 24th, 2015
Posted May 8th, 2014
9 posts
6 Years
Ah my apologies, I didn't see this. It's been a while since I made this code, but I believe the FF byte near the end caused the problem; just take that out and you should be fine, I think.
Maybe you have the code stashed away somewhere? I changed the FF byte to 00 but that restarted my ROM when the attack was executed, so I instead took out the FF byte completely and my ROM broke.
Age 23
Male
Seen July 6th, 2019
Posted October 26th, 2016
253 posts
6.6 Years
Maybe you have the code stashed away somewhere? I changed the FF byte to 00 but that restarted my ROM when the attack was executed, so I instead took out the FF byte completely and my ROM broke.
Ok, I'm on my computer now, I'll look at it and tell you what the problem is.

EDIT: Ok, here's my revised code. This definitely works. If this doesn't work, then you're probably doing something wrong. (I tested this myself) :

14 00 16 00 C7 27 02 2C 2D 59 08 82 03 01 00 F8 FF 00 00 19 88 00 3F 04 04 02 2C 2D 59 08 82 03 01 00 08 00 00 00 03 D1 52 0D 08 02 05 01 00 04 00 00 00 12 00 01 00 19 88 00 3F 05 0E DD 7C 2D 08 08
Seen March 24th, 2015
Posted May 8th, 2014
9 posts
6 Years
Ok, I'm on my computer now, I'll look at it and tell you what the problem is.

EDIT: Ok, here's my revised code. This definitely works. If this doesn't work, then you're probably doing something wrong. (I tested this myself) :

14 00 16 00 C7 27 02 2C 2D 59 08 82 03 01 00 F8 FF 00 00 19 88 00 3F 04 04 02 2C 2D 59 08 82 03 01 00 08 00 00 00 03 D1 52 0D 08 02 05 01 00 04 00 00 00 12 00 01 00 19 88 00 3F 05 0E DD 7C 2D 08 08
Thanks, it worked!

25charmanderlimit
Male
Singapore
Seen June 26th, 2018
Posted June 18th, 2018
87 posts
5.8 Years
Here's some animation codes for Ruby:
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 0A 05 04 00 02 00 09 00 00 00 4C 7F 05 08 19 C5 00 C0

Thunder Fang
Spoiler:


00 9B 27 00 97 27 00 9F 27 00 35 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 02 D0 97 3D 08 02 02 00 00 F0 FF 04 01 03 25 23 0E 08 02 03 01 01 01 01 01 01 04 01 02 D0 97 3D 08 82 02 00 00 D0 FF 04 01 02 D0 97 3D 08 02 02 00 00 F0 FF 04 01 02 D0 97 3D 08 02 02 00 00 10 00 04 01 19 DD 00 3F 03 25 23 0E 08 02 03 01 01 01 01 01 01 04 02 03 7D 7E 0A 08 02 05 01 00 00 00 03 00 0F 00 01 00 02 A8 B4 3D 08 03 04 00 00 00 00 01 00 02 00 04 01 02 C4 B3 3D 08 02 05 01 00 02 00 10 00 00 00 00 00 04 14 05 0B 01 0D 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

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

And I have some questions:
-What command allows you to play a sound multiple times?
-How would a pointer to offset 1 00 00 00 be written? Would it be 00 00 00 01 08, 00 00 00 18, or 00 00 00 09?

destinedjagold

You Can Contact me in PC's Discord

Age 29
Male
Philippines
Seen October 16th, 2019
Posted May 6th, 2019
8,596 posts
12.5 Years
I have successfully made a simple animation for Night Slash in a Ruby ROM. :P
Adding backgrounds seemed to be easier than I thought.
Many thanks to Chaos Rush for this tutorial, and to dreamengine and Artemis64 for your Ruby contributions~ ^^

But I'm having trouble understanding how to add some hues of blue and green and other colors to the screen, like Absorb and Water Pulse. =/

Age 23
Male
Seen July 6th, 2019
Posted October 26th, 2016
253 posts
6.6 Years
I have successfully made a simple animation for Night Slash in a Ruby ROM. :P
Adding backgrounds seemed to be easier than I thought.
Many thanks to Chaos Rush for this tutorial, and to dreamengine and Artemis64 for your Ruby contributions~ ^^

But I'm having trouble understanding how to add some hues of blue and green and other colors to the screen, like Absorb and Water Pulse. =/
destinedjagold: Same principle applies. Just add the code to activate the background at the front, put your animation in between, and put the clear code at the end. Except you don't really need to add an extra 08 here. Here's my modified night slash example for Emerald, with the Giga Drain background, but you can substitute in the codes for Ruby (I think Artemis64 has the codes somewhere) :
02 74 72 59 08 02 05 01 00 01 00 00 00 04 00 ED 33 05 00 C7 27 02 2C 2D 59 08 82 03 01 00 F8 FF 00 00 19 88 00 3F 04 04 02 2C 2D 59 08 82 03 01 00 08 00 00 00 03 D1 52 0D 08 02 05 01 00 04 00 00 00 12 00 01 00 19 88 00 3F 05 02 74 72 59 08 02 05 01 00 01 00 04 00 00 00 ED 33 05 0B 03 0D 08
Male
Singapore
Seen June 26th, 2018
Posted June 18th, 2018
87 posts
5.8 Years
Here are the codes:
To enable such a background: 02 C4 B3 3D 08 02 05 01 00 SS 00 00 00 II 00 CC CC 05
To clear the background: 02 C4 B3 3D 08 02 05 01 00 SS 00 II 00 00 00 CC CC 05 0B 03 0D
SS refers to speed at which the battle becomes colored CC CC, and II controls at what intensity. For CC CC, all you have to do is open up Advance Map, go to the block editor then the palette editor, and pick the color you want. The 15-bit value there, however, has to be reversed to be usable in the thing.
I was thinking about adding new attack backgrounds, however. Using tajaros' tutorial, and substituting the offset 0x37F374, and adding his example Waterfall background, it failed when I placed the pointers at the end of the table. However, if I use it to overwrite BG 0x1 (the extra Dark-type BG) I can load it, and it works perfectly fine as far as I can see. Which makes me think there is some limiter that is preventing the game from loading more than 0x1A (26) backgrounds, in Ruby at least. Unfortunately, I have no idea how to go about finding limiter bytes. If someone can explain the process to me, I'd be more than willing to do it myself.
Edit: Wow, I even forgot what I originally wanted to post (my Flame Charge animation bytes, and my adapted Gen 4 flame sprites):
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 0E E1 02 1D 08 04 20 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 02 94 96 3D 08 03 03 00 00 00 00 32 00 04 04 0F

Flame Sprites.png
Edit 2: Here are some more animated background commands:
Animated Psychic : 0E E7 61 1D 08
High-power BG command: 0E E9 85 1C 08
Flying type BG : 0E FB 61 1D 08
As usual, all of them are for Ruby.

Xencleamas

Suddenly lurking in the shadows...

Male
Asgard
Seen January 21st, 2019
Posted August 7th, 2018
460 posts
5.8 Years
Wow! Very interesting! This really helped me a lot and I get to create on my own. :)

Draco Meteor (noGIF):

I like it a lot. :)

Leaf Storm (noGIF):

Well, kinda bit simple for a powerful move. :3

If you want the Hex codes, just download the attachments below:
Attachment 72102
Attachment 72103
Just open it in an hex editor and you got it. :)

Xencleamas Untitled Pokémon Fan Game (Coming Soon!) Untitled Region (Coming Soon!)
Male
Singapore
Seen June 26th, 2018
Posted June 18th, 2018
87 posts
5.8 Years
Here's some more data on the commands/pointers:
To recap, the 0E command not only loads a sprite, but also loads complex movements e.g. the rotating fire of Fire Spin, the Mud-Slap. The 02 command loads a sprite with some basic movements e.g. the moving upwards before falling downwards in a curve of Acid and Water Gun.
So I was intending to create a custom Emerald animation for Acid Spray by using Mud Slap and replacing the mud particles with A6 27, which is the Acid poison particle command. However, the 02 command didn't load the spherical Acid properly, but rather loaded half of it and combined it with the acid droplets. Therefore I was digging through the 02 command's 0x18 bytes to see how to get it fixed. What I found was the structure of the 02 command:
(1st 2 bytes, image data)(Next 2 bytes, palette data)(2 pointers to what should be extracted from the image and used and how to piece it together)(4 00 bytes, still haven't figured out what they do)(2 pointers containing movement data)
Male
Singapore
Seen June 26th, 2018
Posted June 18th, 2018
87 posts
5.8 Years
More interesting information:
I don't really get this one, but it seems that 0A XX YY 00 02 00 00 00 is the command to color a Pokémon (like the white in Mist and the purple in Sludge). The YY byte appears to define what is colored. 04 is opponent's Pokémon, 0F appears to be the whole area (Heat Wave?) Then, a byte follows that decides the limits of the color. 09 appears to be limited to basic red (Flame Wheel), while 0C/0E seems to accept any color. After that, a 00 byte appears, then the color in reverse hex.
Then, extracting data from Mist, the command is 0A 00 08 00 02 00 00 00 0E 00 FF 7F? However, using Flame Wheel's data, changing the bytes to 00 08 crashes the animation..???
Finally, looking at Heat Wave, the command used to color the whole background is 06 02 06 00 00 1F, while the command used to color the sand particles is 06 00 06 00 00 1F. Just a single byte's difference. The structure appears kinda similar, but it IS different, which is weird, since most animations using the same resource usually is the same command. Get the confusion?
The reason why I am posting this now is because it needs to be better researched and finalised before it can become a proper command. Help please?

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
793 posts
5.3 Years
I try to calculate the offset for SHADOW BALL, but I dont know what is the indication that this byte is the last byte for the move SHADOW BALL? How can I identify the end byte of a certain move???
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Female
Seen August 25th, 2017
Posted February 10th, 2016
25 posts
8 Years
Today i was doing some reserach on the script engine of this language and figuered out, how some commands work. I have not worked through them all and yet I dont understand everything the commands do. The list i am posting is for firered german, so the offsets won't fit a english rom, but the way the commands work should be the same


Spoiler:
battle anim engine

cmd0 [u16 a]
loads a animated graphic given in a into objvram and its animation into animation_bank

cmd2 [u32 a] [u8 b] [u8 c] [...]
a seems to be an oam_structure, while b is a flag?
c also shows additional animation which is loaded into animation_bank
this function spawns an OAM from this structure which a certain animation


cmd3 [u32 a] [u8 b] [u8 c] [...]
loads a into ram as a callback
loads b into this callback as status
c shows the amount of additional animation, which is loeaded into animation_bank

cmd4 [u8 a]
seems to delay the next command by a frames

cmd5
delays the script by a number given at 0x02037EE2, must be some kind of "waitstate"

cmd6
nop

cmd7
nop

cmd8
ends the script, as long there is no delay remaining, otherwise it will wait and then end the script

cmd9 [u16 a]
plays a sound/song given in a, as long as 0x02031DD8 == 0 and 0x0203AdFA != 2

cmdA [u8 a]
something very complex, a lot of code, spawns a callback if there is an targeta
a has states from 0-3 (0,2 = players poke as target ;; 1,3 = opps. poke)

cmdB [u8 b]
very similar to cmdA but not so complex
also spawns a callback and clears bits in the OAM structure flags

cmdC [u16 a]
enables blending by setting BLDCNT to 0x3F40 and sets COLEV to a

cmdD
resets BLDCNT and COLEV to 0

cmdE [u32 a]
branches the code to a and places a return adress at 0x02037ED8

cmdF
branches the code to the return adress at 0x02037ED8

cmd10 [u8 a] [u16 b]
places b in the animation_bank, places it with the ID a

cmd11 [u32 a] [u32 b]
branches the code to a if the byte at 0x02037F16 has bit0 set, otherwise it branches the code to b

cmd12 [u8 a] [u32 b]
branches the code to b if the byte at 0x02037F16 == a

cmd13 [u8 a]
branches the code to a

cmd14 [u8 a]
spawns 0x80737B4|1 as callback and sets a as it param 0x8 in RAM
sets byte at 0x02037F17 to 0x1

cmd15
spawns 0x080737B5|1 as callback and sets it param 0x8 to 0xFFFF
sets byte at 0x02037F17 to 0x1

cmd16
halts the code until 0x02037F17 == 0x2

cmd17
halts the code until 0x02037F17 == 0x0

cmd18 [u8 a]
loads a background into the battle from the table at 0x3ADC64 (ID is a, entry length is 0xC)

cmd19 [u16 a] [s8 b]
does a lot of checks with the singed byte b and then seems to play sound a or something like that
maybe b is some modulation for the sound display


cmd1A [s8 a]
does the same thing with a as cmd19 does with b (maybe modulation)

cmd1B [u16 a] [s8 b] [u8 c] [u8 d] [u8 e]
spawns 0x0873C50|1 as callback
sets a transformed value of b (like in cmd19) as param 0x8 in RAM
sets " c " 0xA "
sets abs(d) or 0x0 (if b >= c)as param 0xE in RAM
sets e as param 0x10 in RAM



cmd1F [u16 a]
sets BLDCNT to a




cmd23 [u8 a]
does the same thing as cmdB but doesnt spawn a callback

cmd24 [u8 a]
very similar to cmdB


kittopian

Source engine coder

Lost in a poorly sorted filesystem
Seen February 3rd, 2015
Posted November 28th, 2014
11 posts
9.8 Years
I have recently got back into ROM hacking, and I am now working on a tool to make editing move animations slightly easier by "decompiling" it into some kind of pseudo-scripting 'language'. So far, it seems to work "ok", for instance, fly seems to be parsed nicely:
load ac 27;
load 97 27;
2waybranch f71f2d08 0f202d08;
wait;

However, It seems to "break" very easily, as evident by this move (Vine whip):
load 2f 28;
sound 8f 0;
execute 28fe578 2 2;
delay 0;
nop;
load 4 6;
sound 9b 0;
execute e828598 82 2;
load 0 0;
load 4 6;
unknown2 d152d8 2 5;
load 2 0;
load 0 6;
load 1 0;
it mainly has trouble with 0x02, and 0x03. It may be due to me miscounting the number of arguments it uses. Can someone tell me the number of arguments these "commands" accept? Or a way of "splitting" these commands? Any help will be appreciated and thank you for your time.
<Insert content here>
Seen July 3rd, 2015
Posted June 27th, 2015
8 posts
4.5 Years
=
02 24 7B 3E 08 02 05 01 00 SS 00 00 00 YY 00 XX XX 05

Where XX XX is the color you want, YY is the intensity (0C for Giga Drain- 10 replaces the background entirely with the given color), and SS is the speed of the transition (01 for Giga Drain, but I imagine Hyper Beam and other attacks use the same logic with a higher value). To revert the background to normal, place the following:

02 24 7B 3E 08 02 05 01 00 SS 00 YY 00 00 00 XX XX 05 0B 03 0D

The values here do not have to be the same, but I'd advise making the color and intensity the same or it will abruptly change at the start of the transition back.
I used 02 24 7B 3E 08 02 05 01 00 SS 00 YY 00 00 00 XX XX 05 0B 03 0D after the move and The background doesn't revert to normal. It continued colored... What can I do to reverte to normal... please show me a example with a move like tackle or slash!!!! Thanks!!!
Male
Singapore
Seen June 26th, 2018
Posted June 18th, 2018
87 posts
5.8 Years
I used 02 24 7B 3E 08 02 05 01 00 SS 00 YY 00 00 00 XX XX 05 0B 03 0D after the move and The background doesn't revert to normal. It continued colored... What can I do to reverte to normal... please show me a example with a move like tackle or slash!!!! Thanks!!!
Here is an example (Giga Drain), with the colored background bytes in bold:
Spoiler:
00 A3 27 00 2F 27 00 97 27 0A 03 2A 01 0C 0C 08 02 24 7B 3E 08 02 05 01 00 01 00 00 00 0C 00 ED 33 05 19 AD 00 3F 02 08 7C 3E 08 02 04 00 00 00 00 01 00 00 00 04 02 03 F9 89 09 08 05 05 01 00 00 00 05 00 05 00 01 00 05 04 03 0E EC EE 1C 08 05 04 0F 0E C9 56 1D 08 05 02 24 7B 3E 08 02 05 01 00 01 00 0C 00 00 00 ED 33 05 0B 03 0D 08
In this, SS = 01, XX XX = ED 33 and YY = 0C

Hope this helps.

Cataclyptic

Everything I say is a lie

Male
United States of America
Seen May 13th, 2018
Posted August 13th, 2016
56 posts
4.7 Years
Hey, can anyone help me? I'm trying to do a simple animation of Sky Attack in Emerald: either to let both animations run in one turn, or to do the second animation on the first turn to reflect its new in game status. Using some hex, I've learned that the location of the animation is at 2CD17B however I cannot find out which byte tells it to pause the animation until next turn, or which byte is responsible for the second half of the attack.

In the tutorial you say to replace the 08 with a 11 or 0E but there are many of those in the index, and I cannot figure out which one I am supposed to edit (mostly because I can't find out where the animation ends and a new animation for a new move begins). I have already tried to edit some but they just freeze the game when Sky Attack is selected.

If anybody can answer this it would be much appreciated.
Male
Britain
Seen May 4th, 2019
Posted March 23rd, 2019
20 posts
1.6 Years
I've followed the night slash step and it worked fine but when I tried to create a move that would have hyper voice has an animation of hyper voice and a stary background but every time I tried the background would never disappear. Iv'e made sure to input the end bg command and add another 08 but it never worked. If anyone could help me with this it would be greatly appreciated.
Making a Rom Hack it's name is currently under construction like it.
Advertiser Content