From the very useful hitbox info in feos' script, this is my conclusion about how melee attacks work:
- The game draws a headbutt hitbox in front of the character when an attack is initiated. If it overlaps an enemy, headbutt, kick and punch are possible outcomes.
- The game then draws a kick hitbox in front of the character, and if it overlaps, kick and punch are possible outcomes.
- The game then draws a punch hitbox, if it overlaps, punch.
- If none of the hitboxes overlap an enemy, a regular projectile is used.
In other words there is still a random element. It is possible to force a punch, but not a headbutt.
http://tasvideos.org/userfiles/info/11501746348848149
More updates to feos' script. The biggest change is the presentation of subpixels - they are just one byte as far as I can tell, not two. Also I changed it to actual value rather than rounded, because I think information is obscured in rounded format. When seeing the actual value, it is obvious that air drag is 9 subpixels per frame, for example.
I was going to change the speed to the same format, but ran into a familiar problem. Due to the way negative numbers are represented in binary, it is not trivial to output as pixels:subpixels. I have a hack/workaround, but it's not pretty, so I'm not posting it yet.
I have tried to locate the charge counter for the weapons, but no success so far.