G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UDocument Class Reference

Document, readable by the Player. More...

Public Member Functions

Functions
TArray< UDocumentElement > BuildDocument (const AGothicCharacterState Reader)
 Returns all contents that have been explicitly added or unlocked by the reader so far. After calling this once, the contents can also be queried via GetContentOfLastBuild().
TArray< UDocumentElement > GetContentOfLastBuild () const
 Returns all contents that have been added during the last build operation.
bool HasBeenBuilt () const
 Returns true, if this Document has some previously (and usable) built data.
void NotifyShownToReader (AGothicCharacterState Reader)
 To be called when this document is shown to the reader (in UI).
void AddSegment (TSubclassOf< UDocumentSegment > SegmentClass)
 Adds the given segment to this document.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static TArray< TSubclassOf< UDocumentSegment > > FindSegmentsUnlockedByReader (const AGothicCharacterState Reader, TSubclassOf< UDocument > DocumentClass)
 Returns all segments that this reader has unlocked (in the order they were unlocked).
static TArray< TSubclassOf< UDocumentSegment > > FindSegmentsViewedByReader (const AGothicCharacterState Reader, TSubclassOf< UDocument > DocumentClass)
 Returns all segments that this reader has unlocked and viewed before (in the order they were viewed).
static bool IsAllowedToUnlockSegment (AGothicCharacterState Reader, TSubclassOf< UDocument > DocumentClass, TSubclassOf< UDocumentSegment > SegmentClass)
 Returns true, if the segments conditions allow it to unlock it now.
static bool IsSegmentUnlockedByReader (const AGothicCharacterState Reader, TSubclassOf< UDocumentSegment > SegmentClass)
 Returns true if the given segment has been unlocked for the given reader.
static void RememberSegmentUnlocked (AGothicCharacterState Reader, TSubclassOf< UDocument > DocumentClass, TSubclassOf< UDocumentSegment > SegmentClass)
 Lets the given reader remember that they have unlocked a segment. (Will be stored in LongTermMemory).
static void RememberSegmentViewed (AGothicCharacterState Reader, TSubclassOf< UDocument > DocumentClass, TSubclassOf< UDocumentSegment > SegmentClass)
 Lets the given reader remember that they have viewed a segment. (Will be stored in LongTermMemory).
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

Document
TArray< UDocumentSegment > BuiltSegments
 Most recently built Segments. Initially empty, call BuildDocument() to update.
FText Title
 Title of this Document.
TMap< FName, FString > Metadata
 Additional metadata attached to this document.
TArray< TSubclassOf< UDocumentSegment > > AddedSegments
 Templates of the Segments that have been added to this document so far.
Variables
const TArray< UDocumentElement > ContentOfLastBuild
 Returns all contents that have been added during the last build operation.
Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Detailed Description

Document, readable by the Player.

The structure is as follows:

Documents are made up of Segments. Segments are made up of Sections.

A section is what will actually be written in the UI: A paragraph, a list, headings, images, etc.

The game may add Segments dynamically - ie. when the story progresses - to fill the document with more content.

Member Function Documentation

◆ AddSegment()

void AddSegment ( TSubclassOf< UDocumentSegment > SegmentClass)

Adds the given segment to this document.

◆ BuildDocument()

TArray< UDocumentElement > BuildDocument ( const AGothicCharacterState Reader)

Returns all contents that have been explicitly added or unlocked by the reader so far. After calling this once, the contents can also be queried via GetContentOfLastBuild().

◆ FindSegmentsUnlockedByReader()

TArray< TSubclassOf< UDocumentSegment > > FindSegmentsUnlockedByReader ( const AGothicCharacterState Reader,
TSubclassOf< UDocument > DocumentClass )
static

Returns all segments that this reader has unlocked (in the order they were unlocked).

◆ FindSegmentsViewedByReader()

TArray< TSubclassOf< UDocumentSegment > > FindSegmentsViewedByReader ( const AGothicCharacterState Reader,
TSubclassOf< UDocument > DocumentClass )
static

Returns all segments that this reader has unlocked and viewed before (in the order they were viewed).

◆ GetContentOfLastBuild()

TArray< UDocumentElement > GetContentOfLastBuild ( ) const

Returns all contents that have been added during the last build operation.

◆ HasBeenBuilt()

bool HasBeenBuilt ( ) const

Returns true, if this Document has some previously (and usable) built data.

◆ IsAllowedToUnlockSegment()

bool IsAllowedToUnlockSegment ( AGothicCharacterState Reader,
TSubclassOf< UDocument > DocumentClass,
TSubclassOf< UDocumentSegment > SegmentClass )
static

Returns true, if the segments conditions allow it to unlock it now.

◆ IsSegmentUnlockedByReader()

bool IsSegmentUnlockedByReader ( const AGothicCharacterState Reader,
TSubclassOf< UDocumentSegment > SegmentClass )
static

Returns true if the given segment has been unlocked for the given reader.

◆ NotifyShownToReader()

void NotifyShownToReader ( AGothicCharacterState Reader)

To be called when this document is shown to the reader (in UI).

◆ RememberSegmentUnlocked()

void RememberSegmentUnlocked ( AGothicCharacterState Reader,
TSubclassOf< UDocument > DocumentClass,
TSubclassOf< UDocumentSegment > SegmentClass )
static

Lets the given reader remember that they have unlocked a segment. (Will be stored in LongTermMemory).

◆ RememberSegmentViewed()

void RememberSegmentViewed ( AGothicCharacterState Reader,
TSubclassOf< UDocument > DocumentClass,
TSubclassOf< UDocumentSegment > SegmentClass )
static

Lets the given reader remember that they have viewed a segment. (Will be stored in LongTermMemory).

◆ StaticClass()

UClass StaticClass ( )
static

Member Data Documentation

◆ AddedSegments

Templates of the Segments that have been added to this document so far.

◆ BuiltSegments

TArray<UDocumentSegment> BuiltSegments

Most recently built Segments. Initially empty, call BuildDocument() to update.

◆ ContentOfLastBuild

const TArray<UDocumentElement> ContentOfLastBuild

Returns all contents that have been added during the last build operation.

◆ Metadata

TMap<FName,FString> Metadata

Additional metadata attached to this document.

◆ Title

FText Title

Title of this Document.