client/addons/player/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

133 lines
2.9 KiB
Markdown

# Forge Player Module
## Overview
The Player module provides a comprehensive system for managing player data, persistence, and state in the Forge client. It includes features for player initialization, data management, and integration with other systems.
## Dependencies
- forge_client_main
- ArmaDragonflyClient
## Authors
- J. Schmidt
- Creedcoder
- IDSolutions
## Features
### Player Management
1. **Initialization**
- First-time player setup
- Data loading from database
- Default values assignment
- State initialization
- Profile creation
2. **Data Persistence**
- Automatic data saving
- Periodic state synchronization
- Position and direction tracking
- Loadout persistence
- Equipment state management
3. **State Management**
- Player position tracking
- Direction tracking
- Stance management
- Weapon holstering
- Current weapon tracking
### Data Management
1. **Player Data**
- Armory unlocks
- Garage unlocks
- Locker contents
- Vehicle inventory
- Financial information
- Contact details
- Organization membership
- Player statistics
- Equipment loadouts
- Position and state
2. **Profile Data**
- Email address
- Phone number
- Paygrade
- Organization
- Reputation
- Custom settings
- Preferences
3. **Save System**
- Automatic saving
- Periodic backups
- Data validation
- Error recovery
- State verification
### Integration
1. **Database System**
- Data persistence
- State synchronization
- Profile management
- Error handling
- Data validation
2. **Organization System**
- Member management
- Role assignment
- Organization tracking
- Asset management
- Financial integration
3. **Financial System**
- Cash management
- Bank integration
- Transaction tracking
- Paygrade system
- Financial persistence
## 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 player module:
```sqf
// Initialize player
[] call forge_client_init_fnc_initPlayer;
// Load player data
[] call forge_client_init_fnc_playerDBLoad;
// Save player data
[] call forge_client_init_fnc_playerDBSave;
// Handle player load
[_data] call forge_client_init_fnc_handlePlayerLoad;
```
## 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 data synchronization
- Secure data management
- Comprehensive validation
- Error handling
- State persistence
- Profile management
- Cross-module integration
- Event system integration
- Data versioning
- Backup support
- Transaction logging
- Data integrity checks