client/addons/task/README.md
Jacob Schmidt 9936d6ddc3
All checks were successful
Build / Build (push) Successful in 28s
feat: Enhance module documentation and features
This commit updates the documentation for several Forge modules, adding comprehensive details about their functionalities, user interfaces, and integration with other systems. Key enhancements include:

- Expanded descriptions for the Admin, Arsenal, Bank, Garage, Interaction, Locker, Medical, Organization, Service, Store, and other modules.
- Added new features such as financial operations, user interface improvements, and integration with organization systems.
- Improved clarity on usage instructions and configuration options across modules.

These changes aim to provide better guidance for users and developers interacting with the Forge client system.
2025-05-25 16:03:03 -05:00

186 lines
4.7 KiB
Markdown

# Forge Task Module
## Overview
The Task module provides a comprehensive mission and objective system for the Forge client. It includes features for creating, managing, and tracking various types of tasks, with support for rewards, penalties, and mission completion conditions.
## Dependencies
- forge_client_main
## Authors
- J. Schmidt
- Creedcoder
- IDSolutions
## Features
### Task Types
1. **Attack Tasks** (`fnc_attack.sqf`)
- Eliminate specific targets
- Time-based objectives
- Target escape prevention
- Success/failure conditions
- Reward system integration
2. **Defend Tasks** (`fnc_defend.sqf`)
- Hold designated zones
- Wave-based enemy attacks
- Minimum force requirements
- Time-based objectives
- Zone control monitoring
3. **Hostage Tasks** (`fnc_hostage.sqf`)
- Rescue hostages
- Extraction zone management
- Hostage protection
- Time-based objectives
- CBRN zone support
4. **HVT Tasks** (`fnc_hvt.sqf`)
- Capture or eliminate HVTs
- Extraction requirements
- Target tracking
- Success/failure conditions
- Reward system integration
5. **Defuse Tasks** (`fnc_defuse.sqf`)
- Defuse explosive devices
- Time-based objectives
- Success/failure conditions
- Reward system integration
- Explosive entity management
6. **Delivery Tasks** (`fnc_delivery.sqf`)
- Transport objectives
- Route management
- Time-based delivery
- Success/failure conditions
- Reward system integration
### Task Management
1. **Task Configuration**
- Unique task IDs
- Success/failure limits
- Time limits
- Reward settings
- Mission end conditions
2. **Reward System** (`fnc_handleTaskRewards.sqf`)
- Company funds
- Reputation points
- Equipment rewards
- Supply rewards
- Weapon rewards
- Vehicle rewards
- Special rewards
3. **Task Tracking**
- Progress monitoring
- State management
- Objective tracking
- Time tracking
- Success/failure detection
### Module System
1. **Attack Module** (`fnc_attackModule.sqf`)
- Target configuration
- Success/failure settings
- Reward configuration
- Time limit settings
- Mission end conditions
2. **Defend Module** (`fnc_defendModule.sqf`)
- Zone configuration
- Wave settings
- Force requirements
- Reward configuration
- Mission end conditions
3. **Hostage Module** (`fnc_hostageModule.sqf`)
- Hostage configuration
- Extraction settings
- Time limit settings
- Reward configuration
- Mission end conditions
4. **HVT Module** (`fnc_hvtModule.sqf`)
- Target configuration
- Extraction settings
- Success/failure settings
- Reward configuration
- Mission end conditions
5. **Defuse Module** (`fnc_defuseModule.sqf`)
- Explosive configuration
- Time limit settings
- Success/failure settings
- Reward configuration
- Mission end conditions
## 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
## Usage
To use the task module:
```sqf
// Create an attack task
["task_attack_1", 1, 2, 1500000, -75, 375, false, false] spawn forge_client_task_fnc_attack;
// Create a defend task
["task_defend_1", "defend_marker", 900, 500000, -100, 400, false, false, 3, 300, 1] spawn forge_client_task_fnc_defend;
// Create a hostage task
["task_hostage_1", 1, 2, "extract_marker", 1500000, -75, 500, [false, true], false, false] spawn forge_client_task_fnc_hostage;
// Create an HVT task
["task_hvt_1", 1, 2, "extract_marker", 1500000, -75, 500, false, false] spawn forge_client_task_fnc_hvt;
```
## Integration
The task module integrates with other Forge client systems:
1. **Organization System**
- Fund management
- Reputation tracking
- Asset rewards
- Transaction processing
- Balance updates
2. **Notification System**
- Task assignments
- Progress updates
- Success/failure alerts
- Reward notifications
- Mission end notifications
3. **Mission System**
- Mission success/failure
- End conditions
- State management
- Progress tracking
- Objective management
## 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
- Real-time task monitoring
- Multi-objective support
- Reward system integration
- State management
- Progress tracking
- Time management
- Cross-module integration
- Event system integration
- Notification handling
- Error management
- Resource management
- Mission control
- Objective validation