Molang

YSM Molang reference

Every Molang function and variable you can use in Yes Steve Model animations and controllers, with what it returns and the YSM version that added it. New to Molang? Start with Molang in YSM.

MolangWhat it doesSince
math.piPi (π), constantFixed at 3.141592653589791.1.5
math.eEuler's number (e), constantFixed at 2.718281828459041.1.5
math.floor(value)Round value down to the nearest integer1.1.5
math.round(value)Round value to the nearest integer1.1.5
math.ceil(value)Round value up to the nearest integer1.1.5
math.trunc(value)Truncate value to an integer (rounds towards zero, which rounds up for negative numbers)1.1.5
math.clamp(value, min, max)Clamp value between min and max1.1.5
math.max(x, y)Return the maximum of x and y1.1.5
math.min(x, y)Return the minimum of x and y1.1.5
math.abs(value)Absolute value of value1.1.5
math.exp(value)Exponential function of value with base e ($e^{value}$)1.1.5
math.ln(value)Natural logarithm of value (base e)1.1.5
math.sqrt(value)Square root of value1.1.5
math.mod(value, denominator)Remainder of value divided by denominator1.1.5
math.pow(base, exponent)Return base raised to the power of exponent1.1.5
math.sin(value)Sine of valueInput is in degrees1.1.5
math.cos(value)Cosine of valueInput is in degrees1.1.5
math.acos(value)Arccosine of valueInput value range is [-1, 1], returns radians1.1.5
math.asin(value)Arcsine of valueInput value range is [-1, 1], returns radians1.1.5
math.atan(value)Arctangent of valueInput value range is [-∞, +∞], returns radians1.1.5
math.atan2(y, x)Angle (in radians) between the positive x-axis and the ray from (0,0) to (x,y)1.1.5
math.lerp(start, end, 0_to_1)Linearly interpolate between start and end via 0_to_1Equivalent to: $start + (end - start) \times 0\_to\_1$1.1.5
math.lerprotatee(start, end, 0_to_1)Interpolate angle between start and end via 0_to_1Wraps around to 0 when exceeding 360 degrees1.1.5
math.random(low, high)Return a random number between low and high1.1.5
math.random_integer(low, high)Return a random **integer** between low and high1.1.5
math.die_roll(num, low, high)Return the sum of num random numbers, each ranging from low to highGenerated numbers are **not** integers like normal dice. Use math.die_roll_integer for that.1.1.5
math.die_roll_integer(num, low, high)Return the sum of num random integers, each ranging from low to highGenerated numbers are integers, like normal dice1.1.5
math.hermite_blend(value)Smooth curve interpolation using a Hermite function: $3 \times value^{2} - 2 \times value^{3}$While any valid float is a valid input, this works best in the [0, 1] range1.1.5
math.min_angle(value)Wrap an angle into the equivalent [-180, 180) rangeRemoves extra full rotations from the input angle to keep it within [-180, 180]1.2.0
math.randomi(value)Same as math.random_integerNon-standard naming, for original GeckoLib compatibility only1.1.5
math.roll(value)Same as math.die_rollNon-standard naming, for original GeckoLib compatibility only1.1.5
math.rolli(value)Same as math.die_roll_integerNon-standard naming, for original GeckoLib compatibility only1.1.5
math.hermite(value)Same as math.hermite_blendNon-standard naming, for original GeckoLib compatibility only1.1.5
query.debug_output(arg1, arg2...)Output message to chatOnly works in animation debug mode1.2.0
query.biome_has_all_tags(tag1, tag2...)Check if the player's current biome has all specified biome tagsOnly available in 1.18+ (1.16 lacks biome tags); Use the locate command to check current biome tags2.2.1
query.biome_has_any_tag(tag1, tag2...)Check if the player's current biome has any of the specified biome tagsOnly available in 1.18+ (1.16 lacks biome tags);Use the locate command to check current biome tags2.2.1
query.relative_block_has_all_tags<br>(xOffset, yOffset, zOffset, tag1, tag2...)Check if a block near the player has all specified block tagsThe first three parameters are centered on the player's lower body; max offset is 81.2.0
query.relative_block_has_any_tag<br>(xOffset, yOffset, zOffset, tag1, tag2...)Check if a block near the player has any of the specified block tagsThe first three parameters are centered on the player's lower body; max offset is 81.2.0
query.is_item_name_any<br>(slotType, id1, id2...)Check if the player's equipped item ID matches any of the specified IDsslotType values: chest feet head legs mainhand offhand1.2.0
query.equipped_item_all_tags<br>(slotType, tag1, tag2...)Check if the player's equipped item has all specified item tagsslotType values: chest feet head legs mainhand offhand1.2.0
query.equipped_item_any_tag<br>(slotType, tag1, tag2...)Checks if the player's equipped item contains any of the specified item tags.slotType parameters: chest feet head legs mainhand offhand1.2.0
query.position(value)Returns the entity's position coordinates (accurate to 14 decimal places).0: X coordinate1: Y coordinate2: Z coordinate1.2.0
query.position_delta(value)Returns the difference in the entity's position coordinates since the last animation update (frame rate dependent).0: X coordinate1: Y coordinate2: Z coordinate1.2.0
query.max_durability(slotType)Returns the maximum durability of the item in the specified slot.slotType parameters: chest feet head legs mainhand offhand2.2.1
query.remaining_durability<br>(slotType)Returns the remaining durability of the item in the specified slot.slotType parameters: chest feet head legs mainhand offhand2.2.1
query.actor_countReturns the number of entities within the loaded range.1.1.5
query.anim_timeCurrent animation playback time (seconds), or 0 if not playing.Represents the animation timeline in seconds. For looping animations, it is the total playback duration with no limit.1.1.5
query.life_timeHow long the current animation has played (seconds), or 0 if not playing.Represents the animation's life time; the maximum value is the length of the current animation.1.1.5
query.all_animations_finishedAll animations in the current controller have finished playing.Can only be used inside an animation controller.2.3.0
query.any_animation_finishedAny animation in the current controller has finished playing.Can only be used inside an animation controller.2.3.0
query.head_x_rotationReturns the player's head X rotation angle; defaults to 0.1.1.5
query.head_y_rotationReturns the player's head Y rotation angle; defaults to 0.1.1.5
query.moon_phaseReturns the current moon phase (0-7).1.1.5
query.time_of_dayReturns the time of day.Midnight = 0, Sunrise = 0.25 Noon = 0.5, Sunset = 0.751.1.5
query.time_stampReturns the timestamp of the current world.1.1.5
query.yaw_speedReturns the entity's Y-axis rotation speed.1.1.5
query.cardinal_facing_2dReturns the player's facing direction.Ignores vertical pitch. North = 2.0, South = 3.0, West = 4.0, East = 5.01.1.5
query.distance_from_cameraReturns the distance between the player and the camera.1.1.5
query.eye_target_x_rotationReturns the player's view X rotation angle; defaults to 0.1.1.5
query.eye_target_y_rotationReturns the player's view Y rotation angle; defaults to 0.1.1.5
query.ground_speed [+client]Returns the player's speed. Cannot be synced on the server; use ysm.ground_speed instead.Always non-negative (outputs a positive value even when moving backward, so it cannot distinguish movement direction). Walking is ~1.7, running is ~3.2, flying is 20.1.1.5
query.modified_distance_movedTotal horizontal distance moved by the player (meters).1.1.5
query.vertical_speedReturns the player's vertical movement speed (m/s); upward is positive.Creative mode flight: [-7.5, 7.5] Falling from height: [0, 20]1.1.5
query.walk_distanceReturns the total walking distance moved by the player (meters).1.1.5
query.has_ridertrue if the player is being ridden, otherwise false.1.1.5
query.is_first_persontrue if the player is in first-person view, otherwise false.1.1.5
query.is_in_watertrue if the player is in water, otherwise false.1.1.5
query.is_in_water_or_raintrue if the player is in water or rain, otherwise false.1.1.5
query.is_on_firetrue if the player is on fire, otherwise false.1.1.5
query.is_on_groundtrue if the player is on the ground, otherwise false.1.1.5
query.is_ridingtrue if the player is riding, otherwise false.1.1.5
query.is_sneakingtrue if the player is sneaking, otherwise false.1.1.5
query.is_spectatortrue if the player is in Spectator mode, otherwise false.1.1.5
query.is_sprintingtrue if the player is sprinting, otherwise false.1.1.5
query.is_swimmingtrue if the player is swimming, otherwise false.1.1.5
query.body_x_rotationReturns the player's body X rotation angle; defaults to 0.1.1.5
query.body_y_rotationReturns the player's body Y rotation angle; defaults to 0.1.1.5
query.healthReturns the player's health.1.1.5
query.max_healthReturns the player's maximum health.1.1.5
query.hurt_timePlayer's hurt timer; defaults to 0.1.1.5
query.is_eatingtrue if the player is eating, otherwise false.1.1.5
query.is_playing_deadtrue if the player is dying, otherwise false.1.1.5
query.is_sleepingtrue if the player is sleeping, otherwise false.1.1.5
query.is_using_itemtrue if the player is using an item, otherwise false.1.1.5
query.item_in_use_durationCounts up from 0 to the item's max use duration (in seconds). Defaults to 0.1.1.5
query.item_max_use_durationMax use duration of the item being used (in seconds). Defaults to 0.1.1.5
query.item_remaining<br>_use_durationRemaining use duration of the item being used (in seconds). Defaults to 0.1.1.5
query.equipment_countReturns the number of equipped armor pieces (0-4), excluding held items.Integer, varies with armor count, max 4.1.1.5
query.has_capetrue if the player has a cape, otherwise false.1.1.5
query.cape_flap_amountReturns the cape flap amount. Works even if the player has no cape.0 is fully down, 1 is fully up. Returns weird data, not recommended.1.2.0
query.player_levelReturns the player's experience level.1.1.5
query.is_jumpingtrue if the player is jumping, otherwise false.1.1.5
query.rotation_to_camera(args)Returns the yaw and pitch of the player's camera view.args is 0 or 1. 0 for pitch 1 for yaw2.6.0
ysm.dump_equipped_item(slotType)Outputs equipped item info to the chat. Only works in animation debug mode.slotType options: chest feet head legs mainhand offhand1.2.0
ysm.dump_relative_block<br>(xOffset, yOffset, zOffset)Outputs info of a nearby block to the chat.Only works in animation debug mode.Centered on the player's lower body. Max value for each parameter is 8.1.2.0
ysm.dump_modsOutputs installed mods info to the chat.Only works in animation debug mode.1.2.0
ysm.dump_effectsOutputs active status effects info to the chat.Only works in animation debug mode.1.2.0
ysm.dump_biomeOutputs current biome ID and tags to the chat.Only works in animation debug mode.1.2.0
ysm.mod_version(modid)Returns the version of a specified mod installed on the client.1.2.0
ysm.equipped_enchantment<br>_level(slotType, id)Returns the level of a specified enchantment on an equipped item. In 2.5.0+, accepts multiple id arguments and returns the sum of their levels.slotType options: chest feet head legs mainhand offhand1.2.0
ysm.effect_level(id)Returns the level of a status effect on the player or arrow.In 2.5.0+, accepts multiple id arguments and returns the sum of their levels.1.2.0
ysm.relative_block_name<br>(xOffset, yOffset, zOffset)Returns the ID of a nearby block.Centered on the player's lower body. Max value for each parameter is 8.1.2.0
ysm.head_yawSame as query.head_x_rotation.1.1.5
ysm.head_pitchSame as query.head_y_rotation.1.1.5
ysm.weatherReturns the current weather.0: Clear, 1: Rain/Snow, 2: Thunder/Blizzard1.2.0
ysm.dimension_nameReturns the current dimension ID.1.2.0
ysm.fpsReturns the game FPS.1.1.5
ysm.input_verticalGets the player's forward/backward movement input.>0 when moving forward, <0 when moving backward, 0 when stationary.2.3.0
ysm.input_horizontalGets the player's left/right movement input.>0 when moving right, <0 when moving left, 0 when stationary.2.3.0
ysm.person_viewReturns the current camera perspective.First-person: 0, Third-person back: 1, Third-person front: 2. Should be compatible with Shoulder Surfing?2.3.1
ysm.is_passengerSame as query.is_riding.1.1.5
ysm.is_sleepSame as query.is_sleeping.1.1.5
ysm.is_sneakSame as query.is_sneaking.1.1.5
ysm.biome_categoryGets the category of the player's current biome.Only available in 1.16.5 and 1.18.2.1.2.0
ysm.is_open_airChecks if the player is in an open-air area.1.2.0
ysm.eye_in_waterChecks if the player's eyes are underwater (used to determine if fully submerged).2.2.1
ysm.frozen_ticksIncreases by 1 per tick when in powder snow (max 140). Decreases by 2 per tick when not, down to 0.2.2.1
ysm.air_supplyAir supply value, max 300.2.2.1
ysm.has_helmettrue if the player is wearing a helmet, otherwise false.1.1.5
ysm.has_chest_platetrue if the player is wearing a chestplate, otherwise false.1.1.5
ysm.has_leggingstrue if the player is wearing leggings, otherwise false1.1.5
ysm.has_bootstrue if the player is wearing boots, otherwise false1.1.5
ysm.has_mainhandtrue if the player is holding an item in the main hand, otherwise false1.1.5
ysm.has_offhandtrue if the player is holding an item in the off-hand, otherwise false1.1.5
ysm.has_elytraReturns true if the player is wearing an elytra, otherwise false1.1.5
ysm.is_riptidetrue if the player is in the Riptide state, otherwise false1.1.5
ysm.armor_valueReturns the player's armor value1.1.5
ysm.is_close_eyesDefaults to false, returns true when the player needs to blinkBlink interval is around 4 seconds. Also returns true when sleeping1.1.5
ysm.rendering_in_inventoryChecks if the model is rendering in a GUI (e.g., model selection screen) Returns true when rendered in these places2.2.1
ysm.rendering_in_paperdollChecks if the model is rendering in the paperdollThe paperdoll refers to the extra player preview in the top-left corner2.3.1
ysm.on_ladderBoolean, checks if the entity is on a ladder2.2.1
ysm.ladder_facingFacing direction of the ladder the entity is climbingOutputs 0-3, corresponding to: South, West, North, East2.2.1
ysm.arrow_countNumber of arrows stuck in the player2.2.1
ysm.stinger_countNumber of bee stingers stuck in the player2.2.1
ysm.texture_nameReturns the name of the texture currently used by the player (including extension)1.2.0
ysm.elytra_rot_xReturns the X rotation angle of the player's elytra1.1.5
ysm.elytra_rot_yReturns the Y rotation angle of the player's elytra1.1.5
ysm.elytra_rot_zReturns the Z rotation angle of the player's elytra1.1.5
ysm.food_levelReturns the player's food level1.1.5
ysm.first_person_mod_hidetrue when the First-person Model mod is installed and the player's head needs to be hidden, otherwise false1.1.5
ysm.has_left_shoulder_parrotChecks if a parrot is perched on the player's left shoulder2.2.1
ysm.has_right_shoulder_parrotChecks if a parrot is perched on the player's right shoulder2.2.1
ysm.left_shoulder<br>_parrot_variantReturns the variant of the parrot on the player's left shoulderVersions 1.19 and earlier do not have string-based parrot color variants, so this variable is only available in 1.20+2.2.1
ysm.right_shoulder<br>_parrot_variantReturns the variant of the parrot on the player's right shoulderVersions 1.19 and earlier do not have string-based parrot color variants, so this variable is only available in 1.20+2.2.1
ysm.attack_damagePlayer's attack damage, inherited from player attributes2.2.1
ysm.attack_speedPlayer's attack speed, inherited from player attributes2.2.1
ysm.attack_knockbackPlayer's attack knockback, inherited from player attributes2.2.1
ysm.movement_speedPlayer's base movement acceleration, inherited from player attributes2.2.1
ysm.knockback_resistancePlayer's knockback resistance, inherited from player attributes2.2.1
ysm.luckPlayer's luck value, inherited from player attributes2.2.1
ysm.block_reachPlayer's block reach distance, inherited from player attributes2.2.1
ysm.entity_reachPlayer's entity reach distance, inherited from player attributes2.2.1
ysm.swim_speedPlayer's swim speed, inherited from player attributes2.2.1
ysm.entity_gravityGravity applied to the player (falling acceleration), inherited from player attributes2.2.1
ysm.step_height_additionAdditional step height (determines the max height a player can step up without jumping and the min height preventing falling while sneaking), inherited from player attributes2.2.1
ysm.nametag_distanceRender distance of the nametag2.2.1
ysm.first_order(name, input, response)First-order system function2.3.0
ysm.second_order(name, input, frequency, coefficient, response)Second-order system function2.3.0
ysm.bone_rot(name).xGets the X-axis rotation value of the specified bone from the previous frame2.2.2
ysm.bone_rot(name).yGets the Y-axis rotation value of the specified bone from the previous frame2.2.2
ysm.bone_rot(name).zGet the Z-axis rotation of a specific bone from the previous frame2.2.2
ysm.bone_pos(name).xGet the X-axis position of a specific bone in model-relative space2.2.2
ysm.bone_pos(name).yGet the Y-axis position of a specific bone in model-relative space2.2.2
ysm.bone_pos(name).zGet the Z-axis position of a specific bone in model-relative space2.2.2
ysm.bone_scale(name).xGet the X-axis scale of a specific bone from the previous frame2.2.2
ysm.bone_scale(name).yGet the Y-axis scale of a specific bone from the previous frame2.2.2
ysm.bone_scale(name).zGet the Z-axis scale of a specific bone from the previous frame2.2.2
ysm.bone_pivot_abs(name).xGet the X-axis pivot position of a specific bone in absolute model space2.2.2
ysm.bone_pivot_abs(name).yGet the Y-axis pivot position of a specific bone in absolute model space2.2.2
ysm.bone_pivot_abs(name).zGet the Z-axis pivot position of a specific bone in absolute model space2.2.2
ysm.entity_typeReturn the type of the currently rendered entity (since rendering is no longer limited to players)Returns player or maid2.4.0
ysm.is_playerWhether the currently rendered entity is a player2.4.0
ysm.is_maidWhether the currently rendered entity is a maid2.4.0
ysm.particle('id', x, y, z, dx, dy, dz, speed, count, life_time)Spawn particles. Parameters match the vanilla particle command, with an extra life_time parameterSee official wiki: [Particle Command](https://minecraft.wiki/w/Commands/particle)2.4.0
ysm.abs_particle('id', x, y, z, dx, dy, dz, speed, count, life_time)Spawn particles. Parameters match the vanilla particle command, with an extra life_time parameterParticles spawned by this function do not rotate with the player's facing direction (spawns in absolute coordinates)2.4.0
ysm.mainhand_charged_crossbowWhether the mainhand is holding a charged crossbow2.4.0
ysm.offhand_charged_crossbowWhether the offhand is holding a charged crossbow2.4.0
ysm.is_fishingWhether the player has cast a fishing bobberAlso applies to maids2.4.0
ysm.perlin_noise(seed, x, y, z)Perlin noise function, returns a float between 0 and 1See Khan Academy's tutorial: [Perlin Noise](https://www.khanacademy.org/computing/computer-programming/programming-natural-simulations/programming-noise/a/perlin-noise)2.4.0
ysm.relative_block_name_any<br>(xOffset, yOffset, zOffset, 'blockName1', 'blockName2'...)Similar to ysm.relative_block_name, but accepts multiple block ID stringsReturns true if at least one ID matches2.5.0
ysm.in_shield_block_cooldownBoolean. Whether currently in the cooldown period after a successful shield blockCooldown lasts 5 ticks2.5.0
ysm.xxa<br/>ysm.yya<br/>ysm.zzaDirectional movement input values (forward, backward, left, right) when riding an entityForward/backward is ysm.zza Left/right is ysm.xxa Usage of ysm.yya is unknown (no value change observed during vertical movement)2.5.0
ysm.play_sound('id', 'sound_name', flags?, volume, pitch)[+new_sound]Play sound. id is the sound identifier, sound_name uses the same format as sound keyframes. flags are special bit flagsWhen set to force play, each execution stops any previously playing sound with the same ID and restarts it from the beginning.2.5.0
ysm.stop_sound('id', global?)[+new_sound]Stop sound. id is the sound identifier2.5.0
ysm.stop_all_sounds(global?)[+new_sound]Stop all sounds played via Molang2.5.0
ysm.block_lightBlock light level at the entity's feet0-152.5.0
ysm.sky_lightSky light level at the entity's feet0-15, 15 when fully exposed to the sky2.5.0
ysm.mouse(keycode) [+client]Detect mouse button stateEnter keycode: [Mouse button numbers](https://www.glfw.org/docs/latest/group__buttons.html)2.5.0
ysm.keyboard(keycode1, keycode2, ...) [+client]Detect keyboard key stateEnter keycode: [Key numbers](https://www.glfw.org/docs/latest/group__keys.html). Supports 1 or more arguments. When multiple arguments are provided, returns true if any of the keys is pressed2.5.0
ysm.time_deltaTime interval between two frames2.5.0
ysm.sync(int1, int2, ...)Actively sync data to the server. Refer to the custom functions section for details2.5.0
ysm.ground_speed2Return player speedBoth this and query.ground_speed represent character speed, but this value syncs between players on the server.Returns a slightly larger value than query.ground_speed2.5.1
ysm.hit_target_idReturn the ID of the block or entity the crosshair is pointing atReturns an empty string if pointing at nothing2.6.0
ysm.hit_target_typeReturn the target type the crosshair is pointing atReturns block for blocks Returns entity for entities Returns an empty string if pointing at nothing2.6.0
ysm.swingingBoolean. Returns true when the player is swinging their arm2.6.0
ysm.swing_timeInteger. Returns the swing tick count when the player is swinging, usually under 102.6.0
ysm.swinging_armThe swinging arm: 0 for mainhand, 1 for offhandAlways returns 0 when not swinging, so use it together with ysm.swinging2.6.0
ysm.attack_timeFloat. Attack wind-up counter between 0 and 1. Triggers the attack when it reaches 1Simply understood as a pre-attack wind-up counter2.6.0
ysm.on_ground_timeDuration the arrow has been on the ground (in ticks)In-game arrows despawn 1200 ticks (60 seconds) after landing. Resets to 0 if the arrow moves during this time1.2.0
ysm.in_groundCheck if the arrow is in the ground1.2.0
ysm.projectile_ownerReturns the player entity that shot the arrowCan use the -> operator to query its properties ==Currently has a memory leak issue; not recommended==1.2.0
ysm.delta_movement_lengthGets the displacement length of the arrow between two ticks, used to determine speed1.2.0
ysm.is_spectral_arrowChecks if the arrow is a spectral arrow1.2.0
ysm.shoot_item_idItem ID of the weapon that shot this arrowCan be used to distinguish arrows shot from regular bows and crossbows2.3.0
ysm.throwable_itemItem ID of the item-based projectile2.5.0
ysm.hooked_inID of the entity hooked by the fishing bobberEmpty string if none2.5.0
ysm.is_bitingWhether a fish is biting the hookBoolean2.5.0
ctrl.deathtrue when dead2.3.0
ctrl.riptidetrue when triggering Riptide with a trident2.3.0
ctrl.sleeptrue when sleeping2.3.0
ctrl.swimtrue when swimming2.3.0
ctrl.climbtrue when crawling and moving2.3.0
ctrl.climbingtrue when crawling and stationary2.3.0
ctrl.ladder_uptrue when climbing up a ladder2.3.0
ctrl.ladder_stillnesstrue when stationary on a ladder2.3.0
ctrl.ladder_downtrue when climbing down a ladder2.3.0
ctrl.flytrue when flying2.3.0
ctrl.elytra_flytrue when flying with Elytra2.3.0
ctrl.swim_standtrue when treading water (swimming upright)2.3.0
ctrl.attackedtrue when attacked2.3.0
ctrl.jumptrue when jumping2.3.0
ctrl.sneaktrue when sneaking and moving2.3.0
ctrl.sneakingtrue when sneaking and stationary2.3.0
ctrl.runtrue when sprinting2.3.0
ctrl.walktrue when walking2.3.0
ctrl.idletrue when idle2.3.1
ctrl.hold(slotType, id)Usage: ctrl.hold('mainhand', '$minecraft:apple')slotType parameters: mainhand offhand The second parameter is similar to the legacy animation naming: $ for item ID, # for item tag, : for special category2.3.0
ctrl.swing(slotType, id)Usage: ctrl.swing('offhand', '#minecraft:axes')slotType parameters: mainhand offhandThe second parameter is similar to the legacy animation naming: $ for item ID, # for item tag, : for special category2.3.0
ctrl.use(slotType, id)Usage: ctrl.use('offhand', ':eat')slotType parameters: mainhand offhandThe second parameter is similar to the legacy animation naming: $ for item ID, # for item tag, : for special category2.3.0
ctrl.armor(slotType, id)Usage: ctrl.armor('head', '$minecraft:iron_helmet') First parameter options: feet, legs, chest, headslotType parameters: chest feet head legsThe second parameter is similar to the legacy animation naming: $ for item ID, # for item tag, : for special category2.3.0
ctrl.ride(type, id)Usage: ctrl.ride('vehicle', '$minecraft:pig') ctrl.ride('passenger', '$minecraft:pig')type parameters: vehicle passengerThe second parameter is similar to the legacy animation naming: $ for entity ID, # for entity tag, : for special category2.3.0
ctrl.playing_extra_animationWhether the player is playing a wheel animationReturns boolean2.5.0
ctrl.tac_hold_gunWhether the player is holding a TaCZ gun in the main handReturns boolean2.3.0
ctrl.tac_gun_typeType of gun currently held by the player (e.g., rifle, pistol)Returns stringReturns empty string if not holding a gun2.3.0
ctrl.tac_gun_idID of the gun currently held by the playerReturns stringReturns empty string if not holding a gun2.3.0
ctrl.tac_is_fireWhether the player is firingReturns boolean2.3.0
ctrl.tac_is_aimWhether the player is aimingReturns boolean2.3.0
ctrl.tac_is_reloadWhether the player is reloadingReturns boolean2.3.0
ctrl.tac_is_meleeWhether the player is performing a melee attack (bayonet)Returns boolean2.3.0
ctrl.tac_is_drawWhether the player is drawing/switching gunsReturns boolean2.3.0
ctrl.tac_fire_modeFirearm firing modeReturns a string, usually uppercase AUTO, SEMI, or BURST2.6.0
ctrl.im_currentCurrent signal level, range 0~12.6.0
ctrl.im_deltaTime interval since the last note outputUnit: ms2.6.0
ctrl.im_pitchPitch, common range 0~2Exact value depends on the note currently being played2.6.0
ctrl.im_volumeNote intensity (velocity), common range 0~22.6.0
ctrl.im_timeElapsed time since playing startedUnit: ms2.6.0
ctrl.carryon_typeType carried by the player: block, entity, or playerReturns a stringReturns an empty string if carrying nothing2.3.0
ctrl.carryon_is_princessWhether the player is **being** carriedReturns a boolean2.3.0
ctrl.parcool_stateReturns the currently executing parkour actionReturns a stringReturns an empty string if no parkour action is executing2.3.0
ctrl.swem_is_rideWhether the player is **riding** an SWEM horseReturns a boolean2.3.0
ctrl.swem_stateEquestrian action currently performed by the playerReturns a stringReturns an empty string if not riding an SWEM horse2.3.0
ctrl.slashblade_animationName of the Sword Art currently performed by the playerReturns a stringReturns an empty string if no Sword Art is performed2.3.0
ctrl.create_hanging_skyhookWhether the player is hanging on a Create chain drive with a skyhookReturns a boolean2.5.0
ctrl.bcombat_attack_animationBetter Combat attack animationNote: Does not distinguish between main/off-hand or weapon types; requires additional conditions2.6.0
ctrl.iss_animationIron's Spells 'n Spellbooks casting animationReturns a string2.6.0
ctrl.set_beginning_<br>transition_length(second)Script controller only. Sets the animation transition time for the current controllerAccepts 1 parameter: animation transition time in seconds2.5.0
ctrl.set_animation(animation, loop_type)Script controller only. Plays the specified animationAccepts 1~2 parameters. 1st: animation name. 2nd (optional): loop type. Uses the animation's preset loop type if omitted2.5.0
ysm.state_continue<br>ysm.state_stop<br/>ysm.state_pause<br/>ysm.state_bypassConstants, script controller onlySee the custom functions section for details2.5.0
ysm.resetNo parametersImmediately resets the animation controller to its initial state. Abruptly stops any playing animation without smooth transition. Also includes the effect of ctrl.indicate_reload2.5.0
ysm.indicate_reloadReload animationSimilar to ysm.reset, but called before animations like play_once or hold_on_last_frame to reset and replay them.2.5.0
tlm.is_beggingtrue when the maid is begging, otherwise false2.4.0
tlm.is_sittingtrue when the maid is sitting (waiting), otherwise false2.4.0
tlm.has_backpacktrue when the maid is wearing a backpack, otherwise false2.4.0
tlm.favorability_pointMaid favorability pointsReturn value: 0-3842.4.0
tlm.favorability_levelMaid favorability levelReturn value: 0-3842.4.0
tlm.task_idMaid task mode IDReturns a string2.4.0
tlm.scheduleMaid work scheduleReturn values: day, night, all Corresponding to: Day shift, Night shift, All day2.4.0
tlm.activityMaid current activityReturn values: work, idle, resetCorresponding to: Working, Off duty, Sleeping2.4.0
tlm.gomoku_win_countMaid total Gomoku winsCurrently only records Gomoku2.4.0
tlm.gomoku_rankMaid Gomoku rank1-4, ==no 0==2.4.0
tlm.game_statueBoard game statusReturn values: win, lost, or an empty string2.4.0
tlm.backpack_typeMaid backpack IDMaids can equip multiple types of backpacks2.4.0
tlm.is_entityRendering maid entityMaids can be made into statues or garage kits; this variable distinguishes between them2.4.0
tlm.is_statueRendering statueMaids can be made into statues or garage kits; this variable distinguishes between them2.4.0
tlm.is_garage_kitRendering garage kit (figure)Maids can be made into statues or garage kits; this variable distinguishes between them2.4.0
tlm.show_itemItem ID in the maid's display slotThe last slot of the maid's inventory has a special display; this records the item ID in that slot2.4.0
ysm.has_any_curios(type, name...)Checks if the specified Curios slot has any of the specified items equipped. type is the slot type, name is the item ID (supports multiple, same below)name can be omitted to only check if the slot is not empty2.5.0
ysm.has_any_curios_with_all_tags(type, tag...)Checks if the specified Curios slot has an item equipped with **all** the given tagsReturns a booleanNote the s at the end of the function name2.5.0
ysm.has_any_curios_with_any_tag(type, tag...)Checks if the specified Curios slot has an item equipped with **any** of the given tagsReturns a booleanNote there is no s at the end of the function name2.5.0
ysm.dump_curiosOutputs the player's currently equipped Curios info. Only works in animation debug mode.All information about the player's currently equipped Curios2.5.0