Making a simple props
Making a simple prop
A Prop is an object that be spawned in KJMod; most people think of props as things that you spawn using the Spawn (Q) Menu but they can also be spawned by game-modes, level logic and from those adventurous enough to build their own tools.
This guide assumes that you are just interested in creating a simple prop. Something you can spawn, grab with the Physgun and throw around - once you've got those basic's you can move onto creating more Complex props or even Props with logic (such as making sounds when dropped, or trying to run away from the player)...
Before starting this guide we assume you've done the following:
1. Followed the Creating a KJMod project and have a shiny new project ready to work with 2. You're not creating a level; just a prop. 3. You have a model ready to go (i.e. a FBX ready to import) and it needs to be scaled 1.0 (see our Ensuring scales page for tips)
Please check out how to get started with KJMod in UE4 first.
Please Note This process is for a single mesh actor; the mesh actor must be the "root"
If you require complex actors with many meshes or internal components, please follow this guide but see the Making a complex prop guide
Create a level
First, you need to create a level that you can put your KJMod Proxy (which holds your connection to the definition file) and your prop. Do this by left-clicking in the content browser (after you have navigated to the UGCXXXXXXXXXX folder and created your Maps folder) and choose Level:
Here is how the structure looks for where the map should be located:
Create a proxy object
In your new empty level place in a KJMod Proxy from the class list on the left. Bind the definition file in your UGC folder to this new Proxy.
Create a blueprint
Make a new blueprint Actor that you are going to add your mesh to. Add your mesh as the root object to the actor. In the example the mesh is called "omnom" and the blueprint is called OmNomBP.
To make the actor work you need to set the replication (syncing it between clients and server). Always Relevent, Replicate Movement, Net Load on Client, and Replicated should all be checked in the checkbox on the Blueprint.
Lastly, add the new actor to the Level. If you don't do this UE4 won't include the actor in the workshop item.
Preparing the Definition file
To tell the KJMod plugin what parts to include in the workshop item you have to specify this in the Definition file, which is located in your UGCXXXXXXXXXX folder.
At the top, you have the UGCID which is the unique id your Workshop item was given in the Mod installation process. Under it, you have the Mod Type which in this case with a Prop you should set to Spawnable Assets.
Next, you have the Mod Name which is the name your Mod will use in-game. Same with the Mod Description which comes after the name. Under the description, you have the Workshop Image which is the image that will show in-game. All of these 3 things will also be used on the workshop page in Steam.
The next two things are the Levels and Spawnable Actors. For the levels, we only have one level to connect for this example which is the level that we placed the Proxy and the Actor inside of. Connecting the level is very straight forward, just click the plus to add a new row and either drag-and-drop the level or use the dropdown.
When it comes to the Actors you have to specify a lot more information. The Actor Category Name is used to select where in the spawn menu the Actor will show up. The Actor Name is the name for the Actor in-game. Actor Description shows up under (?) the Actor name in-game. The Actor Reference Path is the UE path to the Actor. The easiest way to grab this is to right-click the Blueprint in the Content Browser and remove "Blueprint'" from the start and everything from the dot and onwards at the end. In this example this would result in:
Blueprint'/Game/CustomContent/UGC2132142067/OmNomBP.OmNomBP' => /Game/CustomContent/UGC2132142067/OmNomBP After the reference, you have the Actor Type which is what kind of actor your new actor is classified as. This is mainly used for the categories in-game. For a simple actor that doesn't do much, you should specify it as "Physics Object". Next comes the Actor Workshop Image which is the image used in-game mainly in the spawn menu.
The last two things in the Definition is Game Mode specific things. For this example we will leave Game Mode Style as the default which is 'Spawnable Assets Only' and the Game Mode Custom Label we will leave empty.
The completed definition file looks as follows for this example:
Complete and test your prop
To test the prop currently you have to publish the Workshop item using "Deploy (online)" in KillerJim Mod Publishing tool. For the prop to work on a server you need to set the prop to "unlisted" or "published" inside of the steam page. After you have gotten the Success message you can start the game and join a server that is on the lobby level (so that you can choose Addons and level).
In the lobby settings you have to first select a level and then the workshop assets to include in the server.
After the server has loaded you should hopefully see your new fantastic prop in the spawn-menu. Congratulations!