# Forge Dialogue Module

## Overview
The Dialogue module provides a comprehensive AI conversation system for the Forge client. It enables dynamic interactions between players and AI units, supporting topic-based conversations, sentence management, and AI behavior control.

## Dependencies
- forge_client_main

## Authors
- J. Schmidt
- Creedcoder
- IDSolutions

## Features

### AI Dialogue System
1. **AI Selection** (`fnc_selectAI.sqf`)
   - Manages AI unit selection for dialogue
   - Controls AI behavior during conversations
   - Handles unit state management
   - Disables AI actions during dialogue

2. **Dialogue Management** (`fnc_selectDialogue.sqf`)
   - Topic-based conversation system
   - Sentence management and playback
   - AI unit synchronization
   - Conversation flow control

3. **Conversation Features**
   - **Topic Management**
     - Dynamic topic selection
     - Context-aware conversations
     - Topic-based responses
     - Conversation branching

   - **Sentence Control**
     - Sentence playback
     - Timing management
     - Response coordination
     - Conversation state tracking

   - **AI Behavior**
     - Animation control
     - Movement management
     - State synchronization
     - Interaction handling

## Event Handlers
The module uses several event handlers for initialization and execution:
- `XEH_preInit.sqf`: Pre-initialization setup
- `XEH_postInit.sqf`: Post-initialization tasks
- `XEH_preStart.sqf`: Pre-start configuration
- `XEH_postInit_client.sqf`: Client-specific post-initialization
- `XEH_preInit_server.sqf`: Server-specific pre-initialization

## Usage
To use the dialogue module:
1. Ensure the module is properly loaded in your mission
2. Select AI units for dialogue:
   ```sqf
   // Select AI units for dialogue
   [units group player] call forge_client_dialogue_fnc_selectAI;
   
   // Select specific dialogue for AI
   [units, [["topic", "sentence"]]] call forge_client_dialogue_fnc_selectDialogue;
   ```
3. Manage conversation flow and AI behavior

## Debugging
Debug mode can be enabled by uncommenting the following in `script_component.hpp`:
```cpp
#define DEBUG_MODE_FULL
```

## Version Information
Version information is managed through the main Forge client system configuration.

## Technical Details
- Topic-based conversation system
- AI behavior control
- Sentence management
- State synchronization
- Animation handling
- Movement control
- Interaction management
- Conversation flow control
- Response coordination
- Error handling
- Debug support
- Event system integration 