Table of Contents

Class NPCAppearance

Namespace
S1API.Entities
Assembly
S1API.dll

Modder-facing appearance customization system for NPCs. Provides builders to configure visual appearance including physical features, clothing, and accessories. Appearance configuration is done in OnCreated().

public class NPCAppearance
Inheritance
NPCAppearance
Inherited Members
Extension Methods

Remarks

Use the builder pattern to configure customization fields, face layers, body layers, and accessory layers. Always call Build() at the end to generate the mugshot and apply the appearance to the avatar.

Methods

Build()

Finalizes the appearance by generating the NPC's mugshot. This can be called after setting all appearance attributes.

public NPCAppearance Build()

Returns

NPCAppearance

The NPCAppearance instance with the generated mugshot.

GenerateRandomAppearance()

Generates a random appearance for the S1API.Entities.NPCAppearance.NPC

public void GenerateRandomAppearance()

Set<T>(object)

Sets an appearance field within ScheduleOne.AvatarFramework.AvatarSettings

public NPCAppearance Set<T>(object appearanceValue) where T : BaseAppearance

Parameters

appearanceValue object

The value to set

Returns

NPCAppearance

Type Parameters

T

The appearance type

WithAccessoryLayer<T>(string, uint)

Adds a Accessory Layer within the ScheduleOne.AvatarFramework.AvatarSettings

public NPCAppearance WithAccessoryLayer<T>(string path, uint hexColor) where T : BaseAccessoryAppearance

Parameters

path string

The asset path

hexColor uint

The color in Hexadecimals

Returns

NPCAppearance

Type Parameters

T

WithAccessoryLayer<T>(string, Color)

Adds a Accessory Layer within the ScheduleOne.AvatarFramework.AvatarSettings

public NPCAppearance WithAccessoryLayer<T>(string path, Color color) where T : BaseAccessoryAppearance

Parameters

path string

The asset path

color Color

The color instance

Returns

NPCAppearance

Type Parameters

T

WithBodyLayer<T>(string, uint)

Adds a Body Layer within the ScheduleOne.AvatarFramework.AvatarSettings

public NPCAppearance WithBodyLayer<T>(string path, uint hexColor) where T : BaseBodyAppearance

Parameters

path string

The asset path

hexColor uint

The color in Hexadecimals

Returns

NPCAppearance

Type Parameters

T

WithBodyLayer<T>(string, Color)

Adds a Body Layer within the ScheduleOne.AvatarFramework.AvatarSettings

public NPCAppearance WithBodyLayer<T>(string path, Color color) where T : BaseBodyAppearance

Parameters

path string

The asset path

color Color

The color instance

Returns

NPCAppearance

Type Parameters

T

WithFaceLayer<T>(string, uint)

Adds a Face Layer within the ScheduleOne.AvatarFramework.AvatarSettings

public NPCAppearance WithFaceLayer<T>(string path, uint hexColor) where T : BaseFaceAppearance

Parameters

path string

The asset path

hexColor uint

The color in Hexadecimals

Returns

NPCAppearance

Type Parameters

T

WithFaceLayer<T>(string, Color)

Adds a Face Layer within the ScheduleOne.AvatarFramework.AvatarSettings

public NPCAppearance WithFaceLayer<T>(string path, Color color) where T : BaseFaceAppearance

Parameters

path string

The asset path

color Color

The color instance

Returns

NPCAppearance

Type Parameters

T