A dialogue database asset. More...
Classes | |
class | SyncInfo |
Public Member Functions | |
void | ResetEmphasisSettings () |
bool | IsPlayerID (int actorID) |
Determines whether an actor is a player character. More... | |
bool | IsPlayer (string actorName) |
Determines whether an actor is a player character. More... | |
CharacterType | GetCharacterType (int actorID) |
Gets the type of the character (PC or NPC) of an actor. More... | |
void | ResetCache () |
Actor | GetActor (string actorName) |
Gets the actor by name. More... | |
Actor | GetActor (int id) |
Gets the actor associated with an actor ID. More... | |
Item | GetItem (string itemName) |
Gets the item by name. More... | |
Item | GetItem (int id) |
Gets the item associated with an item ID. More... | |
Location | GetLocation (string locationName) |
Gets the location by name. More... | |
Location | GetLocation (int id) |
Gets the location associated with a location ID. More... | |
Variable | GetVariable (string variableName) |
Gets the variable by name. More... | |
Variable | GetVariable (int id) |
Gets the variable by ID. More... | |
void | AddConversation (Conversation conversation) |
Adds a Conversation to the database. More... | |
Conversation | GetConversation (string conversationTitle) |
Retrieves a Conversation by its Title field. More... | |
Conversation | GetConversation (int conversationID) |
Retrieves a Conversation by its ID. More... | |
DialogueEntry | GetDialogueEntry (int conversationID, int dialogueEntryID) |
Gets a dialogue entry by its conversation and dialogue entry IDs. More... | |
DialogueEntry | GetDialogueEntry (Link link) |
Follows a Link and returns the destination DialogueEntry. More... | |
string | GetLinkText (Link link) |
Gets the text of the dialogue entry that a link points to. More... | |
void | Add (DialogueDatabase database) |
Add the contents of another database to this database. More... | |
void | Remove (DialogueDatabase database) |
Removes from this database all content that's in the specified database. More... | |
void | Remove (DialogueDatabase database, List< DialogueDatabase > keep) |
Removes from this database all content that's in the specified database. More... | |
void | Clear () |
Removes all assets from this database. More... | |
void | SyncAll () |
Syncs all assets from their source databases if assigned in syncInfo. More... | |
void | SyncActors () |
Syncs the actors from syncInfo.syncActorsDatabase. More... | |
void | SyncItems () |
Syncs the items from syncInfo.syncItemsDatabase. More... | |
void | SyncLocations () |
Syncs the locations from syncInfo.syncLocationsDatabase. More... | |
void | SyncVariables () |
Syncs the variables from syncInfo.syncVariablesDatabase. More... | |
string | GetEntrytag (Conversation conversation, DialogueEntry entry, EntrytagFormat entrytagFormat) |
Gets the entrytag string of a dialogue entry. More... | |
string | GetEntrytag (int conversationID, int dialogueEntryID, EntrytagFormat entrytagFormat) |
Gets the entrytag string of a dialogue entry. More... | |
string | GetEntrytaglocal (Conversation conversation, DialogueEntry entry, EntrytagFormat entrytagFormat) |
Gets the entrytaglocal string (localized version) of a dialogue entry. More... | |
string | GetEntrytaglocal (int conversationID, int dialogueEntryID, EntrytagFormat entrytagFormat) |
Gets the entrytaglocal string (localized version) of a dialogue entry. More... | |
Static Public Member Functions | |
static bool | ContainsName< T > (List< T > assetList, string assetName) |
Checks if a list of assets contains an asset with a specified name. More... | |
static bool | ContainsID< T > (List< T > assetList, int assetID) |
Checks if a list of assets contains an asset with a specified ID. More... | |
static bool | ContainsTitle (List< Conversation > conversations, string title) |
Checks is a list of conversations contains a conversation with a specified title. More... | |
static bool | Contains (DialogueDatabase database, Asset asset) |
Checks if a database contains an asset. More... | |
static bool | Contains (List< DialogueDatabase > databaseList, Asset asset) |
Checks if a list of databases contains an asset. More... | |
Public Attributes | |
string | version |
The version of the database, typically only used internally by the developer. More... | |
string | author |
The author, typically only used internally by the developer. More... | |
string | description |
The description of the database, typically only used internally by the developer. More... | |
string | globalUserScript |
The global Lua user script. More... | |
EmphasisSetting[] | emphasisSettings = new EmphasisSetting[NumEmphasisSettings] |
A Chat Mapper project defines four emphasis settings (text styles) for formatting lines of dialogue. More... | |
List< Actor > | actors = new List<Actor>() |
The actors in the database. More... | |
List< Item > | items = new List<Item>() |
The items in the database. More... | |
List< Location > | locations = new List<Location>() |
The locations in the database. More... | |
List< Variable > | variables = new List<Variable>() |
The variables in the database. More... | |
List< Conversation > | conversations = new List<Conversation>() |
The conversations in the database. More... | |
SyncInfo | syncInfo = new SyncInfo() |
Static Public Attributes | |
const int | NumEmphasisSettings = 4 |
The number of emphasis settings supported by Chat Mapper and the Dialogue System. More... | |
const string | InvalidEntrytag = "invalid_entrytag" |
const string | VoiceOverFileFieldName = "VoiceOverFile" |
Properties | |
int? | playerID [get] |
Gets the ID of the first player character in the actor list. More... | |
A dialogue database asset.
A dialogue database is a collection of data records necessary to run dialogue, such as actors and conversations. This is a ScriptableObject so it can be edited, serialized, and assigned in Unity.
void PixelCrushers.DialogueSystem.DialogueDatabase.Add | ( | DialogueDatabase | database | ) |
Add the contents of another database to this database.
database | The database to copy. |
void PixelCrushers.DialogueSystem.DialogueDatabase.AddConversation | ( | Conversation | conversation | ) |
Adds a Conversation to the database.
conversation | The conversation to add. |
void PixelCrushers.DialogueSystem.DialogueDatabase.Clear | ( | ) |
Removes all assets from this database.
|
static |
Checks if a database contains an asset.
Depending on the asset's type, it will check by name or title. This might not be an exact match – for example, two conversations could have the same title, in which case either one would return true.
database | The database to search. |
asset | The asset to search for. |
|
static |
Checks if a list of databases contains an asset.
databaseList | The list of databases to check. |
asset | The asset to search for. |
|
static |
Checks if a list of assets contains an asset with a specified ID.
true
if an asset matches the specified ID. assetList | The list of assets to search. |
assetID | The ID to search for. |
T | The type of asset. |
T | : | Asset |
|
static |
Checks if a list of assets contains an asset with a specified name.
true
if an asset matches the specified name. assetList | The list of assets to search. |
assetName | The name to search for. |
T | The type of asset. |
T | : | Asset |
|
static |
Checks is a list of conversations contains a conversation with a specified title.
true
if the title is found. conversations | The conversations to search. |
title | The title to search for. |
Actor PixelCrushers.DialogueSystem.DialogueDatabase.GetActor | ( | int | id | ) |
Gets the actor associated with an actor ID.
id | The actor ID. |
Actor PixelCrushers.DialogueSystem.DialogueDatabase.GetActor | ( | string | actorName | ) |
Gets the actor by name.
actorName | The actor's name (the value of the Name field). |
CharacterType PixelCrushers.DialogueSystem.DialogueDatabase.GetCharacterType | ( | int | actorID | ) |
Gets the type of the character (PC or NPC) of an actor.
actorID | The Actor ID to check. |
The comparison is based on the value of playerID, not the actor's IsPlayer field. If more than one actor's IsPlayer field is true, this will only identify the first one.
Conversation PixelCrushers.DialogueSystem.DialogueDatabase.GetConversation | ( | int | conversationID | ) |
Retrieves a Conversation by its ID.
conversationID | The Conversation ID. |
Conversation PixelCrushers.DialogueSystem.DialogueDatabase.GetConversation | ( | string | conversationTitle | ) |
Retrieves a Conversation by its Title field.
conversationTitle | The title of the conversation. |
DialogueEntry PixelCrushers.DialogueSystem.DialogueDatabase.GetDialogueEntry | ( | int | conversationID, |
int | dialogueEntryID | ||
) |
Gets a dialogue entry by its conversation and dialogue entry IDs.
conversationID | Conversation ID. |
dialogueEntryID | Dialogue entry ID. |
DialogueEntry PixelCrushers.DialogueSystem.DialogueDatabase.GetDialogueEntry | ( | Link | link | ) |
Follows a Link and returns the destination DialogueEntry.
link | The link to follow. |
string PixelCrushers.DialogueSystem.DialogueDatabase.GetEntrytag | ( | Conversation | conversation, |
DialogueEntry | entry, | ||
EntrytagFormat | entrytagFormat | ||
) |
Gets the entrytag string of a dialogue entry.
conversation | Dialogue entry's conversation. |
entry | Dialogue entry. |
entrytagFormat | Entrytag format. |
string PixelCrushers.DialogueSystem.DialogueDatabase.GetEntrytag | ( | int | conversationID, |
int | dialogueEntryID, | ||
EntrytagFormat | entrytagFormat | ||
) |
Gets the entrytag string of a dialogue entry.
conversationID | Dialogue entry's conversation. |
dialogueEntryID | Dialogue entry. |
entrytagFormat | Entrytag format. |
string PixelCrushers.DialogueSystem.DialogueDatabase.GetEntrytaglocal | ( | Conversation | conversation, |
DialogueEntry | entry, | ||
EntrytagFormat | entrytagFormat | ||
) |
Gets the entrytaglocal string (localized version) of a dialogue entry.
conversation | Dialogue entry's conversation. |
entry | Dialogue entry. |
entrytagFormat | Entrytag format. |
string PixelCrushers.DialogueSystem.DialogueDatabase.GetEntrytaglocal | ( | int | conversationID, |
int | dialogueEntryID, | ||
EntrytagFormat | entrytagFormat | ||
) |
Gets the entrytaglocal string (localized version) of a dialogue entry.
conversationID | Dialogue entry's conversation. |
dialogueEntryID | Dialogue entry. |
entrytagFormat | Entrytag format. |
Item PixelCrushers.DialogueSystem.DialogueDatabase.GetItem | ( | int | id | ) |
Gets the item associated with an item ID.
id | The item ID. |
Item PixelCrushers.DialogueSystem.DialogueDatabase.GetItem | ( | string | itemName | ) |
Gets the item by name.
itemName | The item's name (the value of the Name field). |
string PixelCrushers.DialogueSystem.DialogueDatabase.GetLinkText | ( | Link | link | ) |
Gets the text of the dialogue entry that a link points to.
null
if the link is invalid. link | The link to follow. |
Location PixelCrushers.DialogueSystem.DialogueDatabase.GetLocation | ( | int | id | ) |
Gets the location associated with a location ID.
id | The location ID. |
Location PixelCrushers.DialogueSystem.DialogueDatabase.GetLocation | ( | string | locationName | ) |
Gets the location by name.
locationName | The location's name (value of the Name field). |
Variable PixelCrushers.DialogueSystem.DialogueDatabase.GetVariable | ( | int | id | ) |
Gets the variable by ID.
id | ID. |
Variable PixelCrushers.DialogueSystem.DialogueDatabase.GetVariable | ( | string | variableName | ) |
bool PixelCrushers.DialogueSystem.DialogueDatabase.IsPlayer | ( | string | actorName | ) |
Determines whether an actor is a player character.
true
if the named actor is a player; otherwise, false
.actorName | Actor name in the database. |
bool PixelCrushers.DialogueSystem.DialogueDatabase.IsPlayerID | ( | int | actorID | ) |
Determines whether an actor is a player character.
true
if actorID is the ID of a player; otherwise, false
. actorID | An actor ID. |
void PixelCrushers.DialogueSystem.DialogueDatabase.Remove | ( | DialogueDatabase | database | ) |
Removes from this database all content that's in the specified database.
database | The database containing assets to remove from this database. |
void PixelCrushers.DialogueSystem.DialogueDatabase.Remove | ( | DialogueDatabase | database, |
List< DialogueDatabase > | keep | ||
) |
Removes from this database all content that's in the specified database.
database | The database containing assets to remove from this database. |
keep | List of databases containing items that should be kept. |
void PixelCrushers.DialogueSystem.DialogueDatabase.ResetCache | ( | ) |
void PixelCrushers.DialogueSystem.DialogueDatabase.ResetEmphasisSettings | ( | ) |
void PixelCrushers.DialogueSystem.DialogueDatabase.SyncActors | ( | ) |
Syncs the actors from syncInfo.syncActorsDatabase.
void PixelCrushers.DialogueSystem.DialogueDatabase.SyncAll | ( | ) |
Syncs all assets from their source databases if assigned in syncInfo.
void PixelCrushers.DialogueSystem.DialogueDatabase.SyncItems | ( | ) |
Syncs the items from syncInfo.syncItemsDatabase.
void PixelCrushers.DialogueSystem.DialogueDatabase.SyncLocations | ( | ) |
Syncs the locations from syncInfo.syncLocationsDatabase.
void PixelCrushers.DialogueSystem.DialogueDatabase.SyncVariables | ( | ) |
Syncs the variables from syncInfo.syncVariablesDatabase.
The actors in the database.
string PixelCrushers.DialogueSystem.DialogueDatabase.author |
The author, typically only used internally by the developer.
List<Conversation> PixelCrushers.DialogueSystem.DialogueDatabase.conversations = new List<Conversation>() |
The conversations in the database.
string PixelCrushers.DialogueSystem.DialogueDatabase.description |
The description of the database, typically only used internally by the developer.
EmphasisSetting [] PixelCrushers.DialogueSystem.DialogueDatabase.emphasisSettings = new EmphasisSetting[NumEmphasisSettings] |
A Chat Mapper project defines four emphasis settings (text styles) for formatting lines of dialogue.
This array contains those emphasis settings.
string PixelCrushers.DialogueSystem.DialogueDatabase.globalUserScript |
The global Lua user script.
|
static |
The items in the database.
You can use these to track in-game items, or to track quests using the QuestLog class.
The locations in the database.
|
static |
The number of emphasis settings supported by Chat Mapper and the Dialogue System.
The variables in the database.
string PixelCrushers.DialogueSystem.DialogueDatabase.version |
The version of the database, typically only used internally by the developer.
|
static |
|
get |
Gets the ID of the first player character in the actor list.
The player ID.