Stardew Valley

Stardew Valley

76 ratings
How to Animation Cancel
By Xpliciit
A guide on how to Animation Cancel in Stardew Valley.


Animation Cancelling means tool usage is much faster than usual, saving you the time in the day to tend to your farm, spend more time in the mines or catch that pesky legendary fish you have been looking for!
2
3
   
Award
Favorite
Favorited
Unfavorite
What is Animation Cancelling?
So what even is Animation Cancelling? You might ask. Well technically it is a game developer term or phrase that literally describes what it is, cancelling the current animation that is playing.

Basically, each tool when you use it is just an animation that plays when you press a button and at some point when you swing an axe, it hits a tree. Once the axe animation has hit the tree it then needs to return to the player. Animation Cancelling cuts this animation down to just the necessary part of hitting the tree and allowing you to then start another animation quicker than if you had to wait for the axe to return to the player after hitting said tree.
How is it done?
Animation Cancelling is a standard thing that everybody can do in Stardew Valley by just pressing the default keys that perform the Animation Cancel.

Simply press Right-Shift + Del + R.

Ok cool, but that is too hard to do while also moving the character and trying to keep my hand on the mouse!

Don't worry, I got you!

Lets use a third party software to rebind those keys in game to something easier like the X key.

Step 1

Download AutoHotKey[www.autohotkey.com]

The version of AutoHotKey you will need for this guide to work is v1.1 when given the option.

v2.0 of AutoHotKey changed the scripting language so this guide doesn't work without some changes to the script.

Step 2

Once AutoHotKey is installed basically just close it all down including the tutorial window that should have popped up.

Step 3

Right Click with your mouse anywhere on your Desktop and navigate to New > AutoHotKey Script


Step 4

Name it whatever you want, I named mine Stardew.ahk

Step 5

Right Click to Edit the script you just made, copy this script into the script you just made and save it

#IfWinActive Stardew Valley x:: While GetKeyState("x","P") { sendEvent {LButton Down} sleep 10 sendEvent {LButton Up} sleep 125 sendEvent {r Down}{Delete Down}{RShift Down} sleep 10 sendEvent {r Up}{Delete Up}{RShift Up} } sleep 30 return

Step 6

Run the script by double clicking it, you should see a green H icon on your Taskbar.

You can also Right Click the script on your desktop and Run as Administrator if it does not work by double clicking it.


Step 7

Run Stardew Valley, either start a new game or load a saved game. Technically you can now Animation Cancel but sometimes you can have issues as the X key by default is the Check/Do Action key so you really want to rebind the X key in Stardew Valleys options to something else like Spacebar. Other than that you can now enjoy faster tool usage by pressing or holding the X button.

Watch how it is done!
84 Comments
Suxx 25 Aug, 2024 @ 7:09pm 
Followed the guide, worked well. I did use the 70 delay tho.
Dogon 23 Jul, 2024 @ 10:30am 
This works great but if you want it to work faster like most speedrunners have it set up then I'd recommend lowering the delay. From me briefly messing around with it I've found this to work the best:

#IfWinActive Stardew Valley

XButton2::

While GetKeyState("XButton2","P")

{
sendEvent {LButton Down}
sleep 10
sendEvent {LButton Up}
sleep 70
sendEvent {r Down}{Delete Down}{RShift Down}
sleep 10
sendEvent {r Up}{Delete Up}{RShift Up}
}

sleep 30

return

All this does is change the 125 delay to 70, (I found that with 50 and 60 the animation is cancelled before the tool actually hits when facing down if you wanna mess around with it some more feel free though) and the key to the front mouse side button, you can change the key to whatever i just find that most convenient.
fool 13 Apr, 2024 @ 10:11pm 
Actually, dont do what I first said I found a better way.

using a macro, set it to repeat while holding down. click the plus, hit record keystrokes and input Left click, R+Rshift+DEL. add a 100 ms delay between left click and the command. I set this to my mouse and instead of using left click I can just hold down the button I mapped the micro to. this could probably be tweaked more since ive never made a macro before and I was fucking around.
fool 13 Apr, 2024 @ 9:27pm 
you can use G hub for this, yea. create a macro, record keystrokes, press R + rightshift + del, map that to whatever is easiest for you.
Stiler 12 Apr, 2024 @ 9:21am 
Is it possible using Logitech's G Hub?
mort 24 Mar, 2024 @ 11:50am 
Oh, that's my fault then. Your guide is really helpful anyways, so thank you very much for it!
Xpliciit  [author] 22 Mar, 2024 @ 12:48pm 
The character does interact with objects constantly if you do not rebind the in game key bindings as explained in the guide.
mort 22 Mar, 2024 @ 12:41pm 
I've had issue with my character constantly interacting with objects after I used the script. So, I tweaked it a little bit if anyone else had the same issue:

All it does is it changes the button from X to V and adds a line to press down the C button instead of X.

#IfWinActive Stardew Valley

v::

While GetKeyState("v","P")

{
sendEvent {c Down}
sleep 10
sendEvent {LButton Down}
sleep 10
sendEvent {LButton Up}
sleep 125
sendEvent {r Down}{Delete Down}{RShift Down}
sleep 10
sendEvent {r Up}{Delete Up}{RShift Up}
sleep 10
sendEvent {c Up}
}

sleep 30

return
Calico_Magica 6 Dec, 2023 @ 10:08am 
I did notice it doesn't work when looking down, but it is still incredibly inconsistent when i am facing left or right. I've tried messing with values, but it still only works some of the time
Xpliciit  [author] 6 Dec, 2023 @ 5:26am 
I think if you are facing down, it does not work because the tools have to go alot further to reach the ground for some reason, it works best when going side to side or up.

The code is mostly just a generic tool to do the job automatically rather than manually pressing Right-Shift + Del + R. You can alter the code a little here and there to see if you can improve the timings by increasing or decreasing the 'sleep' numbers.