AMM: Collab anims/poses
How to add your poses to AMM
Summary
Created by @manavortex Published April 16 2023
Versions:
Wolvenkit | >= 8.9.0 (or whatever works for you) |
AppearanceMenuMod | >= 2.2 (earlier versions won't support this) |
This guide will teach you how to add custom animations to AppearanceMenuMod's Pose
tab.
Difficulty level: You're able to read ;) You don't even need to know your way around Wolvenkit for this one!
Wait, this is not what I want!
To add poses to photo mode, check ArchiveXL: adding Photo Mode Poses.
This tutorial will use animation
and pose
interchangeably. An animation is simply a pose that moves.
Prerequisites
You have an
.anims
file, either a game file or one that you have made yourselfYou have a text editor like Notepad++
Overview
The screenshots show the example project, but it's absolutely no problem if you set up everything on your own: the guide will tell you which path goes where.
If you have downloaded the example Wolvenkit project, you can start it (the "Install" button has an "Install and launch" option in the dropdown) to see everything in action:
- Spawn an NPC (generic male or female)
- Switch to the Poses
tab
- Find the Netrunner making AMM mods
category and select one of the poses
- Your NPC should now move!
Easy AMM poses
Instead of following the process below, you can use the Easy AMM poses generator, which will walk you through the process.
The pose generator will generate the entire structure out of your .anim
file and your user input. You can then follow the steps under Connecting the files to move your files around.
Visual learners rejoice: There is a video!
Connecting the files
Start by customizing your file structure. If you leave it as it is and publish the mod and somebody else does the same, only one of the two will work. Create a folder structure that is unique to you.
It is good practice to leave base
for the game files, and simply have a folder with your username at the root level of archive
.
Your file structure must not contain spaces, capital letters, or any funky characters, or the game might not find your files. Stick to a-z
, 0-9
, -
and _
, and you're safe.
File structure: The .lua
Any lua poses for AMM must be inside
Custom Poses
, but you can renameyour_optional_subfolder
to whatever you want (or even delete it).Rename
amm_tutorial.lua
to something that identifies your pose pack, e.g.netrunner_coding
Open the file in your text editor. Let's look at the first half of the entries (we'll check the second half later):
Change
modder
to your name so people know who made this.Change
category
to the name of your pose pack. This will be used for AMM to sort your poses into categories, which people will use to browse, so don't go overboard.Change
entity_path
: Right-click on your .ent file in WKit and selectCopy relative Path
and paste it into the lua.Replace all
\
in your entity path with\\
. This is critical and your mod will not work if you don't!
File structure: The .ent
Entity files tell the game what to load. You can learn more about them here if you are curious, but you don't have to.
Open the components
array, find the component with the name of amm_workspot_collab
, and set the depotPath of workspotResource to the relative path of your .workspot
file.
Do not change anything else — we're done here.
File structure: The .anim
You don't need to change anything here yet, we'll be doing this in the next step.
An .anims file is targeting a specific rig and holds a list of animations. These hold the pose data; they're what you overwrite when importing from Blender.
File structure: The .workspot
Scroll to the bottom of the file and find the node named workspotTree
. Open it and find the list finalAnimsets
.
Each of the workWorkspotAnimsetEntries
inside finalAnimset
connects animation files and rigs.
You can delete entries if you don't have animations for that rig.
The tutorial version uses the same .anim file for V's first person animations. Looks weird, but works. You can change it later on your own.
For each of the entries you keep, make sure that the following paths point at the right animset:
animations.cinematics[0].animSet
loadingHandles[0]
If you have launched the game before, make sure to delete the file
Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\mods\AppearanceMenuMod\Collabs\Custom Poses\your_optional_subfolder\amm_tutorial.lua
A good time to check: make sure that everything works again and that the files are correctly connected. If not, check the troubleshooting section of this guide.
Custom poses
Now that we have the basic structure covered, let's talk about pose names. This time, we start at the end and make our way backwards.
Custom poses: The .anims
Files for each type of rig are included in the example files, but you can also find them yourself by searching Wolvenkit for rigName > .anims
or character > .anims
(e.g. massive > .anims
or Smasher > .anims
)
Find and open your .anims file. Here's what you're looking at:
Open the animations array to see data for all defined animations (poses). You can make more by duplicating them, delete obsolete entries and change their names; any other changes are coming from Blender.
An animation's name must match the .lua
and the .workspot
, spelling mistakes will break it. They must not contain spaces, use _
instead. AMM will take care of that for you.
Custom poses: The .workspot
Open your .workspot file and expand the following nodes:
workspotTree
rootEntry
list
First, we're going to look at workSequences.
This data type is used for pose transitions and -definitions (e.g. an NPC standing up). For our purpose, we don't need any of the fancy stuff.
While this list in the example file contains two workSequences,
you're gonna need one per however many animations/poses you have. Duplicate to your hearts content.
You need one workSequence for each of your animations!
Open the
workSequence
and expand bothid
andlist
.Expand the first list entry (
workAnimClip
) and its propretyid
.Point it at the right animation: Change the
workAnimClip
's propertyanimName
to the name of your animation (green on screenshot)Make sure the IDs in the workSequence are unique. (You can skip this for the two entries from the template - if you continue they pattern they establish, all id's will be incremented and unique.)
Find the
workSequence
's propertyid
and increment its numeric value +1 from the previousid
(orange on screenshot)Find the
workAnimClip
's propertyid
and increment its numeric value +1 from the previousid
(orange on screenshot)
To clarify - our first example
workSequence
had a propertyid
of 2 and itsworkAnimClip
's properyid
was 3. Our second exampleworkSequence
had a propertyid
of 4 and itsworkAnimClip
had a propertyid
of 5. Therefore, your nextworkSequence
should have a propertyid
of 6 and itsworkAnimClip
's propertyid
should be 7, and so on. But good news! WolvenKit's File Validation can fill in these numbers for you. Visit this page for more information.Optional, but recommended: Set the
workSequence
's propertyidleAnim
to the name of your appearance (purple on screenshot). This is purely for your convenience, as you can see which is which when scrolling through the list.
The numeric values for all theid
properties - under workSequence and workAnimClip -
need to be unique within the scope of the workspotTree
. As soon as you have duplications here, things will be out of order.
Custom poses: The .lua
As of version 2.2, AMM doesn't know anything about the file structure. For that reason, you need to tell it about the poses you added, and the anims array is how you do that.
The lists tell AMM which poses belong to which rig, allowing to hide them when they aren't supported. As you can see, it's no problem if there are duplicate names, and you can even reuse entries in the workspotTree — the game knows which animation to use because of the file structure above.
Troubleshooting
If you have launched the project in its default state before starting to customize it, delete the file
Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\mods\AppearanceMenuMod\Collabs\Custom Poses\your_optional_subfolder\amm_tutorial.lua
A pose gets correctly added by AMM if you see it in the list and can delete it.
AMM doesn't show my poses
The problem is in your .lua
, AMM fails to pick up the pose information you provided. You can check AppearanceMenuMod.log
, which might tell you what's wrong, but it's probably fastest to just start over from the template .lua
file.
Make sure that you don't add or delete any commas or quotation marks.
I click, but nothing happens (no pose shows up in AMM)
The problem is between your .lua
and your .ent
file: the poses were registered correctly with AMM, but Cyberpunk can find nothing to spawn.
The NPC briefly T-poses, and then the game crashes
Check your .workspot
file for copy-paste mistakes when hooking up your .anim files.
My custom pose changes are ignored
The error is between Blender and your .anims file. Double-check names and make sure that you actually imported.
The wrong pose is triggered
You messed up the indices in the .workspot
file. Go back and make sure that they're all unique.
Last updated