SourceCharacter
public sealed class SourceCharacterNamespace MapExpansions
A character of an expansion’s source scene, as the scene defines it: name, look and voice. The character itself does not come along, because a source scene’s NPCs are network objects of their own world. A mod that brings such a person to life creates its own NPC and gives it this look with ApplyAppearance.
Properties
Section titled “Properties”ObjectName
Section titled “ObjectName”public string ObjectName { get; internal set; }Name of the character’s object in the source scene, such as “Pam”.
public string Id { get; internal set; }The character’s id in the source scene. Not unique; the prologue’s two officers share one.
FirstName
Section titled “FirstName”public string FirstName { get; internal set; }LastName
Section titled “LastName”public string LastName { get; internal set; }Mugshot
Section titled “Mugshot”public Sprite Mugshot { get; internal set; }Contact picture, or null.
public BaseNPCDataObject Data { get; internal set; }The character’s data as the source scene defines it. Kept loaded for the whole session.
Methods
Section titled “Methods”ApplyAppearance
Section titled “ApplyAppearance”public bool ApplyAppearance(NPC npc)Gives a living NPC this character’s body, clothes and distant-view picture. Call it on every peer once the NPC exists; the look is local to each peer. The NPC keeps the look when the game re-applies its data, and when another mod puts a body or an outfit on it later, as S1API does with a custom NPC’s appearance defaults.
Returns False when the NPC or the character’s look is missing; the log names the reason.