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

Quest object. Owned by QuestSubsystem, which also tracks the active instances. More...

Public Member Functions

Functions
bool HasAvailabilityCondition () const
 Whether ShouldBeAvailable has been implemented.
void HandleWorldBeginPlay () const
 Called when the game starts.
void DB (int64 DebugId, bool bValue) const
 DebugBoolean. Set the state of a condition for the ConversationDebugger.
void DC (int64 DebugId, EConversationDebugInfo Info) const
 DebugCall. Set the state of something for the ConversationDebugger.
void FailQuest (AGothicCharacter FailedBy=nullptr)
 Fails this quest. (Works from any state).
AGothicCharacterState GetCharacter (FName UniqueName) const
 Tries to find the given character. May return NULL if not loaded right now.
TArray< UQuest > GetChildQuests () const
 Returns this quests child quests (if there are any).
FInGameTime GetLastUpdateTime (bool Recursive=false) const
 Returns the time point of the last update of this quest. If recursive is true all children (and recursively their children) will be taken into account as well.
UQuest GetParentQuest () const
 Returns this quests parent (if there is one).
TSoftObjectPtr< UTexture2D > GetQuestBannerSoftObjectPtr () const
 Returns a soft object pointer to the quest's banner image.
FText GetQuestChapterDisplayName () const
 Returns the display name of the quest's chapter (if set).
FText GetQuestDescription () const
 Returns the quest's description.
FText GetQuestDisplayName () const
 Returns the quest's display name.
AGothicCharacterState GetQuestGiver () const
 Returns the QuestGiver's CharacterState of this quest or the first parent quest that sets one. Returns nullptr if no QuestGiver was defined anywhere this Quest or any of its parents.
FText GetQuestGiverDisplayName () const
 Returns the quest giver's display name.
TSubclassOf< UQuestline > GetQuestline () const
 Questline this quest belongs to. If not set, the parents Questline is used.
FGameplayTag GetQuestlineFilterTag () const
 Returns the filter tag of the quest line, if set.
TSoftObjectPtr< UTexture2D > GetQuestlineIconImage () const
 Returns a soft object pointer to the icon image of the questline, if set.
TSubclassOf< UDocument > GetQuestlogDocumentClass () const
 Document this quest belongs to (If not set here, the parents settings are used until a document is found).
TSoftObjectPtr< UTexture2D > GetQuestThumbnailSoftObjectPtr () const
 Returns a soft object pointer to the quest's thumbnail image.
EQuestState GetState () const
 Returns the current quest state as enum.
FInGameTime GetStateReachedTime (EQuestState StateToGetTimeFor) const
 Returns the time point when a certain state was reached.
FInGameTime GetTimeLastViewedByPlayer (AGothicPlayerState PlayerState) const
 Returns the last time this quest was looked at in the UI by the given player (invalid time if they have never looked).
void HandleQuestAvailable ()
 Called when the quests state changed to "Available".
void HandleQuestFailed ()
 Called when the quests state changed to "Failed".
void HandleQuestNotAvailableAnymore ()
 Called when the quests state changed from "Available" to "None" again.
void HandleQuestStarted ()
 Called when the quests state changed to "Running".
void HandleQuestSucceeded ()
 Called when the quests state changed to "Success".
bool HasAnyCondition () const
 Whether any script condition has been implemented.
bool AreAllInvolvedCharactersAvailable () const
 Whether all characters listed under InvolvedCharacters are loaded.
bool HasBeenStarted () const
 Returns true if had been started at some point (May be running, failed or succeeded now).
bool HasFailCondition () const
 Whether ShouldFail has been implemented.
bool HasFailed () const
 Returns true if this quest has failed.
bool HasQuestDescription () const
 Returns if the quest has a description set.
bool HasQuestDisplayName () const
 Returns if the quest has a display name set.
bool HasStartCondition () const
 Whether ShouldStart has been implemented.
bool HasSucceeded () const
 Returns true if this quest has succeeded.
bool HasSuccessCondition () const
 Whether ShouldSucceed has been implemented.
bool IsActive () const
 Returns true if this quest is currently active (available or running).
bool IsAvailable () const
 Returns true if this quest is currently available.
bool IsCompleted () const
 Returns true if this quest is completed (failed or succeeded).
bool IsNewForUI (AGothicPlayerState PlayerState=nullptr, bool bRecursive=true) const
 Returns true if this quest is new for the given player in the UI. If no player state is given the local player is used. If recursive is true changes in the state of child quests are taken into account.
bool IsPartOfMainQuest () const
 Returns true if this quest or the first parent that defines a quest kind is a MainQuest.
bool IsPartOfQuestOfKind (EQuestKind Kind) const
 Returns true if this quest or the first parent that defines a quest kind is of the given Kind.
bool IsPartOfSideQuest () const
 Returns true if this quest or the first parent that defines a quest kind is a SideQuest.
bool IsPartOfSubobjective () const
 Returns true if this quest or the first parent that defines a quest kind is a Subobjective.
bool IsRunning () const
 Returns true if this quest is currently running.
void MakeQuestAvailable ()
 Marks this quest "Available".
void MakeQuestNotAvailableAnymore ()
 Marks this quest "Not available" after it had been "Available" before.
void RestartQuest (AGothicCharacter StartedBy=nullptr)
 Starts this quest again. (Quest must be Running, Succeeded or Failed for this to work).
bool ShouldBeAvailable () const
 Called if this quest has not been started yet. Marks the quest available while true is returned.
bool ShouldFail () const
 Called in any state other than "success", fails the quest as soon as true is returned.
bool ShouldStart () const
 Called if this quest is "Available", starts the quest as soon as true is returned.
bool ShouldSucceed () const
 While this quest is running, succeeds the quest as soon as true is returned.
void StartQuest (AGothicCharacter StartedBy=nullptr)
 Starts this quest (Quest must be available for this to work).
void SucceedQuest (AGothicCharacter SuccededBy=nullptr)
 Succeeds this quest. (Must be running before calling this).
void SetQuestline (TSubclassOf< UQuestline > Value)
 Questline this quest belongs to. If not set, the parents Questline is used.
void SetQuestlogDocumentClass (TSubclassOf< UDocument > Value)
 Document that tracks the progress of this quest.
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 UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

Quest
TSoftObjectPtr< UTexture2D > ThumbnailImage
 Smaller image shown for this quest in the quest list UI.
TSubclassOf< UGameStory > BelongsToStory
 Story class this belongs to. Needs to be set for the quest to save correctly.
FGameplayTagContainer PropertyTags
 Additional tags that can be used to describe this Quest.
TArray< FName > InvolvedCharacters
 Characters that are involved in this quest (Other than the hero). The quest conditions will only be checked if all of these are loaded.
bool bIsOptional
 If true, this quest does not need to succeed for it's parent to succeed.
bool bSucceedParent
 If true, this will automatically succeed the parent as well if this quest succeeds, no matter if there're other child quests.
bool bExternalAvailabilityTrigger
 Pretend that this has a starting condition, so it won't be made available automatically.
bool bExternalStartTrigger
 Pretend that this has a starting condition, so it won't auto-start with the parent.
bool bExternalFailTrigger
 Pretend that this has a starting condition, so it won't auto-fail with the children.
bool bExternalSuccessTrigger
 Pretend that this has a starting condition, so it won't auto-succeed with the children.
TSubclassOf< UQuest > ParentQuestClass
 Parent quest this quest belongs to. State changes from parents might affect this quest, too. For example, if the parent fails, this quest might fail to.
TSubclassOf< UDocument > QuestlogDocumentClass
 Document that tracks the progress of this quest.
EQuestKind QuestKind
 Kind of quest (e.g. main, side). Will be inherited to child-quests.
TSubclassOf< UQuestline > Questline
 Questline this quest belongs to. If not set, the parents Questline is used.
FText NameText
 Localized quest name to be shown to the player.
FText DescriptionText
 Localized short description text to be shown to the player.
TSoftObjectPtr< UTexture2D > BannerImage
 Larger image shown for this quest in the quest UI.
FUIViewStateChanged__Quest OnUIViewStateChanged
int InChapter
 If set, defines into which chapter this quest should be sorted into. (INDEX_NONE if not set).
FName QuestGiverCharacterUniqueName
 If set, this is the person that would have given this quest to the player.
Variables
FQuestStateChangedDelegate OnNotAvailableAnymore
 Called when the quests state changed from "Available" to "None" again.
FQuestStateChangedDelegate OnFailed
 Called when the quests state changed to "Failed".
FQuestStateChangedDelegate OnAvailable
 Called when the quests state changed to "Available".
FQuestStateChangedDelegate OnSucceeded
 Called when the quests state changed to "Success".
const UQuest ParentQuest
 Returns this quests parent (if there is one).
const TSoftObjectPtr< UTexture2D > QuestBannerSoftObjectPtr
 Returns a soft object pointer to the quest's banner image.
const FText QuestChapterDisplayName
 Returns the display name of the quest's chapter (if set).
const FText QuestDescription
 Returns the quest's description.
const FText QuestDisplayName
 Returns the quest's display name.
const AGothicCharacterState QuestGiver
 Returns the QuestGiver's CharacterState of this quest or the first parent quest that sets one. Returns nullptr if no QuestGiver was defined anywhere this Quest or any of its parents.
const FText QuestGiverDisplayName
 Returns the quest giver's display name.
FQuestStateChangedDelegate OnStarted
 Called when the quests state changed to "Running".
const FGameplayTag QuestlineFilterTag
 Returns the filter tag of the quest line, if set.
const TSoftObjectPtr< UTexture2D > QuestlineIconImage
 Returns a soft object pointer to the icon image of the questline, if set.
const TArray< UQuest > ChildQuests
 Returns this quests child quests (if there are any).
const TSoftObjectPtr< UTexture2D > QuestThumbnailSoftObjectPtr
 Returns a soft object pointer to the quest's thumbnail image.
const EQuestState State
 This quests progression state.
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

Quest object. Owned by QuestSubsystem, which also tracks the active instances.

Member Function Documentation

◆ AreAllInvolvedCharactersAvailable()

bool AreAllInvolvedCharactersAvailable ( ) const

Whether all characters listed under InvolvedCharacters are loaded.

◆ DB()

void DB ( int64 DebugId,
bool bValue ) const

DebugBoolean. Set the state of a condition for the ConversationDebugger.

◆ DC()

void DC ( int64 DebugId,
EConversationDebugInfo Info ) const

DebugCall. Set the state of something for the ConversationDebugger.

◆ FailQuest()

void FailQuest ( AGothicCharacter FailedBy = nullptr)

Fails this quest. (Works from any state).

◆ GetCharacter()

AGothicCharacterState GetCharacter ( FName UniqueName) const

Tries to find the given character. May return NULL if not loaded right now.

◆ GetChildQuests()

TArray< UQuest > GetChildQuests ( ) const

Returns this quests child quests (if there are any).

◆ GetLastUpdateTime()

FInGameTime GetLastUpdateTime ( bool Recursive = false) const

Returns the time point of the last update of this quest. If recursive is true all children (and recursively their children) will be taken into account as well.

◆ GetParentQuest()

UQuest GetParentQuest ( ) const

Returns this quests parent (if there is one).

◆ GetQuestBannerSoftObjectPtr()

TSoftObjectPtr< UTexture2D > GetQuestBannerSoftObjectPtr ( ) const

Returns a soft object pointer to the quest's banner image.

◆ GetQuestChapterDisplayName()

FText GetQuestChapterDisplayName ( ) const

Returns the display name of the quest's chapter (if set).

◆ GetQuestDescription()

FText GetQuestDescription ( ) const

Returns the quest's description.

◆ GetQuestDisplayName()

FText GetQuestDisplayName ( ) const

Returns the quest's display name.

◆ GetQuestGiver()

AGothicCharacterState GetQuestGiver ( ) const

Returns the QuestGiver's CharacterState of this quest or the first parent quest that sets one. Returns nullptr if no QuestGiver was defined anywhere this Quest or any of its parents.

◆ GetQuestGiverDisplayName()

FText GetQuestGiverDisplayName ( ) const

Returns the quest giver's display name.

◆ GetQuestline()

TSubclassOf< UQuestline > GetQuestline ( ) const

Questline this quest belongs to. If not set, the parents Questline is used.

◆ GetQuestlineFilterTag()

FGameplayTag GetQuestlineFilterTag ( ) const

Returns the filter tag of the quest line, if set.

◆ GetQuestlineIconImage()

TSoftObjectPtr< UTexture2D > GetQuestlineIconImage ( ) const

Returns a soft object pointer to the icon image of the questline, if set.

◆ GetQuestlogDocumentClass()

TSubclassOf< UDocument > GetQuestlogDocumentClass ( ) const

Document this quest belongs to (If not set here, the parents settings are used until a document is found).

◆ GetQuestThumbnailSoftObjectPtr()

TSoftObjectPtr< UTexture2D > GetQuestThumbnailSoftObjectPtr ( ) const

Returns a soft object pointer to the quest's thumbnail image.

◆ GetState()

EQuestState GetState ( ) const

Returns the current quest state as enum.

◆ GetStateReachedTime()

FInGameTime GetStateReachedTime ( EQuestState StateToGetTimeFor) const

Returns the time point when a certain state was reached.

◆ GetTimeLastViewedByPlayer()

FInGameTime GetTimeLastViewedByPlayer ( AGothicPlayerState PlayerState) const

Returns the last time this quest was looked at in the UI by the given player (invalid time if they have never looked).

◆ HandleQuestAvailable()

void HandleQuestAvailable ( )

Called when the quests state changed to "Available".

◆ HandleQuestFailed()

void HandleQuestFailed ( )

Called when the quests state changed to "Failed".

◆ HandleQuestNotAvailableAnymore()

void HandleQuestNotAvailableAnymore ( )

Called when the quests state changed from "Available" to "None" again.

◆ HandleQuestStarted()

void HandleQuestStarted ( )

Called when the quests state changed to "Running".

◆ HandleQuestSucceeded()

void HandleQuestSucceeded ( )

Called when the quests state changed to "Success".

◆ HandleWorldBeginPlay()

void HandleWorldBeginPlay ( ) const

Called when the game starts.

◆ HasAnyCondition()

bool HasAnyCondition ( ) const

Whether any script condition has been implemented.

◆ HasAvailabilityCondition()

bool HasAvailabilityCondition ( ) const

Whether ShouldBeAvailable has been implemented.

◆ HasBeenStarted()

bool HasBeenStarted ( ) const

Returns true if had been started at some point (May be running, failed or succeeded now).

◆ HasFailCondition()

bool HasFailCondition ( ) const

Whether ShouldFail has been implemented.

◆ HasFailed()

bool HasFailed ( ) const

Returns true if this quest has failed.

◆ HasQuestDescription()

bool HasQuestDescription ( ) const

Returns if the quest has a description set.

◆ HasQuestDisplayName()

bool HasQuestDisplayName ( ) const

Returns if the quest has a display name set.

◆ HasStartCondition()

bool HasStartCondition ( ) const

Whether ShouldStart has been implemented.

◆ HasSucceeded()

bool HasSucceeded ( ) const

Returns true if this quest has succeeded.

◆ HasSuccessCondition()

bool HasSuccessCondition ( ) const

Whether ShouldSucceed has been implemented.

◆ IsActive()

bool IsActive ( ) const

Returns true if this quest is currently active (available or running).

◆ IsAvailable()

bool IsAvailable ( ) const

Returns true if this quest is currently available.

◆ IsCompleted()

bool IsCompleted ( ) const

Returns true if this quest is completed (failed or succeeded).

◆ IsNewForUI()

bool IsNewForUI ( AGothicPlayerState PlayerState = nullptr,
bool bRecursive = true ) const

Returns true if this quest is new for the given player in the UI. If no player state is given the local player is used. If recursive is true changes in the state of child quests are taken into account.

◆ IsPartOfMainQuest()

bool IsPartOfMainQuest ( ) const

Returns true if this quest or the first parent that defines a quest kind is a MainQuest.

◆ IsPartOfQuestOfKind()

bool IsPartOfQuestOfKind ( EQuestKind Kind) const

Returns true if this quest or the first parent that defines a quest kind is of the given Kind.

◆ IsPartOfSideQuest()

bool IsPartOfSideQuest ( ) const

Returns true if this quest or the first parent that defines a quest kind is a SideQuest.

◆ IsPartOfSubobjective()

bool IsPartOfSubobjective ( ) const

Returns true if this quest or the first parent that defines a quest kind is a Subobjective.

◆ IsRunning()

bool IsRunning ( ) const

Returns true if this quest is currently running.

◆ MakeQuestAvailable()

void MakeQuestAvailable ( )

Marks this quest "Available".

◆ MakeQuestNotAvailableAnymore()

void MakeQuestNotAvailableAnymore ( )

Marks this quest "Not available" after it had been "Available" before.

◆ RestartQuest()

void RestartQuest ( AGothicCharacter StartedBy = nullptr)

Starts this quest again. (Quest must be Running, Succeeded or Failed for this to work).

◆ SetQuestline()

void SetQuestline ( TSubclassOf< UQuestline > Value)

Questline this quest belongs to. If not set, the parents Questline is used.

◆ SetQuestlogDocumentClass()

void SetQuestlogDocumentClass ( TSubclassOf< UDocument > Value)

Document that tracks the progress of this quest.

◆ ShouldBeAvailable()

bool ShouldBeAvailable ( ) const

Called if this quest has not been started yet. Marks the quest available while true is returned.

◆ ShouldFail()

bool ShouldFail ( ) const

Called in any state other than "success", fails the quest as soon as true is returned.

◆ ShouldStart()

bool ShouldStart ( ) const

Called if this quest is "Available", starts the quest as soon as true is returned.

◆ ShouldSucceed()

bool ShouldSucceed ( ) const

While this quest is running, succeeds the quest as soon as true is returned.

◆ StartQuest()

void StartQuest ( AGothicCharacter StartedBy = nullptr)

Starts this quest (Quest must be available for this to work).

◆ StaticClass()

UClass StaticClass ( )
static

◆ SucceedQuest()

void SucceedQuest ( AGothicCharacter SuccededBy = nullptr)

Succeeds this quest. (Must be running before calling this).

Member Data Documentation

◆ BannerImage

TSoftObjectPtr<UTexture2D> BannerImage

Larger image shown for this quest in the quest UI.

◆ BelongsToStory

TSubclassOf<UGameStory> BelongsToStory

Story class this belongs to. Needs to be set for the quest to save correctly.

◆ bExternalAvailabilityTrigger

bool bExternalAvailabilityTrigger

Pretend that this has a starting condition, so it won't be made available automatically.

◆ bExternalFailTrigger

bool bExternalFailTrigger

Pretend that this has a starting condition, so it won't auto-fail with the children.

◆ bExternalStartTrigger

bool bExternalStartTrigger

Pretend that this has a starting condition, so it won't auto-start with the parent.

◆ bExternalSuccessTrigger

bool bExternalSuccessTrigger

Pretend that this has a starting condition, so it won't auto-succeed with the children.

◆ bIsOptional

bool bIsOptional

If true, this quest does not need to succeed for it's parent to succeed.

◆ bSucceedParent

bool bSucceedParent

If true, this will automatically succeed the parent as well if this quest succeeds, no matter if there're other child quests.

◆ ChildQuests

const TArray<UQuest> ChildQuests

Returns this quests child quests (if there are any).

◆ DescriptionText

FText DescriptionText

Localized short description text to be shown to the player.

◆ InChapter

int InChapter

If set, defines into which chapter this quest should be sorted into. (INDEX_NONE if not set).

◆ InvolvedCharacters

TArray<FName> InvolvedCharacters

Characters that are involved in this quest (Other than the hero). The quest conditions will only be checked if all of these are loaded.

The hero is involved by default.

◆ NameText

FText NameText

Localized quest name to be shown to the player.

◆ OnAvailable

Called when the quests state changed to "Available".

◆ OnFailed

Called when the quests state changed to "Failed".

◆ OnNotAvailableAnymore

FQuestStateChangedDelegate OnNotAvailableAnymore

Called when the quests state changed from "Available" to "None" again.

◆ OnStarted

Called when the quests state changed to "Running".

◆ OnSucceeded

Called when the quests state changed to "Success".

◆ OnUIViewStateChanged

FUIViewStateChanged__Quest OnUIViewStateChanged

◆ ParentQuest

const UQuest ParentQuest

Returns this quests parent (if there is one).

◆ ParentQuestClass

TSubclassOf<UQuest> ParentQuestClass

Parent quest this quest belongs to. State changes from parents might affect this quest, too. For example, if the parent fails, this quest might fail to.

◆ PropertyTags

FGameplayTagContainer PropertyTags

Additional tags that can be used to describe this Quest.

◆ QuestBannerSoftObjectPtr

const TSoftObjectPtr<UTexture2D> QuestBannerSoftObjectPtr

Returns a soft object pointer to the quest's banner image.

◆ QuestChapterDisplayName

const FText QuestChapterDisplayName

Returns the display name of the quest's chapter (if set).

◆ QuestDescription

const FText QuestDescription

Returns the quest's description.

◆ QuestDisplayName

const FText QuestDisplayName

Returns the quest's display name.

◆ QuestGiver

const AGothicCharacterState QuestGiver

Returns the QuestGiver's CharacterState of this quest or the first parent quest that sets one. Returns nullptr if no QuestGiver was defined anywhere this Quest or any of its parents.

◆ QuestGiverCharacterUniqueName

FName QuestGiverCharacterUniqueName

If set, this is the person that would have given this quest to the player.

◆ QuestGiverDisplayName

const FText QuestGiverDisplayName

Returns the quest giver's display name.

◆ QuestKind

EQuestKind QuestKind

Kind of quest (e.g. main, side). Will be inherited to child-quests.

◆ Questline

TSubclassOf<UQuestline> Questline

Questline this quest belongs to. If not set, the parents Questline is used.

◆ QuestlineFilterTag

const FGameplayTag QuestlineFilterTag

Returns the filter tag of the quest line, if set.

◆ QuestlineIconImage

const TSoftObjectPtr<UTexture2D> QuestlineIconImage

Returns a soft object pointer to the icon image of the questline, if set.

◆ QuestlogDocumentClass

TSubclassOf<UDocument> QuestlogDocumentClass

Document that tracks the progress of this quest.

◆ QuestThumbnailSoftObjectPtr

const TSoftObjectPtr<UTexture2D> QuestThumbnailSoftObjectPtr

Returns a soft object pointer to the quest's thumbnail image.

◆ State

const EQuestState State

This quests progression state.

◆ ThumbnailImage

TSoftObjectPtr<UTexture2D> ThumbnailImage

Smaller image shown for this quest in the quest list UI.