# ArchiveXL: adding Photo Mode Poses

## Summary <a href="#summary" id="summary"></a>

**Published**: May 09 2023 **by @manavortex**\
**Last documented update:** December 17 2024 **by @manavortex**

This guide will walk you through **adding poses** to Cyberpunk 2077's photo mode with **ArchiveXL**.

**Difficulty:** You know how to read ;)

{% hint style="warning" %}
[Easy Photomode Poses](https://www.nexusmods.com/cyberpunk2077/mods/18719) by wolv will do all this automatically and is up-to-date with 2.2! You can skip a bunch of reading and just use the required tool
{% endhint %}

### Wait, this is not what I want!

* To make poses from scratch, check [poses-animations-make-your-own](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/animations/animations/poses-animations-make-your-own "mention")
* To scale poses/animations, check [scaling-poses-animations](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/animations/animations/scaling-poses-animations "mention")

### Prerequisites:

We will hook up an existing `.anims` file to photo mode. If you don't have one, you can find a dummy file in the AMM [pose guide](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/animations/animations/amm-collab-anims-poses).

**Tool versions:**

* Cyberpunk 2077 2.2
* [WolvenKit](https://github.com/WolvenKit/WolvenKit-nightly-releases/releases) >= 8.15.0
* [Notepad++](https://notepad-plus-plus.org/downloads/) (you can use any text editor, but N++ is recommended)

## Required mods (2.2)

Your finished pose mod will have the following dependencies:

* [RED4ext](https://www.nexusmods.com/cyberpunk2077/mods/2380)
* [ArchiveXL](https://www.nexusmods.com/cyberpunk2077/mods/4198)
* [TweakXL](https://www.nexusmods.com/cyberpunk2077/mods/4197)
* [PhotomodeEx](https://www.nexusmods.com/cyberpunk2077/mods/18839)

## Getting the files

Download either of these files:

* full Wolvenkit project ([Nexus](https://www.nexusmods.com/cyberpunk2077/mods/8287))
* Wolvenkit source folder ([Nexus](https://www.nexusmods.com/cyberpunk2077/mods/8287))

{% hint style="info" %}
This tutorial assumes that your Wolvenkit project is called `your_cool_new_pose_pack`, and that your legal name is `your_beautiful_name`.

If that's not the case, please adjust accordingly!
{% endhint %}

## Setting up the files

At any point during this guide, you can press the green `Install` button on Wolvenkit's toolbar to check the mod in Wolvenkit.

## Step 1: Rename the folders

### TL;DR

1. Use Wolvenkit's `Rename` feature with the `Update in project files` box checked
2. Use Notepad++ to edit `photomode_poses_tutorial.xl`. Search\&replace the original path (`tutorial\animations\netrunner_making_poses`) with your new folder path.
3. Test. The. Mod.
4. Proceed to [#step-2-hook-up-your-poses](#step-2-hook-up-your-poses "mention")

### Step by step

We usually do this at the very end and I'm leaving you alone with it. However, this time we start by renaming the folders.

Here's how your project should look when you're done.

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-a9b03e3f2f4b4e22f93d13d126b52ac3711bd738%2Faxl_photo_mode_rename_files_folders.png?alt=media" alt=""><figcaption></figcaption></figure>

1. Select the highlighted `tutorial` folder and press f2. This will open the rename dialogue.
2. Change its name, and check the `Update in project files?` box

   <figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-3999b56cc1a6df7532ee2d1c4f62c7297d2a54d9%2Faxl_photomode_2_2_rename_folder.png?alt=media" alt=""><figcaption></figcaption></figure>
3. Do the same for the `netrunner_making_poses` folder (you want your file structure to be as tidy as it can be - future you will thank you for it)
4. Switch your project browser to the resources tab and open `photomode_poses_tutorial.xl` in notepad++:

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-cb74203693895bc88b28bb7b3be217722d68ccec%2Faxl_photomode_edit_xl_file.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Use `Edit` -> `Replace` (Keyboard shortcut: `Ctrl+H`) to open the search and replace menu. Replace the old path with your new path:\
   `tutorial\animations\netrunner_making_poses` -> `your_beautiful_name\animations\your_cool_new_pose_pack`

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-e3491daac96860bdc2247224e25520be0b2dd368%2Faxl_photomode_search_and_replace_repathing.png?alt=media" alt=""><figcaption></figcaption></figure>

6. Hit "Replace All"
7. Save your file (Keyboard shortcut: `Ctrl+S`)
8. Now, rename the files under `resources` as well:
   1. `photomode_poses_tutorial.xl` -> `your_cool_new_pose_pack.xl`
   2. `r6\tweaks\tutorial\photomode_poses_tutorial.yaml` -> `r6\tweaks\tutorial\your_cool_new_pose_pack.yaml`
9. Rename `r6\tweaks\tutorial` to `r6\tweaks\your_beautiful_name`

That's it for the renaming. Time to test!

10. Install the mod, and make sure that you still have photo mode poses.

## Step 2: hook up your poses

### The .xl file

This file tells Cyberpunk to load your custom poses and will be in the same folder as the .archive file for your mod. It looks like this:

{% tabs %}
{% tab title="2.2" %}

```yaml
# ##############################################################################
# your .json file with the pose names
# ##############################################################################
localization:
  onscreens:
    en-us: tutorial\animations\netrunner_making_poses\localization.json

# ##############################################################################
# link up the .anims file with anything in the photo mode
# ##############################################################################
animations:
  # ##############################################################################
  # female body gender - scope includes player + all NPCs + NPV with patched .ents
  # ##############################################################################
  - entity: photomode_wa.ent
    set: tutorial\animations\netrunner_making_poses\pwa.anims  
    
  # ##############################################################################
  # male body gender - scope includes player + all NPCs + NPV with patched .ents
  # ##############################################################################
  - entity: photomode_ma.ent
    set: tutorial\animations\netrunner_making_poses\pma.anims
    
  # ##############################################################################
  # male big - includes all male big bodied NPCs 
  # ############################################################################
  - entity: photomode_mb.ent
    set: tutorial\animations\netrunner_making_poses\pma.anims
```

{% endtab %}

{% tab title="<= 2.1" %}

```yaml
animations:
  - entity: base\characters\entities\player\photo_mode\player_wa_photomode.ent
    set: tutorial\animations\netrunner_making_poses\pwa.anims
  - entity: ep1\characters\entities\player\photo_mode\player_wa_photomode_ep1.ent
    set: tutorial\animations\netrunner_making_poses\pwa.anims
  - entity: base\characters\entities\player\photo_mode\player_ma_photomode.ent
    set: tutorial\animations\netrunner_making_poses\pma.anims
  - entity: ep1\characters\entities\player\photo_mode\player_ma_photomode_ep1.ent
    set: tutorial\animations\netrunner_making_poses\pma.anims
  - entity: base\characters\entities\player\photo_mode\johnny_photomode.ent
    set: tutorial\animations\netrunner_making_poses\pma.anims    
  - entity: base\characters\entities\photomode_replacer\photomode_npc_woman_average.ent
    set: tutorial\animations\netrunner_making_poses\pwa.anims
  - entity: base\characters\entities\photomode_replacer\photomode_npc_man_average.ent
    set: tutorial\animations\netrunner_making_poses\pwa.anims
localization:
  onscreens:
    en-us: tutorial\animations\netrunner_making_poses\localization.json

```

{% endtab %}
{% endtabs %}

You have to adjust the paths under `set` and `en-us` to your new changed folder structure.

{% hint style="info" %}
If you want to support more body types from the Nibbles Replacer, you can [switch to the Mod Browser](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/analysing-other-mods) and enter the following search query to find all the entities:\
`base\characters\entities\photomode_replacer > .ent`
{% endhint %}

Here's what those things do:

`animations:` A list of entities and animation files that you want to add to them\
`animations/entity:` The relative path to the photomode .ent file. There are just three of them.\
`animations/set:` The relative path to the .anims file in your Wolvenkit project.\
`localization/onscreens/en-us:` A file with translation strings. Holds the name of your photo mode pose set.

### localization.json

{% hint style="info" %}
You can name this file whatever you want, just make sure that you change the path and name in the .xl file.
{% endhint %}

* Change the yellow box `UI-Photomode-tutorial-netrunner-making-poses` to something **unique to your mod.**
* To do future you a favour, use names that will make sense even after a year or two - e.g. `UI-Photomode-your_beautiful_name-my_cool_poses` instead of `UI-Photomode-ghuawstsedr-hsarht223445`
* The green text is the name that will show up in photo mode.\
  `femaleVariant` is the default key - if you don't need different pose names for the male body gender, leave it empty.

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-57fd49ab02ffa876267c0b038c075bcb1d98b103%2Farchivexl_photomode_json.png?alt=media" alt=""><figcaption></figcaption></figure>

### The .anim file(s)

If you have created your own animations (as a [replacer](https://xbaebsae.jimdofree.com/cyberpunk-2077-tutorials/cp2077-custom-poses-and-animations/) or for [AMM](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/animations/animations/amm-collab-anims-poses)), then you are already familiar with this kind of file. If not, it is time to appropriate one from the game files - pick any, since the process is just like with a replacer.

Just as a reminder, here's how they look:

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-ce7165092ebb10c8720ae7d9bf5240934b0b5879%2Farchivexl_photomode_anim.png?alt=media" alt=""><figcaption></figcaption></figure>

You will need the green text in your [.yaml file](#the-.yaml-file).

{% hint style="info" %}
Optional: If you want your pose to move, you can set the duration in the .yaml as well!
{% endhint %}

### The .yaml file

Without this file (`r6/tweaks/your_beautiful_name/your_cool_new_pose_pack.yaml`), the animations will be in the entity, but the photo mode won't know about them.

{% hint style="warning" %}
You can use [this tool](https://wolv-photomode-tools.netlify.app/) by @wolv to autogenerate your .yaml. If you do that, then you can skip this entire section and check [the result](#the-result).

As of Dec 17 2024, the tool is not yet up-to-date with 2.2!
{% endhint %}

The yaml file has three sections:

#### Adding the category

The first block will introduce your new category to the photo mode.

{% hint style="info" %}
I recommend doing search and replace on `netrunner_making_poses`, because it's used a bunch of times.
{% endhint %}

* `PhotoModePoseCategories.netrunner_making_poses`: This is the name of the category, used to assign individual pose entries to your category.
* `displayName:` This must match the `secondaryKey` in your .json

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-9bb8b8e266f5ccab302bb778be2203d66735e6eb%2Farchivexl_photomode_yaml_1.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Define the pose entries

{% hint style="danger" %}
If one of your poses is called `idle_stand`, that will break a bunch of other mods. Please re-name it in both the .anims file and the .yaml before releasing.
{% endhint %}

Now comes a long list of entries. They'll look like this:

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-ca741088692eba7b7d9a50ab8778dec816074ce1%2Farchivexl_photomode_yaml_2.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
You need to add one of those for every pose from your .anim file that you want to show up in photo mode.
{% endhint %}

`PhotoModePoses.sit_chair_table_keyboard__2h_on_keyboard__make_amm_addon`: This is the unique key to assign your pose to your pose set. You'll need it in the third block.\
`animationName`: This must match the animation name in your [.anim file](#the-.anim-file-s) (the green box).\
`category`: This must match the category in the first block.\
`displayName`: What'll show up in photo mode

### Telling photo mode about the poses

You register your poses for photo mode by creating the following entry categories. You can use yaml anchors to minimize copy-pasting:

{% tabs %}
{% tab title=">= 2.2" %}
Add **both** code blocks:

```yaml
# ##############################################################
# Player
# ##############################################################
photo_mode.character.malePoses: &AddPosesM
  - !append PhotomodePoses.sit_chair_table_keyboard__2h_on_keyboard_01__thinking
  - !append PhotomodePoses.sit_chair_table_keyboard__2h_on_keyboard__make_amm_addon
photo_mode.character.femalePoses: &AddPosesF
  - !append PhotomodePoses.sit_chair_table_keyboard__2h_on_keyboard_01__thinking
  - !append PhotomodePoses.sit_chair_table_keyboard__2h_on_keyboard__make_amm_addon
```

{% endtab %}

{% tab title="<= 2.1" %}

```yaml
photo_mode.character.malePoses
photo_mode.character.johnnyPoses
photo_mode.character.femalePoses
photo_mode.character.quadrupedPoses
```

{% endtab %}
{% endtabs %}

Characters with `*AddPoses` will use the poses defined under `&AddPoses`. If you don't want a character to use certain poses, don't put `*AddPoses` next to their `photomode.character` entry.

An entry without YAML anchors, where poses are manually appended to each character, looks like this:

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-2967243565c608aa74ae09f7af517aa5c954c2d0%2Farchivexl_photomode_yaml_3.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
The entries in the list **must** match the unique keys that you've defined in the second block, and you need one entry per pose.

If you have different names for differently-gendered poses, you need to use the correct lists.
{% endhint %}

## Finishing up

Before you can share your pose pack, you need to **change the paths**. If you don't and the next modder **also** doesn't, then only one of your mods will work.

You can find a full guide on changing the paths [here](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/items-equipment/moving-and-renaming-in-existing-projects).

If you rename files or folders under resources, remember to delete the old control files from your game directory.

## The result

{% hint style="info" %}
At any point during this guide, you can press the green `Install` button on Wolvenkit's toolbar to check the mod in Wolvenkit.
{% endhint %}

<figure><img src="https://i.imgur.com/1nMpUSy.png" alt=""><figcaption><p>She has no idea what she's doing</p></figcaption></figure>

<figure><img src="https://i.imgur.com/eakqwZu.png" alt=""><figcaption><p>Fortunately, you can hire specialists</p></figcaption></figure>

## Optional: Further fine-tuning poses

### Spawning props with the pose

{% hint style="info" %}
You can find a more detailed guide on this on [xbae's website](https://xbaebsae.jimdofree.com/cyberpunk-2077-guides/cp2077-custom-photomode-props/).
{% endhint %}

It is possible to have certain props spawned automatically. **However, this feature works only for Player V.**

<figure><img src="https://i.imgur.com/hiSBpNJ.png" alt="" width="375"><figcaption><p>Example of prop spawned with the pose after defining it in yaml</p></figcaption></figure>

In your .yaml file (`r6/tweaks/your_beautiful_name/your_cool_new_pose_pack.yaml`), add the `acceptedWeaponConfig` attribute.

{% hint style="info" %}
Find a list of the potential entries under [poses-animations](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/references-lists-and-overviews/cheat-sheet-tweak-ids/poses-animations "mention") ->[#acceptedweaponconfig](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/references-lists-and-overviews/cheat-sheet-tweak-ids/poses-animations#acceptedweaponconfig "mention")
{% endhint %}

<figure><img src="https://i.imgur.com/QHdVuNb.png" alt=""><figcaption><p>I'm using KNIFE as example</p></figcaption></figure>

In the case of weapons, V spawn with whatever weapon you were holding when entering PhotoMode, or the default weapon if none was defined.

The position of the prop is defined by `WeaponRight`/ `WeaponLeft` bone.

### Pose conditions \[Optional]

You can limit the availability of poses by setting a `poseStateConfig`. For example, the following entry in your yaml will cause the pose to be unavailable unless V is swimming forwards:

<pre class="language-yaml"><code class="lang-yaml"><strong>  poseStateConfig: POSE_STATE_SWIMMING_MOVING
</strong></code></pre>

{% hint style="info" %}
Find a list of the potential entries under [poses-animations](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/references-lists-and-overviews/cheat-sheet-tweak-ids/poses-animations "mention") -> [#posestateconfig](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/references-lists-and-overviews/cheat-sheet-tweak-ids/poses-animations#posestateconfig "mention")
{% endhint %}

Once installed, it will be in the same folder as the `.archive` file for your mod — so you should name it `your_mod_name.archive.xl`

Your file should look like this:

<details>

<summary>What do these things do?</summary>

* `animations:`
  * `entity:` The relative path to the [**photomode scope**](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/core-mods-explained/archivexl/archivexl-resource-patching#distributed-patching-scopes) for patching. There are five of them in total; you can delete the ones you don't need.
  * `set:` The relative path to the .anims file in your Wolvenkit project.
* `localization`
  * `onscreens/en-us:` A file with translation strings. Holds the name of your photo mode pose set.

Photo mode knows about custom NPCs through their own `.xl` file, where you add their `.ent` to their body gender's scope — so you don't have to do anything here!

</details>

{% hint style="warning" %}
While editing .xl files, make sure to keep the **indent** (the number of spaces at the beginning of the line). If you fuck up, you can use [yamllint](https://www.yamllint.com/) to check.
{% endhint %}

1. From the `animations` section, d**elete** the blocks that you don't want
2. Replace `tutorial\animations\netrunner_making_poses\pXa.anims` with the relative path to your `.anim` file(s) as copied from Wolvenkit's project browser
3. Replace `tutorial\animations\netrunner_making_poses\localization.json` with the relative path to your `.json` file as copied from Wolvenkit's project browser
4. **O*****ptional:** For compatibility with older game versions, copy the code under `animations:` (not the label itself) from the `<= 2.1 page` in the code box above and add it to your file.*
5. **Optional, but recommended:** Run your .xl file through [yamllint](https://www.yamllint.com/) to check for syntax errors.
6. Save your file.

{% hint style="success" %}
The .xl is now updated to support vanilla Photomode NPC and Photomode NPV!
{% endhint %}

<details>

<summary>What does this do?</summary>

* <mark style="color:orange;">`PhotoModePoses.sit_chair_table_keyboard__2h_on_keyboard__make_amm_addon`</mark>: This is the **unique key** to assign your pose to your pose set.\
  You need this in the third part of the `.yaml` to hook up the poses with photo mode.
* <mark style="color:yellow;">`animationName`</mark>: This must match the animation name in your [.anim file](#the-.anim-file-s) (the green box).
* <mark style="color:green;">`category`</mark>: This must match the category in the first block.
* `displayName`: The name of your pose (plain text or a LocKey in your `.json` file)

</details>

<details>

<summary>What does this do?</summary>

`&AddPosesM` and `&AddPosesF` are so-called **yaml anchors**. They allow easy re-using of lists that you defined previously.

An entry without YAML anchors, where poses are manually appended to each character, looks like this:

<img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-2967243565c608aa74ae09f7af517aa5c954c2d0%2Farchivexl_photomode_yaml_3.png?alt=media" alt="" data-size="original">

If your pose lists are identical, you can use one anchor (`&AddPoses`), and treat the second body gender like any of the NPC pose sets.

</details>

Before finishing up, make sure to run your file through [yamlLint](https://www.yamllint.com/) and get rid of any errors.

## Finishing up

{% hint style="info" %}
If you rename files or folders under resources, remember to **delete** the old control files from your game directory!
{% endhint %}
