NPV: Creating a custom NPC
Step 2: How to create a custom NPC
Summary
Created by @manavortex Published May 13 2023
This page is a part of the NPV guide. It will show you how to use the provided example project to create a custom NPC for Cyberpunk 2077, whom you can then spawn with AppearanceMenuMod.
At any time during the tutorial, you can install the Wolvenkit project (Wolvenkit has a button in the toolbar) and spawn Tutorial Man and Tutorial Woman via AMM to check out your progress.
Skipping and skimming
This guide contains as little fluff as possible. Extra information
The .lua file
We're registering our NPC with AppearanceMenuMod via a .lua file, which needs to end up in AMM's Custom Entities
folder. The full path in the Cyberpunk directory will be this:
bin\x64\plugins\cyber_engine_tweaks\mods\AppearanceMenuMod\Collabs\Custon Entities
I have prepared two example files in the Wolvenkit's project's resources
. Delete the one that you aren't using, then let's take a look at the other one:
tutorial_custom_female_character.lua
tutorial_custom_male_character.lua
The file structure
This is the file content for the female example:
return {
-- Your beautiful name :)
modder = "tutorial",
-- This must be UNIQUE so be creative!
-- NO SPACES OR SYMBOLS ALLOWED
unique_identifier = "tutorial_female_character",
-- This is the info about your new entity
entity_info = {
-- name: The name that will be shown in the Spawn tab
name = "Tutorial Woman",
-- path: The path to your entity file. Must use double slash bars \\
path = "tutorial\\npv\\your_female_character\\ops\\your_female_character.ent",
-- record: This is the TweakDB record that will be used to add your character. More information below.
record = "Character.afterlife_merc_fast_melee_w_hard",
-- type: Character or Vehicle
type = "Character",
-- customName: Set this to true if you want the name you set here to appear in AMM Scan tab.
customName = true
},
appearances = {
"tutorial_woman_casual",
"tutorial_woman_business",
},
-- Here you can pass a list of attributes from different records to be copied to your new character.
-- More information below.
attributes = {
},
}
It loads our root entity from tutorial\npv\your_female_character\ops\your_female_character.ent
. That's the file which tells the game what to load.
You can and should change this file — see the inline documentation above for what to change.
The root entity
You find the root entity for your character here:
tutorial\npv\your_female_character\ops\your_female_character.ent
tutorial\npv\your_male_character\ops\your_male_character.ent
The root entity hooks up your .app file and the appearance names in the .lua file, and that's about everything there is to say about it. Here's how it looks:

If you want to add more appearances:
duplicate an existing entry
change the last key
name
to match the one in your .luachange the first key
appearanceName
to the one you want to put in your.app
Let's look at the .app file now.
The app file
This section will tell you how to edit your NPV's appearance – their skin colour, chrome, piercings, tattoos. We will do this in the .app file.
When changing component names, you want to leave the Component prefixes (t1_) in place — the game needs them to calculate collisions!
This is where all of your NPC's appearances are defined (appearanceDefinition
, linked to the root entity via name
). The appearanceDefinition's components define your NPV's properties, pulling in equipment, facial expressions, hair and skin.
It looks like this:

The next section, How do I know what to put?, will help you find the right appearance names.
If you feel completely lost, you can read up on how to change NPC appearances – the concept is exactly the same.
If you want to add another appearance
duplicate an existing entry
change the key
name
to match the one in your root entitychange the components
How do I know what to put?
To find out which variants and appearances to use, I suggest that you use NoraLee's excellent NPV Part Picker. It will look like this:
The NPV picker does this for you, but here's how to select your eyebrow appearance by hand:
open up the mesh file and expand the first list
appearances
see a bunch of entries with naming schemas like
colour_01
the numbers correspond with the type of eyebrow in the character editor (look them up here)
Select the correct colour and appearance number
Customizing Cyberware
When selecting a different cyberware than the preconfigured one, you have to set the appearance name, or the whole thing will show up in grey. The appearance names are usually identical to the cyberware (cyberware_01
, cyberware_02
etc.), but if you are uncertain, you can also open the mesh file and check the appearances
list at the top.
Customizing piercings and chrome: Chunkmasks
You have the full piercing or cyberware file, but you're only using parts of it — yet the game stubbornly shows you the whole mesh.
Fortunately, you don't have to edit it in Blender, because you can hide the parts you aren't using via chunkmasks.
Find the piercing
or cyberware
component in your .app
file:

How do I know which numbers to put?
You can see that inside the .mesh file (which you can see in the component's depotPath
). Open it in Wolvenkit, then switch to the Mesh Preview
tab and toggle the checkboxes on the right; those directly correspond to the boxes you need to uncheck in the .app
file:

To hide those bits in the .app, we simply need to uncheck the corresponding boxes - check the previous screnshot!
Hair
This section will teach you how to add another hair mesh to your NPV. We will first remove the default hair, then replace it with the one you want.
Delete the current hair from the .app — there should be 2-3 components, their names will start with either
hair_
orhh_0
Find the correct hair mesh. You have three options for this:
Looking it up on our nifty list
Filtering the files and clicking through their previews: female:
base\characters\common\hair > wa_ > .mesh > !shadow
male:base\characters\common\hair > ma_ > .mesh > !shadow
Enter the name of the hair mesh that you want to use into the Asset Browser's search bar (see next screenshot) and hit Return.
Once you have found the correct mesh file, right-click it and select "Find Files Using This":

This will give you a list of files, which you can mostly ignore. The only thing we care about is the hair's
.ent
file:This is how you find the hair's .ent file Open the
.ent
file and expand thecomponents
array. You will find three components in there, which you can now copy over to your.app
!Copy these and move them over to your .app
And that's the gist of it!
Go forth and create custom apperances!
You can check this guide, or look through the .app files for other NPCs for ideas. If you need further details, I highly recommend checking out NoraLee's much more detailed tutorial, which will also give you all the context you could possibly need.
For guides on how to export a whole animated character to Blender, you can check here.
Please remember that before sharing your NPV, you have to change the paths! You can find a full guide on the fastest way to do that here.
Don't forget, you can pack the Wolvenkit project by pressing the green button in Wolvenkit's toolbar, spawning Tutorial Man
and Tutorial Woman
via AMM to check out your progress.
Last updated