Tool Unity Tutorial Creating a Pleasure Party Plus compatible mod bundle for custom levels

asdfgghjkg

Newbie
Oct 18, 2018
74
109
This guide will describe the process of making a bundle for Pleasure Party Plus which allows players to import custom levels and use them in the game Pleasure Party.

Prerequisites:
  • Unity version 2020.3.17f1 installed
  • AssetBundles Browser installed:
  • Basic knowledge and familiarity with Unity
Overview

To add a new level using the Pleasure Party Plus mod, you must create a scene in Unity, export that scene to an asset bundle, create a config file for the mod to read, then start up the game. There are some game-specific details you need to pay attention to when making the scene:
  • The original game is built with Unity version 2020.3.17. Using that version will avoid any compatibility issues with your bundle.
  • The game is built as an HDRP project. You must use that project type or your assets won't show up in game.
    • Some assets you import might not be built for HDRP. Information on upgrading assets to be HDRP compatible can be found here:
    • The simplest method is to use "Upgrade project materials to high definition materials" under Edit -> Render Pipeline
  • Remove any directional lighting and cameras from the scene. The game comes with it's own lighting and camera.
  • The characters will spawn in the level near the coordinates X: -2 Y: 0 Z: 0. It's best to leave some open space in that area.
  • The floor, ground, furniture, and anything else you want the characters to stand on top of must have a collider component. The characters will be able to clip through anything without a collider (which happens a lot in the base game, so don't worry about small objects).
  • Any game object you want to be selectable as a location for sex must have one of the following words in its name. This is especially important for the floor/ground or else you won't be able to start sex.
    • Floor
    • floor
    • SexBase
    • Furniture
    • furniture
  • Any objects you want to work as furniture in the game needs to be a root GameObject (i.e. it has no parent object), needs to have a collider component, and the GameObject's name must begin with "Furniture_"
As long as you follow these points, you can otherwise make a scene in Unity as usual.

Once your scene is made, you need to export it as an asset bundle. Using the AssetBundle Browser, you can add the scene to an asset bundle which will automatically bring in any assets used in the scene. Build the bundle and you're ready to go.

All that's left is to create the PPP config file. The config file is a simple JSON text file. Here's an example:

JSON:
{
    "configVersion": "1.0.0",
    "name": "Example Scene Name",
    "author": "asdfgghjkg",
    "type": "scene",
    "assetBundle": "assetBundleName"
}
The "name" is displayed to the user when selecting which scene to load. The "assetBundle" is the file name of the asset bundle you built with Unity. Now you just drop these two files in the directory: "Pleasure Party\BepInEx\plugins\PleasurePartyPlus\Assets\<YourSceneName>" and run the game. Your scene should now be playable in Pleasure Party!

Step by Step Example

This step by step example will show the process of making a compatible scene. I have released a convenience store level, and this guide walks through the process of how I made it. Some of the details might differ depending on the scene you are creating, but this should cover the general process.

I did not create any of the assets for this level. They are from an asset pack called 6twelve by Elbolilloduro.

First, create a new Unity project. Make sure to select the HDRP template so everything is set up properly.

1-HDRP.png

The template comes with a sample scene that we will not be using. Add a new scene and remove the sample scene from the hierarchy.

2-New Scene.png

Next, import the assets you want to use for the scene. This step will be a little different depending on the format of the assets. The assets I'm using for this scene come in a Unity package, so I will import that now.

3-Import Assets.png

This package includes a prefab for the entire scene pre-built, so I can just drag and drop the prefab into the scene.

5-Prefab.png

Now I have a scene containing the prefab. But there's a problem: everything is pink! This is because the assets from this bundle weren't created with HDRP in mind. We can upgrade the materials to be HDRP compatible through Edit -> Render Pipeline as seen here:

6-Upgrade Materials.png

After that is finished running, all of the materials will be upgraded and our textures will show as normal:

7-Materials Fixed.png

For the game Pleasure Party, you generally don't want a roof on buildings because they will block the top-down view of the player. If you're making the assets yourself, simply don't include a roof. If the assets are modular, you can delete the roof from the scene (there will be an example of deleting an object later). In this case, the building itself is just one model, so we can't delete it easily. As a work around, I found the material for the roof and set it as transparent. The material is called "Roof_tiles" and I changed the surface type to transparent. Then I clicked the color for "base map" and set the alpha value to 0. Finally, I unchecked "preserve specular lighting". If you leave that last one checked, there will be a bit of glare like the surface is a pane of glass.

8-Transparent Roof Texture.png

I repeated this process for the material "Bricks". This material was under the roof texture as another roof blocking the view. Making this transparent also made the walls invisible from the outside, which gives the player a better view into the building.

Another thing blocking the player view is the vents in the back of the store. Click the vents to highlight the object and delete it from the scene. Because the vents are part of a prefab, Unity will ask you to delete them from the prefab instead. Once you do that, they will be removed from the scene. This is how you would remove the roof on a more modular asset.

9-Delete Vent.png

Next we want to add colliders for anything we want the characters to be able to stand on and not clip through. I did this for the shelves, counter, table, and a few other larger items. I used a box collider or mesh collider depending on the shape of the object. Pictured below is adding a box collider to a shelf.

10-Add Colliders.png

At this point, you want to rename any game objects that you want to be able to select as sex locations for the characters. This is most important for the ground and floor, or else you won't be able to start sex at all. The game object must contain one of these words in its name:
  • Floor
  • floor
  • SexBase
  • Furniture
  • furniture
For example, I renamed the game object "Asphalt" to "Floor_Asphalt".

You can rename any objects you want to act as furniture as well. Make sure the name starts with "Furniture_" and the game object is a root object.

Last step before the scene is ready: delete the lighting and camera. The game will provide its own.

11-Delete Camera and Lighting.png

Now that the scene is ready, we can bundle the package! Start by opening the AssetBundle Browser.

22-AssetBundle Browser.png

Create a new bundle here, naming it what you want. Once you have your bundle, drag and drop the scene into the bundle (make sure you saved your changes to the scene).

23-Add scene to bundle.png

The scene and all the assets it depends on will be included in the bundle. Hit the build button now.

24-Build.png

Now create a config file with your bundle's information and drop them in PPP's Assets directory. When you run the game, your level should be selectable from the mod menu.
 
Last edited: