Integrates Ink with the Dialogue System. More...
Public Member Functions | |
virtual void | AddStory (string storyTitle, string storyJSON) |
Adds a story at runtime. | |
virtual void | ResetStories () |
virtual Story | GetStory (string storyName) |
virtual string[] | GetActorsInStory (string storyName, string knotName) |
Returns the names of all actors in the story or knot. | |
Static Public Member Functions | |
static void | SetConversationStartingPoint (string knot) |
static Story | LookupStory (string storyName) |
static bool | TryExtractPrependedActor (ref string text, out string actorName) |
Attempts to extract an actor name from the beginning of a string. | |
static void | SetInkBool (string variableName, bool value) |
static void | SetInkNumber (string variableName, double value) |
static void | SetInkString (string variableName, string value) |
static void | SetInkList (string variableName, string value) |
static void | AddInkList (string variableName, string value) |
static void | SubtractInkList (string variableName, string value) |
static void | IntersectInkList (string variableName, string value) |
static bool | GetInkBool (string variableName) |
static double | GetInkNumber (string variableName) |
static string | GetInkString (string variableName) |
static string | GetInkList (string variableName) |
Public Attributes | |
List< TextAsset > | inkJSONAssets = new List<TextAsset>() |
bool | resetStateOnConversationStart = false |
bool | actorNamesPrecedeLines = false |
bool | caseSensitiveActorNames = false |
bool | trimText = true |
bool | appendNewlineToPlayerResponses = false |
bool | playerDialogueTextFollowsResponseText = false |
bool | disableAlwaysForceResponseMenu = true |
bool | forceResponseMenuForSingleChoices = false |
bool | tieSequencesToDialogueEntries = true |
bool | debug = false |
bool | isResuming = false |
bool | isPlayerSpeaking = false |
Protected Member Functions | |
virtual void | Awake () |
virtual void | Start () |
virtual void | CreateDatabase () |
virtual Actor | CreateActor (Template template, int actorID, string actorName, bool isPlayer) |
virtual void | AddStoryToDatabase (TextAsset asset, int conversationID) |
virtual void | AddStoryToDatabase (string storyTitle, Story story, int conversationID) |
virtual void | SetVariableValue (Variable variable, object value) |
FieldType | GetFieldType (object value) |
virtual void | ObserveStoryVariables (Story story) |
virtual void | OnVariableChange (string variableName, object newValue) |
virtual void | OnConversationStart (Transform actorTransform) |
virtual Story | GetCurrentStory (int conversationID) |
virtual int | GetCurrentPlayerID (int conversationID) |
virtual int | GetCurrentActorID (int conversationID) |
virtual void | OnConversationEnd (Transform actor) |
virtual void | OnPrepareConversationLine (DialogueEntry entry) |
virtual string | ProcessRichText (string s) |
virtual void | ProcessTags (Story activeStory, DialogueEntry entry) |
virtual void | ProcessTag (string tag, DialogueEntry entry) |
virtual void | AddForcedResponse (Story activeStory, Conversation inkConversation, DialogueEntry entry) |
virtual void | AddChoices (Story activeStory, Conversation inkConversation, DialogueEntry entry) |
virtual void | TryExtractPrependedActor (ref string text, DialogueEntry entry) |
virtual Actor | FindActorCaseInsensitive (string actorName) |
virtual int | GetActorID (string actorName, int defaultID) |
virtual void | OnConversationLine (Subtitle subtitle) |
virtual void | BindExternalFunctions (Story story) |
virtual void | PlaySequenceFromInk (string sequence) |
virtual void | UnbindExternalFunctions (Story story) |
virtual void | RegisterLuaFunctions () |
virtual void | SetInkVariableValue (string variableName, object value) |
virtual object | GetInkVariableValue (string variableName) |
void | RecordActorsInStoryRecursive (Story story, string knotPath, HashSet< Choice > visitedChoices, List< string > actors, int recursionDepth) |
void | RecordActor (List< string > actors, string actorName) |
Static Protected Member Functions | |
static InkList | InkListFromCommaSeparatedString (string variableName, string value, Story story) |
Protected Attributes | |
Template | template |
Conversation | lastInkConversation = null |
int | nextStoryConversationID = 10000 |
string | jumpToKnot = string.Empty |
string | sequenceToPlayWithSubtitle = string.Empty |
bool | originalAlwaysForceResponseMenu |
Dictionary< int, Story > | storyDict = new Dictionary<int, Story>() |
Dictionary< int, int > | storyPlayerIDDict = new Dictionary<int, int>() |
Dictionary< int, int > | storyActorIDDict = new Dictionary<int, int>() |
bool | wasDatabaseLoadedIntoMemory = false |
Dictionary< string, Story > | runtimeAddedStoryDict = new Dictionary<string, Story>() |
string | lastPlayerChoice |
Last choice that player made. | |
Static Protected Attributes | |
const int | PlayerActorID = 1 |
const int | StoryActorID = 2 |
static DialogueSystemInkIntegration | m_instance = null |
static bool | m_registeredLuaFunctions = false |
Properties | |
List< Story > | stories [get, set] |
DialogueDatabase | database [get, protected set] |
static DialogueSystemInkIntegration | instance [get] |
static string | lastStartingPoint [get, set] |
Knot that conversation started at, or blank if started at the beginning of the story. | |
Events | |
System.Action | loadedStories = delegate { } |
Invoked after the integration has loaded and initialized all stories. | |
Integrates Ink with the Dialogue System.
In this integration, Ink does the processing, and the Dialogue System does the UI and handles triggers. It also handles saving/loading and exposes functions to manage quests and show alerts.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlinestatic |
|
inlinevirtual |
Adds a story at runtime.
storyTitle | The story's title. |
storyText | The story in JSON format. |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlinevirtual |
Returns the names of all actors in the story or knot.
storyName | Story name. |
knotName | Knot name, or blank for entire story. |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotected |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlineprotectedvirtual |
|
inlinevirtual |
|
inlinestaticprotected |
|
inlinestatic |
|
inlinestatic |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedvirtual |
|
inlinevirtual |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlinestatic |
|
inlineprotectedvirtual |
|
inlinestatic |
Attempts to extract an actor name from the beginning of a string.
text | Text possibly containing an actor name and colon at the beginning. |
actorName | Actor name (if extracted). |
|
inlineprotectedvirtual |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.actorNamesPrecedeLines = false |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.appendNewlineToPlayerResponses = false |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.caseSensitiveActorNames = false |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.debug = false |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.disableAlwaysForceResponseMenu = true |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.forceResponseMenuForSingleChoices = false |
List<TextAsset> PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.inkJSONAssets = new List<TextAsset>() |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.isPlayerSpeaking = false |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.isResuming = false |
|
protected |
|
protected |
|
protected |
Last choice that player made.
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
staticprotected |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.playerDialogueTextFollowsResponseText = false |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.resetStateOnConversationStart = false |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.tieSequencesToDialogueEntries = true |
bool PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.trimText = true |
|
protected |
|
getprotected set |
|
staticget |
|
staticgetset |
Knot that conversation started at, or blank if started at the beginning of the story.
|
getset |
System.Action PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration.loadedStories = delegate { } |
Invoked after the integration has loaded and initialized all stories.