How to create custom props to use with AMM or sector editing
Published: April 2023 by @manavortex Last documented update: Sep 20 2024 by @manavortex
This guide will teach you how to create AMM props in two variants:
the old way by using a mesh entity with a .mesh file with only one appearance
customizable by chaining a root entity
, an .app
, and a .mesh
file with multiple appearances
Its focus is on the file structure and the relations between the files.
For another guide regarding custom props, check AMM: Textured items and Cyberpunk Materials using Custom Props – it will focus on the possibilities you have with different materials, while this guide focuses on the process and the structure.
If you want to play around with materials and an existing prop, check AMM: Textured items and Cyberpunk Materials using Custom Props
If you want to enable collisions, see Enable embedded collisions
If you want to make meshes out of 2d textures, see Your image as custom mesh
… or use the wiki's AI-assisted search function, or simply poke around
Many websites host free stuff; you can find the largest archives below. Browse this list for a more comprehensive collection, or use the following queries in your search engine of choice:
For game design or rendering, usually textured:
TurboSquid (there's a drop-down menu on the left-hand side where you can select to search for free models!)
For 3d printing, usually not textured:
Cyberpunk 2077 game version
WolvenKit >= 8.12 for 2.1, 8.8.1 for 1.6.1 (DLSS)
Appearance Menu Mod (>= version 2.1, anything earlier won't have customizable appearances)
Optional, but recommended if you want to create multiple props: Notepad++
Level of difficulty: You know how to read.
This section will tell you how to get the files, then give you an explanation of what they do and finally show you a diagram on how they hang together.
Tutorial item
Tutorial item (customizable)
Download the AMM prop template from Nexus. Download the complete source folder, as it will have the files as depicted below.
Prepare your Wolvenkit project by you downloaded with the one from your project. By the end of it, you should have the following files:
If you want to move or rename anything, please do it as specified in Moving and renaming in existing projects. Doing anything else will break the mod.
Optional, but recommended: Start the game and spawn the props, as in the green hint box at the beginning of this section.
Optional, but very recommended: Read through the next section to understand what's going on here.
If you're the more hands-on kind of learner, skip to #using-other-meshes or #creating-another-prop to fuck around and find out.
The first part of the structure is up to you, although for the sake of the tutorial you might want to stick to it. There's a section later on how to change your paths.
The second part (under "resources") is where AMM will look for custom props. You can't change it other than creating subfolders under "Custom Props".
This section gives an explanation of the included files, explaining the difference in file structure between props with vs without variants.
If you don't want to know this, you can skip ahead to #using-other-meshes or #creating-another-prop to get crackin', or check the diagram to see how the files connect.
This file registers your prop with AMM. File content looks like this:
Without a lua
file, AMM won't know about your props, and thus can't spawn them.
Here's what the lines do:
When you edit the .lua, it's usually enough to reload all mods
in CET.
Defined in your LUA
file, this file holds the game entity that AMM spawns when you click the button. There are two ways of using entity files:
Fun fact: The cluttered prop browser annoyed manavortex so much that she helped Max implement the alternative workflow described below the picture, and wrote this guide!
It was that bad!
One entity file per variant. The props will not have appearances — AMM's prop browser has one entry per entity file (e.g. cube_black
, cube_white
, cube_glowing
).
Edit this kind of prop by opening the following file in Wolvenkit:
You add props by putting meshes directly into the components array:
One entity file per prop, one entry in AMM's prop browser (e.g. cube
). After spawning it, you can toggle its appearances (white
, black
, glowing
) the same way you do it with NPCs.
If you have added clothing items, then this will be familiar to you. If you haven't, please ignore the link and keep reading — this is the simpler version!
Edit this kind of prop by opening the following file in Wolvenkit:
Instead of adding items directly via the components array, we link appearances to an .app file. The only component we keep in the root entity is the targeting component for the CET cursor: this way, it will be added to each appearance in the .app file.
This file holds a list of appearances
. Inside each appearance
, you can define any number of things to be loaded (components) and specify or override their behaviour.
We will only use entPhysicalMeshComponent
s, and they must be named amm_prop_slot1
.. amm_prop_slot4
if you want to enable scaling.
If you have more than four mesh files assigned to your app's components, the prop will no longer be scaleable (as of AMM 2.1). You can get around this limitation by making meshes with more submeshes instead of having individual files.
A pre-configured mesh for a textured material. Uses the following files in the subfolder textures
:
template_01_d.xbm
: A diffuse (albedo) map, colouring the mesh
template_01_n.xbm
: A normal (bump) map, adding depth to the object.
If you stick to this naming convention and have your filenames end in _d
or _n
, Wolvenkit will recognize and identify the correct settings for image import.
You can learn more about textured materials here. This is not necessary for the purpose of this guide.
A pre-configured mesh for a multilayered material. Uses the following files in the subfolder textures
:
6_layers.mlsetup
: A multilayer setup with colour properties
6_layers.mlmask
: A multilayer mask, determining which parts of the mesh are affected by which layer of the mlsetup. In this case, it just contains six blank layers.
template_01_n.xbm
: A normal (bump) map, adding depth to the object.
You can learn more about multilayered materials here. This is not necessary for the purpose of this guide.
If you have downloaded the example Wolvenkit project, you can now install it and launch the game, seeing everything in action.
Okay, now that we've gone through the theory, let's have a quick overview how everything hangs together:
You can point the prop at a different mesh by changing the depot path of the component. If you have no idea how to do that, read on!
Open the appearance
file tutorial\amm_props\template\template.app
Find the array appearances
at the top of the file
For each appearance, open the components
array
Click on the first component amm_prop_slot1
. In the panel to the right of the tree, change the following properties:
mesh -> DepotPath
. Put the relative path to your .mesh (right-click on the file)
mesh -> meshAppearance
. Put something that actually exists in your file, otherwise the first appearance from the list will be used as default.
If you want to use more than one mesh, repeat the process for the other components. If you want to use more than 4, check #why-only-4-components below.
Repeat the process for the other appearances.
Save the file and start the game. If you've done everything right, you will now see your new mesh.
Open the mesh entity
tutorial\amm_props\template_no_variants\template_no_variants.ent
Find the components
array and open it
Click on the first component amm_prop_slot1
. In the panel to the right of the tree, change the following properties:
mesh -> DepotPath
. Put the relative path to your .mesh (right-click on the file)
mesh -> meshAppearance
. Put something that actually exists in your file, otherwise the first appearance from the list will be used as default.
If you want to load more than one mesh, repeat the process for the other components. If you want to use more than four, read #why-only-4-components
If you don't want to load more than one mesh, select amm_prop_slot2
and delete the depotPath
. Otherwise, you'll see your prop and a floating cube.
Finally, change the defaultAppearance
to a valid appearance in your .mesh file. If no appearance with this name can be found, the prop will be invisible when it spawns.
Currently (October 31 2023), AppearanceMenuMod can only scale objects by targeting their components by name. For that reason, yours have to be named as they are.
If you use more than 4 components or change their name, then your prop will no longer scale.
This step is optional. If you just want to see how this works, you can pack your project with Wolvenkit and search AMM for "tutorial item". However, assuming that you actually want to make cool things, you will be doing this a lot.
If you want to create another prop, here's the fastest non-script way to go about it (tried and tested by manavortex).
In Windows Explorer, duplicate the template
folder
Rename the new folder (template - Copy
) to the name of your prop (e.g. baseball
).
It's important that you stick to a schema here, because otherwise, the search and replace below will not work and you have to change all the paths by hand.
Use the exact same value to replace template
in both the folder and the file names!
Good: folder: baseball, file: baseball.ent Bad: folder: baseball, file: my_baseball.ent
Rename all files inside of the folder: replace template
with the name of your prop (e.g. baseball
). Not all files will have template in their names; just ignore the ones that don't.
Capitalization matters. If you use uppercase letters in folder names, the game will get confused, and Wolvenkit will secretly convert them back to lowercase before packing.
Good: baseball
Bad: Baseball
Switch to the raw
tab in Wolvenkit and open your json files in Notepad++
Via Search and Replace in Files
(Ctrl+Shift+F), replace template
with the name of your new prop and folder (e.g. baseball
). Replace it in all files, using Match case:
Optional: If you have changed the folder structure (e.g. moved your folder from the subfolder stuff
to the subfolder misc
), run another Search and Replace in Files
(Ctrl+Shift+F) to adjust your file paths.
In the project browser's raw section, right-click on the folder and select Convert from json
. This will have updated the relationships between the files to your renamed files.
Delete the files / appearances that you don't need. Save and close the mesh file.
Import your meshes and textures over the ones from the template. For a guide on how to do that, check here.
To register the prop with AMM, add another entry to the props array in your LUA
file:
Save the LUA file.
Install and launch the game
Spawn your new prop Baseball (customizable)
with AMM.
If everything went well, you should see something like this now:
If not, it is time to hit up the troubleshooting.
Before you can share your custom props, you have to change the folder structure and file paths. Otherwise, two people overwrite tutorial.lua
, and one of the mods stops working.
You can find a step-by-step guide on the process here.
This section will only cover troubleshooting steps for this guide. For anything related to mesh imports, see here. For general 3d model troubleshooting (including import errors), see here.
The problem is in your .lua file. Use this tool to check the syntax and make sure that there are no errors - usually, it is missing/extra commas and/or missing/extra braces.
If the syntax is okay and your prop still doesn't show up, double-check your category and make sure that it is one of the existing ones.
AMM can't find your .ent file. Make sure that your .lua points to the correct path in your archive (right-click -> copy relative path and paste it to your lua file.
Make sure that you don't delete any quotation marks or commas while you do that. If you're unsure, you can double-check this step.
Toy around with the scaling. Sometimes, your prop doesn't show because it's the size of Johnny's ego and hovers somewhere above your city block – or the opposite, it's microscopically tiny. Don't be afraid to change it by the factor 10 or even 100 and see if that does anything.
If that's not it and if you have a customizable prop (with a root entity), try adding an appearance default
to the mesh. The game will fall back to that one if there are issues with your custom appearances.
In general, your answer is probably in the guide on AMM: Textured items and Cyberpunk Materials using Custom Props, section 2 (processing the mesh) – check that guide's troubleshooting section.
How to add light components with AMM
Published: Feb 09 2024 by Last documented edit: Feb 11 2024 by
This page will show you how to add a light component to AMM props.
For a quick overview on lights and their properties, check Cheat Sheet: Lights (currently WIP)
For an explanation about light, check Lights explained (currently WIP)
You can learn more about effect components (e.g. how to remove or create effect spawns) on the Effect components page.
This is as easy as finding the right component, adding it to your prop (either in the root entity or in each appearance in the .app file) and naming it Light:
This enables the AMM light panel in the target tools.
Not all light components actually support colour and intensity changes. Candlelight, for example, does not.
Your lights will be anywhere relative to your prop. How can you position them relative to the actual object?
Add an Empty in Blender (Viewport, Hotkey: Shift+A
-> Empty -> Plain Axes)
Move the empty to the position where you want your light to be
Switch to the Object tab and see its location transform:
Now that you have the relative position, switch back to Wolvenkit: we need to add it to our entSlotComponent
.
Open the slots
array and select your first entSlot
Find the relativePosition
property in the box on the right
Copy the values from the "Transform" field in Blender (Screenshot above) to the corresponding fields under relativePosition
(screenshot below)
Save and see your effect changing positions!
If your light doesn't seem to be in the right spot, try multiplying the value for z with -1
At any part during the process, you can and launch the game to spawn the props with AMM. In the decor tab, search for
Create a and give it a name. This will later be the name of your archive file.
Back in Wolvenkit, right-click on your folder and .
To make sure that everything went okay, open your new root entity (tutorial\\amm_props\\baseball\\baseball.ent
) in Wolvenkit and save it to trigger . Check the Wolvenkit log window for errors. If you made no mistakes in the renaming process, there shouldn't be any.
name
what you search for in AMM
category
what AMM sorty by (you can only reuse exisitng categories)
distanceFromGround
how far away from the ground should your prop be? (This moves the origin in Blender's 3d viewport)
appearances
If you're using a root entity, these are the appearance names to switch through and the entries in AMM's "appearance" dropdown / spawn tab