Skip to content

tes3dialogue⚓︎

A parent-level dialogue, such as a topic, voice, greeting, persuasion response, or journal.

This type inherits the following: tes3baseObject

Properties⚓︎

blocked⚓︎

The blocked state of the object.

Returns:

  • result (boolean)

deleted⚓︎

Read-only. The deleted state of the object.

Returns:

  • result (boolean)

disabled⚓︎

Read-only. The disabled state of the object.

Returns:

  • result (boolean)

id⚓︎

Read-only. The unique identifier for the object.

Returns:

  • result (string)

info⚓︎

Read-only. A collection of individual entries in the dialogue.

Returns:


journalIndex⚓︎

For journal dialogues, the currently active journal index.

Returns:

  • result (number, nil)

modified⚓︎

The modification state of the object since the last save.

Returns:

  • result (boolean)

objectFlags⚓︎

Read-only. The raw flags of the object.

Returns:

  • result (number)

objectType⚓︎

Read-only. The type of object. Maps to values in tes3.objectType.

Returns:


persistent⚓︎

The persistent flag of the object.

Returns:

  • result (boolean)

sourceless⚓︎

The soruceless flag of the object.

Returns:

  • result (boolean)

sourceMod⚓︎

Read-only. The filename (including the extension) of the mod that owns this object. It has nil value if the object was anything other than loaded from an ESP or ESM file.

Returns:

  • result (string)

supportsLuaData⚓︎

If true, references of this object can store temporary or persistent lua data.

Returns:

  • result (boolean)

type⚓︎

Read-only. The type of the dialogue. Maps to values in tes3.dialogueType namespace.

Returns:


Methods⚓︎

__tojson⚓︎

Serializes the object to json.

local string = myObject:__tojson()

Returns:

  • string (string)

addToJournal⚓︎

Adds the dialogue to the player's journal, if applicable, at a given index.

local result = myObject:addToJournal({ index = ..., actor = ... })

Parameters:

Returns:

  • result (boolean)

getInfo⚓︎

Fetches the info that a given actor would produce for the dialogue.

local result = myObject:getInfo({ actor = ..., context = ... })

Parameters:

Returns:


getJournalInfo⚓︎

Retrieves the info object for a journal. By default this will return the info for the player's current journal index for this dialogue. An index can be provided to fetch a specific index's related info.

local journalInfo = myObject:getJournalInfo(index)

Parameters:

  • index (number): Optional. The index of the journal to fetch the info for. If not provided, the current player's journal index is used.

Returns:


loadQuestName⚓︎

This method finds the info that contains the quest name, then loads and returns its text. This method accesses the disk, and may be slow to operate. For dialogues that aren't journal-based, this will be nil.

local questName = myObject:loadQuestName()

Returns:

  • questName (string, nil)