Data Types
----------

dialogue is a table with:
* speaker [nil]
  title of the dialogue
* text [nil]
  main text of the dialogue
* update_self(player, dialogue) -> dialogue [nil]
  function that updates the dialogue (runs before it is shown)
* successors [nil]
  branch points
* successors_style [{border = "false"}]
  key value pairs do define styles for successors
* successors_style_hovered [{textcolor = "yellow"}]
  same as above but with the hovered style
* number_successors [true]
  a bool to mark if each successor should be prepended with a number
The default values in brackets above can be modified with alter_messages.set_default

successor is a table with:
* option_text
  text shown on parent dialogue
* on_choose(player) -> nil (optional)
  a function that runs when this option is chosen
* dialogue (optional)
  another dialogue to show. This is just a shortcut for including it another send_dialogue in on_choose

registration is a table with:
* sound
  sound to be played with this character


Functions
---------

alter_messages.register_character(name, registration)
* name is matched with speaker for each dialogue
* registration is a character registration

alter_messages.send_dialogue(playername, dialogue)

alter_messages.set_default(dialogue)
* Sets the default values for dialogues using the keys and values in this table. This is useful for
  styling changes.

alter_messages.linear_layout(speaker, sequence)
* Creates a dialogue tree from a sequence of alternating text and option lines for a linear layout
  This is useful for tutorial dialogues and other longer dialogues
* speaker is the speaker associated with each dialogue text. To override this, see sequence
* sequence is a list of values alternating between dialogue and option texts.
  Alternatively, any item in the sequence can be a table, where it will override the defaults,
  allowing for custom update_self, on_choose, speaker, and other dialogue options.
* Example:
  alter_messages.linear_layout(
  "Tutorial Master",
  {"To go forward, press the w key",      -- dialogue text
   "Everyone knows that",                 -- option_text
   {speaker = "Tired Tutorial Master",    -- dialogue text
   text = "To go back, press the s key"},
   "Ok",                                  -- option_text
  })
