Class NPCPrefabBuilder.AvatarDefaultsBuilder
Wrapper for authoring appearance defaults without exposing game types to modders.
public sealed class NPCPrefabBuilder.AvatarDefaultsBuilder
- Inheritance
-
NPCPrefabBuilder.AvatarDefaultsBuilder
- Inherited Members
- Extension Methods
Constructors
AvatarDefaultsBuilder()
public AvatarDefaultsBuilder()
Properties
EyeBallTint
public Color EyeBallTint { get; set; }
Property Value
- Color
EyeballMaterialIdentifier
public string EyeballMaterialIdentifier { get; set; }
Property Value
EyebrowRestingAngle
public float EyebrowRestingAngle { get; set; }
Property Value
EyebrowRestingHeight
public float EyebrowRestingHeight { get; set; }
Property Value
EyebrowScale
public float EyebrowScale { get; set; }
Property Value
EyebrowThickness
public float EyebrowThickness { get; set; }
Property Value
Gender
public float Gender { get; set; }
Property Value
HairColor
public Color HairColor { get; set; }
Property Value
- Color
HairPath
public string HairPath { get; set; }
Property Value
Height
public float Height { get; set; }
Property Value
LeftEye
public (float topLidOpen, float bottomLidOpen) LeftEye { get; set; }
Property Value
LeftEyeLidColor
public Color LeftEyeLidColor { get; set; }
Property Value
- Color
PupilDilation
public float PupilDilation { get; set; }
Property Value
RightEye
public (float topLidOpen, float bottomLidOpen) RightEye { get; set; }
Property Value
RightEyeLidColor
public Color RightEyeLidColor { get; set; }
Property Value
- Color
SkinColor
public Color32 SkinColor { get; set; }
Property Value
- Color32
Weight
public float Weight { get; set; }
Property Value
Methods
WithAccessoryLayer(string, Color)
public NPCPrefabBuilder.AvatarDefaultsBuilder WithAccessoryLayer(string path, Color color)
Parameters
pathstringcolorColor
Returns
WithBodyLayer(string, Color)
public NPCPrefabBuilder.AvatarDefaultsBuilder WithBodyLayer(string path, Color color)
Parameters
pathstringcolorColor
Returns
WithFaceLayer(string, Color)
public NPCPrefabBuilder.AvatarDefaultsBuilder WithFaceLayer(string path, Color color)
Parameters
pathstringcolorColor
Returns
WithImpostor(AvatarImpostorDefinition)
Uses an existing game-owned NPC impostor discovered through NPCImpostorCatalog.
public NPCPrefabBuilder.AvatarDefaultsBuilder WithImpostor(AvatarImpostorDefinition impostor)
Parameters
impostorAvatarImpostorDefinitionThe discovered impostor definition to use.
Returns
- NPCPrefabBuilder.AvatarDefaultsBuilder
The current builder for chaining.
WithImpostor(string)
Uses an existing game-owned NPC impostor by character settings name.
public NPCPrefabBuilder.AvatarDefaultsBuilder WithImpostor(string name)
Parameters
namestringName such as
Kyle, or a resource path such ascharactersettings/Kyle.
Returns
- NPCPrefabBuilder.AvatarDefaultsBuilder
The current builder for chaining.
WithImpostorTexture(Texture2D)
Uses a texture supplied by the mod as this NPC's far-distance impostor.
public NPCPrefabBuilder.AvatarDefaultsBuilder WithImpostorTexture(Texture2D texture)
Parameters
textureTexture2DTexture to use for the impostor.
Returns
- NPCPrefabBuilder.AvatarDefaultsBuilder
The current builder for chaining.
Remarks
This is appropriate for textures loaded from an embedded resource with
TextureUtils.LoadTextureFromResource(...). S1API does not network raw texture bytes;
every visual client must be able to load the same texture locally.
WithRandomImpostor()
Uses a deterministic random game-owned NPC impostor from all available impostors.
public NPCPrefabBuilder.AvatarDefaultsBuilder WithRandomImpostor()
Returns
- NPCPrefabBuilder.AvatarDefaultsBuilder
The current builder for chaining.
WithRandomImpostor(int, params string[])
Uses a seeded random game-owned NPC impostor from the supplied character settings names.
public NPCPrefabBuilder.AvatarDefaultsBuilder WithRandomImpostor(int seed, params string[] names)
Parameters
Returns
- NPCPrefabBuilder.AvatarDefaultsBuilder
The current builder for chaining.
WithRandomImpostor(params string[])
Uses a deterministic random game-owned NPC impostor from the supplied character settings names.
public NPCPrefabBuilder.AvatarDefaultsBuilder WithRandomImpostor(params string[] names)
Parameters
namesstring[]Names such as
Kyle,Mac, orMick.
Returns
- NPCPrefabBuilder.AvatarDefaultsBuilder
The current builder for chaining.