Table of Contents

Class GameState

Namespace
SuzerainModdingKit
Assembly
SuzerainModdingKit.dll

Static interface for querying and modifying the current state of the game.

public static class GameState
Inheritance
GameState
Inherited Members

Properties

CurrentStepName

The current step name (eg. "Sordland_Turn_2_Step_3"). Note that the format of step names may vary between story packs. May be null.

[Obsolete("Deprecated in v1.2. Use CurrentStepNum, CurrentTurnNum, and CurrentStoryPackName instead.")]
public static string CurrentStepName { get; }

Property Value

string

CurrentStepNum

The current step number. May be null.

public static int? CurrentStepNum { get; }

Property Value

int?

CurrentStoryPackName

The name of the current story pack. May be null.

public static string CurrentStoryPackName { get; }

Property Value

string

CurrentTurnNum

The current turn number. May be null.

public static int? CurrentTurnNum { get; }

Property Value

int?

IsGameActive

Is the game active?

public static bool IsGameActive { get; }

Property Value

bool

Methods

AddCustomReport(CustomReportData)

Add a custom report to the current turn.

public static bool AddCustomReport(CustomReportData customReportData)

Parameters

customReportData CustomReportData

The custom report data.

Returns

bool

A boolean indicating whether the operation succeeded or not.

Exceptions

ArgumentNullException

Thrown if any required arguments are null.

InvalidOperationException

Thrown if the game is not active.

AddCustomStoryFragment(CustomStoryFragmentData)

Add a custom story fragment to the current step.

public static bool AddCustomStoryFragment(CustomStoryFragmentData customStoryFragmentData)

Parameters

customStoryFragmentData CustomStoryFragmentData

The custom story fragment data.

Returns

bool

A boolean indicating whether the operation succeeded or not.

Exceptions

ArgumentNullException

Thrown if any required arguments are null.

InvalidOperationException

Thrown if the game is not active.

IsCurrentStoryPack(StoryPackInfo)

Check if the current story pack matches the given StoryPackInfo.

public static bool IsCurrentStoryPack(StoryPackInfo storyPack)

Parameters

storyPack StoryPackInfo

The StoryPackInfo to test against.

Returns

bool

A boolean indicating whether the current story pack matches the given StoryPackInfo.

ReportExistsInCurrentTurn(string)

Check if a report exists in the current turn.

public static bool ReportExistsInCurrentTurn(string name)

Parameters

name string

The name of the report.

Returns

bool

A boolean indicating whether the report exists in the current turn.

StoryFragmentExistsInCurrentStep(string)

Check if a story fragment exists in the current step.

public static bool StoryFragmentExistsInCurrentStep(string name)

Parameters

name string

The name of the story fragment.

Returns

bool

A boolean indicating whether the story fragment exists in the current step.