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

Public Member Functions

Functions
bool IsInChapter (int Number) const
 Returns true if this story is in the given chapter right now.
void HandleChapterChanged (int NewChapter)
void ChangeChapter (int NewChapter)
 Sets the current chapter.
void DeactivateStoryDataLayer (FString DataLayerName)
 Requests to unload a StoryDataLayer.
int GetChapter () const
 Returns this stories current chapter.
FText GetChapterDisplayName (int ChapterIndex)
 Returns the localized chapter name for the given chapter index.
bool HasReachedChapter (int Number) const
 Returns true if this story is in or in some further chapter than the passed one.
void ActivateStoryDataLayer (FString DataLayerName)
 Requests a StoryDataLayer to be Loaded and Active.
void RequestChapterHUDNotification (int NewChapter)
 Pushes a notification request to the notification system when the chapter changes.

Static Public Member Functions

Static Functions
static TArray< UGameStory > GetAllActiveStories ()
 Returns all story instances that are currently active.
static UGameStory GetMainStory ()
 Returns the story with the highest weight - aka the MainStory.
static TSubclassOf< UGameStory > GetMainStoryClass ()
 Returns the class of the set MainStory.
static bool IsStoryActive (TSubclassOf< UGameStory > StoryClass)
 Returns true if the given story is currently activated in the session.
static UClass StaticClass ()
static UGameStory GetActiveStoryOfClass (TSubclassOf< UGameStory > StoryClass)
 Returns an active story instance of the given class (if such a story is active right now).

Public Attributes

GameStory
TSoftClassPtr< UHUDNotificationWidgetBase > ChapterNotificationWidgetClass
 The widget class used for chapter notifications.
bool bShouldActivateStory
 To be set via .ini to activate/deactivate stories on demand via mod plugins.
float32 SortOrder
 Defines how "important" this story is. MainStory should have the lowest, sub-stories should have a higher order. A value of 0 means "this is the first, most important story".
FText ChapterFormatText
 Format string to transform a chapter index into a localized text, e.g. "Chapter {ChapterNum}" @note Text must contain {ChapterNum} format placeholder.
Variables
const int Chapter
 Chapter this story is in.

Member Function Documentation

◆ ActivateStoryDataLayer()

void ActivateStoryDataLayer ( FString DataLayerName)

Requests a StoryDataLayer to be Loaded and Active.

◆ ChangeChapter()

void ChangeChapter ( int NewChapter)

Sets the current chapter.

◆ DeactivateStoryDataLayer()

void DeactivateStoryDataLayer ( FString DataLayerName)

Requests to unload a StoryDataLayer.

◆ GetActiveStoryOfClass()

UGameStory GetActiveStoryOfClass ( TSubclassOf< UGameStory > StoryClass)
static

Returns an active story instance of the given class (if such a story is active right now).

◆ GetAllActiveStories()

TArray< UGameStory > GetAllActiveStories ( )
static

Returns all story instances that are currently active.

◆ GetChapter()

int GetChapter ( ) const

Returns this stories current chapter.

◆ GetChapterDisplayName()

FText GetChapterDisplayName ( int ChapterIndex)

Returns the localized chapter name for the given chapter index.

◆ GetMainStory()

UGameStory GetMainStory ( )
static

Returns the story with the highest weight - aka the MainStory.

◆ GetMainStoryClass()

TSubclassOf< UGameStory > GetMainStoryClass ( )
static

Returns the class of the set MainStory.

◆ HandleChapterChanged()

void HandleChapterChanged ( int NewChapter)

◆ HasReachedChapter()

bool HasReachedChapter ( int Number) const

Returns true if this story is in or in some further chapter than the passed one.

◆ IsInChapter()

bool IsInChapter ( int Number) const

Returns true if this story is in the given chapter right now.

◆ IsStoryActive()

bool IsStoryActive ( TSubclassOf< UGameStory > StoryClass)
static

Returns true if the given story is currently activated in the session.

◆ RequestChapterHUDNotification()

void RequestChapterHUDNotification ( int NewChapter)

Pushes a notification request to the notification system when the chapter changes.

◆ StaticClass()

UClass StaticClass ( )
static

Member Data Documentation

◆ bShouldActivateStory

bool bShouldActivateStory

To be set via .ini to activate/deactivate stories on demand via mod plugins.

◆ Chapter

const int Chapter

Chapter this story is in.

◆ ChapterFormatText

FText ChapterFormatText

Format string to transform a chapter index into a localized text, e.g. "Chapter {ChapterNum}" @note Text must contain {ChapterNum} format placeholder.

◆ ChapterNotificationWidgetClass

TSoftClassPtr<UHUDNotificationWidgetBase> ChapterNotificationWidgetClass

The widget class used for chapter notifications.

◆ SortOrder

float32 SortOrder

Defines how "important" this story is. MainStory should have the lowest, sub-stories should have a higher order. A value of 0 means "this is the first, most important story".

This is so we can easily run multiple stories at the same time.