She Will Punish Them
0 of 0

File information

Last updated

Original upload

Created by

aedenthorn

Uploaded by

aedenthorn

Virus scan

Safe to use

About this mod

Lets you easily create animations in Free Pose mode.

Requirements
Permissions and credits
Changelogs
Donations
Description

This mod implements a simple means of creating animations using the in-game Free Pose mode.


Usage

When you run the game with this mod and open Free Pose mode, you will find a new category in the pose dropdown called Animations.

Until you add or create animation files, there will be a single entry in the Animations category (a big plus sign). Clicking on that button lets you create a new animation consisting of a single frame taken from the selected character's current pose.

Once you have animations in the list, you can do the following:


Play Animation

If you click on an animation it will play for the current character. If the animation is newly created, again it will only have a single frame.

By default, animations will be created as not looping and not reversing (playing forward then backward). You can change this default creation behaviour in the config file.


Stop Animation

If you click on an animation that is currently playing for the currently selected character, it will stop playing. If you click on a different animation than what is currently playing for the selected character, it will stop the old animation and start the new one.


Toggle Looping and Reversing

To toggle looping or reversing for an animation, hover over an animation in the list and press the respective hotkey (default R for reversing and L for looping).

If both are set to true, the animation will play forward and backwards for each loop.


Reset Reference Position


In order to allow for moving the entire model, a reference position is set when an animation is created, to calculate changes in position per frame. If you try to add frames to an existing animation using a model in a different position, this can cause problems. Use the position reset key (default p) to reset the the start position to the current character's position.


Add Movement

If you hold down the add delta modifier key (default left shift) when clicking on an animation, it will add the model's current pose to the list of changes (called deltas). It will also record how many frames it uses to make the pose change (i.e. how fast the change occurs).

By default, a bone can only be rotated a maximum of 1 degree per frame - if the rotation of any bone is greater than that, multiple frames will be added equal to the amount of frames needed to completely rotate the bone with the greatest rotation respecting that maximum. E.g. if the bone with the greatest rotation is to be rotated 7.5 degrees, it will take 8 frames, each frame rotating it 7.5 / 8 degrees.

Basically, this just means you will get a smooth transition from one pose to another over a series of frames. Increasing the maximum rotation per frame will speed up the transition being added.

You can alternatively specify the number of frames per delta in the Frames: input box in the top right of the pose UI.

Once you have saved the animation to file (using the save key below), you can change the number of frames required for a change by editing the animation file directly and changing the frames value for the delta.


Delete Change

You can delete the final pose change of an animation by holding down the delete frame modifier key (default left alt) while clicking on it.


Save Animation

When a new animation is created using the add button, it will be saved to disk. All of the other operations above will not be saved to disk until you hover over the animation and press the save key (default V).


Reload Animation

To reload an animation (and icon) from disk, hover over the animation and press the file reload key (default F).



File System

Animation files are stored in BepInEx\plugins\PoseAnimations as JSON files. You can edit them with a text editor.

If you want to change the animation's name, change both the "name" key's value and the JSON file's name.

Each animation file has a "rate" key that specifies seconds per frame - the default is 0.0 meaning it switches frames on every game tick. E.g. if you set this to 0.1 the animation's fps will be 10 frames per second.

Each frame has an "index" field to help navigate the list of frames.

If you create a PNG file with the same name as the animation JSON file, it will be used as that animation's icon (icon should be square).

To share an animation, all you need are the JSON file and the PNG icon file.


Config

A config file BepInEx/config/aedenthorn.PoseAnimations.cfg is created after running the game once with this mod.

You can adjust the config values by editing this file using a text editor or using the Configuration Manager mod.


Technical

This mod requires BepInEx to be installed for SWPT. Detailed instructions on installing BepInEx are here.

To install this mod, place the contents of its zip file in the BepInEx/plugins folder (create it if the folder doesn't exist).


Code is at https://github.com/aedenthorn/SWPTMods.

If you want to complain or ask for help or help me test my mods, you can visit my Discord server.