Where is the animation for ranged attacks defined?

TLDR: i want to make a throwing axe. i took the bow, i replaced it with an axe. i took the arrow. i replaced it with an axe.

throwing_axe.zip (10.8 KB)

result: hold up an axe, pull back, fire a second axe from the axe. amusing, but not entirely the plan.
i’d like to use the normal one handed chop animation, that should be a “good enough” animation for throwing for now, and make the axe spin in mid air (would need to find out how but i know its possible)

…where do i stop it bow-animating its ranged attack?

Did you copy the bow, or the recurve bow? :thinking:
In bow.json it’s pretty clear:

"stonehearth:combat:ranged_attacks": [
         {
            "name": "archer_1h_shoot",
            "effect": "archer_1h_shoot",
            "active_frame": 41,
            "cooldown": 0,
            "priority": 0
         }
      ],
      "stonehearth:combat:idle:ready": {
         "name": "archer_1h_idle"
      },

Notice the stonehearth:combat:ranged_attacks. The “effect” points to the name of the effect file that contains the animation (it’s inside stonehearth\data\rigs\entities\humans\effects). So you can change it to the name of the effect file that contains the other animation (but the chop effect attaches the axe manually, you might need to add a new one based on it if you want to use your custom axe instead of the default one, or just create your own animation).
The active frame is the moment where the arrow is thrown, I guess, it depends on each animation (for melee is the moment where the weapons would collide with the enemy, sparks appear at that moment).

1 Like

Yeah I think I see where I went astray, this helps, thanks Relyss

1 Like