Skip to main content
Version: 1.0.0

Struct AiState

Namespace: OblivionMp.Sdk.Common.Archetypes.Mixins
Assembly: OblivionMp.Sdk.Common.dll

What an NPC's AI is doing, as reported by the game that simulates it.

[ArchetypeMixin]
public readonly struct AiState : 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​

Overridden​

Whether the NPC runs a package laid over its schedule, such as a server order, rather than its own.

public bool Overridden { get; set; }

Property Value​

bool

PackageFormId​

The form id of the AI package the NPC is running now.

public uint PackageFormId { get; set; }

Property Value​

uint

PackageType​

The type of that package.

public AiPackageType PackageType { get; set; }

Property Value​

AiPackageType

Procedure​

The step of the package the NPC is on.

public AiProcedure Procedure { get; set; }

Property Value​

AiProcedure

ProcedureIndex​

The index of that step within the package.

public int ProcedureIndex { get; set; }

Property Value​

int

ReportedOutcome​

How that order ended, or None before any has ended.

public AiIntentOutcome ReportedOutcome { get; set; }

Property Value​

AiIntentOutcome

ReportedSeq​

The sequence number of the last order the NPC finished.

public ushort ReportedSeq { get; set; }

Property Value​

ushort

Methods​

Keep()​

This entity, which it already is: a loop over this shape hands over the shape itself.

public AiState Keep()

Returns​

AiState

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.

  • Properties
    • Overridden
    • PackageFormId
    • PackageType
    • Procedure
    • ProcedureIndex
    • ReportedOutcome
    • ReportedSeq
  • Methods
    • Keep()