Repository navigation
The conversation system
Conversations are used throughout the game to display cutscenes and implement complex mechanics, like changing computer AI or adding unique win conditions.
In-game, conversations are mostly used for the intro conversation (the one at the beginning of each run) and the pre- and post-battle conversations (see the level system for more info). However, smaller conversations are also used for multiple other purposes throughout the game, like map events and unit battle & death quotes.
Full conversations (intro & battle ones) are comprised of four parts: identifiers, requirements, demands, and events.
Events are the actual content of the conversations. The event is the most important part of the conversation, and in some mechanics, the only part of it that is used (like in unit death quotes).

A sample event
Events are read and executed by Frogman Magmaborn line-by-line, and are comprised of three main types of lines: script, command and comment lines.
These lines tell the game to display a character, and have them say something – similar to movie or theatre scripts. In the example above, the bottom three lines are script lines.
Script lines are comprised of two parts: the speaker and their text. They generally use the following format to introduce a new speaker:
Speaker: Text
The : part (including the space) is important – it tells the game that this is a new speaker.
If you want to give the same character two lines of dialogue, add a new text line without specifying the speaker, like this:
Speaker: Text1.
Text2.

The sample events from above, as seen in-game. Notice that Firbell and Frogman say exactly the same text as the event file.
Command lines are slightly more complex, and inspired by scripting languages. To denote a command line, use the : sign at the beginning, followed by the command name, and (optionally) parameters for the command. For example, writing :win: will cause the level to immediately end in victory once the conversation reaches that point. In the example above, the second line (:play:BeforeBattle) is a command – one which tells the game to play the BeforeBattle music. Commands are highlighted in pink.
Frogman Magmaborn contains a lot of built-in commands for various purposes. For a complete list of them, check the Commands documentation.
Comment lines are completely ignored by the game – they are used solely to mark or explain parts of the conversation. Comments are marked with # at the beginning of the line. In the example above, the first line is a comment. Comments are highlighted in red.
Requirements are the conditions for displaying an event. Most events include some requirements, but not all of them – for example, battle and death quotes will always trigger the relevant event.

Some sample requirements.
The game checks all requirements of the event before displaying it, and if even one isn’t true, it will not show or select that event. Requirements always begin with the requirement name (like levelNumber), followed by a : and (usually) a list of arguments. Requirements are highlighted in yellow.
In the example above, the first requirement is levelNumber:1, which means that it will only trigger the event if the current level number is 1.
Frogman Magmaborn contains a lot of built-in requirements for various purposes. For a complete list of them, check the Requirements documentation.
Demands are only used in battle conversations. As explained in the level system, maps are selected after conversations, and the demands are what determines the available maps.

A sample demand.
The format of demands is exactly the same as that of requirements, and they are highlighted in yellow as well. However, the built-in demands in Frogman Magmaborn are different from the built-in requirements since many requirements do not make sense as a demand and vice versa. In the example above, if this conversation was selected, it will pick a map containing the unit Firbell.
Frogman Magmaborn contains multiple of built-in demands for various purposes. For a complete list of them, check the Demands documentation.
Identifiers are only used in conversations. Their goal is to give the game basic info about the conversation – mainly its priority (as explained in the level system) and uniqueness (whether this conversation can only appear once or not. Conversations with both pre- and post-battle parts will keep appearing until the player has seen both parts).

Some sample identifiers. Every conversation has these two identifier: priority and unique.
The format of identifiers is similar to the one of requirements. Identifiers are highlighted in cyan. In the example above, the conversation has a priority of -1 and is not unique – meaning that it can appear multiple times.
Frogman Magmaborn currently has only two more identifiers, ID and displayName, which are explained in the Identifiers documentation.
Conversations contain all the previous parts (Identifiers, Requirements, Demands, and Events). The different parts are separated with a ~ sign to create the complete conversation.

The sample from above combined to create the complete conversation – the generic level 1 conversation from Frogman Magmaborn.
Other places using events & requirements, such as mid-battle events, do not need these separators and directly specify the necessary parts instead.
Conversations and events also have additional advanced features, like conditions and functions, which are further explained in the documentation.