Struct NpcTemplateMixin
Namespace: OblivionMp.Sdk.Common.Archetypes.Mixins
Assembly: OblivionMp.Sdk.Common.dll
An NPC's record from the game files.
[ArchetypeMixin]
public readonly struct NpcTemplateMixin : IArchetypeMixin, IArchetypeQueryable, IEntityShape
Implements
IArchetypeMixin, IArchetypeQueryable, IEntityShape
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Properties
CalcMax
The highest level when the level is relative to the player's, or 0 for no limit.
public ushort CalcMax { get; set; }
Property Value
CalcMin
The lowest level when the level is relative to the player's, or 0 for no limit.
public ushort CalcMin { get; set; }
Property Value
Id
The NPC's form id.
public FormId Id { get; set; }
Property Value
FormId
ItemsCount
public int ItemsCount { get; }
Property Value
Level
The NPC's level, or its offset from the player's level when PcLevelOffset is set.
public int Level { get; set; }
Property Value
PcLevelOffset
Whether Level is relative to the player's level.
public bool PcLevelOffset { get; set; }
Property Value
Methods
AddItems(in BaseContainerItem)
[Changes("NpcTemplateMixin.Field.Items")]
public void AddItems(in BaseContainerItem value)
Parameters
value BaseContainerItem
ClearItems()
[Changes("NpcTemplateMixin.Field.Items")]
public void ClearItems()
ContainsItems(in BaseContainerItem)
public bool ContainsItems(in BaseContainerItem value)
Parameters
value BaseContainerItem
Returns
GetItems()
public NativeList<BaseContainerItem>.ReadOnly GetItems()
Returns
NativeList<BaseContainerItem>.ReadOnly
GetItems(int)
public BaseContainerItem GetItems(int index)
Parameters
index int
Returns
BaseContainerItem
InsertItems(int, in BaseContainerItem)
[Changes("NpcTemplateMixin.Field.Items")]
public void InsertItems(int index, in BaseContainerItem value)
Parameters
index int
value BaseContainerItem
Keep()
This entity, which it already is: a loop over this shape hands over the shape itself.
public NpcTemplateMixin Keep()
Returns
Remarks
Here so taking something out of a loop reads the same whichever way the loop walks. Whether a shape is walked by chunk follows from what it includes, which the call site cannot see and which changes when an include does.
RemoveAtItems(int)
[Changes("NpcTemplateMixin.Field.Items")]
public BaseContainerItem RemoveAtItems(int index)
Parameters
index int
Returns
BaseContainerItem
SetItems(in NativeList<BaseContainerItem>)
[Changes("NpcTemplateMixin.Field.Items")]
public void SetItems(in NativeList<BaseContainerItem> value)
Parameters
value NativeList<BaseContainerItem>
SetItems(int, in BaseContainerItem)
[Changes("NpcTemplateMixin.Field.Items")]
public void SetItems(int index, in BaseContainerItem value)
Parameters
index int
value BaseContainerItem