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

  1. You have an .anims file, either a game file or one that you have made yourself

  2. You have a text editor like Notepad++

  3. You have one of the following things:

    1. The Easy AMM Poses tool (Nexus | Github)

    2. The template project (Nexus)

    3. Not recommended: A different template project or game files that you want to adjust. If you don't know what you're doing yet, this may lead to frustration

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

  1. Any lua poses for AMM must be inside Custom Poses, but you can rename your_optional_subfolder to whatever you want (or even delete it).

  2. Rename amm_tutorial.lua to something that identifies your pose pack, e.g. netrunner_coding

  3. Open the file in your text editor. Let's look at the first half of the entries (we'll check the second half later):

return {
  -- Your beautiful name :)
  modder = "your_name_here",
  
  -- A custom category for your poses that will appear on the list in the tab. 
  -- You could use your name or a description of your pose pack. 
  -- You can also add your stuff to a category that somebody else has already defined.
  category = "Netrunner making AMM mods",
  
  -- relative path to your ent file. You can copy this from Wolvenkit.
  -- Don't forget to add the extra slashes!
  entity_path = "tutorial\\amm_custom_poses\\making_addons\\ops\\amm_tutorial.ent",
  
  -- we'll get to these at "Custom Poses: The .lua"
  anims = { --[[ here be code ]]  }
}
  1. Change modder to your name so people know who made this.

  2. 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.

  3. Change entity_path: Right-click on your .ent file in WKit and select Copy relative Path and paste it into the lua.

  4. 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!

  1. Open the workSequence and expand both id and list.

  2. Expand the first list entry (workAnimClip) and its proprety id.

  3. Point it at the right animation: Change the workAnimClip's property animName to the name of your animation (green on screenshot)

  4. 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.)

    1. Find the workSequence's property id and increment its numeric value +1 from the previous id (orange on screenshot)

    2. Find the workAnimClip's property id and increment its numeric value +1 from the previous id (orange on screenshot)

  5. To clarify - our first example workSequence had a property id of 2 and its workAnimClip's propery id was 3. Our second example workSequence had a property id of 4 and its workAnimClip had a property id of 5. Therefore, your next workSequence should have a property id of 6 and its workAnimClip's property id 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.

  6. Optional, but recommended: Set the workSequence's property idleAnim 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.

  anims = {        
      ["Man Average"] = {                       -- male body gender, e.g. spawned masc V, Johnny, Viktor, Takemura…
        "sit_chair_table_keyboard__2h_on_keyboard__make_amm_addon",
        "sit_chair_table_keyboard__2h_on_keyboard__01__thinking",
      },                    
      ["Woman Average"] = {                     -- female body gender, e.g. spawned femme V, Panam, Judy, Mamá Welles…
        "sit_chair_table_keyboard__2h_on_keyboard__make_amm_addon",
        "sit_chair_table_keyboard__2h_on_keyboard__01__thinking",      
      },                   
      ["Big"] = {},                             -- any body gender: big folks, e.g. Jackie, River, Rhino…
      ["Child"] = {},                           -- any body gender: children
      ["Fat"] = {},                             -- any body gender: fat folks, e.g. Dexter
      ["Man Massive"] = {},                     -- Smasher      
      ["Player Man"] = {},                      -- first person: male body gender V
      ["Player Woman"] = {},                    -- first person: female body gender V
  }

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