Table of Contents

Struct PapyrusType

Namespace
SkyrimForge.Papyrus
Assembly
SkyrimForge.Game.dll

A type in a native function's signature, as the script declares it.

A scalar is one of the fixed kinds. An object declares a form type, from which the Papyrus VM resolves the script class at registration.

public readonly struct PapyrusType
Inherited Members

Properties

Bool

The type of a bool parameter or return value.

public static PapyrusType Bool { get; }

Property Value

PapyrusType

Float

The type of a float parameter or return value.

public static PapyrusType Float { get; }

Property Value

PapyrusType

Int

The type of an int parameter or return value.

public static PapyrusType Int { get; }

Property Value

PapyrusType

None

The return type of a function declaring none. Papyrus has no None parameter.

public static PapyrusType None { get; }

Property Value

PapyrusType

String

The type of a string parameter or return value.

public static PapyrusType String { get; }

Property Value

PapyrusType

Methods

Form(FormType)

Builds the type for a form of objectType, such as ObjectReference for Reference or Actor for ActorCharacter.

public static PapyrusType Form(FormType objectType)

Parameters

objectType FormType

Returns

PapyrusType

FromType<T>()

Gets the Papyrus type of T, which is int, float, bool, string, a form view, or an array of one of those. A nullable type maps to the type it wraps.

public static PapyrusType FromType<T>()

Returns

PapyrusType

Type Parameters

T

Exceptions

TypeInitializationException

Papyrus has no such type, wrapping the NotSupportedException that names it.

MakeArrayType(PapyrusType)

Builds the type for an array of elementType, such as Int[] or Form[].

public static PapyrusType MakeArrayType(PapyrusType elementType)

Parameters

elementType PapyrusType

Returns

PapyrusType

Exceptions

NotSupportedException

Papyrus has no array of elementType. Arrays of arrays and arrays of None do not exist.