Better Combat Animations in Yes Steve Model
Starting from version 2.6.0, Yes Steve Model (YSM) features improved compatibility with the Better Combat mod. Weapon swings now properly trigger YSM animations without first-person head clipping issues, and creators can use new Molang variables to build custom, dynamic combat animation controllers.
How Better Combat Works with YSM
When you attack using the Better Combat mod, YSM does not use separate animation files by default; instead, it reuses the standard swing animation found in your model's arm.animation.json file.
Since YSM version 2.6.0, major compatibility bugs have been resolved. Swinging a weapon smoothly triggers the default swing animation, and the player's head will no longer block your view in first-person perspective. Why this matters: your existing models will work with Better Combat out of the box, even before you write any custom combat logic.
New Molang Variables for Combat (2.6.0+)
To help you replace the generic arm swing with detailed directional slashes and stabs, YSM 2.6.0 introduces five new Molang variables specifically for driving animation controllers.
You can combine these variables inside your controller conditions to check if the player is attacking, which hand they are using, and how far along the swing is.
- ctrl.bcombat_attack_animation: Outputs the exact name of the Better Combat attack animation currently playing.
- ysm.swinging: A boolean that returns true whenever the player is actively swinging.
- ysm.swing_time: An integer returning the swing tick counter while the player swings (usually stays under 10).
- ysm.swinging_arm: An integer indicating which arm is swinging. It returns 0 for the main hand and 1 for the off-hand.
- ysm.attack_time: A float representing the attack wind-up progress from 0 to 1. The actual hit triggers when this value reaches 1.
Understanding Better Combat Animation Names
The ctrl.bcombat_attack_animation variable tells your YSM animation controller which move Better Combat is currently performing. Because vanilla Better Combat animation names do not distinguish between main hand, off-hand, or specific weapon types, you should combine this variable with ysm.swinging_arm and other queries to make precise transitions.
In the base Better Combat mod (which covers basic weapons like swords, axes, and tridents), you will commonly match against three primary values:
- one_handed_slash_horizontal_right: A single-handed horizontal slash moving from right to left.
- one_handed_slash_horizontal_left: A single-handed horizontal slash moving from left to right.
- one_handed_stab: A single-handed forward thrust or stab.
Checking Animation Names In-Game
If a player installs add-on mods for Better Combat, weapons may trigger many custom animation names not listed above. You can inspect the exact animation name playing in real time by running the YSM client watch command in-game.
Swing different weapons while this command is active to see the exact string you need to match in your animation controller.
/ysmclient watch var ctrl.bcombat_attack_animationQuestions
Which version of YSM do I need for Better Combat support?
You need YSM version 2.6.0 or newer. This version fixes first-person head obstruction bugs, makes default swing animations trigger properly, and adds the Better Combat Molang variables.
What happens if my model does not have a custom Better Combat controller?
Better Combat will automatically fall back to using the default swing animation inside your model's arm.animation.json file.
How can I tell if the player is swinging with their off-hand in Better Combat?
The ctrl.bcombat_attack_animation variable does not tell you which hand is used. Check the ysm.swinging_arm variable alongside it: 0 means main hand, and 1 means off-hand.
How do I find the animation names for modded weapons added by Better Combat add-ons?
Run the command /ysmclient watch var ctrl.bcombat_attack_animation in Minecraft and swing the weapon. The current animation string will be displayed on your screen.