Compare commits
No commits in common. "master" and "1.0.0.22" have entirely different histories.
@ -1,7 +1,7 @@
|
||||
# Forge Admin Module
|
||||
|
||||
## Overview
|
||||
The Admin module provides comprehensive administrative functionality for the Forge client system. It includes features for user management, financial operations, messaging, and administrative controls through both traditional and web-based interfaces.
|
||||
The Admin module provides administrative functionality for the Forge client system. It includes features for user management, messaging, and administrative controls.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
@ -18,13 +18,9 @@ The Admin module provides comprehensive administrative functionality for the For
|
||||
- Initializes the admin system
|
||||
- Sets up necessary permissions and configurations
|
||||
|
||||
2. **Admin Interface**
|
||||
- **Traditional UI** (`fnc_openAdmin.sqf`)
|
||||
2. **Admin Interface** (`fnc_openAdmin.sqf`)
|
||||
- Opens the administrative user interface
|
||||
- Provides access to administrative controls
|
||||
- **Web-based UI** (`RscWebAdmin.hpp`)
|
||||
- Modern web interface for administrative tasks
|
||||
- Real-time player statistics and management
|
||||
|
||||
3. **User Management**
|
||||
- **Promotion** (`fnc_adminPromote.sqf`)
|
||||
@ -34,36 +30,16 @@ The Admin module provides comprehensive administrative functionality for the For
|
||||
- **Refresh** (`fnc_adminRefresh.sqf`)
|
||||
- Updates administrative permissions and states
|
||||
|
||||
4. **Financial Operations**
|
||||
- **Payday System**
|
||||
- Distributes funds based on player ranks
|
||||
- Configurable paygrade amounts
|
||||
- **Money Management**
|
||||
- Advance funds to players
|
||||
- Deduct funds from players
|
||||
- Global money distribution
|
||||
- Company account balance tracking
|
||||
|
||||
5. **Communication**
|
||||
4. **Communication**
|
||||
- **Admin Messages** (`fnc_adminMessage.sqf`)
|
||||
- Handles administrative messaging system
|
||||
- **Broadcast System**
|
||||
- Send messages to all players
|
||||
- Targeted player messaging
|
||||
|
||||
### User Interface Components
|
||||
1. **Traditional UI** (`RscAdmin.hpp`)
|
||||
- Player list management
|
||||
- Rank selection and promotion
|
||||
- Financial operations
|
||||
- Messaging system
|
||||
|
||||
2. **Web Interface** (`ui/_site/`)
|
||||
- Modern, responsive design
|
||||
- Real-time statistics
|
||||
- Player management
|
||||
- Financial operations
|
||||
- Messaging system
|
||||
### User Interface
|
||||
The module includes two main UI components:
|
||||
1. **RscCommon.hpp**
|
||||
- Common UI elements and definitions
|
||||
2. **RscAdmin.hpp**
|
||||
- Administrative interface specific elements
|
||||
|
||||
## Event Handlers
|
||||
The module uses several event handlers for initialization and execution:
|
||||
@ -74,9 +50,7 @@ The module uses several event handlers for initialization and execution:
|
||||
## Usage
|
||||
To use the admin module:
|
||||
1. Ensure the module is properly loaded in your mission
|
||||
2. Access administrative functions through either:
|
||||
- Traditional UI: Use the provided dialog interface
|
||||
- Web Interface: Access through the modern web-based panel
|
||||
2. Access administrative functions through the provided UI
|
||||
3. Use appropriate administrative commands based on your role
|
||||
|
||||
## Debugging
|
||||
@ -87,17 +61,3 @@ Debug mode can be enabled by uncommenting the following in `script_component.hpp
|
||||
|
||||
## Version Information
|
||||
Version information is managed through the main Forge client system configuration.
|
||||
|
||||
## Security
|
||||
The module includes built-in security features:
|
||||
- Admin authentication
|
||||
- Permission-based access control
|
||||
- Secure financial transactions
|
||||
- Protected administrative functions
|
||||
|
||||
## Technical Details
|
||||
- Supports both traditional Arma 3 UI and modern web interface
|
||||
- Real-time data updates
|
||||
- Configurable paygrade system
|
||||
- Comprehensive player management
|
||||
- Secure financial operations
|
@ -1,8 +1,14 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_admin_fnc_adminRefresh
|
||||
* Author: IDSolutions
|
||||
* Refreshes the admin interface
|
||||
*
|
||||
* [Description]
|
||||
* Refreshes the admin interface player list and resets input fields.
|
||||
* This function populates the player list with names and paygrades,
|
||||
* storing player UIDs as data for each entry. Only shows players
|
||||
* on the same side as the admin.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Dummy <ANY> - Optional parameter, not used (for compatibility with event handlers)
|
||||
@ -14,9 +20,10 @@
|
||||
* [] call forge_client_admin_fnc_adminRefresh;
|
||||
* ["dummy"] call forge_client_admin_fnc_adminRefresh;
|
||||
*
|
||||
* Public: No
|
||||
* Public: No - Called from admin dialog controls
|
||||
*/
|
||||
|
||||
|
||||
private _dialog = findDisplay 202303;
|
||||
private _list = _dialog displayCtrl 2023001;
|
||||
|
||||
|
@ -1,8 +1,16 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_admin_fnc_handleTransfer
|
||||
* Author: IDSolutions
|
||||
* Handles fund transfers
|
||||
*
|
||||
* [Description]
|
||||
* Handles fund transfers through the admin interface.
|
||||
* This function retrieves the selected player's UID and amount
|
||||
* from the admin dialog, then sends it to the server-side admin store.
|
||||
* Supports multiple transfer types: advance (to single player),
|
||||
* deduct (from single player), advanceAll (to all players),
|
||||
* and payday (distribute based on paygrade).
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Condition <STRING> - The type of transfer to perform ("advance", "deduct", "advanceAll", "payday")
|
||||
|
@ -1,8 +1,13 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_admin_fnc_sendMessage
|
||||
* Author: IDSolutions
|
||||
* Sends a message to a selected player
|
||||
*
|
||||
* [Description]
|
||||
* Sends a message to a selected player through the admin interface.
|
||||
* This function retrieves the selected player's UID and message content
|
||||
* from the admin dialog, then sends it to the server-side admin store.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,8 +1,13 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_admin_fnc_updatePaygrade
|
||||
* Author: IDSolutions
|
||||
* Updates a player's paygrade
|
||||
*
|
||||
* [Description]
|
||||
* Updates a player's paygrade in the server's admin store.
|
||||
* This function retrieves the selected player's UID and the target paygrade
|
||||
* from the admin dialog, then sends it to the server-side admin store.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,74 +0,0 @@
|
||||
# Forge Ambient Module
|
||||
|
||||
## Overview
|
||||
The Ambient module provides environmental sound management for the Forge client system. It enables the creation and management of ambient sound effects in the game environment, enhancing the immersive experience for players.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
|
||||
## Authors
|
||||
- J. Schmidt
|
||||
- Creedcoder
|
||||
- IDSolutions
|
||||
|
||||
## Features
|
||||
|
||||
### Sound Management
|
||||
1. **Ambient Sound System** (`fnc_ambientSound.sqf`)
|
||||
- Creates and manages sound sources in the game world
|
||||
- Handles sound effect playback and cleanup
|
||||
- Supports timed and continuous sound effects
|
||||
|
||||
2. **Sound Source Features**
|
||||
- Dynamic sound source creation
|
||||
- Position-based sound placement
|
||||
- Automatic cleanup of sound sources
|
||||
- Support for various sound types and durations
|
||||
|
||||
3. **Sound Control**
|
||||
- Lifecycle management of sound sources
|
||||
- Automatic cleanup when source is destroyed
|
||||
- Configurable sound duration
|
||||
- Position tracking for moving sound sources
|
||||
|
||||
## 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 ambient module:
|
||||
1. Ensure the module is properly loaded in your mission
|
||||
2. Create sound sources using the ambient sound function:
|
||||
```sqf
|
||||
[source, "sfx_sound_name"] spawn forge_client_ambient_fnc_ambientSound
|
||||
```
|
||||
3. Optionally specify a duration for temporary sounds:
|
||||
```sqf
|
||||
[source, "sfx_sound_name", duration] spawn forge_client_ambient_fnc_ambientSound
|
||||
```
|
||||
|
||||
## Parameters
|
||||
The ambient sound function accepts the following parameters:
|
||||
1. `source`: The object or position where the sound will be played
|
||||
2. `sfx`: The name of the sound effect to play
|
||||
3. `time` (optional): Duration in seconds before the sound is removed
|
||||
|
||||
## 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
|
||||
- Supports both object-attached and position-based sound sources
|
||||
- Automatic cleanup of sound sources when source is destroyed
|
||||
- Configurable sound duration for temporary effects
|
||||
- Efficient sound source management
|
||||
- Client-side sound processing
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Create a sound source and play an ambient sfx sound
|
||||
* Function: forge_client_ambient_fnc_ambientSound
|
||||
* Author: J.Schmidt
|
||||
*
|
||||
* [Description]
|
||||
* Create a sound source and play an ambient sfx sound.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The sound source <OBJECT>
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Forge Arsenal Module
|
||||
|
||||
## Overview
|
||||
The Arsenal module provides a comprehensive weapon and vehicle management system for the Forge client. It includes features for managing armory items, vehicle garages, and unlock systems, with support for both traditional and virtual arsenals.
|
||||
The Arsenal module provides a comprehensive weapon and vehicle management system for the Forge client. It includes features for managing armory items, vehicle garages, and unlock systems.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
@ -17,52 +17,27 @@ The Arsenal module provides a comprehensive weapon and vehicle management system
|
||||
1. **Armory Initialization** (`fnc_initArsenal.sqf`)
|
||||
- Initializes the arsenal system
|
||||
- Sets up necessary configurations and permissions
|
||||
- Configures default armory and garage data
|
||||
- Supports both traditional and virtual arsenal types
|
||||
|
||||
2. **Armory Interface** (`fnc_openArmory.sqf`)
|
||||
- Opens the armory user interface
|
||||
- Provides access to weapon and equipment management
|
||||
- Supports both traditional and ACE arsenal interfaces
|
||||
|
||||
3. **Item Management**
|
||||
- **Add Armory Items** (`fnc_addArmoryItem.sqf`)
|
||||
- Handles adding new items to the armory
|
||||
- Supports multiple item types:
|
||||
- Facewear (goggles, masks)
|
||||
- Headgear (helmets, caps)
|
||||
- HMD (night vision devices)
|
||||
- Items (tools, medical supplies)
|
||||
- Uniforms
|
||||
- Vests
|
||||
- Weapons
|
||||
- Magazines
|
||||
- Backpacks
|
||||
- **Save Unlocks** (`fnc_saveUnlocks.sqf`)
|
||||
- Manages the persistence of unlocked items
|
||||
- Integrates with player database system
|
||||
- **Update Unlocks** (`fnc_updateUnlocks.sqf`)
|
||||
- Updates the unlock status of items
|
||||
- Maintains synchronization between client and server
|
||||
|
||||
### Vehicle Management
|
||||
1. **Garage System**
|
||||
- **Open Garage** (`fnc_openGarage.sqf`)
|
||||
- Provides access to the vehicle garage interface
|
||||
- Categorizes vehicles by type
|
||||
- **Add Garage Vehicle** (`fnc_addGarageVehicle.sqf`)
|
||||
- Handles adding new vehicles to the garage
|
||||
- Supports vehicle categories:
|
||||
- Cars
|
||||
- Armored vehicles
|
||||
- Helicopters
|
||||
- Planes
|
||||
- Naval vessels
|
||||
- Static weapons
|
||||
- **Add Virtual Vehicles** (`fnc_addVirtualVehicles.sqf`)
|
||||
- Manages virtual vehicle entries in the garage
|
||||
- Automatically categorizes vehicles by type
|
||||
- Maintains vehicle model information
|
||||
|
||||
## Event Handlers
|
||||
The module uses several event handlers for initialization and execution:
|
||||
@ -79,27 +54,6 @@ To use the arsenal module:
|
||||
3. Use the garage interface for vehicle management
|
||||
4. Manage unlocks and permissions through the appropriate functions
|
||||
|
||||
## Item Types
|
||||
The module supports various item categories:
|
||||
- Weapons (Primary, Secondary, Handgun)
|
||||
- Magazines
|
||||
- Items (Tools, Medical, etc.)
|
||||
- Uniforms
|
||||
- Vests
|
||||
- Backpacks
|
||||
- Facewear
|
||||
- Headgear
|
||||
- HMD (Night Vision)
|
||||
|
||||
## Vehicle Categories
|
||||
Vehicles are organized into the following categories:
|
||||
1. Cars (Light vehicles, transport)
|
||||
2. Armor (Tanks, APCs)
|
||||
3. Helicopters (All rotary-wing aircraft)
|
||||
4. Planes (Fixed-wing aircraft)
|
||||
5. Naval (Boats, ships)
|
||||
6. Static (Weapons, emplacements)
|
||||
|
||||
## Debugging
|
||||
Debug mode can be enabled by uncommenting the following in `script_component.hpp`:
|
||||
```cpp
|
||||
@ -108,12 +62,3 @@ Debug mode can be enabled by uncommenting the following in `script_component.hpp
|
||||
|
||||
## Version Information
|
||||
Version information is managed through the main Forge client system configuration.
|
||||
|
||||
## Technical Details
|
||||
- Supports both traditional Arma 3 arsenal and ACE arsenal systems
|
||||
- Automatic vehicle categorization based on class inheritance
|
||||
- Persistent unlock system with database integration
|
||||
- Efficient item and vehicle management
|
||||
- Client-server synchronization for unlocks
|
||||
- Integration with the locker system for item storage
|
||||
- Support for virtual and physical vehicle spawning
|
@ -1,10 +1,10 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
[{
|
||||
GETVAR(player,EGVAR(player,done),false)
|
||||
GETVAR(player,value_loadDone,false)
|
||||
}, {
|
||||
private _armory_unlocks = GETVAR(player,Armory_Unlocks,GVAR(default_armory));
|
||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
|
||||
private _armory_unlocks = player getVariable ["Armory_Unlocks", [[],[],[],[]]];
|
||||
private _garage_unlocks = player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]];
|
||||
|
||||
[_armory_unlocks, _garage_unlocks] call FUNC(initArsenal);
|
||||
}] call CFUNC(waitUntilAndExecute);
|
@ -7,16 +7,6 @@ PREP_RECOMPILE_END;
|
||||
|
||||
GVAR(armory_unlocks) = [];
|
||||
GVAR(garage_unlocks) = [];
|
||||
|
||||
GVAR(car_unlocks) = [];
|
||||
GVAR(armor_unlocks) = [];
|
||||
GVAR(heli_unlocks) = [];
|
||||
GVAR(plane_unlocks) = [];
|
||||
GVAR(naval_unlocks) = [];
|
||||
GVAR(static_unlocks) = [];
|
||||
|
||||
GVAR(default_armory) = [[],[],[],[]];
|
||||
GVAR(default_garage) = [[],[],[],[],[],[]];
|
||||
GVAR(pdb_mode) = "PDB_MODE" call BFUNC(getParamValue);
|
||||
GVAR(armory_type) = "ARS_TYPE" call BFUNC(getParamValue);
|
||||
GVAR(gear_box) = "ReammoBox_F" createVehicleLocal [0, 0, -999];
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_addArmoryItem
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds item to player's armory unlocks and updates virtual arsenal
|
||||
*
|
||||
* Arguments:
|
||||
@ -19,7 +22,9 @@
|
||||
|
||||
params [["_class", "", [""]], ["_type", "", [""]]];
|
||||
|
||||
private _armory_unlocks = GETVAR(player,Armory_Unlocks,GVAR(default_armory));
|
||||
private _default = [[],[],[],[]];
|
||||
private _armory_unlocks = GETVAR(player,Armory_Unlocks,_default);
|
||||
|
||||
private _typeToNumber = switch (_type) do {
|
||||
case "facewear";
|
||||
case "headgear";
|
||||
@ -44,6 +49,7 @@ if (_index > -1) then {
|
||||
[GVAR(gear_box), [_class]] call AFUNC(arsenal,addVirtualItems);
|
||||
};
|
||||
|
||||
TRACE_2("Item added to armory",_class,_type);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_addGarageVehicle
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds vehicle to player's garage unlocks and updates virtual garage
|
||||
*
|
||||
* Arguments:
|
||||
@ -19,7 +22,10 @@
|
||||
|
||||
params [["_class", "", [""]], ["_type", "", [""]]];
|
||||
|
||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
|
||||
private _default = [[],[],[],[],[],[]];
|
||||
// private _garage_unlocks = player getVariable ["Garage_Unlocks", _default];
|
||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
|
||||
|
||||
private _typeToNumber = switch (_type) do {
|
||||
case "car": {0};
|
||||
case "armor": {1};
|
||||
@ -33,9 +39,11 @@ private _typeToNumber = switch (_type) do {
|
||||
private _index = (_garage_unlocks select _typeToNumber) pushBackUnique _class;
|
||||
|
||||
if (_index > -1) then {
|
||||
// player setVariable ["Garage_Unlocks", _garage_unlocks, true];
|
||||
SETPVAR(player,Garage_Unlocks,_garage_unlocks);
|
||||
[[_class]] call FUNC(addVirtualVehicles);
|
||||
|
||||
TRACE_2("Vehicle added to garage",_class,_type);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_addVirtualVehicles
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds vehicles to virtual garage and categorizes them by type
|
||||
*
|
||||
* Arguments:
|
||||
@ -18,8 +21,15 @@
|
||||
|
||||
params [["_vehicles", [], [[]]]];
|
||||
|
||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
|
||||
_garage_unlocks params ["_cars", "_armor", "_helis", "_planes", "_naval", "_static"];
|
||||
private _default = [[],[],[],[],[],[]];
|
||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
|
||||
|
||||
private _cars = _garage_unlocks select 0;
|
||||
private _armor = _garage_unlocks select 1;
|
||||
private _helis = _garage_unlocks select 2;
|
||||
private _planes = _garage_unlocks select 3;
|
||||
private _naval = _garage_unlocks select 4;
|
||||
private _static = _garage_unlocks select 5;
|
||||
|
||||
{
|
||||
switch true do {
|
||||
@ -27,14 +37,31 @@ _garage_unlocks params ["_cars", "_armor", "_helis", "_planes", "_naval", "_stat
|
||||
if ((_x isKindOf "Tank") || (_x isKindOf "Wheeled_APC_F")) exitWith {};
|
||||
_cars pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Tank"): { _armor pushBackUnique _x; };
|
||||
case (_x isKindOf "Helicopter"): { _helis pushBackUnique _x; };
|
||||
case (_x isKindOf "Plane"): { _planes pushBackUnique _x; };
|
||||
case (_x isKindOf "Ship"): { _naval pushBackUnique _x; };
|
||||
case (_x isKindOf "Static"): { _static pushBackUnique _x; };
|
||||
case (_x isKindOf "Tank"): {
|
||||
_armor pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Helicopter"): {
|
||||
_helis pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Plane"): {
|
||||
_planes pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Ship"): {
|
||||
_naval pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Static"): {
|
||||
_static pushBackUnique _x;
|
||||
};
|
||||
};
|
||||
} forEach _vehicles;
|
||||
|
||||
GVAR(car_unlocks) = [];
|
||||
GVAR(armor_unlocks) = [];
|
||||
GVAR(heli_unlocks) = [];
|
||||
GVAR(plane_unlocks) = [];
|
||||
GVAR(naval_unlocks) = [];
|
||||
GVAR(static_unlocks) = [];
|
||||
|
||||
{
|
||||
GVAR(car_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
|
||||
} forEach _cars;
|
||||
@ -58,3 +85,5 @@ _garage_unlocks params ["_cars", "_armor", "_helis", "_planes", "_naval", "_stat
|
||||
{
|
||||
GVAR(static_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
|
||||
} forEach _static;
|
||||
|
||||
TRACE_1("Virtual vehicles updated",count _vehicles);
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_initArsenal
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the arsenal system with armory and garage data
|
||||
*
|
||||
* Arguments:
|
||||
@ -17,8 +20,11 @@
|
||||
|
||||
params [["_armory_data", [], [[]]], ["_garage_data", [], [[]]]];
|
||||
|
||||
if (!(_armory_data isEqualTypeArray GVAR(default_armory)) || (count _armory_data != 4)) then { _armory_data = GVAR(default_armory); };
|
||||
if (!(_garage_data isEqualTypeArray GVAR(default_garage)) || (count _garage_data != 6)) then { _garage_data = GVAR(default_garage); };
|
||||
private _defaultArmory = [[],[],[],[]];
|
||||
private _defaultGarage = [[],[],[],[],[],[]];
|
||||
|
||||
if (!(_armory_data isEqualTypeArray _defaultArmory) || (count _armory_data != 4)) then { _armory_data = _defaultArmory; };
|
||||
if (!(_garage_data isEqualTypeArray _defaultGarage) || (count _garage_data != 6)) then { _garage_data = _defaultGarage; };
|
||||
if (GVAR(armory_type) == 0) then {
|
||||
{
|
||||
[GVAR(gear_box), _x, false, true, 1, _forEachIndex] call BFUNC(addVirtualItemCargo);
|
||||
@ -50,3 +56,8 @@ GVAR(static_unlocks) = _statics;
|
||||
{
|
||||
[_x] call FUNC(addVirtualVehicles);
|
||||
} forEach GVAR(garage_unlocks);
|
||||
|
||||
private _armoryCount = count (_armory_data select { count _x > 0 });
|
||||
private _garageCount = count (_garage_data select { count _x > 0 });
|
||||
|
||||
TRACE_2("Arsenal System Initialized",_armoryCount,_garageCount);
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_openArmory
|
||||
* Author: IDSolutions
|
||||
* Opens the virtual arsenal
|
||||
*
|
||||
* [Description]
|
||||
* Opens the arsenal system
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_openGarage
|
||||
* Author: IDSolutions
|
||||
* Opens the virtual garage
|
||||
*
|
||||
* [Description]
|
||||
* Opens the garage system
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_saveUnlocks
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Saves arsenal/garage unlocks to appropriate storage based on persistence mode
|
||||
*
|
||||
* Arguments:
|
||||
@ -20,16 +23,20 @@ params [["_type", "", [""]]];
|
||||
|
||||
switch (_type) do {
|
||||
case "armory": {
|
||||
private _armory_data = GETVAR(player,Armory_Unlocks,GVAR(default_armory));
|
||||
private _default_armory_data = [[],[],[],[]];
|
||||
// private _armory_data = player getVariable ["Armory_Unlocks", [[],[],[],[]]];
|
||||
private _armory_data = GETVAR(player,Armory_Unlocks,_default_armory_data);
|
||||
|
||||
switch (GVAR(pdb_mode)) do {
|
||||
case 0: {
|
||||
// profileNamespace setVariable ["Armory_Unlocks", _armory_data];
|
||||
SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
|
||||
};
|
||||
case 1: {
|
||||
["hsetid", getPlayerUID player, "armory_unlocks", -1, _armory_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
|
||||
};
|
||||
default {
|
||||
// profileNamespace setVariable ["Armory_Unlocks", _armory_data];
|
||||
SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
|
||||
};
|
||||
};
|
||||
@ -38,16 +45,20 @@ switch (_type) do {
|
||||
};
|
||||
|
||||
case "garage": {
|
||||
private _garage_data = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
|
||||
private _default_garage_data = [[],[],[],[],[],[]];
|
||||
// private _garage_data = player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]];
|
||||
private _garage_data = GETVAR(player,Garage_Unlocks,_default_garage_data);
|
||||
|
||||
switch (GVAR(pdb_mode)) do {
|
||||
case 0: {
|
||||
// profileNamespace setVariable ["Garage_Unlocks", _garage_data];
|
||||
SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
|
||||
};
|
||||
case 1: {
|
||||
["hsetid", getPlayerUID player, "garage_unlocks", -1, _garage_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
|
||||
};
|
||||
default {
|
||||
// profileNamespace setVariable ["Garage_Unlocks", _garage_data];
|
||||
SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
|
||||
};
|
||||
};
|
||||
@ -55,3 +66,5 @@ switch (_type) do {
|
||||
[_type, _garage_data] call FUNC(updateUnlocks);
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_2("Arsenal Unlocks saved",_type,GVAR(pdb_mode));
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_updateUnlocks
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Updates the arsenal system variables when unlocks change
|
||||
*
|
||||
* Arguments:
|
||||
@ -21,24 +24,26 @@ params [["_type", "", [""]], ["_data", [], [[]]]];
|
||||
|
||||
switch (_type) do {
|
||||
case "armory": {
|
||||
_data params ["_items", "_weapons", "_magazines", "_backpacks"];
|
||||
|
||||
GVAR(armory_unlocks) = _data;
|
||||
GVAR(item_unlocks) = _items;
|
||||
GVAR(weapon_unlocks) = _weapons;
|
||||
GVAR(magazine_unlocks) = _magazines;
|
||||
GVAR(backpack_unlocks) = _backpacks;
|
||||
|
||||
GVAR(item_unlocks) = _data select 0;
|
||||
GVAR(weapon_unlocks) = _data select 1;
|
||||
GVAR(magazine_unlocks) = _data select 2;
|
||||
GVAR(backpack_unlocks) = _data select 3;
|
||||
|
||||
TRACE_1("Armory unlocks updated",count GVAR(armory_unlocks));
|
||||
};
|
||||
|
||||
case "garage": {
|
||||
_data params ["_cars", "_armor", "_helis", "_planes", "_naval", "_static"];
|
||||
|
||||
GVAR(garage_unlocks) = _data;
|
||||
GVAR(car_unlocks) = _cars;
|
||||
GVAR(armor_unlocks) = _armor;
|
||||
GVAR(heli_unlocks) = _helis;
|
||||
GVAR(plane_unlocks) = _planes;
|
||||
GVAR(naval_unlocks) = _naval;
|
||||
GVAR(static_unlocks) = _static;
|
||||
|
||||
GVAR(car_unlocks) = _data select 0;
|
||||
GVAR(armor_unlocks) = _data select 1;
|
||||
GVAR(heli_unlocks) = _data select 2;
|
||||
GVAR(plane_unlocks) = _data select 3;
|
||||
GVAR(naval_unlocks) = _data select 4;
|
||||
GVAR(static_unlocks) = _data select 5;
|
||||
|
||||
TRACE_1("Garage unlocks updated",count GVAR(garage_unlocks));
|
||||
};
|
||||
};
|
@ -1,7 +1,7 @@
|
||||
# Forge Bank Module
|
||||
|
||||
## Overview
|
||||
The Bank module provides a comprehensive banking system for the Forge client. It includes features for managing player finances, transfers, and timesheet functionality, with a modern web-based interface for seamless user experience.
|
||||
The Bank module provides a comprehensive banking system for the Forge client. It includes features for managing player finances, transfers, and timesheet functionality.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
@ -17,70 +17,39 @@ The Bank module provides a comprehensive banking system for the Forge client. It
|
||||
1. **Bank Initialization** (`fnc_initBank.sqf`)
|
||||
- Initializes the banking system
|
||||
- Sets up necessary configurations and account structures
|
||||
- Configures player account data and balances
|
||||
- Handles server-side synchronization
|
||||
|
||||
2. **Bank Interface** (`fnc_openBank.sqf`)
|
||||
- Opens the banking user interface
|
||||
- Provides access to all banking functions
|
||||
- Modern web-based UI with real-time updates
|
||||
- Responsive design for optimal user experience
|
||||
|
||||
3. **Transaction Management**
|
||||
- **Deposit** (`fnc_deposit.sqf`)
|
||||
- Handles money deposits into bank accounts
|
||||
- Validates transaction amounts
|
||||
- Updates account balances in real-time
|
||||
- **Withdraw** (`fnc_withdraw.sqf`)
|
||||
- Manages money withdrawals from bank accounts
|
||||
- Ensures sufficient funds
|
||||
- Updates wallet balance immediately
|
||||
- **Transfer** (`fnc_transfer.sqf`)
|
||||
- Handles money transfers between players
|
||||
- Validates recipient and amount
|
||||
- Supports both account-to-account and wallet transfers
|
||||
- **Submit** (`fnc_submit.sqf`)
|
||||
- Processes transaction submissions
|
||||
- Handles timesheet submissions
|
||||
- Manages pending payments
|
||||
- **Refresh** (`fnc_refresh.sqf`)
|
||||
- Updates account information and balances
|
||||
- Synchronizes with server data
|
||||
- Updates UI elements
|
||||
|
||||
### User Interface
|
||||
The module includes a modern web-based interface with:
|
||||
1. **Account Overview**
|
||||
- Current wallet balance
|
||||
- Bank account balance
|
||||
- Pending payments
|
||||
- Transaction history
|
||||
The module includes several UI components:
|
||||
1. **Base Controls** (`BaseControls.hpp`)
|
||||
- Common UI elements and definitions
|
||||
2. **Bank Dialog** (`RscBankDialog.hpp`)
|
||||
- Banking interface specific elements
|
||||
|
||||
2. **Transaction Features**
|
||||
- Transfer between wallet and account
|
||||
- Player-to-player transfers
|
||||
- Timesheet submission
|
||||
- Transaction history view
|
||||
|
||||
3. **UI Components**
|
||||
- Real-time balance updates
|
||||
- Transaction notifications
|
||||
- Input validation
|
||||
- Error handling
|
||||
- Responsive design
|
||||
|
||||
### Timesheet System
|
||||
1. **Rating Integration**
|
||||
- Tracks player rating
|
||||
- Calculates pending payments
|
||||
- Automatic payment processing
|
||||
- Rating reset after submission
|
||||
|
||||
2. **Payment Processing**
|
||||
- Automatic calculation based on rating
|
||||
- Configurable payment multiplier
|
||||
- Pending payment tracking
|
||||
- Instant payment processing
|
||||
### Interface Elements
|
||||
The module defines several UI control IDs:
|
||||
- Account Information Display
|
||||
- Amount Input Fields
|
||||
- Player Selection
|
||||
- Transaction Buttons (Deposit, Withdraw, Transfer)
|
||||
- Wallet and Bank Balance Displays
|
||||
- Rating System
|
||||
- Timesheet Integration
|
||||
|
||||
## Event Handlers
|
||||
The module uses several event handlers for initialization and execution:
|
||||
@ -94,12 +63,8 @@ The module uses several event handlers for initialization and execution:
|
||||
To use the bank module:
|
||||
1. Ensure the module is properly loaded in your mission
|
||||
2. Access the bank through the provided UI
|
||||
3. Perform transactions using the appropriate functions:
|
||||
- Transfer money between wallet and account
|
||||
- Send money to other players
|
||||
- Submit timesheets for payment
|
||||
- View transaction history
|
||||
4. Monitor account status and transactions in real-time
|
||||
3. Perform transactions using the appropriate functions
|
||||
4. Monitor account status and transactions
|
||||
|
||||
## Debugging
|
||||
Debug mode can be enabled by uncommenting the following in `script_component.hpp`:
|
||||
@ -109,15 +74,3 @@ Debug mode can be enabled by uncommenting the following in `script_component.hpp
|
||||
|
||||
## Version Information
|
||||
Version information is managed through the main Forge client system configuration.
|
||||
|
||||
## Technical Details
|
||||
- Web-based interface using HTML5, CSS3, and JavaScript
|
||||
- Real-time data synchronization with server
|
||||
- Secure transaction processing
|
||||
- Client-server event system
|
||||
- Persistent data storage
|
||||
- Rating-based payment system
|
||||
- Transaction history tracking
|
||||
- Input validation and error handling
|
||||
- Responsive UI design
|
||||
- Cross-browser compatibility
|
49
addons/bank/functions/fnc_initBank.sqf
Normal file
49
addons/bank/functions/fnc_initBank.sqf
Normal file
@ -0,0 +1,49 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_bank_fnc_initBank
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the bank system
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Examples:
|
||||
* None
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
{
|
||||
private _configName = configName(_x);
|
||||
private _className = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "className") call BFUNC(getCfgData);
|
||||
private _pos = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "pos") call BFUNC(getCfgData);
|
||||
private _dir = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "dir") call BFUNC(getCfgData);
|
||||
private _type = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "type") call BFUNC(getCfgData);
|
||||
|
||||
if (_type == "object") then {
|
||||
private _bank = createSimpleObject [_className, [0, 0, 0]];
|
||||
|
||||
_bank setPosATL _pos;
|
||||
_bank setDir _dir;
|
||||
_bank allowDamage false;
|
||||
_bank setVariable ["isBank", true, true];
|
||||
} else {
|
||||
private _group = createGroup civilian;
|
||||
private _bank = _group createUnit [_className, [0, 0, 0], [], 0, "NONE"];
|
||||
|
||||
_bank disableAI "MOVE";
|
||||
_bank setPosATL _pos;
|
||||
_bank setDir _dir;
|
||||
_bank allowDamage false;
|
||||
_bank setVariable ["isBank", true, true];
|
||||
_bank setVariable ["BIS_enableRandomization", false];
|
||||
};
|
||||
|
||||
diag_log text format ["[FORGE Bank] ClassName: '%1' Pos: '%2' Dir: '%3'", _className, _pos, _dir];
|
||||
} forEach ("true" configClasses (missionConfigFile >> "CfgBanks" >> "banks"));
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_bank_fnc_submit
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Submits the timesheet
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Transfers money to a player
|
||||
* Transfers money to a player.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Withdraws money from the bank
|
||||
* Withdraws money from the bank.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,114 +0,0 @@
|
||||
# Forge Briefing Module
|
||||
|
||||
## Overview
|
||||
The Briefing module provides a comprehensive presentation and lecture system for the Forge client. It includes features for creating interactive slideshows, managing presentations, and delivering lectures with synchronized audio and visual elements.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
|
||||
## Authors
|
||||
- J. Schmidt
|
||||
- Creedcoder
|
||||
- IDSolutions
|
||||
|
||||
## Features
|
||||
|
||||
### Presentation System
|
||||
1. **Slide Show Management** (`fnc_initSlideShow.sqf`)
|
||||
- Initializes interactive slide shows
|
||||
- Configures display screens and controllers
|
||||
- Sets up image sequences and timing
|
||||
- Manages presentation flow and transitions
|
||||
|
||||
2. **Presentation Controls**
|
||||
- **Start Slide Show** (`fnc_startSlideShow.sqf`)
|
||||
- Initiates the presentation sequence
|
||||
- Synchronizes audio and visual elements
|
||||
- Manages presentation state
|
||||
- **Next Image** (`fnc_nextImage.sqf`)
|
||||
- Advances to the next slide
|
||||
- Updates display screens
|
||||
- Maintains presentation state
|
||||
- **Previous Image** (`fnc_prevImage.sqf`)
|
||||
- Returns to the previous slide
|
||||
- Updates display screens
|
||||
- Maintains presentation state
|
||||
- **End Slide Show** (`fnc_endSlideShow.sqf`)
|
||||
- Terminates the presentation
|
||||
- Cleans up resources
|
||||
- Resets presentation state
|
||||
|
||||
3. **Lecture System**
|
||||
- **Spawn Lecture** (`fnc_spawnLecture.sqf`)
|
||||
- Initiates AI-driven lectures
|
||||
- Manages speaker animations
|
||||
- Controls presentation timing
|
||||
- **Spawn Presentation** (`fnc_spawnPresentation.sqf`)
|
||||
- Creates automated presentations
|
||||
- Manages slide timing
|
||||
- Controls visual transitions
|
||||
|
||||
### Presentation Features
|
||||
1. **Interactive Controls**
|
||||
- Manual slide navigation
|
||||
- Auto-scroll capability
|
||||
- Presentation state management
|
||||
- Speaker control integration
|
||||
|
||||
2. **Visual Elements**
|
||||
- Multiple display screen support
|
||||
- Synchronized image transitions
|
||||
- Customizable timing
|
||||
- Power-of-2 image optimization
|
||||
|
||||
3. **Audio Integration**
|
||||
- Speaker synchronization
|
||||
- Topic-based conversations
|
||||
- Sentence-specific playback
|
||||
- Multi-speaker support
|
||||
|
||||
## 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 briefing module:
|
||||
1. Ensure the module is properly loaded in your mission
|
||||
2. Set up presentation screens and controllers
|
||||
3. Configure slide shows or lectures:
|
||||
```sqf
|
||||
// Initialize a slide show
|
||||
[Screen01, [Controller01], ["images/folder/image.paa"]] call forge_client_briefing_fnc_initSlideShow;
|
||||
|
||||
// Start a lecture
|
||||
[player, "topic", "sentence"] call forge_client_briefing_fnc_spawnLecture;
|
||||
|
||||
// Create a presentation
|
||||
[screen, [["texture.paa", 5]]] call forge_client_briefing_fnc_spawnPresentation;
|
||||
```
|
||||
4. Control the presentation using the provided functions
|
||||
|
||||
## 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
|
||||
- Support for multiple display screens
|
||||
- Synchronized audio-visual presentations
|
||||
- Interactive control system
|
||||
- AI-driven lecture capabilities
|
||||
- Power-of-2 image optimization
|
||||
- State management for presentations
|
||||
- Multi-speaker support
|
||||
- Customizable timing controls
|
||||
- Resource cleanup on completion
|
||||
- Error handling and validation
|
@ -1,19 +1,14 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Ends the slide show
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Controller <OBJECT> - object that controls the slide show
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean - true if the slide show was ended; false if not
|
||||
*
|
||||
* Example:
|
||||
* [controller] call ace_briefing_fnc_endSlideShow
|
||||
*
|
||||
* Public: No
|
||||
Author: PDT for J. Schmidt
|
||||
ends the slide show
|
||||
|
||||
Arguments:
|
||||
0: _controller <OBJECT> - object that controls the slide show
|
||||
|
||||
Return Value:
|
||||
<BOOL> - true if the slide show was ended; false if not
|
||||
*/
|
||||
|
||||
params [["_controller", objNull]];
|
||||
|
@ -1,25 +1,23 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Sets up a slide show
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _screen <ARRAY> - array of objects to display images on
|
||||
* 1: _controllers <ARRAY> - array of objects to use are controlers
|
||||
* 2: _images <ARRAY> - array of image paths; images should be powers of 2
|
||||
* 3: _autoScroll <BOOL> - should the image auto-scroll
|
||||
* 4: _units <ARRAY> - unit(s) that should speak
|
||||
* 5: _topic <STRING> - conversation topic
|
||||
* 6: _sentence <STRING> - conversation sentence, "" = play all
|
||||
*
|
||||
* Return Value:
|
||||
* <BOOL> - true if slide show was setup; false if not
|
||||
*
|
||||
* Example:
|
||||
* [Screen01, [Controler01], ["images/folder/image.paa"]] call forge_client_briefing_fnc_initSlideShow;
|
||||
*
|
||||
* Public: No
|
||||
Author: PDT for J. Schmidt
|
||||
sets up a slide show
|
||||
|
||||
Arguments:
|
||||
0: _screen <ARRAY> - array of objects to display images on
|
||||
1: _controllers <ARRAY> - array of objects to use are controlers
|
||||
2: _images <ARRAY> - array of image paths; images should be powers of 2
|
||||
3: _autoScroll <BOOL> - should the image auto-scroll
|
||||
4: _units <ARRAY> - unit(s) that should speak
|
||||
5: _topic <STRING> - conversation topic
|
||||
6: _sentence <STRING> - conversation sentence, "" = play all
|
||||
|
||||
Return Value:
|
||||
<BOOL> - true if slide show was setup; false if not
|
||||
|
||||
Example:
|
||||
[Screen01, [Controler01], ["images/folder/image.paa"]] call forge_client_briefing_fnc_initSlideShow;
|
||||
*/
|
||||
|
||||
params [["_screens", []], ["_controllers", []], ["_images", []], ["_autoScroll", false], ["_units", []], ["_topic", ""], ["_sentence", ""]];
|
||||
|
@ -1,19 +1,14 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Displays the next image
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _controller <OBJECT> - object that controls the slide show
|
||||
*
|
||||
* Return Value:
|
||||
* 0: _return <BOOL> - true if the next image was displayed; false if not
|
||||
*
|
||||
* Example:
|
||||
* [controller] call ace_briefing_fnc_nextImage
|
||||
*
|
||||
* Public: No
|
||||
Author: PDT for J. Schmidt
|
||||
displays the next image
|
||||
|
||||
Arguments:
|
||||
0: _controller <OBJECT> - object that controls the slide show
|
||||
|
||||
Return Value:
|
||||
<BOOL> - true if the next image was displayed; false if not
|
||||
*/
|
||||
|
||||
params [["_controller", objNull]];
|
||||
|
@ -1,19 +1,14 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Displays the previous image
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _controller <OBJECT> - object that controls the slide show
|
||||
*
|
||||
* Return Value:
|
||||
* 0: _return <BOOL> - true if the previous image was displayed; false if not
|
||||
*
|
||||
* Example:
|
||||
* [controller] call forge_briefing_fnc_prevImage
|
||||
*
|
||||
* Public: No
|
||||
Author: PDT for J. Schmidt
|
||||
displays the previous image
|
||||
|
||||
Arguments:
|
||||
0: _controller <OBJECT> - object that controls the slide show
|
||||
|
||||
Return Value:
|
||||
<BOOL> - true if the previous image was displayed; false if not
|
||||
*/
|
||||
|
||||
params [["_controller", objNull]];
|
||||
|
@ -1,25 +1,21 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* AI plays a given sentence/conversation
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that is playing the given sentence/conversation <OBJECT>
|
||||
* 1: Topic that is being talked about <STRING>
|
||||
* 2: Sentence partaining to the topic at hand <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [player, "topic", "sentence"] call forge_client_briefing_fnc_spawnLecture
|
||||
*
|
||||
* Public: No
|
||||
Name: forge_client_briefing_fnc_spawnLecture
|
||||
Date: 8/6/2022
|
||||
Version: 1.0
|
||||
Author: J. Schmidt
|
||||
|
||||
Description:
|
||||
AI plays a given sentence/conversation.
|
||||
|
||||
Parameter(s):
|
||||
0: Unit that is playing the given sentence/conversation. <OBJECT>
|
||||
1: Topic that is being talked about. <STRING>
|
||||
2: Sentence partaining to the topic at hand. <STRING>
|
||||
*/
|
||||
|
||||
params ["_unit", "_topic", "_sentence"];
|
||||
|
||||
FORGE_Briefing_inProgress = true;
|
||||
publicVariable "FORGE_Briefing_inProgress";
|
||||
|
||||
|
@ -1,22 +1,19 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Object displays a slideshow presentation
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object that will display the presentation <OBJECT>
|
||||
* 1: Slides that will be used for the presentation <ARRAY>
|
||||
* - 0: Texture used for the Slide <STRING>
|
||||
* - 1: Amount of Time the Slide will display <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [screen, [["texture.paa", 5]]] call forge_client_briefing_fnc_spawnLecture
|
||||
*
|
||||
* Public: No
|
||||
Name: forge_client_briefing_fnc_spawnLecture
|
||||
Date: 8/6/2022
|
||||
Version: 1.0
|
||||
Author: J. Schmidt
|
||||
|
||||
Description:
|
||||
Object displays a slideshow presentation.
|
||||
|
||||
Parameter(s):
|
||||
0: Object that will display the presentation. <OBJECT>
|
||||
1: Slides that will be used for the presentation. <ARRAY>
|
||||
1-0: Texture used for the Slide. <STRING>
|
||||
1-1: Amount of Time the Slide will display. <NUMBER>
|
||||
*/
|
||||
|
||||
params ["_object", "_slides"];
|
||||
|
@ -1,19 +1,14 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Starts the slideshow
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Controller <OBJECT> - object that controls the slide show
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean - true if slide show was started
|
||||
*
|
||||
* Example:
|
||||
* [controller] call ace_fnc_startSlideShow
|
||||
*
|
||||
* Public: No
|
||||
Author: PDT for J. Schmidt
|
||||
starts the slideshow
|
||||
|
||||
Arguments:
|
||||
0: _controller <OBJECT> - object that controls the slide show
|
||||
|
||||
Return Value:
|
||||
<BOOL> - true if slide show was started
|
||||
*/
|
||||
|
||||
params [["_controller", objNull], ["_units", []], ["_topic", ""], ["_sentence", ""]];
|
||||
|
@ -1 +0,0 @@
|
||||
z\forge_client\addons\common
|
@ -1,19 +0,0 @@
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client));
|
||||
};
|
||||
};
|
@ -1,3 +0,0 @@
|
||||
PREP(actorStateGet);
|
||||
PREP(actorStateSet);
|
||||
PREP(getPlayer);
|
@ -1 +0,0 @@
|
||||
#include "script_component.hpp"
|
@ -1 +0,0 @@
|
||||
#include "script_component.hpp"
|
@ -1,8 +0,0 @@
|
||||
#include "script_component.hpp"
|
||||
ADDON = false;
|
||||
|
||||
PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
ADDON = true;
|
@ -1 +0,0 @@
|
||||
#include "script_component.hpp"
|
@ -1,2 +0,0 @@
|
||||
#include "script_component.hpp"
|
||||
#include "XEH_PREP.hpp"
|
@ -1,16 +0,0 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
name = COMPONENT_NAME;
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"forge_client_main"};
|
||||
authors[] = {"J. Schmidt", "Creedcoder"};
|
||||
author = "IDSolutions";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
@ -1,43 +0,0 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Gets the current state of a player
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Player State <HASHMAP>
|
||||
*
|
||||
* Example:
|
||||
* _state = [player] call forge_client_common_fnc_actorStateGet
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params [["_player", objNull, [objNull]]];
|
||||
|
||||
private _loadout = getUnitLoadout _player;
|
||||
private _pos = getPosASL _player;
|
||||
private _dir = getDir _player;
|
||||
private _stance = stance _player;
|
||||
private _phone = GETVAR(_player,FORGE_Phone,QUOTE(000-000-0000));
|
||||
private _email = GETVAR(_player,FORGE_Email,QUOTE(player@example.com));
|
||||
private _bank = GETVAR(_player,FORGE_Bank,0);
|
||||
private _cash = GETVAR(_player,FORGE_Cash,0);
|
||||
private _state = lifeState _player;
|
||||
|
||||
private _hash = createHashMap;
|
||||
|
||||
_hash set ["loadout", _loadout];
|
||||
_hash set ["position", _pos];
|
||||
_hash set ["direction", _dir];
|
||||
_hash set ["stance", _stance];
|
||||
_hash set ["phone", _phone];
|
||||
_hash set ["email", _email];
|
||||
_hash set ["bank", _bank];
|
||||
_hash set ["cash", _cash];
|
||||
_hash set ["state", _state];
|
||||
|
||||
_hash
|
@ -1,65 +0,0 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Sets the state of a player
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
* 1: Data <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Unit State <HASHMAP>
|
||||
*
|
||||
* Example:
|
||||
* [player, _data] call forge_client_common_fnc_actorStateSet
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params [["_player", objNull, [objNull]], ["_data", "", [""]]];
|
||||
private _hash = createHashMap;
|
||||
|
||||
if (isNull _player || _data isEqualTo "") exitWith {
|
||||
diag_log text format ["[FORGE:Player:Actor] Invalid player or data: %1", _player];
|
||||
};
|
||||
|
||||
(parseSimpleArray _data) params ["_uid", "_loadout", "_pos", "_dir", "_stance", "_email", "_phone", "_bank", "_cash", "_state"];
|
||||
|
||||
_player setUnitLoadout _loadout;
|
||||
|
||||
if !(isNil "_pos") then {
|
||||
_player setPosASL _pos;
|
||||
|
||||
private _pAlt = ((getPosATLVisual player) select 2);
|
||||
private _pVelZ = ((velocity player) select 2);
|
||||
if (_pAlt > 5 && _pVelZ < 0) then {
|
||||
player setVelocity [0, 0, 0];
|
||||
player setPosATL [((getPosATLVisual player) select 0), ((getPosATLVisual player) select 1), 1];
|
||||
hint "You logged off mid air. You were moved to a safe position on the ground.";
|
||||
};
|
||||
};
|
||||
|
||||
if !(isNil "_dir") then {
|
||||
_player setDir _dir;
|
||||
};
|
||||
|
||||
_player playAction _stance;
|
||||
SETPVAR(_player,FORGE_Phone,_phone);
|
||||
SETPVAR(_player,FORGE_Email,_email);
|
||||
SETPVAR(_player,FORGE_Bank,_bank);
|
||||
SETPVAR(_player,FORGE_Cash,_cash);
|
||||
SETPVAR(_player,FORGE_State,_state);
|
||||
|
||||
_hash set ["uid", _uid];
|
||||
_hash set ["loadout", _loadout];
|
||||
_hash set ["position", _pos];
|
||||
_hash set ["direction", _dir];
|
||||
_hash set ["stance", _stance];
|
||||
_hash set ["phone", _phone];
|
||||
_hash set ["email", _email];
|
||||
_hash set ["bank", _bank];
|
||||
_hash set ["cash", _cash];
|
||||
_hash set ["state", _state];
|
||||
|
||||
_hash
|
@ -1,27 +0,0 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Gets a player object by UID.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player UID <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Player object or objNull if not found <OBJECT>
|
||||
*
|
||||
* Example:
|
||||
* ["76561198012345678"] call forge_client_common_fnc_getPlayer
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
params ["_uid"];
|
||||
|
||||
private _player = objNull;
|
||||
|
||||
{
|
||||
if ((getPlayerUID _x) isEqualTo _uid) exitWith { _player = _x; };
|
||||
} forEach allPlayers;
|
||||
|
||||
_player
|
@ -1,16 +0,0 @@
|
||||
#define COMPONENT common
|
||||
#define COMPONENT_BEAUTIFIED Common
|
||||
#include "\z\forge_client\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
|
||||
#ifdef DEBUG_ENABLED_COMMON
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_COMMON
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_COMMON
|
||||
#endif
|
||||
|
||||
#include "\z\forge_client\addons\main\script_macros.hpp"
|
@ -1,125 +0,0 @@
|
||||
# Forge Database Module
|
||||
|
||||
## Overview
|
||||
The Database module provides a comprehensive data persistence system for the Forge client. It includes features for managing player data, organization information, and game state persistence using the ArmaDragonflyClient database system.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
- ArmaDragonflyClient
|
||||
|
||||
## Authors
|
||||
- J. Schmidt
|
||||
- Creedcoder
|
||||
- IDSolutions
|
||||
|
||||
## Features
|
||||
|
||||
### Database System
|
||||
1. **Server Communication** (`fnc_requestServerDB.sqf`)
|
||||
- Handles client-server database communication
|
||||
- Manages asynchronous database operations
|
||||
- Provides callback support for data retrieval
|
||||
- Ensures data consistency across clients
|
||||
|
||||
2. **Data Management**
|
||||
- **Player Data**
|
||||
- Armory unlocks
|
||||
- Garage unlocks
|
||||
- Locker contents
|
||||
- Vehicle inventory
|
||||
- Financial information
|
||||
- Contact details
|
||||
- Organization membership
|
||||
- Player statistics
|
||||
- Equipment loadouts
|
||||
- Position and state
|
||||
|
||||
- **Organization Data**
|
||||
- Member information
|
||||
- Asset tracking
|
||||
- Financial records
|
||||
- Reputation system
|
||||
- Activity logs
|
||||
- Creation timestamps
|
||||
- Modification history
|
||||
|
||||
3. **Persistence Features**
|
||||
- Automatic data saving
|
||||
- Periodic state synchronization
|
||||
- Data validation and sanitization
|
||||
- Error recovery mechanisms
|
||||
- Transaction logging
|
||||
- Data versioning
|
||||
|
||||
### Data Operations
|
||||
1. **Storage Operations**
|
||||
- Hash-based storage (HSET)
|
||||
- Bulk data operations
|
||||
- Atomic transactions
|
||||
- Data serialization
|
||||
- String normalization
|
||||
|
||||
2. **Retrieval Operations**
|
||||
- Hash-based retrieval (HGET)
|
||||
- Bulk data loading
|
||||
- Data deserialization
|
||||
- Error handling
|
||||
- Default value management
|
||||
|
||||
3. **Synchronization**
|
||||
- Client-server sync
|
||||
- Real-time updates
|
||||
- Conflict resolution
|
||||
- State verification
|
||||
- Data integrity checks
|
||||
|
||||
## 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 database module:
|
||||
1. Ensure the module is properly loaded in your mission
|
||||
2. Initialize database connections
|
||||
3. Perform database operations:
|
||||
```sqf
|
||||
// Request data from server
|
||||
["hgetall", "Hello World!", {
|
||||
systemChat format ["Message: %1", _this];
|
||||
}] call forge_db_fnc_requestServerDB;
|
||||
|
||||
// Save player data
|
||||
[] call forge_client_init_fnc_playerDBSave;
|
||||
|
||||
// Load player data
|
||||
[] call forge_client_init_fnc_playerDBLoad;
|
||||
```
|
||||
4. Handle database callbacks and responses
|
||||
|
||||
## 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
|
||||
- Asynchronous database operations
|
||||
- Callback-based response handling
|
||||
- Data serialization and normalization
|
||||
- Error handling and recovery
|
||||
- Transaction logging
|
||||
- State management
|
||||
- Data validation
|
||||
- Conflict resolution
|
||||
- Real-time synchronization
|
||||
- Bulk operation support
|
||||
- Atomic transactions
|
||||
- Data versioning
|
||||
- Integrity verification
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_db_fnc_requestServerDB
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Sends database requests to the server using CBA events
|
||||
*
|
||||
* Arguments:
|
||||
@ -11,11 +14,6 @@
|
||||
*
|
||||
* Return Value:
|
||||
* Request ID <STRING>
|
||||
*
|
||||
* Example:
|
||||
* ["hgetall", "Hello World!", { systemChat format ["Message: %1", _this]; }] call forge_db_fnc_requestServerDB;
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
params [
|
||||
|
@ -1,90 +0,0 @@
|
||||
# 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
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_dialogue_fnc_selectAI
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Selects AI for dialogue
|
||||
*
|
||||
* Arguments:
|
||||
@ -9,11 +12,6 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [units group player] call FUNC(selectAI);
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params [["_units", [], [[]]]];
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Forge Garage Module
|
||||
|
||||
## Overview
|
||||
The Garage module provides a comprehensive vehicle management system for the Forge client. It includes features for storing, spawning, and managing vehicles in a garage environment, with support for various vehicle types and states.
|
||||
The Garage module provides a comprehensive vehicle management system for the Forge client. It includes features for storing, spawning, and managing vehicles in a garage environment.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
@ -16,72 +16,21 @@ The Garage module provides a comprehensive vehicle management system for the For
|
||||
### Garage System
|
||||
1. **Garage Initialization** (`fnc_initGarage.sqf`)
|
||||
- Initializes the garage system
|
||||
- Sets up vehicle storage and management
|
||||
- Configures garage locations and spawn points
|
||||
- Manages vehicle state persistence
|
||||
- Sets up necessary configurations and vehicle storage
|
||||
|
||||
2. **Vehicle Management**
|
||||
2. **Garage Interface** (`fnc_openGarage.sqf`)
|
||||
- Opens the garage user interface
|
||||
- Provides access to vehicle management functions
|
||||
|
||||
3. **Vehicle Management**
|
||||
- **Spawn Vehicle** (`fnc_spawnVehicle.sqf`)
|
||||
- Handles vehicle spawning from garage
|
||||
- Manages spawn locations and orientations
|
||||
- Preserves vehicle type information
|
||||
- Updates garage inventory
|
||||
|
||||
- **Store Vehicle** (`fnc_storeVehicle.sqf`)
|
||||
- Manages vehicle storage in garage
|
||||
- Handles vehicle cleanup
|
||||
- Updates garage inventory
|
||||
- Preserves vehicle data
|
||||
|
||||
- **Fetch Garage** (`fnc_fetchGarage.sqf`)
|
||||
- Retrieves garage vehicle information
|
||||
- Updates garage interface
|
||||
- Manages vehicle listings
|
||||
- Handles vehicle categorization
|
||||
|
||||
- **Fetch Nearby** (`fnc_fetchNearby.sqf`)
|
||||
- Locates and manages nearby vehicles
|
||||
- Validates vehicle ownership
|
||||
- Handles vehicle state checks
|
||||
- Updates interface with nearby vehicles
|
||||
|
||||
3. **Vehicle Categories**
|
||||
- Cars (Light vehicles, transport)
|
||||
- Armor (Tanks, APCs)
|
||||
- Helicopters (All rotary-wing aircraft)
|
||||
- Planes (Fixed-wing aircraft)
|
||||
- Naval (Boats, ships)
|
||||
- Static (Weapons, emplacements)
|
||||
|
||||
4. **Vehicle States**
|
||||
- Available
|
||||
- In Use
|
||||
- Maintenance
|
||||
- Damaged
|
||||
- Fuel Status
|
||||
- Condition Tracking
|
||||
|
||||
### User Interface
|
||||
1. **Garage Dialog**
|
||||
- Vehicle listing and management
|
||||
- Category filtering
|
||||
- Status indicators
|
||||
- Action buttons (Spawn/Store)
|
||||
- Vehicle details display
|
||||
|
||||
2. **Vehicle Information**
|
||||
- Vehicle name and type
|
||||
- Status indicators
|
||||
- Fuel level
|
||||
- Damage state
|
||||
- Maintenance status
|
||||
- Last used timestamp
|
||||
|
||||
3. **Controls**
|
||||
- Category filters
|
||||
- Vehicle actions
|
||||
- Status management
|
||||
- Quick access buttons
|
||||
|
||||
## Event Handlers
|
||||
The module uses several event handlers for initialization and execution:
|
||||
@ -95,17 +44,7 @@ The module uses several event handlers for initialization and execution:
|
||||
To use the garage module:
|
||||
1. Ensure the module is properly loaded in your mission
|
||||
2. Access the garage through the provided UI
|
||||
3. Manage vehicles using the appropriate functions:
|
||||
```sqf
|
||||
// Open garage interface
|
||||
[] call forge_client_garage_fnc_openGarage;
|
||||
|
||||
// Store a vehicle
|
||||
[] call forge_client_garage_fnc_storeVehicle;
|
||||
|
||||
// Spawn a vehicle
|
||||
[] call forge_client_garage_fnc_spawnVehicle;
|
||||
```
|
||||
3. Manage vehicles using the appropriate functions
|
||||
4. Monitor vehicle status and location
|
||||
|
||||
## Debugging
|
||||
@ -116,17 +55,3 @@ Debug mode can be enabled by uncommenting the following in `script_component.hpp
|
||||
|
||||
## Version Information
|
||||
Version information is managed through the main Forge client system configuration.
|
||||
|
||||
## Technical Details
|
||||
- Vehicle state persistence
|
||||
- Category-based organization
|
||||
- Status tracking system
|
||||
- Location management
|
||||
- Spawn point configuration
|
||||
- Vehicle cleanup handling
|
||||
- Interface synchronization
|
||||
- Event system integration
|
||||
- Error handling
|
||||
- Debug support
|
||||
- Data validation
|
||||
- State management
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_fetchGarage
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Fetches the vehicles in the garage
|
||||
*
|
||||
* Arguments:
|
||||
@ -9,11 +12,6 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
private _display = findDisplay IDD_GARAGEDIALOG;
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_fetchNearby
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Fetches the nearby vehicles
|
||||
*
|
||||
* Arguments:
|
||||
@ -9,11 +12,6 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
private _display = findDisplay IDD_GARAGEDIALOG;
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_initGarage
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Initializes the garages
|
||||
*
|
||||
* Arguments:
|
||||
@ -9,11 +12,6 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
{
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_openGarage
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Opens the garage dialog
|
||||
*
|
||||
* Arguments:
|
||||
@ -9,11 +12,6 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
disableSerialization;
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_spawnVehicle
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Spawns a vehicle from the garage
|
||||
*
|
||||
* Arguments:
|
||||
@ -9,11 +12,6 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
disableSerialization;
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_storeVehicle
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Stores a vehicle in the garage
|
||||
*
|
||||
* Arguments:
|
||||
@ -9,11 +12,6 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
private _display = findDisplay IDD_GARAGEDIALOG;
|
||||
|
@ -1,118 +0,0 @@
|
||||
# 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
|
||||
1. **Player Setup** (`fnc_initPlayer.sqf`)
|
||||
- Initializes player state
|
||||
- Clears default equipment
|
||||
- Sets up player variables
|
||||
- Configures initial loadout
|
||||
- Manages loading screen
|
||||
|
||||
2. **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
|
||||
|
||||
3. **Data Handling** (`fnc_handlePlayerLoad.sqf`)
|
||||
- Processes loaded data
|
||||
- Restores player state
|
||||
- Manages default values
|
||||
- Handles data validation
|
||||
|
||||
### Persisted Data
|
||||
1. **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
|
||||
|
||||
2. **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 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 initialization module:
|
||||
1. Ensure the module is properly loaded in your mission
|
||||
2. The module automatically handles player initialization
|
||||
3. Access player data using the appropriate functions:
|
||||
```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;
|
||||
```
|
||||
4. Monitor player state and data persistence
|
||||
|
||||
## 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
|
||||
- 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
|
@ -5,6 +5,4 @@ PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
GVAR(done) = false;
|
||||
|
||||
ADDON = true;
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_init_fnc_initPlayer
|
||||
* Author: IDSolutions
|
||||
* Initialize player
|
||||
*
|
||||
* [Description]
|
||||
* Initialize player.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
@ -29,7 +32,7 @@ removeBackpack player;
|
||||
removeGoggles player;
|
||||
removeHeadgear player;
|
||||
|
||||
SETPVAR(player,GVAR(done),false);
|
||||
SETPVAR(player,value_loadDone,false);
|
||||
cutText ["Loading In...", "BLACK", 1];
|
||||
|
||||
// ["hgetall", "", "", -1, [], "forge_client_init_fnc_handlePlayerLoad", true] spawn dragonfly_db_fnc_addTask;
|
||||
@ -38,7 +41,7 @@ cutText ["Loading In...", "BLACK", 1];
|
||||
[] spawn FUNC(playerSaveLoop);
|
||||
[] spawn EFUNC(interaction,initInteraction);
|
||||
|
||||
waitUntil { GETVAR(player,GVAR(done),false) };
|
||||
waitUntil { GETVAR(player,value_loadDone,false) };
|
||||
cutText ["", "PLAIN", 1];
|
||||
|
||||
waitUntil { !(isNull (findDisplay 46)) };
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_init_fnc_playerDBLoad
|
||||
* Author: IDSolutions
|
||||
* Load player from DB
|
||||
*
|
||||
* [Description]
|
||||
* Load player from DB.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_init_fnc_playerDBSave
|
||||
* Author: IDSolutions
|
||||
* Save player to DB
|
||||
*
|
||||
* [Description]
|
||||
* Save player to DB.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
@ -17,10 +20,13 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
private _default_armory_unlocks = [[],[],[],[]];
|
||||
private _default_garage_unlocks = [[],[],[],[],[],[]];
|
||||
|
||||
private _data = [
|
||||
getPlayerUID player,
|
||||
"armory_unlocks", [GETVAR(player,Armory_Unlocks,EGVAR(arsenal,default_armory))],
|
||||
"garage_unlocks", [GETVAR(player,Garage_Unlocks,EGVAR(arsenal,default_garage))],
|
||||
"armory_unlocks", [GETVAR(player,Armory_Unlocks,_default_armory_unlocks)],
|
||||
"garage_unlocks", [GETVAR(player,Garage_Unlocks,_default_garage_unlocks)],
|
||||
"locker", [GETVAR(player,FORGE_Locker,[])],
|
||||
"garage", [GETVAR(player,FORGE_Garage,[])],
|
||||
"cash", [GETVAR(player,FORGE_Cash,0)],
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_init_fnc_playerSaveLoop
|
||||
* Author: IDSolutions
|
||||
* Initialize player save loop
|
||||
*
|
||||
* [Description]
|
||||
* Initialize player save loop.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,124 +1,4 @@
|
||||
# Forge Interaction Module
|
||||
forge_interaction
|
||||
===============
|
||||
|
||||
## Overview
|
||||
The Interaction module provides a comprehensive player interaction system for the Forge client. It manages how players engage with objects, NPCs, items, and other interactive elements in the environment through a dynamic and context-sensitive interface.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
|
||||
## Authors
|
||||
- J. Schmidt
|
||||
- Creedcoder
|
||||
- IDSolutions
|
||||
|
||||
## Features
|
||||
|
||||
### Interaction System
|
||||
1. **Interaction Initialization** (`fnc_initInteraction.sqf`)
|
||||
- Initializes the interaction system
|
||||
- Sets up interaction buttons and items
|
||||
- Configures team coordination settings
|
||||
- Manages virtual arsenal integration
|
||||
|
||||
2. **Interaction Interface**
|
||||
- **Open Interaction** (`fnc_openInteraction.sqf`)
|
||||
- Opens the interaction menu
|
||||
- Displays available actions
|
||||
- Manages button visibility
|
||||
- Handles action execution
|
||||
|
||||
- **Interaction Action** (`fnc_interactionAction.sqf`)
|
||||
- Processes selected actions
|
||||
- Executes interaction commands
|
||||
- Manages action feedback
|
||||
- Handles interface updates
|
||||
|
||||
3. **Available Interactions**
|
||||
- **Player Interactions**
|
||||
- Give Cash
|
||||
- Add Contact
|
||||
- Access ATM
|
||||
- Access CPOF (Company Point of Finance)
|
||||
- Take Cash
|
||||
- Open Locker
|
||||
- Access Store
|
||||
- Open Garage
|
||||
- Virtual Armory (if enabled)
|
||||
- Virtual Garage (if enabled)
|
||||
|
||||
4. **Team Coordination**
|
||||
- Company garage access
|
||||
- Team-specific interactions
|
||||
- Permission-based actions
|
||||
- Organization integration
|
||||
|
||||
### User Interface
|
||||
1. **Interaction Menu**
|
||||
- Dynamic button display
|
||||
- Context-sensitive actions
|
||||
- Distance-based availability
|
||||
- Permission-based options
|
||||
|
||||
2. **Control Elements**
|
||||
- Action buttons
|
||||
- Status indicators
|
||||
- Feedback messages
|
||||
- Error 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 interaction module:
|
||||
1. Ensure the module is properly loaded in your mission
|
||||
2. Access interactions using the configured key (default: TAB)
|
||||
3. Interact with objects and players:
|
||||
```sqf
|
||||
// Open interaction menu
|
||||
[] call forge_client_interaction_fnc_openInteraction;
|
||||
|
||||
// Initialize interaction system
|
||||
[] call forge_client_interaction_fnc_initInteraction;
|
||||
```
|
||||
4. Monitor interaction feedback and results
|
||||
|
||||
## Configuration
|
||||
The module can be configured through the main Forge client configuration:
|
||||
```cpp
|
||||
// Interaction key (default: TAB)
|
||||
interactionKey = 15;
|
||||
|
||||
// Team coordination mode
|
||||
FORGE_Team_Coord = 1;
|
||||
|
||||
// Virtual arsenal enable
|
||||
FORGE_VA_Enable = 1;
|
||||
```
|
||||
|
||||
## 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
|
||||
- Dynamic interaction system
|
||||
- Context-sensitive actions
|
||||
- Distance-based availability
|
||||
- Permission management
|
||||
- Team coordination
|
||||
- Virtual arsenal integration
|
||||
- Error handling
|
||||
- User feedback
|
||||
- Interface management
|
||||
- Action validation
|
||||
- State tracking
|
||||
- Event system integration
|
||||
Core interaction addon that handles all player interactions with the game world. This system manages how players engage with objects, NPCs, items and other interactive elements in the environment.
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_interaction_fnc_initInteraction
|
||||
* Author: IDSolutions
|
||||
* Initialize player interaction
|
||||
*
|
||||
* [Description]
|
||||
* Initialize player interaction.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_interaction_fnc_interactionAction
|
||||
* Author: IDSolutions
|
||||
* Initialize player interaction
|
||||
*
|
||||
* [Description]
|
||||
* Initialize player interaction.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Index of current action array <NUMBER>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_interaction_fnc_openInteraction
|
||||
* Author: IDSolutions
|
||||
* Open player interaction
|
||||
*
|
||||
* [Description]
|
||||
* Open player interaction.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Forge Locker Module
|
||||
|
||||
## Overview
|
||||
The Locker module provides a comprehensive equipment management system for the Forge client. It includes features for storing, equipping, and managing player gear in a secure locker system with a modern web-based interface.
|
||||
The Locker module provides a comprehensive equipment management system for the Forge client. It includes features for storing, equipping, and managing player gear in a secure locker system.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
@ -16,76 +16,21 @@ The Locker module provides a comprehensive equipment management system for the F
|
||||
### Locker System
|
||||
1. **Locker Initialization** (`fnc_initLocker.sqf`)
|
||||
- Initializes the locker system
|
||||
- Sets up storage structures
|
||||
- Configures player variables
|
||||
- Manages equipment tracking
|
||||
- Sets up necessary configurations and storage structures
|
||||
|
||||
2. **Equipment Management**
|
||||
2. **Locker Interface** (`fnc_openLocker.sqf`)
|
||||
- Opens the locker user interface
|
||||
- Provides access to equipment management functions
|
||||
|
||||
3. **Equipment Management**
|
||||
- **Store Gear** (`fnc_storeGear.sqf`)
|
||||
- Stores equipment in locker
|
||||
- Handles different item types:
|
||||
- Backpacks (with contents)
|
||||
- Facewear (goggles)
|
||||
- Headgear
|
||||
- HMD (Head Mounted Display)
|
||||
- Uniforms
|
||||
- Vests
|
||||
- Weapons (with attachments)
|
||||
- Items
|
||||
- Magazines (with ammo count)
|
||||
- Manages storage space
|
||||
- Preserves item condition
|
||||
|
||||
- Handles equipment storage in locker
|
||||
- **Equip Gear** (`fnc_equipGear.sqf`)
|
||||
- Equips items from locker
|
||||
- Handles equipment compatibility
|
||||
- Manages inventory space
|
||||
- Preserves attachments and magazines
|
||||
- Provides feedback on actions
|
||||
|
||||
3. **Data Management**
|
||||
- Manages equipment equipping from locker
|
||||
- **Fetch Locker** (`fnc_fetchLocker.sqf`)
|
||||
- Retrieves locker contents
|
||||
- Updates UI display
|
||||
- Manages item categorization
|
||||
- Handles item metadata
|
||||
|
||||
- Retrieves locker contents and information
|
||||
- **Fetch Player** (`fnc_fetchPlayer.sqf`)
|
||||
- Retrieves player equipment
|
||||
- Updates UI display
|
||||
- Manages equipment lists
|
||||
- Handles item metadata
|
||||
|
||||
### User Interface
|
||||
1. **Modern Web Interface**
|
||||
- Responsive design
|
||||
- Category filtering
|
||||
- Item categorization
|
||||
- Storage statistics
|
||||
- Equipment details view
|
||||
|
||||
2. **Interface Features**
|
||||
- Storage space tracking
|
||||
- Item count display
|
||||
- Category filters:
|
||||
- All Items
|
||||
- Weapons
|
||||
- Clothing
|
||||
- Equipment
|
||||
- Magazines
|
||||
- Item details:
|
||||
- Name
|
||||
- Category
|
||||
- Condition
|
||||
- Quantity
|
||||
- Attachments
|
||||
|
||||
3. **Control Elements**
|
||||
- Store button
|
||||
- Equip button
|
||||
- Category filters
|
||||
- Item lists
|
||||
- Status indicators
|
||||
- Retrieves player equipment information
|
||||
|
||||
## Event Handlers
|
||||
The module uses several event handlers for initialization and execution:
|
||||
@ -98,30 +43,9 @@ The module uses several event handlers for initialization and execution:
|
||||
## Usage
|
||||
To use the locker module:
|
||||
1. Ensure the module is properly loaded in your mission
|
||||
2. Access the locker through the interaction menu
|
||||
3. Manage equipment using the interface:
|
||||
```sqf
|
||||
// Open locker interface
|
||||
[] call forge_client_locker_fnc_openLocker;
|
||||
|
||||
// Store equipment
|
||||
[] call forge_client_locker_fnc_storeGear;
|
||||
|
||||
// Equip items
|
||||
[] call forge_client_locker_fnc_equipGear;
|
||||
```
|
||||
4. Monitor storage space and item status
|
||||
|
||||
## Configuration
|
||||
The module can be configured through the main Forge client configuration:
|
||||
```cpp
|
||||
// Locker storage space (default: 100)
|
||||
FORGE_Locker_Space = 100;
|
||||
|
||||
// Enable/disable features
|
||||
FORGE_Locker_EnableAttachments = 1;
|
||||
FORGE_Locker_EnableMagazines = 1;
|
||||
```
|
||||
2. Access the locker through the provided UI
|
||||
3. Manage equipment using the appropriate functions
|
||||
4. Monitor equipment status and storage
|
||||
|
||||
## Debugging
|
||||
Debug mode can be enabled by uncommenting the following in `script_component.hpp`:
|
||||
@ -131,19 +55,3 @@ Debug mode can be enabled by uncommenting the following in `script_component.hpp
|
||||
|
||||
## Version Information
|
||||
Version information is managed through the main Forge client system configuration.
|
||||
|
||||
## Technical Details
|
||||
- Modern web-based interface
|
||||
- Real-time storage tracking
|
||||
- Equipment condition preservation
|
||||
- Attachment management
|
||||
- Magazine ammo tracking
|
||||
- Category-based filtering
|
||||
- Responsive UI design
|
||||
- Error handling
|
||||
- User feedback
|
||||
- State management
|
||||
- Event system integration
|
||||
- Database persistence
|
||||
- Inventory validation
|
||||
- Space management
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_equipGear
|
||||
* Author: IDSolutions
|
||||
* Equips gear from the locker
|
||||
*
|
||||
* [Description]
|
||||
* Equips gear from the locker.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_fetchLocker
|
||||
* Author: IDSolutions
|
||||
* Fetches the locker
|
||||
*
|
||||
* [Description]
|
||||
* Fetches the locker.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_fetchPlayer
|
||||
* Author: IDSolutions
|
||||
* Fetches the player's gear
|
||||
*
|
||||
* [Description]
|
||||
* Fetches the player's gear.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_initLocker
|
||||
* Author: IDSolutions
|
||||
* Initializes the lockers
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the lockers.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_openLocker
|
||||
* Author: IDSolutions
|
||||
* Opens the locker dialog
|
||||
*
|
||||
* [Description]
|
||||
* Opens the locker dialog.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_storeGear
|
||||
* Author: IDSolutions
|
||||
* Stores gear in the locker
|
||||
*
|
||||
* [Description]
|
||||
* Stores gear in the locker.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,4 +1,4 @@
|
||||
#define MAJOR 1
|
||||
#define MINOR 0
|
||||
#define PATCH 0
|
||||
#define BUILD 32
|
||||
#define BUILD 22
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Forge Medical Module
|
||||
|
||||
## Overview
|
||||
The Medical module provides a comprehensive medical system for the Forge client. It includes features for handling player health, death, respawn, medical costs, and inventory management during medical events.
|
||||
The Medical module provides a comprehensive medical system for the Forge client. It includes features for handling player health, death, respawn, and medical costs.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
@ -16,85 +16,25 @@ The Medical module provides a comprehensive medical system for the Forge client.
|
||||
### Medical System
|
||||
1. **Medical Initialization** (`fnc_initMedical.sqf`)
|
||||
- Initializes the medical system
|
||||
- Sets up stretcher detection and triggers
|
||||
- Configures medical service points
|
||||
- Manages occupancy tracking
|
||||
- Handles system variables
|
||||
- Sets up necessary configurations and health monitoring
|
||||
|
||||
2. **Health Management**
|
||||
- **Heart Beat** (`fnc_heartBeat.sqf`)
|
||||
- Monitors player vital signs
|
||||
- Tracks medical costs
|
||||
- Manages respawn conditions
|
||||
- Handles payment verification
|
||||
- Controls spectator mode
|
||||
|
||||
- **On Killed** (`fnc_onKilled.sqf`)
|
||||
- Handles player death events
|
||||
- Creates body bag
|
||||
- Saves dropped weapons
|
||||
- Manages inventory transfer
|
||||
- Triggers respawn process
|
||||
|
||||
- **On Respawn** (`fnc_onRespawn.sqf`)
|
||||
- Manages player respawn process
|
||||
- Handles medical costs
|
||||
- Sets default loadout
|
||||
- Manages stretcher placement
|
||||
- Controls spectator mode
|
||||
- Processes payment verification
|
||||
|
||||
3. **Inventory Management**
|
||||
- **Move Inventory** (`fnc_moveInventory.sqf`)
|
||||
- Transfers player inventory to body bag
|
||||
- Handles all equipment types:
|
||||
- Headgear
|
||||
- Uniforms and items
|
||||
- Vests and contents
|
||||
- Backpacks and contents
|
||||
- Weapons and attachments
|
||||
- Magazines and ammo
|
||||
- Assigned items
|
||||
- Dropped equipment
|
||||
- Manages weapon holders
|
||||
- Preserves item condition
|
||||
|
||||
- Handles inventory transfers during medical events
|
||||
- **Save Dropped Weapons** (`fnc_saveDroppedWeapons.sqf`)
|
||||
- Tracks dropped weapons
|
||||
- Manages weapon attachments
|
||||
- Preserves magazine data
|
||||
- Handles handgun equipment
|
||||
- Stores item information
|
||||
- Manages weapon preservation on death
|
||||
|
||||
4. **Medical Costs**
|
||||
- **Deduct Medical Cost** (`fnc_deductMedicalCost.sqf`)
|
||||
- Handles medical service payments
|
||||
- Manages account selection
|
||||
- Processes payment deduction
|
||||
- Provides payment feedback
|
||||
- Updates account balances
|
||||
|
||||
### Medical Features
|
||||
1. **Stretcher System**
|
||||
- Automatic stretcher detection
|
||||
- Occupancy tracking
|
||||
- Position management
|
||||
- Respawn placement
|
||||
- Trigger-based activation
|
||||
|
||||
2. **Body Bag System**
|
||||
- Custom body bag class
|
||||
- Increased storage capacity
|
||||
- ACE dragging support
|
||||
- Inventory preservation
|
||||
- Equipment management
|
||||
|
||||
3. **Payment System**
|
||||
- Insurance deductible
|
||||
- Medical service costs
|
||||
- Account balance checking
|
||||
- Payment processing
|
||||
- Transaction feedback
|
||||
|
||||
## Event Handlers
|
||||
The module uses several event handlers for initialization and execution:
|
||||
@ -108,36 +48,9 @@ The module uses several event handlers for initialization and execution:
|
||||
To use the medical module:
|
||||
1. Ensure the module is properly loaded in your mission
|
||||
2. Monitor player health through the medical system
|
||||
3. Handle medical events using the appropriate functions:
|
||||
```sqf
|
||||
// Initialize medical system
|
||||
[] call forge_client_medical_fnc_initMedical;
|
||||
|
||||
// Handle player death
|
||||
[player, killer, instigator, true] call forge_client_medical_fnc_onKilled;
|
||||
|
||||
// Process respawn
|
||||
[player, corpse] call forge_client_medical_fnc_onRespawn;
|
||||
```
|
||||
3. Handle medical events using the appropriate functions
|
||||
4. Manage medical costs and inventory during medical events
|
||||
|
||||
## Configuration
|
||||
The module can be configured through the main Forge client configuration:
|
||||
```cpp
|
||||
// Medical cost (default: 1000)
|
||||
MED_COST = 1000;
|
||||
|
||||
// Insurance deductible (default: 200)
|
||||
INS_DEDUCT = 200;
|
||||
|
||||
// Stretcher types
|
||||
FORGE_Medical_StretcherTypes = [
|
||||
"Land_Stretcher_01_F",
|
||||
"Land_Stretcher_01_olive_F",
|
||||
"Land_Stretcher_01_sand_F"
|
||||
];
|
||||
```
|
||||
|
||||
## Debugging
|
||||
Debug mode can be enabled by uncommenting the following in `script_component.hpp`:
|
||||
```cpp
|
||||
@ -146,19 +59,3 @@ Debug mode can be enabled by uncommenting the following in `script_component.hpp
|
||||
|
||||
## Version Information
|
||||
Version information is managed through the main Forge client system configuration.
|
||||
|
||||
## Technical Details
|
||||
- Stretcher-based respawn system
|
||||
- Body bag inventory management
|
||||
- Medical cost processing
|
||||
- Insurance system integration
|
||||
- Inventory preservation
|
||||
- Equipment tracking
|
||||
- Payment verification
|
||||
- Spectator mode control
|
||||
- Trigger-based activation
|
||||
- Event system integration
|
||||
- State management
|
||||
- Error handling
|
||||
- User feedback
|
||||
- Database persistence
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_deductMedicalCost
|
||||
* Author: IDSolutions
|
||||
* Deducts the medical cost from the player's account
|
||||
*
|
||||
* [Description]
|
||||
* Deducts the medical cost from the player's account.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_deductMedicalCost
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Deducts the medical cost from the player's account.
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_initMedical
|
||||
* Author: IDSolutions
|
||||
* Initializes the medical system
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the medical system.
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_moveInventory
|
||||
* Author: IDSolutions
|
||||
* Moves the unit's inventory to the body bag
|
||||
*
|
||||
* [Description]
|
||||
* Moves the unit's inventory to the body bag.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_onKilled
|
||||
* Author: IDSolutions
|
||||
* Handles the unit's death
|
||||
*
|
||||
* [Description]
|
||||
* Handles the unit's death.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_onRespawn
|
||||
* Author: IDSolutions
|
||||
* Handles the unit's respawn
|
||||
*
|
||||
* [Description]
|
||||
* Handles the unit's respawn.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_saveDroppedWeapons
|
||||
* Author: IDSolutions
|
||||
* Saves the unit's dropped weapons and items
|
||||
*
|
||||
* [Description]
|
||||
* Saves the unit's dropped weapons and items.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,132 +0,0 @@
|
||||
# Forge Misc Module
|
||||
|
||||
## Overview
|
||||
The Misc module provides a collection of utility functions and features for the Forge client. It includes a notification system, string handling, number formatting, and various helper functions used throughout the client.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
|
||||
## Authors
|
||||
- J. Schmidt
|
||||
- Creedcoder
|
||||
- IDSolutions
|
||||
|
||||
## Features
|
||||
|
||||
### Notification System
|
||||
1. **Notification Display** (`fnc_notify.sqf`)
|
||||
- Creates customizable notifications
|
||||
- Supports multiple notification types:
|
||||
- Error (red)
|
||||
- Warning (amber)
|
||||
- Success (green)
|
||||
- Info (blue)
|
||||
- Custom colors
|
||||
- Configurable display options:
|
||||
- Text content
|
||||
- Display duration
|
||||
- Display side (left/right)
|
||||
- Animation speed
|
||||
- Material Design color scheme
|
||||
- Sound effects
|
||||
- Stacking support
|
||||
- Fade animations
|
||||
|
||||
### String Handling
|
||||
1. **String Serialization** (`fnc_serializeString.sqf`)
|
||||
- Converts strings to serialized format
|
||||
- Handles special characters
|
||||
- Supports data transfer
|
||||
|
||||
2. **String Deserialization** (`fnc_deserializeString.sqf`)
|
||||
- Converts serialized strings back to original format
|
||||
- Restores special characters
|
||||
- Processes received data
|
||||
|
||||
### Number Formatting
|
||||
1. **Number Format** (`fnc_formatNumber.sqf`)
|
||||
- Formats numbers for display
|
||||
- Adds thousand separators
|
||||
- Handles decimal places
|
||||
- Currency formatting support
|
||||
|
||||
### Utility Functions
|
||||
1. **System Time** (`fnc_getSystemTime.sqf`)
|
||||
- Gets current system time
|
||||
- Timestamp generation
|
||||
- Time-based operations
|
||||
|
||||
2. **Equipment Checks**
|
||||
- **Binocular Check** (`fnc_isAssignableBinocular.sqf`)
|
||||
- Validates binocular equipment
|
||||
- Checks compatibility
|
||||
- Equipment type verification
|
||||
|
||||
- **Weapon Type Check** (`fnc_isWeaponType.sqf`)
|
||||
- Validates weapon types
|
||||
- Equipment categorization
|
||||
- Type verification
|
||||
|
||||
3. **Cargo Management** (`fnc_cargoToPairs.sqf`)
|
||||
- Converts cargo to paired format
|
||||
- Inventory management
|
||||
- Equipment organization
|
||||
|
||||
## 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 misc module functions:
|
||||
```sqf
|
||||
// Create a notification
|
||||
["Hello World!", "default", 3, "right"] call forge_client_misc_fnc_notify;
|
||||
|
||||
// Format a number
|
||||
[1000000] call forge_client_misc_fnc_formatNumber; // Returns "1,000,000"
|
||||
|
||||
// Get system time
|
||||
[] call forge_client_misc_fnc_getSystemTime;
|
||||
|
||||
// Check weapon type
|
||||
["arifle_MX_F"] call forge_client_misc_fnc_isWeaponType;
|
||||
```
|
||||
|
||||
## Configuration
|
||||
The module can be configured through the main Forge client configuration:
|
||||
```cpp
|
||||
// Notification colors (Material Design)
|
||||
#define COLOR_RED [0.957, 0.263, 0.212, 1]
|
||||
#define COLOR_GREEN [0.298, 0.686, 0.314, 1]
|
||||
#define COLOR_BLUE [0.129, 0.588, 0.953, 1]
|
||||
#define COLOR_AMBER [1, 0.757, 0.027, 1]
|
||||
|
||||
// Notification settings
|
||||
#define NOTIFICATION_DEFAULT_DURATION 3
|
||||
#define NOTIFICATION_MAX_STACK 3
|
||||
#define NOTIFICATION_MARGIN 0.01
|
||||
```
|
||||
|
||||
## 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
|
||||
- Material Design color scheme
|
||||
- Responsive notification system
|
||||
- String serialization/deserialization
|
||||
- Number formatting utilities
|
||||
- Equipment validation
|
||||
- Time management
|
||||
- Cargo handling
|
||||
- Event system integration
|
||||
- Error handling
|
||||
- User feedback
|
||||
- Cross-module compatibility
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_cargoToPairs
|
||||
* Author: IDSolutions
|
||||
* Converts a cargo array to an array of pairs
|
||||
*
|
||||
* [Description]
|
||||
* Converts a cargo array to an array of pairs.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Cargo Array <ARRAY>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_deserializeString
|
||||
* Author: IDSolutions
|
||||
* Converts underscores in a string to spaces for display
|
||||
*
|
||||
* [Description]
|
||||
* Converts underscores in a string to spaces for display.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: String <STRING>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_formatNumber
|
||||
* Author: IDSolutions
|
||||
* Formats a number with thousands separators and decimal places
|
||||
*
|
||||
* [Description]
|
||||
* Formats a number with thousands separators and decimal places.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Number <NUMBER>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_getSystemTime
|
||||
* Author: IDSolutions
|
||||
* Gets the current system time in a formatted string
|
||||
*
|
||||
* [Description]
|
||||
* Gets the current system time in a formatted string.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_isAssignableBinocular
|
||||
* Author: IDSolutions
|
||||
* Checks if a binocular is assignable
|
||||
*
|
||||
* [Description]
|
||||
* Checks if a binocular is assignable.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Binocular <STRING>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_isWeaponType
|
||||
* Author: IDSolutions
|
||||
* Checks if a weapon is of a certain type
|
||||
*
|
||||
* [Description]
|
||||
* Checks if a weapon is of a certain type.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Weapon <STRING>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_notify
|
||||
* Author: IDSolutions
|
||||
* Creates a notification
|
||||
*
|
||||
* [Description]
|
||||
* Creates a notification.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: STRING - The text to display
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_serializeString
|
||||
* Author: IDSolutions
|
||||
* Converts spaces in a string to underscores for database storage
|
||||
*
|
||||
* [Description]
|
||||
* Converts spaces in a string to underscores for database storage.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: String <STRING>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_test
|
||||
* Author: IDSolutions
|
||||
* Test function
|
||||
*
|
||||
* [Description]
|
||||
* Test function.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Value <ARRAY|STRING|NUMBER|BOOL>
|
||||
|
@ -1,120 +0,0 @@
|
||||
# Forge Money Module
|
||||
|
||||
## Overview
|
||||
The Money module provides a comprehensive currency management system for the Forge client. It includes features for handling cash transactions, money transfers, and currency management across the client's various systems.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
|
||||
## Authors
|
||||
- J. Schmidt
|
||||
- Creedcoder
|
||||
- IDSolutions
|
||||
|
||||
## Features
|
||||
|
||||
### Cash Management
|
||||
1. **Give Cash** (`fnc_giveCash.sqf`)
|
||||
- Handles giving cash to players
|
||||
- Validates transaction amounts
|
||||
- Updates player balances
|
||||
- Provides transaction feedback
|
||||
- Supports direct transfers
|
||||
|
||||
2. **Take Cash** (`fnc_takeCash.sqf`)
|
||||
- Manages cash removal from players
|
||||
- Validates available funds
|
||||
- Updates player balances
|
||||
- Provides transaction feedback
|
||||
- Supports direct deductions
|
||||
|
||||
3. **Cash Submission** (`fnc_giveCashSubmit.sqf`)
|
||||
- Processes cash transactions
|
||||
- Validates transaction data
|
||||
- Updates player balances
|
||||
- Handles transaction feedback
|
||||
- Manages transaction history
|
||||
|
||||
### Transaction Features
|
||||
1. **Direct Transfers**
|
||||
- Player-to-player transfers
|
||||
- Amount validation
|
||||
- Balance verification
|
||||
- Transaction confirmation
|
||||
- Error handling
|
||||
|
||||
2. **Balance Management**
|
||||
- Real-time balance updates
|
||||
- Transaction history
|
||||
- Balance verification
|
||||
- Error prevention
|
||||
- Transaction logging
|
||||
|
||||
3. **Transaction Validation**
|
||||
- Amount verification
|
||||
- Player validation
|
||||
- Balance checks
|
||||
- Error handling
|
||||
- Transaction confirmation
|
||||
|
||||
## 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 money module:
|
||||
```sqf
|
||||
// Give cash to a player
|
||||
[player, 1000] call forge_client_money_fnc_giveCash;
|
||||
|
||||
// Take cash from a player
|
||||
[player, 500] call forge_client_money_fnc_takeCash;
|
||||
|
||||
// Submit a cash transaction
|
||||
[player, 750, "Payment for services"] call forge_client_money_fnc_giveCashSubmit;
|
||||
```
|
||||
|
||||
## Integration
|
||||
The money module integrates with other Forge client systems:
|
||||
1. **Bank System**
|
||||
- Wallet management
|
||||
- Account transfers
|
||||
- Balance synchronization
|
||||
- Transaction history
|
||||
|
||||
2. **Organization System**
|
||||
- Organization funds
|
||||
- Member payments
|
||||
- Transaction tracking
|
||||
- Balance management
|
||||
|
||||
3. **Admin System**
|
||||
- Administrative transfers
|
||||
- Balance modifications
|
||||
- Transaction oversight
|
||||
- System 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 transaction processing
|
||||
- Secure balance management
|
||||
- Transaction validation
|
||||
- Error handling
|
||||
- User feedback
|
||||
- Cross-module integration
|
||||
- Event system integration
|
||||
- State management
|
||||
- Database persistence
|
||||
- Transaction logging
|
||||
- Balance verification
|
||||
- Player validation
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_money_fnc_giveCash
|
||||
* Author: IDSolutions
|
||||
* Send money to player
|
||||
*
|
||||
* [Description]
|
||||
* Send money to player.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target to send money <OBJECT>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_money_fnc_giveCashSubmit
|
||||
* Author: IDSolutions
|
||||
* Handle cash to be given
|
||||
*
|
||||
* [Description]
|
||||
* Handle cash to be given.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target to add money <OBJECT>
|
||||
@ -20,6 +23,8 @@
|
||||
params ["_target", "_player"];
|
||||
|
||||
private _amount = parseNumber (ctrlText 1401);
|
||||
// private _playerCash = player getVariable ["FORGE_Cash", 0];
|
||||
// private _targetCash = _target getVariable ["FORGE_Cash", 0];
|
||||
private _playerCash = GETVAR(player,FORGE_Cash,0);
|
||||
private _targetCash = GETVAR(_target,FORGE_Cash,0);
|
||||
|
||||
@ -28,6 +33,7 @@ if (_amount > 0) then {
|
||||
|
||||
private _newCash = _targetCash + _amount;
|
||||
private _formattedAmount = (_amount) call EFUNC(misc,formatNumber);
|
||||
// _target setVariable ["FORGE_Cash", _newCash, true];
|
||||
SETPVAR(_target,FORGE_Cash,_newCash);
|
||||
|
||||
["deduct", "Cash", _amount] remoteExecCall ["forge_server_money_fnc_handleMoney", 2];
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_money_fnc_takeCash
|
||||
* Author: IDSolutions
|
||||
* Handle cash picked up
|
||||
*
|
||||
* [Description]
|
||||
* Handle cash picked up.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
|
@ -1,134 +1,126 @@
|
||||
# Forge Organization Module
|
||||
# Player Organization Module
|
||||
|
||||
## Overview
|
||||
The Organization module provides a comprehensive system for managing player-created organizations in the Forge client. It enables players to create, join, and manage organizations with features including member management, asset tracking, financial operations, and reputation systems.
|
||||
|
||||
## Dependencies
|
||||
- forge_client_main
|
||||
- ArmaDragonflyClient
|
||||
|
||||
## Authors
|
||||
- J. Schmidt
|
||||
- Creedcoder
|
||||
- IDSolutions
|
||||
The Player Organization Module provides a comprehensive system for managing player-created organizations in Arma 3. This module enables players to create, join, and manage organizations with features including member management, asset tracking, financial operations, and reputation systems.
|
||||
|
||||
## Features
|
||||
|
||||
### Organization Management
|
||||
1. **Creation & Disbanding**
|
||||
- Create new organizations with custom names
|
||||
- Set initial funds and reputation
|
||||
- Disband organizations (owner only)
|
||||
- Automatic database persistence
|
||||
|
||||
2. **Member Management**
|
||||
- Add and remove members
|
||||
- Role-based permissions
|
||||
- Member status tracking
|
||||
- Join date tracking
|
||||
- Leave organization option
|
||||
|
||||
3. **Asset Management**
|
||||
- Track organization-owned assets
|
||||
- Categorize assets by type
|
||||
- Store custom properties
|
||||
- Asset value tracking
|
||||
- Asset history logging
|
||||
|
||||
### Financial System
|
||||
1. **Fund Management**
|
||||
- Add and remove funds
|
||||
- Transaction history
|
||||
- Balance tracking
|
||||
- Financial logging
|
||||
- Real-time updates
|
||||
|
||||
2. **Reputation System**
|
||||
- Reputation tracking
|
||||
- Reputation adjustments
|
||||
- Reputation history
|
||||
- Impact on gameplay
|
||||
- Reputation logging
|
||||
|
||||
### Data Management
|
||||
1. **Database Integration**
|
||||
- Persistent storage
|
||||
- Automatic synchronization
|
||||
- Data validation
|
||||
- Error handling
|
||||
- Backup support
|
||||
|
||||
2. **Logging System**
|
||||
- Comprehensive activity logs
|
||||
- Transaction history
|
||||
- Member changes
|
||||
- Asset modifications
|
||||
- System events
|
||||
|
||||
## 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
|
||||
- **Organization Creation & Management**: Create and disband organizations with customizable names
|
||||
- **Member Management**: Add, remove, and manage organization members with different roles
|
||||
- **Asset Tracking**: Register and manage organization-owned assets (vehicles, buildings, etc.)
|
||||
- **Financial System**: Track organization funds with deposit and withdrawal capabilities
|
||||
- **Reputation System**: Manage organization reputation that can influence gameplay mechanics
|
||||
- **Database Integration**: Persistent storage using ArmaDragonflyClient for reliable data management
|
||||
- **User-Friendly Notifications**: Visual feedback for all organization operations
|
||||
|
||||
## Usage
|
||||
To use the organization module:
|
||||
```sqf
|
||||
// Create a new organization
|
||||
[getPlayerUID player, "My Organization", 5000, 100] call forge_client_org_fnc_create;
|
||||
|
||||
// Add a member
|
||||
### Creating an Organization
|
||||
|
||||
```sqf
|
||||
// Create a new organization with default funds and reputation
|
||||
[getPlayerUID player, "My Organization"] call forge_client_org_fnc_create;
|
||||
|
||||
// Create an organization with custom initial funds and reputation
|
||||
[getPlayerUID player, "Elite Squad", 5000, 100] call forge_client_org_fnc_create;
|
||||
```
|
||||
|
||||
### Managing Members
|
||||
|
||||
```sqf
|
||||
// Add a member to your organization
|
||||
["76561198012345678", "John Doe"] call forge_client_org_fnc_addMember;
|
||||
|
||||
// Add funds
|
||||
// Remove a member from your organization
|
||||
["76561198012345678"] call forge_client_org_fnc_removeMember;
|
||||
|
||||
// Leave an organization (for members)
|
||||
[] call forge_client_org_fnc_leave;
|
||||
```
|
||||
|
||||
### Managing Assets
|
||||
|
||||
```sqf
|
||||
// Add a vehicle to organization assets
|
||||
["vehicle", "B_MRAP_01_F"] call forge_client_org_fnc_addAsset;
|
||||
|
||||
// Add a vehicle with custom properties
|
||||
private _properties = createHashMap;
|
||||
_properties set ["color", "red"];
|
||||
_properties set ["plate", "ORG-001"];
|
||||
["vehicle", "B_MRAP_01_F", _properties] call forge_client_org_fnc_addAsset;
|
||||
|
||||
// Remove an asset from the organization
|
||||
["vehicle", "B_MRAP_01_F_1234567890"] call forge_client_org_fnc_removeAsset;
|
||||
```
|
||||
|
||||
### Financial Operations
|
||||
|
||||
```sqf
|
||||
// Add funds to organization account
|
||||
[1000] call forge_client_org_fnc_addFunds;
|
||||
|
||||
// Add reputation
|
||||
// Remove funds from organization account
|
||||
[-500] call forge_client_org_fnc_addFunds;
|
||||
```
|
||||
|
||||
### Reputation Management
|
||||
|
||||
```sqf
|
||||
// Increase organization reputation
|
||||
[10] call forge_client_org_fnc_addReputation;
|
||||
|
||||
// Add an asset
|
||||
["vehicle", "B_MRAP_01_F"] call forge_client_org_fnc_addAsset;
|
||||
// Decrease organization reputation
|
||||
[-5] call forge_client_org_fnc_addReputation;
|
||||
```
|
||||
|
||||
## Integration
|
||||
The organization module integrates with other Forge client systems:
|
||||
1. **Bank System**
|
||||
- Organization accounts
|
||||
- Transaction processing
|
||||
- Balance management
|
||||
- Financial reporting
|
||||
### Disbanding an Organization
|
||||
|
||||
2. **Vehicle System**
|
||||
- Organization vehicles
|
||||
- Vehicle registration
|
||||
- Maintenance tracking
|
||||
- Usage logging
|
||||
|
||||
3. **Property System**
|
||||
- Organization properties
|
||||
- Property management
|
||||
- Value tracking
|
||||
- Usage rights
|
||||
|
||||
## Debugging
|
||||
Debug mode can be enabled by uncommenting the following in `script_component.hpp`:
|
||||
```cpp
|
||||
#define DEBUG_MODE_FULL
|
||||
```sqf
|
||||
// Permanently delete the organization (owner only)
|
||||
[] call forge_client_org_fnc_disband;
|
||||
```
|
||||
|
||||
## Version Information
|
||||
Version information is managed through the main Forge client system configuration.
|
||||
## Technical Architecture
|
||||
|
||||
## Technical Details
|
||||
- Real-time data synchronization
|
||||
- Secure data management
|
||||
- Comprehensive validation
|
||||
- Error handling
|
||||
- User feedback
|
||||
- Cross-module integration
|
||||
- Event system integration
|
||||
- State management
|
||||
- Database persistence
|
||||
- Transaction logging
|
||||
- Asset tracking
|
||||
- Member management
|
||||
The module is built around a central organization store interface that provides a clean API for all organization operations. This interface handles data validation, database persistence, and user feedback.
|
||||
|
||||
### Core Components
|
||||
|
||||
- **Organization Store**: Central interface for all organization operations
|
||||
- **Database Integration**: Persistent storage using ArmaDragonflyClient
|
||||
- **User Notifications**: Visual feedback system for all operations
|
||||
- **Data Validation**: Comprehensive input validation to ensure data integrity
|
||||
|
||||
### Data Structure
|
||||
|
||||
Organizations are stored as structured hashmaps with the following key components:
|
||||
|
||||
- **Basic Information**: ID, name, owner, creation date
|
||||
- **Members**: List of members with roles and join dates
|
||||
- **Assets**: Categorized inventory of organization-owned assets
|
||||
- **Finances**: Current funds and transaction history
|
||||
- **Reputation**: Current reputation score and history
|
||||
- **Logs**: Comprehensive activity logs for auditing
|
||||
|
||||
## Integration with Other Systems
|
||||
|
||||
The organization module is designed to integrate with other game systems:
|
||||
|
||||
- **Vehicle Garage**: Register organization-owned vehicles
|
||||
- **Property System**: Manage organization-owned buildings and territories
|
||||
- **Mission System**: Organization-specific missions and objectives
|
||||
- **Economy System**: Organization financial operations and investments
|
||||
|
||||
## Developer Notes
|
||||
|
||||
- All organization operations are performed through the organization store interface
|
||||
- The store is initialized automatically when needed via `verifyOrgStore`
|
||||
- Database operations are asynchronous and use callback functions
|
||||
- User feedback is provided through the notification system
|
||||
- Error handling is comprehensive with appropriate user feedback
|
||||
|
||||
---
|
||||
|
||||
*Developed by J. Schmidt*
|
@ -1,8 +1,11 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_addAsset
|
||||
* Author: IDSolutions
|
||||
* Adds an asset to an organization's inventory
|
||||
*
|
||||
* [Description]
|
||||
* Adds an asset to an organization's inventory.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Asset Type <STRING> - Type of asset (vehicle, building, etc.)
|
||||
|
@ -1,8 +1,12 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_addFunds
|
||||
* Author: IDSolutions
|
||||
* Adds or removes funds from an organization's account
|
||||
*
|
||||
* [Description]
|
||||
* Adds or removes funds from an organization's account.
|
||||
* Positive values increase funds, negative values decrease funds.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Amount <NUMBER> - Amount to add (positive) or withdraw (negative)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user