Opened 5 years ago

Last modified 5 years ago

#145 new enhancement

Add animation types to Oni

Reported by: Iritscen Owned by: Christian
Priority: minor Component: Daodan/Win
Keywords: Cc:

Description

Delano has pointed out that with additional animation types, we will be able to add new types of animations such as weapons melee moves (throws, disarms, etc.). Slightly paraphrased:

"Throws consist of a Throw and a TargetThrow animation, and the game recognizes which TargetThrow animation it's supposed to execute through the TargetType tag in the Throw animation, and the corresponding type in the TargetThrow animation."

Change History (2)

comment:1 by Delano762, 5 years ago

So to put the entire matter as simply as possible: Is it possible to duplicate existing animation types and add them to the end of whatever list they're stored in? https://wiki.oni2.net/XML:StNA

E.g. so we could copy Thrown17 31 times and have up Thrown states up to Thrown48. Or, we could copy some of the Knockdown types and have, for example, KnockdownBody1, 2, 3, etc. and add new knockdown animations.

Animation types essentially work as sort of slots for TRAMs, that tell the engine what type of animation (Thrown1/2/3/.../17 or Stagger/Hit/Knockdown - Body/Head/Foot etc) should another "starting" animation (one of punch/kick or throw types) trigger.

There are two reasons why we need this:

  1. Geyser is working on extracting Oni 2's knockdown animations, and there's only one unused knockdown type (KnockdownCrouch). That means we can import only one knockdown animation.
  2. I'm working on new types of throws/disarms. There are only 17 "ThrownX" types, which means that with the current list it's possible to cover only 17 cases of throws, and vanilla animations already cover 14 of them, which gives us only 3 unused slots (4 if you count the "Throw" type).

So if we could duplicate the animation types, we could add new knockdown animations, new types of throws and disarms (like Rifle-to-Rifle or Rifle-to-Unarmed throws), and add disarms for Ninjas (I've got a wonky, but reasonable idea on how to make all of the ninja disarms in a short amount of time). The last two are explained in more detail below, if you want.

EXPLANATION ON HOW THROWS RELY ON VARIENTS - YOU CAN SKIP THIS IF YOU WANT:

There are 6 relavant varients (as misspelled in the files) in the game, that are one of the things that define what throw is going to be triggered: Sprint (unused for throws but already proven possible), Combat, RightRifle, RightPistol, LeftRifle, LeftPistol (last two are used by ninjas exclusively).
Each throw is defined by the current varients of the animations the attacker and victim is in. Examples:

  1. Both characters are in Combat varients. Regular throw will be played.
  2. Attacker is in Combat varient (possibly also other varients), victim is in RightRifle. Disarm will be played.
  3. Attacker is in RightRifle (or RightPistol), victim is in RightRifle (or RightPistol). There are no vanilla animations for this case, but this was proven possible.
  4. Attacker is in RightRifle (or RightPistol), victim is in Combat. No vanilla animations for this case as well, but this should be possible as well.
  5. Attacker is in Combat varient (possibly also other), victim is in LeftRifle or LeftPistol. There are no vanilla animations for this case, which is why you can't disarm ninjas, because they use these two varients.

comment:2 by Delano762, 5 years ago

Another note: Experiments conducted so far suggest that there is no additional hardcoded-or-not logic behind the types we want to duplicate. They're essentially slots, numbers in a list, nothing else.

That being said, this doesn't apply to all animation types. All the punch/kick/combo types seem to have input defined for them, but we're not planning on doing anything about them now, and especially in the context of this ticket.

Note: See TracTickets for help on using tickets.