Epic Fight

Epic Fight

13M Downloads

[Suggestion]: Play speed of imported animation changing

GLMaster19 opened this issue ยท 3 comments

commented

Have you checked if there's any similar suggestions ?

  • I checked, there are no similar suggestions that have been reported.

Are you using the latest Epic Fight ?

  • I checked I'm using latest Epic Fight version.

Is this suggestion related to another mod? (i.e: add animations for X mod)

  • This is related to other mods.

The mod

No response

Minecraft Version

1.20.1

What's your suggestion?

Hello, dear developers!
Actually, I don't know if this mechanics can be implemented or not, and if this in general can be fixed somehow. So first I will describe the problem.

When you, through the datapack editor, import an animation, it works as it should, but its playback speed is too fast to use. As one of the people in the Patreon chat found out, this applies to animations from EF addons - they use the .addProperty property, thus setting the animation playback speed. But since there is no way to change any of the animation settings after importing, it ends up looking very unnatural.

Is there any way to add an option to change some animation settings? Or is it not possible?

Thank you in advance for your answer. And a huge thank you for your labors and work.

commented

There is a feature that hasn't been implemented in datapack editor screen yet. You can add a property for your imported animation with this element:

  "properties": {
     "basis_attack_speed": 1.6
  },

As you mentioned, this property will make the animation play speed x1.0 when you wield a weapon with an attack speed of 1.6. I didn't have enough time to make configurable properties screen for animation so for now, you have to manually add this in your datapack file.

commented

There is a feature that hasn't been implemented in datapack editor screen yet. You can add a property for your imported animation with this element:

  "properties": {
     "basis_attack_speed": 1.6
  },

As you mentioned, this property will make the animation play speed x1.0 when you wield a weapon with an attack speed of 1.6. I didn't have enough time to make configurable properties screen for animation so for now, you have to manually add this in your datapack file.

Thank you very much for an answer! Good to know that this thing existing.
So, don't know will you reply to this or not, but which properties I can add to an imported animations, besides of play speed?

Just a few, for a novice. Want to send more info to a Patreon chat about this.

Edit: also, where I need to put those properties? Sry for this dumb question.

commented

You can put the properties tag inside your animation file created by datapack editor. For example, you can setup the bokken animation (which is an official example datapack of weapon type with custom animations) by basis speed 1.6 with the below

{
  "constructor": {
    "invocation_command": "..."
  },
  "properties": {
     "basis_attack_speed": 1.6
  },
  "animation": [
    {
      ...
    }
}

For now, you can only add primitive-typed properties. You can check the whole properties you can import in here and what they do: https://github.com/Yesssssman/epicfightmod/blob/1.20.1/src/main/java/yesman/epicfight/api/animation/property/AnimationProperty.java

p.s. The constructor accepting Codec as a parameter are the properties you can add in animation .json
image