Novelty scripting reference > Types > Novel

Novel

Interface for the novel and story engine.


Members

N/A


Index operator

Variant@ [const string in& variableName]
Returns the handle of a global variable.


Methods

Page@ GetCurrentPage() const
Returns a handle to the current page.

Page@ GetNextPage() const
Returns a handle to the page following the current one; or null.

Chapter@ GetCurrentChapter() const
Returns a handle to the current chapter.

Chapter@ GetNextChapter() const
Returns a handle to the chapter following the current one; or null.

Chapter@ GetChapter(uint index) const
Chapter@ GetChapter(const string &in name) const
Returns a handle to a chapter by order index or name; or null.

Page@ GetPage(const string &in name) const
Finds and returns a handle to a page by name. Returns null on failure.

Page@ GetPageByUID(UID uid) const
Finds and returns a handle to a page by UID. Returns null on failure.

void EnumerateChapters(array<Chapter@> &inout chapterArray) const
Populates the array with handles to all chapters in the novel.

uint GetChapterCount() const
Returns the number of chapters in the novel.

void EnumerateScreens(array<ScreenPage@> &inout screenArray)
Populates the array with handles to all screens.

uint GetScreenCount() const
Returns the number of screens in the novel.

bool OpenScreen(const string &in name)
bool OpenScreen(ScreenPage@ screen)
Opens a screen. Returns true on success.

bool CloseScreen()
Closes the current screen. Returns true on success.

bool NextPage()
Proceeds to the next page in the novel. Returns true on success.

bool NextChapter()
Proceeds to the next chapter in the novel. Returns true on success.

bool GoToLabel(const string &in label)
Jumps to a label in the current page. Returns true on success.

void Exit()
Shuts down the novel/game.

bool PlayThread(const string &in threadName)
Plays a thread (within the current page). Returns true on success.

bool ChangePage(Page@ page)
Changes the current page. Returns true on success.

bool IsWaiting() const
Returns true if the novel is in a halted state and waiting for the player to click the mouse or press a button.

bool IsSkipping() const
Returns true if the playing is pressing the skip-button.

bool IsAutoPlaying() const
Returns true if autoplay has been engaged.

bool LoadGameState(uint slot)
Loads a saved game. Returns true on success.
Slot must be a value between 0 and 100. (0 = quick save slot)

bool SaveGameState(uint slot)
bool SaveGameState(uint slot, const string &in caption)
Saves the current game state. Returns true on success.
Slot must be a value between 0 and 100. (0 = quick save slot)

bool HasGameState(uint slot) const
Returns true if there is a saved game in the slot.
Slot must be a value between 0 and 100. (0 = quick save slot)

string GetGameStateThumbnail(uint slot) const
Returns the internal name of the thumbnail texture for a saved game or "null" if the slot is empty.
Slot must be a value between 0 and 100. (0 = quick save slot)

Settings@ GetSettings()
Returns a handle to the current novel settings.


Back to top