lodoraemon Posted 19 hours ago Posted 19 hours ago (edited) A year ago, I set out to fix the issue where the “knockdown animation” (also known as the action key/PASleeper animation) in SexLab Defeat didn’t work with the Nemesis and Pandora engines. In fact, Nemesis and Pandora's support for pair animations in FNIS is an issue that has been raised but has yet to be addressed by the developers. For a long time, I couldn’t figure out where the problem lay. Thanks to Codex’s help, I was finally able to pinpoint and fix the issue. I’ve included the patch, along with a detailed account of how I resolved the problem, as a reference for anyone who might encounter a similar issue in the future. Please note that I have only tested this on the Pandora Behaviour Engine+ 4.3.1-beta / .NET 10; I have not tested it on Nemesis, as I have discontinued its use. I haven't tested this extensively, so if you find any issues during your testing, please let me know. Below is the technical documentation. If you just want to download the patch, you can skip to the installation and usage sections. ## The problem The important distinction is the FNIS list entry's **`pa` type**, not merely an animation name containing “PA.” The Sleeper declaration is: pa -D3.0,Tnpcsoundplay.NPCKillStruggle/1.0,Tnpcsoundplay.NPCKillShove/2.9 DefeatPASleeper DefeatPASleeper.hkx The source HKX contains paired character tracks. In the examined FNIS output, `0_Master` contains both synchronized branches needed to play them. The examined Pandora output lacked those branches and event names; its available character XML also lacked the animation-path registration. This points to missing generated behavior and registration for this animation. It does not establish that the animation asset needs to be remade. Pandora's handling of FNIS paired-animation generation is discussed in the upstream [paired-animation feature request](https://github.com/Monitor221hz/Pandora-Behaviour-Engine-Plus/issues/76). Check your own engine version and output rather than assuming all releases behave identically. ## What the patch adds The package supplies two components, both loaded by Pandora: | Component | Purpose | | --- | --- | | **Defeat PASleeper Experimental - Behavior** | A native Pandora extension that adds the two behavior branches, connects their entry transitions, and registers the character animation and clip data. | | **Defeat PASleeper Experimental - Animation Registration** | A declaration patch in the Nemesis format that Pandora reads to add the animation to the supplied male and female AnimSetData sets. Running Nemesis is not required. | The behavior extension runs during generation, not inside Skyrim. It is not an SKSE plugin. The package does not replace the original animation, ESP, or Papyrus scripts and does not ship a prebuilt replacement `0_Master.hkx`. The implementation extracts 24 relevant nodes from a working FNIS-generated graph and attaches two top-level states to `MT_PairedAnimationsBehavior`. It preserves the entry events `DefeatPASleeper` and `pa_DefeatPASleeper`, resolves event and variable indices by name in the target graph, and allocates unused top-level state IDs. For this particular donor graph, the synchronized generators use: | Generator name | `SyncAnimPrefix` | `bLeadCharacter` | | --- | --- | --- | | `DefeatPASleeper` | `2_` | `true` | | `pa_DefeatPASleeper` | empty | `false` | These values come from the working graph; they should not be assumed to apply to every paired animation. The patch also registers `Animations\Defeat\DefeatPASleeper.hkx` in both character projects and adds AnimData entries for its two clip generators. Its companion registration files cover the 374 male and 374 female sets in the template used for this release. **AnimData and AnimSetData are different.** A graph node, a character animation path, a clip-data entry, and an AnimSetData entry do not substitute for one another. AnimSetData stores encoded identifiers, so a failed plain-text filename search alone does not prove that registration is absent. See Pandora's [AnimSetData documentation](https://github.com/Monitor221hz/Pandora-Behaviour-Engine-Plus/blob/main/README.md#animsetdata) for its declaration format. ## Requirement Sexlab Defeat Pandora Engine ## Installation 1. Unzip `Pandora_Engine` and `Nemesis_Engine` the two foloders and place them in the root directory of the Pandora engine, overwriting the folders with the same names.Pandora's root. 3. Enable **both** patch components listed above, along with your usual patches. 4. Generate your behaviors. Keeping a separate experimental output makes rollback easier; ensure the new output wins the relevant file conflicts in MO2. 5. Check `DefeatSleeper-patch.log` in the output directory. It should report `added 2 paired states, 2 entry transitions` and animation registration for both character projects. A shared graph may produce only one graph-addition line. 6. Test Sleeper through the original mod's trigger. Check both characters, alignment, completion, recovery of control, and repeated use. The log confirms the behavior extension ran. It does **not** independently verify that the separate AnimSetData component was enabled, so both checkboxes matter. To roll back, restore your previous output, or disable both components and regenerate. Disabling the patch alone does not remove nodes already written into generated HKX files. ## Adapting the method to another animation Treat this as a worked example, not a universal FNIS `pa` converter. The supplied code has Sleeper-specific names, guards, and assumptions. 1. **Obtain a working donor.** Generate a known-working FNIS output for the exact animation. Keep it separate from the Pandora output. Inspect the FNIS list and the mod's actual Idle/script event names; do not guess names from filenames. 2. **Trace the complete behavior path.** Find both synchronized generators, their clip generators, supporting state machines, variable bindings, trigger arrays, and entry/exit notifications. Trace the transitions that make the states reachable from their parent. A self-contained collection of nodes can still be unreachable. 3. **Extract dependencies, not the entire master graph.** Include referenced blend effects and bindings where needed. Keep object references consistent within the extracted data; allow the exporter to assign output object IDs. Copying a complete FNIS master over Pandora's master can replace unrelated changes. 4. **Remap identifiers.** Resolve event and variable names against the target graph. Allocate state IDs within the correct parent machine and update incoming transitions. For another animation with nested transitions or additional states, extend the remapping accordingly: this patch only remaps its two top-level state IDs and their entry transitions. 5. **Preserve synchronization and termination.** Carry over the donor's lead/support settings, prefixes, flags, sound triggers, and stop events. Sleeper's HKX duration is about 4.666667 seconds, but its FNIS declaration stops the paired sequence at 3.0 seconds. The fix preserves the working 3-second logic, including `NPCpairedStop`, `NPCPairEnd`, and `2_pairedStop`; it does not replace it with the raw asset duration. 6. **Register all required data.** Add the character animation path and appropriate clip data, then supply AnimSetData declarations for the relevant projects and sets. This patch's dummy clip-data entries reproduce its chosen integration path; they are not a general substitute for required motion data in other animations. Additional custom sets or creature projects require separate consideration. 7. **Update the implementation and package together.** Change the animation path, allowed event names, duplicate-detection names, internal node/clip prefixes, parent selection if necessary, log names, and XML donor data. Give a separate patch its own mod code and assembly identity. Review all Sleeper-specific literals, not only the public constants. 8. **Validate generated output and then test in game.** Check reachable states, references, event/variable indices, synchronization settings, stop events, character registrations, and encoded AnimSetData entries. Test occupied IDs and duplicate application. Successful serialization alone does not establish correct in-game behavior. The included `source/DefeatSleeper.cs` implements the generation hooks and remapping; `source/Sleeper.xml` contains the donor nodes and entry transitions. The XML's `eventName` and `variableName` attributes are annotations understood by this extension, **not native Pandora XML patch syntax**. The included build script has machine-specific paths: edit them before rebuilding. It uses the matching Pandora API and HKX2E assemblies. The native directory, DLL filename, and assembly identity must agree (`DefeatSleeper` in this release), and `Sleeper.xml` must remain beside the DLL. A mismatched assembly identity caused a silent load failure during development; checking only Pandora's overall completion message would have missed it. ## Evidence and limits Before the user reported in-game success, local tests exercised the actual native plugin loader, generation callbacks, Pandora Base changes, HKX export, and animation-data merging. Checks covered both synchronized branches, entry transitions, 3-second stop events, one animation-path registration per character file, and 374/374 AnimSetData registrations per sex. A test with 64 extra events and state ID 50000 occupied allocated 50001 and 50002; duplicate application was rejected. The reporter has now confirmed success in game. Specific sex combinations, repeated-use behavior, other engine versions, and arbitrary mod lists have not been separately documented as tested. This release does not fix NeckBreak, vampire-feed animations, all Defeat animations, or Nemesis generally. An older debug XML sample contained duplicate object IDs and could not be reliably reloaded. Compatibility stress testing therefore used a valid template with deliberately occupied identifiers. That XML issue is separate from the missing Sleeper integration and does not by itself prove the corresponding in-game binary is broken. For useful follow-up reports, include your Pandora version, the two enabled patch names, `DefeatSleeper-patch.log`, relevant `Engine.log` errors, and what each character does when the action starts and ends. Debug XML from the same generation run can help distinguish missing integration from a playback problem. The animation and donor behavior originate from the existing mod/FNIS workflow; this patch adds a targeted compatibility layer. It is not an official FNIS or Pandora release. If adapting or redistributing third-party assets or donor data, check the original authors' permissions separately; this note does not grant rights to their work. ons separately; this note does not grant rights to their work. Defeat-PASleeper-Pandora-v0.1.0-community.zip Edited 18 hours ago by lodoraemon
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now