Rough animation hacking
What you will need:
A hexeditor (preferably HxD, I tell you how to optimize it for almost all of melee's files later) (download:
https://mh-nexus.de/en/hxd/)
GCR (For opening your iso, you can get it here:
https://www.dropbox.com/s/kh5npupjkqymtb4/gcr_v1.0.rar?dl=0)
Optimizing HxD:
View -> Bytes per row: 32
View -> Byte group size: 4
Reason for doing this: Almost ALL of melee's code is grouped into this size, with all floating points being this size. The change in bytes per row is to see more byte groups with a huge change in the size of the byte group.
Now onto the actual stuff:
Extract a characters Pl**Aj.dat using GCR. You prob know how to do this right? I can help you with it if you need it.
Leave GCR open, you'll need it.
Open it up in HXD
Organization:
What you are going to want to do is open up a empty notepad (You'll need it for temporarily storing data)
Look through Crazy Hand Subactions (All) list for the subaction you wish to edit. Take note of its string name (Attack10, AttackAirF, Walldamage, CatchDash, TurnRun, etc...)
In HXD press ctrl+f -> search direction: ALL; Datatype: Text-string
and search the string name of the subaction
Upon the first result you will see something like PlyCHARACTER5K_SHARE_ACTION_Subactionstringname_figatree
This is the header of the animation. This will ALWAYS take up two "lines" in HxD if you formatted HxD correctly, otherwise it takes up 0x40. If the stringname doesn't take up the entire two lines the end will be padded with FF's.
After these FF's are the start of the animation.
Precautions:
Make a backup of Pl**Aj.dat just in case
Write down the starting offset of the animation as 0xSTARTHEXADDRESS-
(We will fill in the other portion later)
Begin to highlight from that position until the 00000000 before the next animation header you see.
Write down the end offset in notepad as 0xSTARTHEXADDRESS-ENDHEXADDRESS:
What you just wrote was the animation offsets and will be referred as such from this point on.
paste the entire contents you highlighted afterwards, if you ever screw up you can just revert the entire animation.
Throw some newlines(Enters) after that. Its always good to have some spare enters at the bottom of the notepad so you don't have to scroll sideways all the time.
Breakdown of the animation:
The animation is split into thre main parts:
The header(We went over this earlier)
the body,
and the footer.
The body is the main part of the animation responsible for all the good stuff, it begins right after the header.
The footer will look something like
00000ABC 00000AC8 00000AD4 00000AE0 00000AEC 00000AF8 00000B04 00000B10
00000B1C 00000B28 00000B34 00000B40 00000B4C 00000B58 00000B64 00000B70
00000B7C 00000B88 00000B94 00000BA0 00000BAC 00000BB8 00000BC4 00000BD0
00000BDC 00000BE8 00000BF4 00000C00 00000C0C 00000C18 00000C24 00000C30
00000C3C 00000C48 00000C54 00000C60 00000C6C 00000C78 00000C84 00000C90
00000C9C 00000CA8 00000CB4 00000CC0 00000CCC 00000CD8 00000CE4 00000CF0
00000CFC 00000D08 00000D14 00000D20 00000D2C 00000D38 00000D44 00000D50
00000D5C 00000D68 00000D74 00000D80 00000D8C 00000D98 00000DA4 00000DB0
Its point is unknown, previous experiences make me conclude it is pointless for anything I would need (no documented effects of changing it)
However, There is a common pattern to the footer
The footer is broken down into 8 collumns, with each collumn containing a number
as you move down a collumn, the number increments by 0x60.
That is what is known.
Now onto actual animation hacking.
In the body highlight a random section of hex of about 3 lines (0x60)
copy it, create an animations offsets in notepad for it (0xSTARTHEXADDRESS-ENDHEXADDRESS: HEX)
(Do not immediately save after performing the following)
Right click on the highlighted hex
Click fill selection -> Random Bytes -> Ok (this will be referred to as random byting)
Now still do not save
Highlight the now red text
Ctrl-S (Save)
Open up GCR(alt+tab)
Right click on the Pl**AJ.dat and import the now edited file
Play it in dolphin and use the desired move
Take note of the bones that are moving
If you want for example, to perform an upper-cut of some sort, check to see if the arms are moving. If they are GREAT(Note, crazy flailing if it includes the bones desired is OK), Move onto, Process of elimations:
Otherwise, you ran out of luck. Open up hexedit and paste over the still highlighted region the original hex and try again.
Process of elimnation:
Great you identified a bone you want to change, "What do I do now?".
So you have the region you changed to get the desired result, paste the original hex over the highlighted region.
Split that region into several sub-regions, making an animation offset for each.
Go through each subregion, random byting the region (still following the optimization steps with highlighting regions)
and loading dolphin up with the changes.
Use the process of elimination to determine which sub-region contains the hex that controls the desired bone.
Once you have the determined the sub-region, split that up into sub-sub-regions until you find the exact hex that controls it.
You now have what you want.
Fiddle with that as you please.
Notes:
Some of the animation body can't be random byted as it contains op-code read by the game and will cause a crash. Its no big deal, just revert the hex and skip over it.