
All checks were successful
Build / Build (push) Successful in 28s
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.
Forge Initialization Module
Overview
The Initialization module provides a comprehensive player initialization and data persistence system for the Forge client. It handles player data loading, saving, and synchronization with the database, ensuring a seamless experience across sessions.
Dependencies
- forge_client_main
- ArmaDragonflyClient
Authors
- J. Schmidt
- Creedcoder
- IDSolutions
Features
Player Initialization
-
Player Setup (
fnc_initPlayer.sqf
)- Initializes player state
- Clears default equipment
- Sets up player variables
- Configures initial loadout
- Manages loading screen
-
Data Management
-
Player Load (
fnc_playerDBLoad.sqf
)- Loads player data from database
- Handles first-time login
- Restores player state
- Manages data synchronization
-
Player Save (
fnc_playerDBSave.sqf
)- Saves player data to database
- Manages data persistence
- Handles state synchronization
- Preserves player information
-
Save Loop (
fnc_playerSaveLoop.sqf
)- Periodic data saving
- Configurable save intervals
- Automatic state persistence
- Error handling
-
-
Data Handling (
fnc_handlePlayerLoad.sqf
)- Processes loaded data
- Restores player state
- Manages default values
- Handles data validation
Persisted Data
-
Player Information
- Armory unlocks
- Garage unlocks
- Locker contents
- Vehicle inventory
- Financial data (cash/bank)
- Contact details
- Organization membership
- Player statistics
- Equipment loadouts
- Position and state
-
State Management
- Player position
- Player direction
- Weapon state
- Stance information
- Rating/reputation
- Paygrade
- Organization status
Event Handlers
The module uses several event handlers for initialization and execution:
XEH_preInit.sqf
: Pre-initialization setupXEH_postInit.sqf
: Post-initialization tasksXEH_preStart.sqf
: Pre-start configurationXEH_postInit_client.sqf
: Client-specific post-initializationXEH_preInit_server.sqf
: Server-specific pre-initialization
Usage
To use the initialization module:
- Ensure the module is properly loaded in your mission
- The module automatically handles player initialization
- Access player data using the appropriate functions:
// 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;
- Monitor player state and data persistence
Debugging
Debug mode can be enabled by uncommenting the following in script_component.hpp
:
#define DEBUG_MODE_FULL
Version Information
Version information is managed through the main Forge client system configuration.
Technical Details
- Automatic player initialization
- Database integration
- Periodic data saving
- State persistence
- Error handling
- Data validation
- First-time login handling
- Default value management
- Position tracking
- Equipment management
- Financial synchronization
- Organization integration