Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Godot Dialogue System 2

An advanced non-linear dialogue system for the free and open-source Godot engine. · By radmatt

Method for initiating dialogue from a parsed JSON value

A topic by Xananax created Aug 27, 2020 Views: 177
Viewing posts 1 to 1

I would like to store JSON values as properties of characters, as well as be able to procedurally create dialogues from bits and pieces.

I propose that the method Dialogue.start_dialogue(json_path) receives a sibling method Dialogue.start_from_data(data, character), where data is pre-parsed json (or, in my case, generated).

A possibly better API would be:

  • Dialogue.set_data(data)
  • Dialogue.set_data_from_file(json_path)
  • Dialogue.start()

Then the external Dialogue.start_dialogue API could stay as it is, but use the underlying set_data_from_file.

An additional though: if the two set_data* methods return self, then one can do:

Dialogue.set_data(data, character, context).start()
# or
Dialogue.set_data_from_file(json_path, character, context).start()