Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

Dialogs system #9

Open
22 tasks
AgainPsychoX opened this issue Jul 30, 2018 · 0 comments
Open
22 tasks

Dialogs system #9

AgainPsychoX opened this issue Jul 30, 2018 · 0 comments

Comments

@AgainPsychoX
Copy link
Collaborator

AgainPsychoX commented Jul 30, 2018

Dialogs system

Dialog system should load, store, manage dialogs and their parts, provide access to them and possibility to display and play dialogs.

Overall

  • Timestamp management (btw, maybe should be exposed to whole project from Utility) with long format (00:00:000, minutes, seconds, miliseconds)

Dialog

  • Load from file via relative to Assets path to file or folder with dialog.dlg file
  • Load characters names from the file
  • Load segments from the file

Segments

  • Has its index in dialog data.
  • Contains list of lines, including empty
  • Has starting and ending timestamps (for loading from sound file)

Futher:

  • Volume factor (dB)

Lines

"kwestie"

  • Has relative (to segment start) timestamp (for subtitles)

  • Related with character (may via index)

  • Has pause for time (after subtitle line)

  • Contains text (including empty)

  • Text can contain all characters UTF-8 except new line

APIs

  • Preparing to use (loading and parsing). Return object to work with.

    local dialog = Dialog.use("Quests/GlenarmEntrance/Guard/dialog.dlg")
  • Running simple segment by segment name/ID.

    dialog:run("SareraKilled")
  • Running with callback onFinish by function

    dialog:run("SareraKilled").onFinish = function() someCode() end
  • Running with callback onFinish by event ID

    dialog:run("SareraKilled").onFinish = ID("MyEvent")
  • Adding options to dialog to choose after runed dialog

    dialog:prepare()
    dialog:addOption("SareraKilledLeave")
    dialog:addOption("SareraKilledMore")
    dialog:run("SareraKilled")
  • Options with callbacks onFinish by function

  • Options with callbacks onFinish by event name

  • Options with callbacks onClick by function

  • Options with callbacks onClick by event name

    dialog:prepare()
    dialog:addOption(17) = {
        onFinish = function() myCodeee() end;
        onClick = "MyEventtt";
    }
    dialog:run(7)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants