Customizing NPCs

**If you don't want to use a completely pre-fabricated NPC, you can customize their appearance. You essentially select a naked model and then customize its skin color, hair style and hair color and horns. Following the documentation below will set you up with the proper code to use.**

If you have 3D character building and rigging skills and Unity, or at least some texture painting skills, it's possible to create your own prefabs or NPC outfits. But since it's not native to the Editor it will require distribution as a "full" game mod.

## Edit Character Instance

With an  actor selected, select  from the  properties view to open the Character Instance Editor.

### Model & Gender

Clicking the current model will open a drop down that with all the models available to the current content pack based upon its dependencies.

You can use this picture viewer to view available models

A **mod** from Shadowrun Electric allows 3D body transforms from the Editor for all three games in the trilogy. This non-intrusive code mod uses transforms to allow smaller (younger), "slim ork" or overweight human and metahuman 3D models.

### Character Portrait

You may select a portrait from those available to the content pack. By default this includes *all* of the portraits in the base game, including PC and NPC options. To add a custom portrait exclusive to your campaign, make a 212x278 PNG image and save it in your content pack under the /art/portrait folder.

### Model Customization

Most of the models are "pre-fab" options that cannot be customized. For example, if you select Standard/ElfMaleGanger, then the character will appear as a pre-defined Elf Male Ganger. You cannot change their hair color or other characteristics.

The exception is the Core options located under the Seattle menu. If you select one of these ten models (2 genders for each of the 5 races), an **Input Portrait Code** text box will appear. You can now further customize your NPC by entering a code here. Generally you would base your choices on the selected portrait, unless no portrait was set.

The code should be formatted like this:  `s#h#c#b#c#t#`

 t# | horn style (Trolls only)

Replace '#' with the number that indicates which style you want. Inputting '0' means nothing (e.g. no hair: h0, no beard: b0, no horns: t0).

The following examples correspond to the Dead Man's Switch version of the editor and game.

The following is a randomized code example for a male troll: `s3h5c2b2c5t4`

#### Model Generator Tool

You may also use the Model Generator to generate a code

## Character Outfit

From the character editor, select the equipment tab to modify the characters outfit. Upon selecting Add Equipment, outfits can be found through the following menus:

* DFDC Player Outfits
* Disguises
* HK Player Outfits
* Outfits
* Player Outfits

In general, NPCs should only use Outfits, especially if they will be on the Shadowrunner team. Player Outfits are meant to be iconic for the PC, and Disguises are automatically applied to other members of the team.

## Randomize From Groups

Randomize From groups can be used to easily add variety to a group of spawned actors, especially those that don't have speaking roles and appear in groups. Hong Kong used this method for certain Triad and security actors, as well as civilians .

If you select Randomize From in the actor preferences, or have "hiring\_set\_randomizer" specified in the character instance file, the game will override the actor's prefab, name, and outfit with a randomly selected model, name, and outfit from one inside the hiring file you select. This is done each time a map is loaded or the actor is spawned, so it's an easy way to have a scene change subtly without moving actors around or spawning based on triggers.

### Creating Custom Randomize From Groups

The hiring files that create Randomize From groups are very simple, but require you to know the specific prefab path that calls the models you want to randomize. This can be found in the actor properties, or in manifest files for the uncooked Hong Kong pack.
You also need to create a "hiring" folder in your content pack's data folder. It's a good idea to make a list of all the actors you want to use for a specific group, and a good place to start there is the HK Model Viewer.

So let's use an actual example to show you how it works. Since Hong Kong doesn't make use of the Humanis prefabs, they didn't make a randomizer for them. But we really want to use Humanis groups in a scene. Teams of shotgun, axe and spell-slinging fascists to challenge the player. Since there's 16 prefabs for Humanis, it's easy enough to sort them into roles that fit the models, much like Hong Kong does with Triad members.

Open a text file. When you go to save the file make sure the first part matches the ID you add to the document, but the format is "id\_role.hiring.txt". Let's name this one humanis\_enforcer.hiring.txt for our shotgun toting loser. After looking at the models, I picked 4 prefabs that look good with a gun. Let's look at the document contents:

id: "humanis\_enforcer"

prefab: "Berlin:Humanis/HumanFemaleHumanisLongSleeve\_1"

prefab: "Berlin:Humanis/HumanFemaleHumanisPonytail"

prefab: "Berlin:Humanis/HumanMaleHumanisLongSleeve\_1"

prefab: "Berlin:Humanis/HumanMaleHumanisPonytailRedhead"

portrait: ""

description {

```
 gender: Gender_Male

 name: "Humanis Enforcer"

 description: ""

```

}

description {

```
 gender: Gender_Female

 name: "Humanis Enforcer"

 description: ""

```

}

ignore\_uniqueness: true

And the Pastebin for the document contents because the wiki syntax is giving me trouble.

Because the prefabs here are all cooked with clothes, they don't need random outfits. Generally, undressed actors that need outfits should be used only for occasional/iconic actors or hires for team Shadowrunner (because it uses lots more memory to dress an actor).

You may need to restart the editor for any randomized groups you added to show up, but you can also manually add the line "hiring\_set\_randomizer: humanis\_enforcer" to the character instance files you're using for these ugly thugs.