Conversation

From The DarkMod Wiki
Revision as of 12:06, 18 July 2008 by Greebo (talk | contribs) (first draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Add Conversations to your Map =

All the info regarding a map's conversations are contained within atdm:conversation_info entities. Each of these entities can define one or more conversations. In the end of the day there will be a custom conversation editor GUI for DarkRadiant, but for now you'll need to add these entities yourself and set the spawnargs manually.

Each conversation can have one or more Actors. These are the AI which will participate in the conversation.

Each conversation consists of a sequence of so-called Conversation Commands, which are atomic actions you can use to make the actors do what you want them to. Examples are "Talk", "Attack", "WalkToEntity", etc.

Add a Conversation Info entity

Right-click somewhere in the grid view and hit "Create Entity" which will open the dialog for selecting the entity classes. Go to Conversation and select atdm:conversation_info.

Add the conversation spawnargs

Once the entity is created you can start defining your conversation. Here is an example of a simplistic "conversation" containing exactly one command:

"conv_1_name" "Testconversation 1"                // defines the name of the conversation (mandatory)
"conv_1_actor_1" "atdm:ai_builder_guard_1"        // first actor
"conv_1_actor_2" "atdm:ai_builder_guard_2"        // second actor

// Here's the first conversation command
"conv_1_cmd_1_actor" "1"                          // Actor 1
"conv_1_cmd_1_type" "Talk"                        // should "Talk"
"conv_1_cmd_1_arg_1" "tdm_test_conversation_1_1"  // the sound shader 'tdm_test_conversation_1_1'

So basically, this conversation has a name Testconversation 1, two actors (builder_guard_1 and 2) and lets the actor 1 play the sound shader tdm_test_conversation_1_1.

As you can see, the naming convention for the spawnargs is like this:

conv_<index>_<key>

The purpose of <index> is to distinguish multiple conversations defined on the same conversation info entity. The <key> is then defining the properties and commands of this conversation. Each conversation can have multiple commands, that's why these spawnargs are equipped with indices as well ("conv1_cmd_N_...").

The above example is defining a command called "Talk". There are more conversation commands available, each having a varying number of arguments. See the section below for details.

Each conversation must have a name and at least one actor and one command, otherwise the parser will flag the conversation as invalid and it will therefore be ignored.

Note: The <index> value is always numeric and starts with 1.

Spawnargs

  • TODO

Conversation Commands

The following is a list of available conversation commands:

  • TODO