Skip to content

Text keys

Text keys are timed markers stored in a KF file’s NiTextKeyExtraData block. In NifSkope, each entry in the Text Keys array has a Time (in seconds from the start of the animation) and a Value (the key text).

Fallout: New Vegas already uses text keys such as Start, End, Hit, Eject, Attach, Detach, Blend:, m:, a:, and prn:. kNVSE adds new text keys and extends a few vanilla keys.

Examples on this page write each key as time: value:

0.0: Start
0.5: loadAmmo
1.2: End
  • Match the spelling and capitalization shown below. While kNVSE parses several keys case-insensitively, some checks are strictly case-sensitive (including noFix, noBlendSmoothing, allowFirstPerson, allowClampInLocomotion, fDestFrame, and parts of respectEndKey, noBlend, and interruptLoop).
  • Stay under 260 characters per key. Any text key longer than 259 characters crashes the game when the KF loads. This is a game engine limit.
  • Timed keys trigger on playback. Keys that act at a timestamp (Script:, scriptLine:, SoundPath:, loadAmmo, unloadAmmo, and burstFire Hit/Eject keys) fire when playback reaches that timestamp and fire again each time a looping animation wraps around. Keys placed before the animation’s starting time do not fire.
  • Editing keys from scripts: SetAnimTextKeys, AddAnimTextKey, and RemoveAnimTextKey modify a KF’s keys at runtime for future plays (plays already running keep their original keys). Note that AddAnimTextKey and RemoveAnimTextKey do not re-parse vanilla engine keys (Start, Hit, End), weaponSpace is cached until the weapon reloads, and blendToReloadLoop remains active for the session once used.

kNVSE keys with arguments use one of two formats:

  1. Flexible-argument keys (aimPitch, weaponSpace, spawn, despawn, blendCurve, blendInCurve, blendOutCurve, loadAmmo, unloadAmmo, anchor, anchorTo):
    • Format: name or name: arg1, arg2, ...
    • The colon is optional (loadAmmo 2 and loadAmmo: 2 are identical), and spaces around the colon or commas are ignored.
  2. Colon-prefix keys (Script:, scriptLine:, SoundPath:):
    • The colon must appear immediately after the key name with no space before it (Script: MyFunc, not Script MyFunc).

Use respectEndKey (or its alias respectTextKeys) in a player 1st-person animation so that the 1st-person KF controls action timing and blend times while in 1st person.

By default, Fallout: New Vegas drives firing, reloading, drawing, and holstering timing from the 3rd-person animation even when the player is in 1st person. If your 1st-person KF has different Hit, Eject, Attach, Detach, or End times than the 3rd-person KF, gameplay events will be out of sync with the 1st-person visuals. Adding respectEndKey copies the 1st-person KF’s key times and blend times to the player’s 3rd-person animation while in 1st person. NPCs and 3rd-person play are unaffected.

0.0: Start
0.0: respectEndKey
0.4: Hit
0.5: Eject
0.9: End

kNVSE can automatically repair common mistakes in respectEndKey KFs; see bFixWrongAKeyInRespectEndKeyAnim, bFixWrongPrnKey, and bFixMissingPrnKey.

Alias for respectEndKey.

Disables blending both into and out of the animation so it cuts immediately, and disables blend smoothing on that animation (just like noBlendSmoothing). Works for any actor in 1st and 3rd person.

0.0: Start
0.0: noBlend
1.0: End

Opts an animation out of bBlendSmoothing and fBlendSmoothness so it uses vanilla engine blending. Use this on animations that depend on vanilla blend behavior.

0.0: Start
0.0: noBlendSmoothing
1.0: End

Unless a KF contains noFix, kNVSE automatically adds noBlendSmoothing to:

  • meshes\characters\_1stperson\locomotion\male\pipboy.kf
  • meshes\characters\_1stperson\locomotion\female\pipboyfemale.kf
  • Any KF whose path contains B42Inject, B42Interact, or pipboyholopanel_animations

Sets the easing curve for blending both into and out of the animation (by default, the game blends at a constant rate). Works with or without bBlendSmoothing.

blendCurve: <curve>

Available <curve> values (case-insensitive):

Curve Shape
default Vanilla engine blend (affected by fBlendSmoothness).
linear Strictly linear blend (bypasses fBlendSmoothness).
smooth Smoothstep (slow start and slow end).
inSine, inQuad, inCubic, inQuart, inExpo, inCirc Slow start, fast end.
outSine, outQuad, outCubic, outQuart, outExpo, outCirc Fast start, slow end.
inOutSine, inOutQuad, inOutCubic, inOutQuart, inOutExpo, inOutCirc Slow start and slow end.
bezier x1 y1 x2 y2 Cubic Bézier curve (same parameters as CSS cubic-bezier()). Each value must be between 0 and 1; commas between values are optional.

Overshooting curves (elastic, back, bounce) are not supported. An unrecognized curve name or missing argument is logged to kNVSE.log and ignored.

How curves are chosen:

  • You can place multiple curve keys along an animation’s timeline. Each key stays in effect from its timestamp until the next curve key for that direction.
  • When a blend starts, kNVSE checks the key active at the animation’s current timestamp. For example, placing blendOutCurve near the end of a reload affects the normal end of the reload, without affecting an early reload cancel.
  • During a transition between two animations, the incoming animation’s blendInCurve (or blendCurve) takes precedence over the outgoing animation’s blendOutCurve (or blendCurve).
0.0: Start
0.0: blendInCurve: bezier 0.25, 0.1, 0.25, 1
0.0: blendOutCurve: outQuad
1.5: blendOutCurve: inOutSine
2.0: End

Same as blendCurve, but only applies when blending into the animation. If placed at the same timestamp as a blendCurve key, blendInCurve takes precedence.

0.0: blendInCurve: outCubic

Same as blendCurve, but only applies when blending out of the animation. If placed at the same timestamp as a blendCurve key, blendOutCurve takes precedence.

0.0: blendOutCurve: inOutQuad

Place blendToReloadLoop in a looping reload’s start animation (ReloadWStart through ReloadZStart) to prevent the engine from briefly cutting back to the aim pose between the start animation and the reload loop. kNVSE already does this for every looping reload while bBlendSmoothing is on, so the key only matters with it off. For the player in 1st person, placing this key in the 1st-person reload start covers the 3rd-person skeleton as well.

0.0: Start
0.0: blendToReloadLoop
0.6: End

Sets the starting timestamp (in seconds) that the animation jumps to the next time the engine blends into it via BlendFromPose. Put the target frame time in the text key’s Time field.

fDestFrame is one-shot: once consumed by a blend, kNVSE resets its timestamp so subsequent plays start normally. This key is most commonly managed from scripts using SetAnimDestFrame.

0.45: fDestFrame

Lets the player fire again before the current animation finishes. Once playback passes the allowAttack timestamp (while the animation is actively playing, not blending in or out), the player can attack to interrupt the rest of the animation.

Applies to the player only, using the KF for the currently active camera view. If multiple allowAttack keys exist in the KF, the first one is used.

0.0: Start
0.6: allowAttack
1.2: End

Place interruptLoop in an automatic weapon’s AttackLoop or AttackLoopIS animation (player only) so the loop does not have to play to its end before the next shot or a reload can start:

  • Once the animation has played for the weapon’s shot interval, the player can fire again or reload immediately.
  • When the magazine reaches 0 rounds, the player returns directly to aiming instead of finishing the loop.
0.0: Start
0.0: interruptLoop
0.4: End

Place burstFire in an attack animation to fire a shot at every Hit key and eject a casing at every Eject key, rather than only the first of each.

  • Works for both the player (using the active camera view’s KF) and NPCs.
  • Firing stops automatically if the magazine runs empty or a reload starts (unless the player is in god mode).
  • Any additional Hit key placed after the last extra Eject key ejects its own casing automatically. If the KF has only one Eject key total (handled by the engine for the first shot), every subsequent Hit key ejects its own casing.

Example of a 3-round burst animation:

0.00: Start
0.00: burstFire
0.10: Hit
0.15: Eject
0.20: Hit
0.25: Eject
0.30: Hit
0.35: Eject
0.60: End

In addition to standard attack timing and burstFire, kNVSE reads Hit in automatic weapon attack loops (AttackLoop, AttackLoopIS, and their Up/Down variants) to support open-bolt weapons:

  • The first shot of a burst is held until the attack loop reaches the Hit key.
  • Subsequent shots in the same burst follow at the weapon’s normal fire rate.
  • Works for both the player (active camera view) and NPCs.
0.00: Start
0.08: Hit
0.20: End

In addition to standard casing ejection and burstFire, kNVSE reads Eject in automatic weapon attack animations (when burstFire is not present) to synchronize shell casing ejection with the animation:

  • Instead of ejecting immediately when a shot fires, kNVSE delays casing ejection until the animation reaches the Eject key (wrapping around the loop if Eject is earlier in the loop than the shot).
  • Works for both the player (active camera view) and NPCs.
0.00: Start
0.05: Eject
0.15: End

Loads rounds into the actor’s magazine at the key’s timestamp. Works for the player and NPCs, and can be used in reload or non-reload animations.

loadAmmo
loadAmmo: <rounds>
  • loadAmmo (no argument) fills the magazine to capacity, or to the total matching ammo carried if that is lower.
  • loadAmmo: <n> adds n rounds (a positive whole number), up to magazine capacity and carried ammo.

Rounds loaded into the magazine are part of the actor’s carried ammo, so total inventory ammo count does not change. For the player, only the keys from the camera view active when the animation started take effect (switching POV mid-reload does not switch key sets).

Behavior in reloads:

  • Standard reloads: Adding a loadAmmo key stops the game from refilling the magazine at the start of the reload. If the reload is cancelled before the loadAmmo timestamp, the magazine keeps its previous count.
  • Looping reloads (shotguns, lever-action rifles): Placing loadAmmo in the shell-insertion loop replaces the game’s default 1-round load. For example, loadAmmo: 3 loads 3 rounds per animation loop. For NPCs, looping reloads require bFixNPCLoopingReloads.
0.0: Start
1.1: loadAmmo
1.6: End

Removes rounds from the actor’s magazine at the key’s timestamp. The removed rounds remain in the actor’s inventory.

unloadAmmo
unloadAmmo: <rounds>
  • unloadAmmo (no argument) empties the magazine to 0.
  • unloadAmmo: <n> removes n rounds (clamped at 0).

Note that unloadAmmo by itself does not suppress the game’s start-of-reload magazine refill. Pair it with loadAmmo in reload animations.

Example of dropping the old magazine at 0.3s and inserting the new one at 1.1s:

0.0: Start
0.3: unloadAmmo
1.1: loadAmmo
1.6: End

Overrides automatic hand detection for bFixWeaponHandBlend from the key’s timestamp until the next weaponSpace key. Requires both bBlendSmoothing and bFixWeaponHandBlend.

weaponSpace: right|left|body|auto|off
Value Meaning
right Weapon is held by the right hand.
left Weapon is held by the left hand.
body Weapon is held by neither hand (blend relative to the body, useful for tosses or hand-offs).
auto Resume automatic hand detection (the default before the first key).
off Opt this animation’s share of any blend out of bFixWeaponHandBlend.

right, left, and body require the KF to contain left-hand bone tracks; off works on any animation.

Example of a reload where the left hand holds the rifle while the right hand works the bolt:

0.0: Start
0.2: weaponSpace: left
0.9: weaponSpace: right
1.4: End

Calls a user-defined function (UDF) script on the actor at the key’s timestamp. The colon must immediately follow Script.

0.5: Script: MyReloadCallback

The script is looked up by its EditorID. If the EditorID does not exist or is not a script, kNVSE logs an error and ignores the key.

Inside the called script, you can use ThisAnim and ThisAnimDir to get the playing KF’s path and folder.

Player 1st/3rd-person behavior: Because the player plays both a 1st-person and 3rd-person animation at the same time, keys in the hidden view only fire if the currently visible view’s animation has no Script: keys of its own. This avoids firing the script twice while letting 1st-person-only or 3rd-person-only KFs still trigger their scripts in either view.

Compiles and runs inline NVSE script code on the actor at the key’s timestamp. The colon must immediately follow scriptLine.

0.5: scriptLine: ModAV Variable01 1
0.9: scriptLine: if GetAV Variable01 > 5%r SetAV Variable01 0%rendif
1.0: scriptLine: Print %qReload finished%q
  • Use %r for a line break and %q for a double quote (").
  • Local variable declarations (ref rActor, int iCount, etc.) cannot be used in scriptLine:; call a UDF with Script: instead if you need local variables.
  • Keep the entire text key under 260 characters.
  • Compile errors are logged to kNVSE.log.
  • Uses the same player 1st/3rd-person fallback rule as Script: (tracked independently from Script:).

Plays a sound file or a random sound from a folder at the key’s timestamp. The colon must immediately follow SoundPath.

0.3: SoundPath: fx\wpn\mymod\magout.wav
1.0: SoundPath: fx\wpn\mymod\magin
  • Paths are relative to Data\Sound\.
  • Specify a .wav or .ogg file directly, or omit the extension to treat the path as a folder (kNVSE picks a random .wav or .ogg from that folder when the animation starts).
  • For the player in 1st person, the sound plays in 2D (non-positional); in 3rd person and for NPCs, it plays in 3D at the actor’s position. For the player, only the visible camera view plays SoundPath: keys.

When bMovementTransitions or bAimTransitions plays a _start or _stop transition KF, the vanilla End text key marks the handover point:

  • A walk/run _start animation transitions into the walk/run cycle at End.
  • A walk/run _stop animation blends into the idle animation at End.
  • An aim _start or _stop animation transitions into the target aim animation at End.

If an aim transition plays backwards (because the player toggled aim partway through), timed kNVSE keys (SoundPath:, Script:, scriptLine:, loadAmmo, unloadAmmo, burstFire) are skipped while playing in reverse.

Allows a 3rd-person walk/run _start or _stop animation to play on the player’s 3rd-person skeleton while the player is in 1st person.

By default, kNVSE skips 3rd-person movement transitions in 1st person so their root motion does not shift the camera unexpectedly when the 1st-person arms do not animate with them. Transition KFs in _1stperson folders do not need this key.

0.0: Start
0.0: allowFirstPerson
0.4: End

Allows a movement override (Forward through TurnRight) exported with the Clamp cycle type to load and play as a looping animation. Normally, kNVSE rejects non-looping movement overrides (except _start and _stop transitions, which allow Clamp automatically).

0.0: Start
0.0: allowClampInLocomotion
0.8: End

Rotates spine bones on a 3rd-person skeleton to follow the actor’s vertical aim pitch, so a single animation can aim up and down without separate Up/Down KFs. Requires bBlendSmoothing. Applies to 3rd-person skeletons only (player in 3rd person and NPCs).

aimPitch
aimPitch: <bone> <share>, <bone> <share>, ...
  • Without arguments, kNVSE splits the pitch evenly (1/3 each) across Bip01 Spine, Bip01 Spine1, and Bip01 Spine2.
  • With arguments, list up to 16 <bone> <share> pairs separated by commas. The last space-separated word in each entry is the numeric share, so bone names containing spaces work naturally. Shares summing to less than 1.0 rotate the upper body by a fraction of the actor’s pitch.
  • Only the first aimPitch key in a KF is read.
  • 3rd-person aim _start/_stop transitions automatically apply default aimPitch unless they define their own aimPitch key.
0.0: Start
0.0: aimPitch: Bip01 Spine1 0.5, Bip01 Spine2 0.5
0.5: End

Vanilla movement morph keys (such as m:L and m:R marking left and right foot plants) keep footsteps synchronized when switching between movement animations.

With bBlendSmoothing enabled, bFixMovementMorphKeys keeps m: sync working whenever two looping movement animations contain the same set of m: keys, even if they animate different numbers of bones or begin on different m: keys.

0.00: Start
0.15: m:L
0.55: m:R
0.80: End

Temporarily attaches a NIF mesh or a copy of an existing node from the actor’s 3D (such as a weapon’s ##Clip magazine) during an animation, without editing weapon NIFs or skeleton files. Works for the player in both 1st and 3rd person; NPCs play the animation without spawning the mesh.

spawn: <bone>, <mesh>[, <parent>]
  • <bone>: Name of the node to attach the mesh to.
    • If the skeleton does not already have a node with this name, kNVSE adds a new bone as a child of <parent> (default: Weapon). Your KF can animate this bone by name just like any regular skeleton bone, relative to <parent>. If the KF has no animation track for <bone>, the mesh stays at <parent>’s origin.
    • If the skeleton already has an NiNode with this name (such as Bip01 L Hand), kNVSE attaches the mesh directly to that existing node.
  • <mesh>: Either a .nif path relative to Data\Meshes\ (for example, Weapons\2HandAutomatic\ServiceRifle.nif) or the exact name of an existing node on the actor’s 3D to clone (for example, ##Clip).
  • <parent>: Optional parent bone name when creating a new bone. Defaults to Weapon.

Visibility follows the animation’s playback time: nothing appears before the first spawn key, and the latest spawn or despawn key for that bone at or before the current timestamp decides what is shown. Spawning a new mesh on the same bone replaces the previous one. All spawned meshes are automatically removed when the animation ends or is interrupted, and reappear if the animation loops or restarts.

(Note: If you add a new spawn bone at runtime using SetAnimTextKeys, the bone’s KF track will only begin moving after the player next equips a weapon; until then the mesh sits at its parent’s origin.)

Example of spawning a fresh copy of the weapon’s magazine in the left hand during a reload:

0.0: Start
0.4: spawn: NewMag, ##Clip, Bip01 L Hand
1.2: despawn: NewMag
1.6: End

Hides the mesh spawned on <bone> by spawn from this timestamp onward.

1.2: despawn: NewMag

Stabilizes partial-skeleton animations played on top of other animations (for example, a left-arm animation played with ActivateAnim over weapon idles). Because different weapons bend the spine and neck differently, a partial left-arm KF that does not key the spine normally shifts position depending on the equipped weapon. anchor compensates for that spine/neck movement so the listed bones stay in their authored position relative to a reference bone.

Requires bBlendSmoothing. Works for the player (1st and 3rd person) and NPCs.

anchor: <bone>, <bone>, ...
  • List the top-most keyed bone of each chain (up to 16 bones), such as Bip01 L Clavicle. All child bones below each listed bone follow automatically.
  • Only the first anchor key in the KF is read.
  • Author the animation on the skeleton’s rest pose.
0.0: Start
0.0: anchor: Bip01 L Clavicle
0.0: anchorTo: Bip01 Spine2
1.0: End

Sets the ancestor reference bone used by anchor. Only the first anchorTo key in the KF is read, and it has no effect without an anchor key.

Defaults to Bip01 Rotate, which keeps camera movement and walk/run bob affecting the anchored bones in 1st person while removing stance differences from the spine and neck.

0.0: anchorTo: Bip01 Spine2

Opts a KF file out of kNVSE’s automatic KF repairs and auto-applied noBlendSmoothing. Specifically, noFix skips:

0.0: Start
0.0: noFix
1.0: End