Skip to content

Item Porting Guide

DeathWeasel1337 edited this page May 23, 2019 · 5 revisions

What you'll need:
SB3Utility
A game from which to port stuff

First, start by opening some game files with SB3UGS. In this example I'll show you how to port stuff from Musumakeup, but the actual items are poorly organized and may be different depending on the game. It's up to you to find the stuff you want to port.

In Musumakeup, all the interesting stuff is stored in .pp files. If you open one you'll see a bunch of different tabs, the ones relevant for this tutorial are .xx and .xa. .xx contains the item, it's meshes, it's materials, and it's textures. .xa contains animations.

Open on of the .pp files and expand the things on the object tree. Click on them for information. Click on a mesh and the object will display in the renderer window. Select a mesh and click export.

Step 1

If an object has multiple meshes, you can click the meshes tab, select all of them, and click export. When you export you will get a .fbx file and a texture inside a folder at the location of the file you opened.

Step 2

An fbx file contains the mesh. You can open it in Blender or whatever 3D modelling program you prefer. For many objects, you shouldn't need to do so.

To import this object to Koikatsu, we're going to replace an accessory. Open Koikatu\abdata\chara\ao_arm_00.unity3d with SB3UGS. SB3UGS will make a backup of a file whenever you save, but you can make a backup yourself just to be sure you don't mess up your accessories.

Choose a worthy sacrifice, expand the object tree, and remove the transform containing the accessory. This removes the mesh and unassigns (but does not remove) the materials and textures.

Step 3

Now open the .fbx you exported earlier. Drag and drop the frame on to the root transform.

Step 4

Drag the Imported Mesh anywhere in to the blue area of the Object Tree. Because we added the transform, SB3UGS knows where to put it. This object has no bones so it needs to be converted to a MeshRenderer.

Step 5

Now you've imported the mesh, but it has no material. Select the MeshRenderer and select any material.

Step 6

This adds the material and its textures to the Object Tree. Select the material and rename it to the material of the original object.

Step 7

Now drag the Imported Texture to the blue area of the Object Tree, then the Imported Material. Because you renamed the material, the imported material will automatically overwrite the one with the same name and assign the texture you imported.

Step 8

This example only has one texture, a Main Tex. Koikatsu items have line masks, color masks, detail masks, and others that allow them to be fully configurable by the in game color selectors. This item doesn't.

An optional step at this point if your object had multiple meshes is to reimport the meshes. When you import the materials it will copy the one you assigned for ALL the imported materials, then reimporting the meshes will assign all those materials to the mesh. Very useful for quickly importing things like maps which can have dozens of materials, textures, and meshes without having to assign anything manually.

The last thing to do before we can try the item out in game is to assign the MonoBehavior. Double click it in the Object Tree top open it and expand the array there at the top.

Step 9

Go back to the Object Tree and drag the MeshRenderer on to this array. If the data turned green you did it right. If your object has multiple MeshRenderers you will need to add more array entries and assign every MeshRenderer.

Step 10

Now open up the character maker and see your item in game.

Step 11

Huge, right? You can select a transform which contains your mesh and scale it. Don't forget to apply changes and save.

Step 12

If the object doesn't appear on the character it may be because it is way off center. Try rotating the camera around and looking for it. You can open the fbx in Blender and recenter it.

If the object appears at the feet it may be because the MonoBehavior is not set up correctly or some other error. Check output_log.

If your goal is to create an accessory you've pretty much done that. Rename N_item to N_move. This allows accessories to be moved around in the character maker. Items without a transform named N_move cannot be repositioned.

Now since most of these items only have one main texture they make for poor accessories since they cannot be colored. Studio items don't need all that. Let's turn this accessory in to a studio mod.

First make a copy of your Koikatu\abdata\chara mt_ramp_00.unity3d and open the copy with SB3UGS. Give it a unique CAB string.

Step 13

Now, select all the textures and delete them.

Step 14

This leaves us with an empty unity3d file we can fill with whatever we want. We are using this one because SB3UGS cannot remove animators once added, so we cant use anything that already has a 3D object in it.

Go back to your accessory file and mark for copying the accessory you modified.

Step 15

Go to your empty unity3d file and paste all marked. This will bring the object and all it's materials and textures. Double click the animator, expand the object tree and delete the MonoBehavior.

Step 16

This MonoBehavior is for accessories and isn't useful for studio items. Now you could open a studio item, find the ItemComponent MonoBehavior, and drag and drop it in, but for this item there is no need.

The MonoBehavior allows you to configure certain aspects of your item, particularly what will show up when you select the item in the workspace and click Anim. This item has no meaningful way to change colors, no FK control, no animations, and nothing that an ItemComponent MonoBehavior would be useful for.

Studio items function just fine without one so for a simple object like this we can just leave it off. Now you can rename your asset.

Step 17

Rename your unity3d file. Create some studio list files and point them to this asset in this file.

Step 18

Reverse engineer an existing mod to find out how the lists work. If all goes well your item will show up in studio.

Step 19

If your item shows up in the list but doesn't appear in studio when you select it make sure you're pointing your lists at the right file and asset.

If your item appears in studio but does not appear in the workspace it means there was an error, check output_log. Most likely a misconfigured MonoBehavior.

Clone this wiki locally