Class ScenePackage
- Namespace
- SkyrimForge
- Assembly
- SkyrimForge.dll
An AI package the actor filling an alias runs in a ScenePhase.
public sealed record ScenePackage : SceneAction, IEquatable<SceneAction>, IEquatable<ScenePackage>
- Inheritance
-
ScenePackage
- Implements
- Inherited Members
Remarks
A package that does not complete, such as a sandbox package, leaves the phase it ends in playing until the scene is stopped or the phase's EndsWhen returns true.
The player performs a package only while AI-driven. A scene with a package action whose alias the player fills sets that state as it begins to play and clears it as it ends. The state is one flag, so clearing it clears it for another mod that set it. A travel action whose alias the player fills runs Travel, or TravelAtRun for a speed of kRun or kJog. The radius does not apply to it, and two such actions running in one phase share the destination of the one listed last.
Constructors
ScenePackage(QuestReferenceAlias, LinkedRefPackage, QuestReferenceAlias)
Creates an action that runs a package record whose location or target is the actor's linked reference,
with that link set to the reference filling linkedRef.
public ScenePackage(QuestReferenceAlias actor, LinkedRefPackage package, QuestReferenceAlias linkedRef)
Parameters
actorQuestReferenceAliasThe alias whose actor runs the package.
packageLinkedRefPackageThe package record and the keyword of its link.
linkedRefQuestReferenceAliasThe alias whose reference the link is set to.
Remarks
The link is set to the reference from the scene's start until it ends, and is then restored to the reference it was set to before.
Exceptions
- ArgumentNullException
actor,package, orlinkedRefisnull.
ScenePackage(QuestReferenceAlias, params IEnumerable<FormId<Package>>)
Creates an action that runs package records.
public ScenePackage(QuestReferenceAlias actor, params IEnumerable<FormId<Package>> packageIds)
Parameters
actorQuestReferenceAliasThe alias whose actor runs the packages.
packageIdsIEnumerable<FormId<Package>>The package records, in the order of the Creation Kit's package list.
Exceptions
- ArgumentNullException
actororpackageIdsisnull.- ArgumentException
packageIdsis empty.
Properties
Actor
The alias whose actor runs the package.
public QuestReferenceAlias Actor { get; }
Property Value
Destination
The alias whose reference a travel package's actor travels to. The value is null for a package record or another destination.
public QuestReferenceAlias? Destination { get; }
Property Value
EqualityContract
protected override Type EqualityContract { get; }
Property Value
LinkedPackage
The package record whose location or target is a linked reference, with the keyword of that link. The value is null for another package.
public LinkedRefPackage? LinkedPackage { get; }
Property Value
LinkedRef
The alias whose reference the link of LinkedPackage is set to. The value is null for another package.
public QuestReferenceAlias? LinkedRef { get; }
Property Value
LocationDestination
The location alias whose location's world location marker a travel package's actor travels to. The value is null for a package record or another destination.
public QuestLocationAlias? LocationDestination { get; }
Property Value
PackageIds
The package records. A travel package has none.
public IReadOnlyList<FormId<Package>> PackageIds { get; }
Property Value
Radius
The distance from the destination at which a travel package's actor has arrived.
public uint Radius { get; }
Property Value
Speed
The speed a travel package's actor travels at. A null value selects the package's default.
public PACKAGE_DATA.PreferredSpeed? Speed { get; }
Property Value
Methods
Equals(SceneAction?)
public override sealed bool Equals(SceneAction? other)
Parameters
otherSceneAction
Returns
Equals(ScenePackage?)
public bool Equals(ScenePackage? other)
Parameters
otherScenePackage
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Travel(QuestReferenceAlias, QuestLocationAlias, uint, PreferredSpeed?)
Creates an action that runs a travel package,
whose location is within radius units of the world location marker of the location filling destination.
public static ScenePackage Travel(QuestReferenceAlias actor, QuestLocationAlias destination, uint radius, PACKAGE_DATA.PreferredSpeed? speed = null)
Parameters
actorQuestReferenceAliasThe alias whose actor travels.
destinationQuestLocationAliasThe location alias whose location's world location marker the actor travels to.
radiusuintThe distance from the marker at which the actor has arrived.
speedPACKAGE_DATA.PreferredSpeed?The speed the actor travels at. A null value selects the package's default.
Returns
Exceptions
- ArgumentNullException
actorordestinationisnull.
Travel(QuestReferenceAlias, QuestReferenceAlias, uint, PreferredSpeed?)
Creates an action that runs a travel package whose location is within radius units of the reference filling destination.
public static ScenePackage Travel(QuestReferenceAlias actor, QuestReferenceAlias destination, uint radius, PACKAGE_DATA.PreferredSpeed? speed = null)
Parameters
actorQuestReferenceAliasThe alias whose actor travels.
destinationQuestReferenceAliasThe alias whose reference the actor travels to.
radiusuintThe distance from the reference at which the actor has arrived.
speedPACKAGE_DATA.PreferredSpeed?The speed the actor travels at. A null value selects the package's default.
Returns
Remarks
An actor does not reliably reach a load door as the destination. To travel to a position, fill the destination with a marker CreateMarker(NiPoint3) creates.
Exceptions
- ArgumentNullException
actorordestinationisnull.
TravelToPlayer(QuestReferenceAlias, uint, PreferredSpeed?)
Creates an action that runs a travel package whose location is within radius units of the player.
public static ScenePackage TravelToPlayer(QuestReferenceAlias actor, uint radius, PACKAGE_DATA.PreferredSpeed? speed = null)
Parameters
actorQuestReferenceAliasThe alias whose actor travels.
radiusuintThe distance from the player at which the actor has arrived.
speedPACKAGE_DATA.PreferredSpeed?The speed the actor travels at. A null value selects the package's default.
Returns
Exceptions
- ArgumentNullException
actorisnull.
Operators
operator ==(ScenePackage?, ScenePackage?)
public static bool operator ==(ScenePackage? left, ScenePackage? right)
Parameters
leftScenePackagerightScenePackage
Returns
operator !=(ScenePackage?, ScenePackage?)
public static bool operator !=(ScenePackage? left, ScenePackage? right)
Parameters
leftScenePackagerightScenePackage