Add shared Forge mod dependency

This commit is contained in:
Jacob Schmidt 2026-05-28 18:53:40 -05:00
parent 1e2402c332
commit 623f690a82
45 changed files with 509 additions and 180 deletions

1
.gitignore vendored
View File

@ -34,5 +34,6 @@ Thumbs.db
# Arma
arma/ui/map-viewer/
arma/mod/.hemttout/
arma/server/surrealdb/forge.db/
promo/

View File

@ -24,6 +24,7 @@ connect_timeout_ms = 5000
```text
arma/
mod/ Shared client/server config addon built as @forge_mod
client/ Client-side addons and browser UIs
server/ Server-side addons and extension crate
bin/
@ -44,13 +45,16 @@ npm run build:webui
.\build-arma.ps1
```
`.\build-arma.ps1` builds `arma/mod`, `arma/client`, and `arma/server`. Load
the resulting `@forge_mod` on both clients and servers, `@forge_client` on
clients, and `@forge_server` on the server only.
## Documentation
- [Framework Documentation](./docs/README.md)
- [Framework Architecture](./docs/FRAMEWORK_ARCHITECTURE.md)
- [Module Reference](./docs/MODULE_REFERENCE.md)
- [Development Guide](./docs/DEVELOPMENT_GUIDE.md)
- [Git Workflow](./docs/GIT_WORKFLOW.md)
## Extension Status

View File

@ -8,7 +8,8 @@ class CfgPatches {
name = COMPONENT_NAME;
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"forge_client_main"
"forge_client_main",
"forge_mod_common"
};
units[] = {};
weapons[] = {};
@ -18,4 +19,3 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgSounds.hpp"
#include "CfgVehicles.hpp"

View File

@ -1,4 +1,4 @@
protocol = 1;
publishedid = MOD_ID;
publishedid = 0;
name = "forge-client";
timestamp = 5250140732737923549;

View File

@ -0,0 +1,2 @@
[config]
unknown_external = "allow"

View File

@ -0,0 +1,24 @@
name = "forge-mod"
author = "J.Schmidt"
prefix = "forge_mod"
mainprefix = "forge"
[version]
path = "addons/main/script_version.hpp"
git_hash = 0
[files]
include = [
"mod.cpp",
"meta.cpp",
"icon_64_ca.paa",
"icon_128_ca.paa",
"icon_128_highlight_ca.paa",
"title_ca.paa",
"LICENSE.md",
"README.md",
]
exclude = []
[properties]
author = "J.Schmidt"

119
arma/mod/LICENSE.md Normal file
View File

@ -0,0 +1,119 @@
![APL-SA](https://www.bohemia.net/assets/img/licenses/APL-SA.png)
## Brief summary of this Licence
PLEASE, NOTE THAT THIS SUMMARY HAS NO LEGAL EFFECT AND IS ONLY OF AN INFORMATORY NATURE DESIGNED FOR YOU TO GET THE BASIC INFORMATION ABOUT THE CONTENT OF THIS LICENCE. THE ONLY LEGALLY BINDING PROVISIONS ARE THOSE IN THE ORIGINAL AND FULL TEXT OF THIS LICENCE.
With this licence you are free to adapt (i.e. modify, rework or update) and share (i.e. copy, distribute or transmit) the material under the following conditions:
- **Attribution** - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material).
- **Noncommercial** - You may not use this material for any commercial purposes.
- **Arma Only** - You may not convert or adapt this material to be used in other games than Arma.
- **Share Alike** - If you adapt, or build upon this material, you may distribute the resulting material only under the same license.
---
# Full version of licence
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Arma Public License - Share Alike ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
### Section 1 Definitions
1. **Adapted Material** means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
2. **Adapter's License** means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
3. **ArmaOnly** means primarily intended for or directed towards the use in any of existing and future Arma games, including but not limited to Arma: Cold War Assault, Arma, Arma 2 and Arma 3 and its official sequels and expansion packs.
4. **Arma Public Share Alike Compatible License** means a license listed at [https://www.bohemia.net/community/licenses](https://www.bohemia.net/community/licenses) as essentially the equivalent of this Public License.
5. **Copyright and Similar Rights** means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
6. **Effective Technological Measures** means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
7. **Exceptions and Limitations** means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
8. **Licensed Material** means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
9. **Licensed Rights** means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
10. **Licensor** means the individual(s) or entity(ies) granting rights under this Public License.
11. **NonCommercial** means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
12. **Share** means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
13. **Sui Generis Database Rights** means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
14. **You** means the individual or entity exercising the Licensed Rights under this Public License. **Your** has a corresponding meaning.
### Section 2 Scope
1. **License grant**
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
1. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial and ArmaOnly purposes only; and
2. produce, reproduce, and Share Adapted Material for NonCommercial and ArmaOnly purposes only.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
5. Downstream recipients.
1. Offer from the Licensor Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
2. Additional offer from the Licensor Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapters License You apply.
3. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(a)(i).
2. **Other rights**
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial and ArmaOnly purposes.
### Section 3 License Conditions
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
1. **Attribution**
1. If You Share the Licensed Material (including in modified form), You must:
1. retain the following if it is supplied by the Licensor with the Licensed Material:
1. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
2. a copyright notice;
3. a notice that refers to this Public License;
4. a notice that refers to the disclaimer of warranties;
5. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
2. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
3. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(a) to the extent reasonably practicable.
2. **ShareAlike**
In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
1. The Adapters License You apply must be this Public License, or an Arma Public Share Alike Compatible License.
2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
### Section 4 Sui Generis Database Rights
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
1. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial and ArmaOnly purposes only;
2. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
3. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
### Section 5 Disclaimer of Warranties and Limitation of Liability
1. **Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.**
2. **To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.**
3. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
### Section 6 Term and Termination
1. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
2. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
3. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
4. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
### Section 7 Other Terms and Conditions
1. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
2. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
### Section 8 Interpretation
1. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
2. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
3. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
4. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
### Bohemia Interactive Notices
1. Bohemia Interactive a.s. is not a party to this License, and makes no warranty whatsoever in connection with the Licensed Material. Bohemia Interactive a.s. will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, Bohemia Interactive a.s. may elect to apply the Public License to material it publishes and in those instances it becomes the "Licensor".
2. Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s.

19
arma/mod/README.md Normal file
View File

@ -0,0 +1,19 @@
# FORGE Shared Mod
Shared client/server config classes for FORGE missions. This HEMTT project
builds to `@forge_mod`.
Load `@forge_mod` on both clients and servers. Server runtime systems remain in
`@forge_server`, and player-facing UI remains in `@forge_client`.
## Addons
- `forge_mod_common`: shared vehicle/config definitions, including
`forge_bodyBag`.
- `forge_mod_task`: Forge Eden task module classes used by missions. The module
config points at server-side task functions, but those functions are still
provided by `@forge_server`.
Mission `requiredAddons` should reference `forge_mod_*` packages for shared
classes. Clients should never need `@forge_server` just to load or edit a Forge
mission.

View File

@ -0,0 +1 @@
forge\forge_mod\addons\common

View File

@ -0,0 +1,20 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
author = AUTHOR;
authors[] = {"IDSolutions"};
url = "https://github.com/IDSolutions/MOD_REPO";
name = COMPONENT_NAME;
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"forge_mod_main",
"A3_Characters_F"
};
units[] = {"forge_bodyBag"};
weapons[] = {};
VERSION_CONFIG;
};
};
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,4 @@
#define COMPONENT common
#define COMPONENT_BEAUTIFIED Common
#include "\forge\forge_mod\addons\main\script_mod.hpp"
#include "\forge\forge_mod\addons\main\script_macros.hpp"

View File

@ -0,0 +1 @@
forge\forge_mod\addons\main

View File

@ -0,0 +1,15 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
author = AUTHOR;
authors[] = {"J.Schmidt"};
url = "https://github.com/IDSolutions/MOD_REPO";
name = COMPONENT_NAME;
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"cba_main"};
units[] = {};
weapons[] = {};
VERSION_CONFIG;
};
};

View File

@ -0,0 +1,4 @@
#define COMPONENT main
#define COMPONENT_BEAUTIFIED Main
#include "script_mod.hpp"
#include "script_macros.hpp"

View File

@ -0,0 +1,8 @@
#define QUOTE(var1) #var1
#define DOUBLES(var1,var2) var1##_##var2
#define TRIPLES(var1,var2,var3) DOUBLES(DOUBLES(var1,var2),var3)
#define ADDON DOUBLES(PREFIX,COMPONENT)
#define VERSION_CONFIG version = VERSION; versionStr = QUOTE(VERSION_STR); versionAr[] = {VERSION_AR}
#define SERVER_TASK_FUNC(var1) QUOTE(TRIPLES(DOUBLES(forge_server,task),fnc,var1))

View File

@ -0,0 +1,18 @@
#define MAINPREFIX forge
#define PREFIX forge_mod
#define MOD_NAME forge-mod
#define AUTHOR "J.Schmidt"
#define REQUIRED_VERSION 2.20
#include "script_version.hpp"
#define VERSION MAJOR.MINOR
#define VERSION_STR MAJOR.MINOR.PATCH.BUILD
#define VERSION_AR MAJOR,MINOR,PATCH,BUILD
#ifndef COMPONENT_BEAUTIFIED
#define COMPONENT_BEAUTIFIED COMPONENT
#endif
#define COMPONENT_NAME QUOTE(MOD_NAME - COMPONENT_BEAUTIFIED)

View File

@ -0,0 +1,4 @@
#define MAJOR 1
#define MINOR 0
#define PATCH 0
#define BUILD 0

View File

@ -0,0 +1 @@
forge\forge_mod\addons\task

View File

@ -14,7 +14,7 @@ class CfgVehicles {
// icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\default_ca.paa";
category = "FORGE_Modules";
function = QFUNC(attackModule);
function = SERVER_TASK_FUNC(attackModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 1;
@ -127,7 +127,7 @@ class CfgVehicles {
// icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\default_ca.paa";
category = "FORGE_Modules";
function = QFUNC(explosivesModule);
function = SERVER_TASK_FUNC(explosivesModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
@ -164,7 +164,7 @@ class CfgVehicles {
// icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\default_ca.paa";
category = "FORGE_Modules";
function = QFUNC(hostagesModule);
function = SERVER_TASK_FUNC(hostagesModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
@ -201,7 +201,7 @@ class CfgVehicles {
// icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\default_ca.paa";
category = "FORGE_Modules";
function = QFUNC(shootersModule);
function = SERVER_TASK_FUNC(shootersModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
@ -238,7 +238,7 @@ class CfgVehicles {
// icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\default_ca.paa";
category = "FORGE_Modules";
function = QFUNC(protectedModule);
function = SERVER_TASK_FUNC(protectedModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
@ -274,7 +274,7 @@ class CfgVehicles {
displayName = "Defend Task";
category = "FORGE_Modules";
function = QFUNC(defendModule);
function = SERVER_TASK_FUNC(defendModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 1;
@ -399,7 +399,7 @@ class CfgVehicles {
// icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\default_ca.paa";
category = "FORGE_Modules";
function = QFUNC(defuseModule);
function = SERVER_TASK_FUNC(defuseModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 1;
@ -512,7 +512,7 @@ class CfgVehicles {
// icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\default_ca.paa";
category = "FORGE_Modules";
function = QFUNC(destroyModule);
function = SERVER_TASK_FUNC(destroyModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 1;
@ -625,7 +625,7 @@ class CfgVehicles {
// icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\default_ca.paa";
category = "FORGE_Modules";
function = QFUNC(hostageModule);
function = SERVER_TASK_FUNC(hostageModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 1;
@ -775,7 +775,7 @@ class CfgVehicles {
displayName = "Delivery Task";
category = "FORGE_Modules";
function = QFUNC(deliveryModule);
function = SERVER_TASK_FUNC(deliveryModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 1;
@ -892,7 +892,7 @@ class CfgVehicles {
displayName = "Cargo Entities";
category = "FORGE_Modules";
function = QFUNC(cargoModule);
function = SERVER_TASK_FUNC(cargoModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
@ -928,7 +928,7 @@ class CfgVehicles {
// icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\default_ca.paa";
category = "FORGE_Modules";
function = QFUNC(hvtModule);
function = SERVER_TASK_FUNC(hvtModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 1;

View File

@ -0,0 +1,34 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
author = AUTHOR;
authors[] = {"J.Schmidt"};
url = "https://github.com/IDSolutions/MOD_REPO";
name = COMPONENT_NAME;
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"forge_mod_main",
"A3_Modules_F"
};
units[] = {
"FORGE_Module_Attack",
"FORGE_Module_Explosives",
"FORGE_Module_Hostages",
"FORGE_Module_Shooters",
"FORGE_Module_Protected",
"FORGE_Module_Defend",
"FORGE_Module_Defuse",
"FORGE_Module_Destroy",
"FORGE_Module_Hostage",
"FORGE_Module_Delivery",
"FORGE_Module_Cargo",
"FORGE_Module_HVT"
};
weapons[] = {};
VERSION_CONFIG;
};
};
#include "CfgFactionClasses.hpp"
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,44 @@
#define COMPONENT task
#define COMPONENT_BEAUTIFIED Task
#include "\forge\forge_mod\addons\main\script_mod.hpp"
#include "\forge\forge_mod\addons\main\script_macros.hpp"
#define REWARD_ARRAY_ATTRIBUTES(PREFIX) \
class EquipmentRewards: Edit { \
property = QUOTE(DOUBLES(PREFIX,EquipmentRewards)); \
displayName = "Equipment Rewards"; \
tooltip = "Comma-separated equipment class names, e.g. ItemGPS, ItemCompass. Legacy SQF arrays still work."; \
typeName = "STRING"; \
}; \
class SupplyRewards: Edit { \
property = QUOTE(DOUBLES(PREFIX,SupplyRewards)); \
displayName = "Supply Rewards"; \
tooltip = "Comma-separated supply class names, e.g. FirstAidKit, Medikit. Legacy SQF arrays still work."; \
typeName = "STRING"; \
}; \
class WeaponRewards: Edit { \
property = QUOTE(DOUBLES(PREFIX,WeaponRewards)); \
displayName = "Weapon Rewards"; \
tooltip = "Comma-separated weapon class names, e.g. arifle_MX_F, arifle_Katiba_F. Legacy SQF arrays still work."; \
typeName = "STRING"; \
}; \
class VehicleRewards: Edit { \
property = QUOTE(DOUBLES(PREFIX,VehicleRewards)); \
displayName = "Vehicle Rewards"; \
tooltip = "Comma-separated vehicle class names, e.g. B_MRAP_01_F, B_Quadbike_01_F. Legacy SQF arrays still work."; \
typeName = "STRING"; \
}; \
class SpecialRewards: Edit { \
property = QUOTE(DOUBLES(PREFIX,SpecialRewards)); \
displayName = "Special Rewards"; \
tooltip = "Comma-separated special reward class names, e.g. B_UAV_01_F, B_Heli_Light_01_F. Legacy SQF arrays still work."; \
typeName = "STRING"; \
};
#define TASK_CHAIN_ATTRIBUTES(PREFIX) \
class PrerequisiteTaskIds: Edit { \
property = QUOTE(DOUBLES(PREFIX,PrerequisiteTaskIds)); \
displayName = "Prerequisite Task IDs"; \
tooltip = "Comma-separated task IDs that must succeed before this task appears in CAD or can be assigned"; \
typeName = "STRING"; \
};

BIN
arma/mod/icon_128_ca.paa Normal file

Binary file not shown.

Binary file not shown.

BIN
arma/mod/icon_64_ca.paa Normal file

Binary file not shown.

4
arma/mod/meta.cpp Normal file
View File

@ -0,0 +1,4 @@
protocol = 1;
publishedid = 0;
name = "forge-mod";
timestamp = 5250140732737923549;

15
arma/mod/mod.cpp Normal file
View File

@ -0,0 +1,15 @@
dir = "@forge_mod";
author = "J.Schmidt";
name = "Forge Mod";
description = "Forge Shared Mod - Version 1.0.0";
overview = "";
overviewPicture = "title_ca.paa";
picture = "title_ca.paa";
logoSmall = "icon_64_ca.paa";
logo = "icon_128_ca.paa";
logoOver = "icon_128_highlight_ca.paa";
tooltip = "Forge Mod";
tooltipOwned = "IDS Owned";
action = "https://innovativedevsolutions.org";
actionName = "Website";
dlcColor[] = {0.45, 0.47, 0.41, 1};

BIN
arma/mod/title_ca.paa Normal file

Binary file not shown.

View File

@ -1,12 +0,0 @@
class CfgVehicles {
class Land_Bodybag_01_black_F;
class forge_bodyBag: Land_Bodybag_01_black_F {
maximumLoad = 2000;
transportMaxWeapons = 500;
transportMaxMagazines = 2000;
transportMaxItems = 1000;
ace_dragging_canCarry = 1;
ace_dragging_carryPosition[] = {0, 0.5, 1.2};
ace_dragging_carryDirection = 90;
};
};

View File

@ -8,7 +8,8 @@ class CfgPatches {
name = COMPONENT_NAME;
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"forge_server_main"
"forge_server_main",
"forge_mod_common"
};
units[] = {};
weapons[] = {};
@ -18,4 +19,3 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgSounds.hpp"
#include "CfgVehicles.hpp"

View File

@ -37,8 +37,14 @@ if (_stackTrace) then {
// private _timestamp = format (["%1-%2-%3 %4:%5:%6:%7"] + systemTimeUTC);
if (isNil "_file") then { _file = ["", _fnc_scriptName] select (!isNil "_fnc_scriptName"); };
if (isNil "_callingFile" && !isNil "_fnc_scriptNameParent") then { _callingFile = _fnc_scriptNameParent; };
if (isNil "_file") then {
_file = "";
if (!isNil "_fnc_scriptName") then {
_file = _fnc_scriptName;
};
};
if (isNil "_callingFile" && {!isNil "_fnc_scriptNameParent"}) then { _callingFile = _fnc_scriptNameParent; };
// private _callingFileText = if !(isNil "_callingFile") then { format ["Called By: %1", _callingFile] } else { "" };

View File

@ -9,7 +9,8 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"forge_server_main",
"forge_server_common"
"forge_server_common",
"forge_mod_task"
};
units[] = {};
weapons[] = {};
@ -18,6 +19,4 @@ class CfgPatches {
};
#include "CfgEventHandlers.hpp"
#include "CfgFactionClasses.hpp"
#include "CfgVehicles.hpp"
#include "CfgMissions.hpp"

View File

@ -1,4 +1,4 @@
protocol = 1;
publishedid = MOD_ID;
publishedid = 0;
name = "forge-server";
timestamp = 5250140732737923549;

View File

@ -1,21 +1,21 @@
#!/usr/bin/env pwsh
<#
.SYNOPSIS
Build both arma/client and arma/server using hemtt
Build arma/mod, arma/client, and arma/server using hemtt
.DESCRIPTION
This script runs hemtt build for both the client and server Arma mods.
This script runs hemtt build for the shared, client, and server Arma mods.
It changes to each directory and runs the build command.
.PARAMETER Target
Specify which target to build: 'client', 'server', or 'both' (default)
Specify which target to build: 'mod', 'client', 'server', or 'all' (default)
.PARAMETER BuildUI
Rebuild the web UI bundles before running the client build.
.EXAMPLE
.\build-arma.ps1
Builds both client and server
Builds shared, client, and server mods
.EXAMPLE
.\build-arma.ps1 -Target client
@ -28,8 +28,8 @@
param(
[Parameter(Mandatory=$false)]
[ValidateSet('client', 'server', 'both')]
[string]$Target = 'both',
[ValidateSet('mod', 'client', 'server', 'all')]
[string]$Target = 'all',
[Parameter(Mandatory=$false)]
[switch]$BuildUI
@ -77,16 +77,21 @@ function Build-HemttProject {
$clientPath = Join-Path $scriptDir "arma\client"
$serverPath = Join-Path $scriptDir "arma\server"
$modPath = Join-Path $scriptDir "arma\mod"
try {
if ($Target -eq 'client' -or $Target -eq 'both') {
if ($Target -eq 'mod' -or $Target -eq 'all') {
Build-HemttProject -ProjectPath $modPath -ProjectName "Shared Mod"
}
if ($Target -eq 'client' -or $Target -eq 'all') {
if ($BuildUI) {
Build-WebUIAssets
}
Build-HemttProject -ProjectPath $clientPath -ProjectName "Client"
}
if ($Target -eq 'server' -or $Target -eq 'both') {
if ($Target -eq 'server' -or $Target -eq 'all') {
Build-HemttProject -ProjectPath $serverPath -ProjectName "Server"
}

View File

@ -2,52 +2,6 @@
This guide covers the usual path for adding or changing a Forge module.
## Repository Workflow
Use [Git Workflow](./GIT_WORKFLOW.md) as the source of truth for branch roles,
release tags, and mission branch handling. The short version is:
- Use `pre-v0.2` for framework development after the `v0.1.0` baseline.
- Keep `master` as the clean release baseline branch.
- Keep mission folders off `master`; mission work belongs on
`missions/local-mission-copies`.
- Keep `archive/pre-v0.1-history` read-only unless recovering old work.
- Bring reusable mission logic back to framework branches by copying only the
needed framework files or code, not by merging the mission branch.
Use the workflow helper for the routine checks:
```powershell
npm run workflow -- status
npm run workflow -- doctor
npm run workflow -- switch dev
npm run workflow -- switch missions
```
Example framework workflow:
```powershell
git switch pre-v0.2
git pull
git switch -c feature/cad-task-request
# make framework changes
git status --short --branch
git add arma/client/addons/cad arma/server/addons/cad
git commit -m "Add CAD task request workflow"
```
Example mission workflow:
```powershell
git switch missions/local-mission-copies
# make mission changes
git status --short --branch
git add arma/forge_pmc_simulator.Tanoa
git commit -m "Update PMC simulator mission setup"
```
## Local Checks
Before running storage-backed workflows locally, complete
@ -77,6 +31,10 @@ Build Arma packages with:
.\build-arma.ps1
```
The default build target now builds the shared mod first, then client and
server addons. Use `.\build-arma.ps1 -Target mod` when only shared config
classes changed.
## Module Boundaries
Keep each layer responsible for one kind of work:
@ -87,6 +45,7 @@ Keep each layer responsible for one kind of work:
| `lib/repositories` | Repository traits and in-memory stores. | SurrealDB-specific code. |
| `lib/services` | Business rules, workflow orchestration, structured results. | Arma engine calls, extension transport details. |
| `arma/server/extension` | Command parsing, context resolution, SurrealDB implementations, serialization to SQF. | Business rules that belong in services. |
| `arma/mod/addons` | Config classes required by both clients and servers, including mission-facing Eden modules and shared vehicle definitions. | Server-only runtime logic or client-only UI. |
| `arma/server/addons` | Server SQF lifecycle, game-object integration, calls into `forge_server`. | Direct database logic. |
| `arma/client/addons` | Client UI, keybinds, local UI events. | Authoritative persistence. |
@ -105,9 +64,10 @@ Keep each layer responsible for one kind of work:
11. Register the storage adapter in `arma/server/extension/src/storage.rs`.
12. Add an extension command group under `arma/server/extension/src/<module>.rs`.
13. Register the command group in `arma/server/extension/src/lib.rs`.
14. Add server addon functions under `arma/server/addons/<module>` if SQF needs a module-level API.
15. Add client addon or browser UI files under `arma/client/addons/<module>` if the module has player-facing UI.
16. Add documentation in `docs/` and module-level READMEs.
14. Add shared config under `arma/mod/addons/<module>` if missions, clients, and servers all need the class definitions.
15. Add server addon functions under `arma/server/addons/<module>` if SQF needs a module-level API.
16. Add client addon or browser UI files under `arma/client/addons/<module>` if the module has player-facing UI.
17. Add documentation in `docs/` and module-level READMEs.
## Extension Command Rules
@ -175,6 +135,7 @@ server-authoritative decisions in server SQF or Rust services.
When adding or changing a module, update:
- `docs/MODULE_REFERENCE.md` for framework-level inventory.
- `arma/mod/README.md` when shared config classes or dependencies change.
- A module-specific README in the addon directory when SQF or UI usage changes.
- `arma/server/docs/api-reference.md` when extension commands change.
- Existing usage guides when payload shapes or workflows change.

View File

@ -6,10 +6,11 @@ handlers, and optional browser UI.
## Runtime Flow
![Architectural Flow Diagram](images/architecture-flow.svg)
![Architectural Flow Diagram](architecture-flow.svg)
```text
Arma client UI or SQF action
-> shared config classes from @forge_mod
-> client addon bridge
-> server addon function
-> forge_server callExtension command
@ -26,6 +27,17 @@ request and response chunks through the extension transport module.
## Main Layers
### Shared Mod
The shared mod lives under `arma/mod` and builds to `@forge_mod`. It contains
mission-facing config classes that must exist on both clients and servers, such
as Forge task Eden modules and shared vehicle definitions. Missions should
depend on these `forge_mod_*` addons when placing Forge modules.
`@forge_mod` does not own server runtime behavior. Task module config can point
at server-owned functions, but those functions still live in `@forge_server`
and execute only where the server mod is loaded.
### Client Addons
Client addons live under `arma/client/addons`. They own local player UX,
@ -40,6 +52,10 @@ initialization, game-object integration, validation near the Arma runtime, and
calls into the Rust extension. The `extension` addon is the shared bridge for
`callExtension` and transport handling.
Server addons may require `forge_mod_*` addons for shared class definitions.
They should keep authoritative logic in `@forge_server` so clients only need
shared config and client UX packages.
### Rust Extension
The server extension lives under `arma/server/extension`. It registers the

View File

@ -7,6 +7,17 @@ This guide focuses on editor placement and mission validation. Framework
internals, extension commands, and persistence details are covered in the
developer-oriented module guides.
## Required Forge Addons
Forge missions that place Forge task modules or shared Forge vehicle classes
must depend on `@forge_mod`. This addon is loaded by both clients and servers
and provides the mission-facing config classes, including `forge_mod_task`.
Do not make missions depend on `@forge_server` for Eden module classes.
`@forge_server` remains server-only and owns the runtime task handlers. A
mission that lists `forge_server_task` in `requiredAddons` will force clients to
install the server-only mod.
## Core Rule
Most Forge systems become available to players through nearby Eden objects.
@ -150,15 +161,12 @@ Minimum Eden setup:
Transport nodes are generic paid travel points. They can represent ferries,
airports, bus stops, teleport terminals, or any other mission transport system.
The framework owns the menu, billing, cargo scan, and movement logic.
The framework owns the menu, billing, cargo scan, and movement logic. The
mission only needs placed objects and optional arrival markers.
![Eden transport location one](images/eden/transport_loc_1.jpg)
![Placeholder: Eden transport node object placement](images/eden/transport_node_obj.svg)
![Eden transport location two](images/eden/transport_loc_2.jpg)
![Eden transport node object placement](images/eden/transport_obj_1.jpg)
![Eden transport node variable name](images/eden/transport_obj_1_var.jpg)
![Placeholder: Eden transport node variable name](images/eden/transport_node_var.svg)
Place transport node objects with these variable names:
@ -170,7 +178,7 @@ transport_2
transport_10
```
Place arrival markers with matching suffixes:
Place optional arrival markers with matching suffixes:
```text
transport_arrival
@ -180,9 +188,7 @@ transport_arrival_2
transport_arrival_10
```
![Eden transport arrival marker placement](images/eden/transport_arrival_mrkr.jpg)
![Eden transport arrival marker variable name](images/eden/transport_arrival_mrkr_var.jpg)
![Placeholder: Eden transport arrival marker placement](images/eden/transport_arrival_marker.svg)
Objects that should be excluded from the nearby cargo scan, such as the actual
boat or transport vehicle used as set dressing, should use:
@ -195,9 +201,7 @@ transport_vehicle_2
transport_vehicle_10
```
![Eden transport vehicle exclusion object placement](images/eden/transport_veh_obj.jpg)
![Eden transport vehicle exclusion object variable name](images/eden/transport_veh_obj_var.jpg)
![Placeholder: Eden transport vehicle exclusion object variable name](images/eden/transport_vehicle_var.svg)
Minimum Eden setup:

View File

@ -5,6 +5,7 @@ This reference lists the main Forge modules and where each layer lives.
## Directory Map
```text
arma/mod/addons/ Shared config addon built as @forge_mod
arma/client/addons/ Client-side Arma addons and browser UIs
arma/server/addons/ Server-side Arma addons and extension bridge
arma/server/extension/ Rust arma-rs extension and SurrealDB adapters
@ -29,7 +30,7 @@ docs/ Framework-level documentation
| Organization | Player organizations, membership, treasury, credit lines, shared assets, and fleet data. | `arma/client/addons/org` | `arma/server/addons/org` | `lib/models/src/org.rs`, `lib/services/src/org.rs` | `org:*`, `org:hot:*` |
| Phone | Contacts, messages, and email state. | `arma/client/addons/phone` | `arma/server/addons/phone` | `lib/models/src/phone.rs`, `lib/services/src/phone.rs` | `phone:*` |
| Store | Storefront entity setup, catalog hydration, checkout workflows, and checkout charging integration. | `arma/client/addons/store` | `arma/server/addons/store` | `lib/models/src/store.rs`, `lib/services/src/store.rs` | `store:checkout` |
| Task | Server-owned mission/task flows, catalog, ownership, status, participant tracking, rewards, and defuse counters. | none | `arma/server/addons/task` | `lib/models/src/task.rs`, `lib/services/src/task.rs` | `task:*` |
| Task | Server-owned mission/task flows, catalog, ownership, status, participant tracking, rewards, and defuse counters. Mission-facing Eden module classes live in `@forge_mod`; runtime execution remains server-owned. | shared module config in `arma/mod/addons/task` | `arma/server/addons/task` | `lib/models/src/task.rs`, `lib/services/src/task.rs` | `task:*` |
| Owned Garage | Organization or owner-scoped vehicle unlock storage. | via garage/org UI | server extension only | `lib/models/src/v_garage.rs`, `lib/services/src/v_garage.rs` | `owned:garage:*` |
| Owned Locker | Organization or owner-scoped arsenal unlock storage. | via locker/org UI | server extension only | `lib/models/src/v_locker.rs`, `lib/services/src/v_locker.rs` | `owned:locker:*` |
@ -64,6 +65,8 @@ Client guides:
| Module | Purpose | Location |
| --- | --- | --- |
| `forge_mod_common` | Shared config classes required by both clients and servers, including the Forge body bag vehicle. | `arma/mod/addons/common` |
| `forge_mod_task` | Shared Forge task Eden module classes used by missions. Functions still resolve to server-side task handlers at runtime. | `arma/mod/addons/task` |
| `common` | Shared SQF helpers, base stores, utility functions, and shared UI bridge pieces. | `arma/client/addons/common`, `arma/server/addons/common` |
| `extension` | Server SQF bridge around `forge_server` extension calls and chunked transport. | `arma/server/addons/extension` |
| `main` | Mod-level configuration, pre-init wiring, and server/client startup glue. | `arma/client/addons/main`, `arma/server/addons/main` |

View File

@ -1,8 +1,26 @@
# Forge Documentation
Forge is split into Arma client addons, Arma server addons, a Rust server
extension, shared Rust domain crates, and web UI build tooling. This directory
collects framework-level documentation for those pieces.
Forge is split into a shared Arma addon, Arma client addons, Arma server
addons, a Rust server extension, shared Rust domain crates, and web UI build
tooling. This directory collects framework-level documentation for those
pieces.
## Arma Addon Layout
Forge now ships three Arma addon packages:
- `@forge_mod`: shared client/server config classes required by Forge
missions. It owns shared definitions such as Forge task Eden modules and the
custom body bag vehicle config.
- `@forge_client`: client-side UX, browser UIs, keybinds, and local player
integrations. It depends on `@forge_mod`.
- `@forge_server`: server-only runtime systems, extension bridge code, and
authoritative mission/task execution. It depends on `@forge_mod` but should
not be required by clients.
Mission `requiredAddons` should reference shared mission-facing classes through
`forge_mod_*` addons, not `forge_server_*`, so clients can load and edit
missions without installing the server-only mod.
## Launch Prerequisites
@ -13,10 +31,13 @@ server owners and developers must:
2. Place `config.toml` beside `forge_server_x64.dll`.
3. Keep the `config.toml` SurrealDB endpoint, namespace, database, username,
and password aligned with the running database.
4. Load `@forge_mod` with the server's normal mod list and `@forge_server` as
a server-only mod.
Mission designers and players do not need to run SurrealDB unless they are
hosting locally, but the server they join must have these prerequisites ready.
See [SurrealDB Setup](./surrealdb-setup.md) for the full setup path.
hosting locally, but they do need `@forge_mod` for Forge mission config classes.
Players also load `@forge_client` for player-facing UI. See
[SurrealDB Setup](./surrealdb-setup.md) for the full setup path.
## Start Here
@ -27,8 +48,6 @@ See [SurrealDB Setup](./surrealdb-setup.md) for the full setup path.
crates.
- [Development Guide](./DEVELOPMENT_GUIDE.md): how to add or change a module
without breaking the framework boundaries.
- [Git Workflow](./GIT_WORKFLOW.md): branch roles, mission branch usage, and
release tagging.
- [Mission Designer Guide](./MISSION_DESIGNER_GUIDE.md): how to place Eden
objects, garage markers, and CAD-compatible task modules for playable
missions.

View File

@ -5,6 +5,7 @@ description: Use this section as the main entry point for the Forge framework.
Forge combines:
- Arma 3 shared config addons for mission-facing classes
- Arma 3 client addons for UX and browser-hosted interfaces
- Arma 3 server addons for mission integration and authoritative flow control
- a Rust server extension for command routing and persistence
@ -17,10 +18,12 @@ Before starting a Forge-enabled dedicated server or local multiplayer test,
server owners and developers must start SurrealDB and make sure
`config.toml` is beside `forge_server_x64.dll`. The config values must match
the running SurrealDB endpoint, namespace, database, username, and password.
Servers must load `@forge_mod` as a normal mod and `@forge_server` as a
server-only mod.
Mission designers and players do not need their own SurrealDB instance unless
they are hosting locally, but the server they join must have these prerequisites
ready.
they are hosting locally, but they do need `@forge_mod` for shared Forge
mission classes. Players also load `@forge_client` for player-facing UI.
## Common Commands

View File

@ -5,10 +5,11 @@ description: "Forge is organized around domain modules. A domain usually has SQF
## Runtime Flow
![Architectural Flow Diagram](images/architecture-flow.svg)
![Architectural Flow Diagram](architecture-flow.svg)
```text
Arma client UI or SQF action
-> shared config classes from @forge_mod
-> client addon bridge
-> server addon function
-> forge_server callExtension command
@ -25,6 +26,17 @@ request and response chunks through the extension transport module.
## Main Layers
### Shared Mod
The shared mod lives under `arma/mod` and builds to `@forge_mod`. It contains
mission-facing config classes that must exist on both clients and servers, such
as Forge task Eden modules and shared vehicle definitions. Missions should
depend on these `forge_mod_*` addons when placing Forge modules.
`@forge_mod` does not own server runtime behavior. Task module config can point
at server-owned functions, but those functions still live in `@forge_server`
and execute only where the server mod is loaded.
### Client Addons
Client addons live under `arma/client/addons`. They own local player UX,
@ -39,6 +51,10 @@ initialization, game-object integration, validation near the Arma runtime, and
calls into the Rust extension. The `extension` addon is the shared bridge for
`callExtension` and transport handling.
Server addons may require `forge_mod_*` addons for shared class definitions.
They should keep authoritative logic in `@forge_server` so clients only need
shared config and client UX packages.
### Rust Extension
The server extension lives under `arma/server/extension`. It registers the

View File

@ -6,6 +6,7 @@ description: "This reference lists the main Forge modules and where each layer l
## Directory Map
```text
arma/mod/addons/ Shared config addon built as @forge_mod
arma/client/addons/ Client-side Arma addons and browser UIs
arma/server/addons/ Server-side Arma addons and extension bridge
arma/server/extension/ Rust arma-rs extension and SurrealDB adapters
@ -30,7 +31,7 @@ docs/ Framework-level documentation
| Organization | Player organizations, membership, treasury, credit lines, shared assets, and fleet data. | `arma/client/addons/org` | `arma/server/addons/org` | `lib/models/src/org.rs`, `lib/services/src/org.rs` | `org:*`, `org:hot:*` |
| Phone | Contacts, messages, and email state. | `arma/client/addons/phone` | `arma/server/addons/phone` | `lib/models/src/phone.rs`, `lib/services/src/phone.rs` | `phone:*` |
| Store | Storefront entity setup, catalog hydration, checkout workflows, and checkout charging integration. | `arma/client/addons/store` | `arma/server/addons/store` | `lib/models/src/store.rs`, `lib/services/src/store.rs` | `store:checkout` |
| Task | Server-owned mission/task flows, catalog, ownership, status, participant tracking, rewards, and defuse counters. | none | `arma/server/addons/task` | `lib/models/src/task.rs`, `lib/services/src/task.rs` | `task:*` |
| Task | Server-owned mission/task flows, catalog, ownership, status, participant tracking, rewards, and defuse counters. Mission-facing Eden module classes live in `@forge_mod`; runtime execution remains server-owned. | shared module config in `arma/mod/addons/task` | `arma/server/addons/task` | `lib/models/src/task.rs`, `lib/services/src/task.rs` | `task:*` |
| Owned Garage | Organization or owner-scoped vehicle unlock storage. | via garage/org UI | server extension only | `lib/models/src/v_garage.rs`, `lib/services/src/v_garage.rs` | `owned:garage:*` |
| Owned Locker | Organization or owner-scoped arsenal unlock storage. | via locker/org UI | server extension only | `lib/models/src/v_locker.rs`, `lib/services/src/v_locker.rs` | `owned:locker:*` |
@ -65,6 +66,8 @@ Client guides:
| Module | Purpose | Location |
| --- | --- | --- |
| `forge_mod_common` | Shared config classes required by both clients and servers, including the Forge body bag vehicle. | `arma/mod/addons/common` |
| `forge_mod_task` | Shared Forge task Eden module classes used by missions. Functions still resolve to server-side task handlers at runtime. | `arma/mod/addons/task` |
| `common` | Shared SQF helpers, base stores, utility functions, and shared UI bridge pieces. | `arma/client/addons/common`, `arma/server/addons/common` |
| `extension` | Server SQF bridge around `forge_server` extension calls and chunked transport. | `arma/server/addons/extension` |
| `main` | Mod-level configuration, pre-init wiring, and server/client startup glue. | `arma/client/addons/main`, `arma/server/addons/main` |

View File

@ -3,52 +3,6 @@ title: "Development Guide"
description: "This guide covers the usual path for adding or changing a Forge module."
---
## Repository Workflow
Use [Git Workflow](/getting-started/git-workflow) as the source of truth for branch roles,
release tags, and mission branch handling. The short version is:
- Use `pre-v0.2` for framework development after the `v0.1.0` baseline.
- Keep `master` as the clean release baseline branch.
- Keep mission folders off `master`; mission work belongs on
`missions/local-mission-copies`.
- Keep `archive/pre-v0.1-history` read-only unless recovering old work.
- Bring reusable mission logic back to framework branches by copying only the
needed framework files or code, not by merging the mission branch.
Use the workflow helper for the routine checks:
```powershell
npm run workflow -- status
npm run workflow -- doctor
npm run workflow -- switch dev
npm run workflow -- switch missions
```
Example framework workflow:
```powershell
git switch pre-v0.2
git pull
git switch -c feature/cad-task-request
# make framework changes
git status --short --branch
git add arma/client/addons/cad arma/server/addons/cad
git commit -m "Add CAD task request workflow"
```
Example mission workflow:
```powershell
git switch missions/local-mission-copies
# make mission changes
git status --short --branch
git add arma/forge_pmc_simulator.Tanoa
git commit -m "Update PMC simulator mission setup"
```
## Local Checks
Before running storage-backed workflows locally, complete
@ -78,6 +32,10 @@ Build Arma packages with:
.\build-arma.ps1
```
The default build target now builds the shared mod first, then client and
server addons. Use `.\build-arma.ps1 -Target mod` when only shared config
classes changed.
## Module Boundaries
Keep each layer responsible for one kind of work:
@ -88,6 +46,7 @@ Keep each layer responsible for one kind of work:
| `lib/repositories` | Repository traits and in-memory stores. | SurrealDB-specific code. |
| `lib/services` | Business rules, workflow orchestration, structured results. | Arma engine calls, extension transport details. |
| `arma/server/extension` | Command parsing, context resolution, SurrealDB implementations, serialization to SQF. | Business rules that belong in services. |
| `arma/mod/addons` | Config classes required by both clients and servers, including mission-facing Eden modules and shared vehicle definitions. | Server-only runtime logic or client-only UI. |
| `arma/server/addons` | Server SQF lifecycle, game-object integration, calls into `forge_server`. | Direct database logic. |
| `arma/client/addons` | Client UI, keybinds, local UI events. | Authoritative persistence. |
@ -106,9 +65,10 @@ Keep each layer responsible for one kind of work:
11. Register the storage adapter in `arma/server/extension/src/storage.rs`.
12. Add an extension command group under `arma/server/extension/src/<module>.rs`.
13. Register the command group in `arma/server/extension/src/lib.rs`.
14. Add server addon functions under `arma/server/addons/<module>` if SQF needs a module-level API.
15. Add client addon or browser UI files under `arma/client/addons/<module>` if the module has player-facing UI.
16. Add documentation in `docs/` and module-level READMEs.
14. Add shared config under `arma/mod/addons/<module>` if missions, clients, and servers all need the class definitions.
15. Add server addon functions under `arma/server/addons/<module>` if SQF needs a module-level API.
16. Add client addon or browser UI files under `arma/client/addons/<module>` if the module has player-facing UI.
17. Add documentation in `docs/` and module-level READMEs.
## Extension Command Rules
@ -176,6 +136,7 @@ server-authoritative decisions in server SQF or Rust services.
When adding or changing a module, update:
- `docs/MODULE_REFERENCE.md` for framework-level inventory.
- `arma/mod/README.md` when shared config classes or dependencies change.
- A module-specific README in the addon directory when SQF or UI usage changes.
- `arma/server/docs/api-reference.md` when extension commands change.
- Existing usage guides when payload shapes or workflows change.

View File

@ -19,21 +19,17 @@ const generatedPages = [
source: 'docs/DEVELOPMENT_GUIDE.md',
target: '1.getting-started/3.development.md'
},
{
source: 'docs/GIT_WORKFLOW.md',
target: '1.getting-started/4.git-workflow.md'
},
{
source: 'docs/MISSION_DESIGNER_GUIDE.md',
target: '1.getting-started/5.mission-designer.md'
target: '1.getting-started/4.mission-designer.md'
},
{
source: 'docs/PLAYER_GUIDE.md',
target: '1.getting-started/6.player-guide.md'
target: '1.getting-started/5.player-guide.md'
},
{
source: 'docs/surrealdb-setup.md',
target: '1.getting-started/7.surrealdb-setup.md'
target: '1.getting-started/6.surrealdb-setup.md'
},
{
source: 'arma/server/docs/README.md',
@ -177,8 +173,8 @@ Forge Framework Documentation
#description
Forge is a persistent Arma 3 framework that combines SQF addons, a Rust
\`arma-rs\` extension, SurrealDB persistence, shared domain crates, and
browser-backed player interfaces.
\`arma-rs\` extension, SurrealDB persistence, shared domain crates, a shared
mission config addon, and browser-backed player interfaces.
Use these docs to understand the runtime architecture, extension API surface,
server gameplay modules, and client addon integration patterns.
@ -187,6 +183,10 @@ Server owners and developers must start SurrealDB and place a matching
\`config.toml\` beside \`forge_server_x64.dll\` before launching a
Forge-enabled server or local multiplayer test.
Forge missions require \`@forge_mod\` for shared mission-facing config classes.
Servers also load \`@forge_server\` as a server-only runtime mod, and players
load \`@forge_client\` for client UI.
#links
:::u-button
---
@ -382,6 +382,7 @@ description: Use this section as the main entry point for the Forge framework.
Forge combines:
- Arma 3 shared config addons for mission-facing classes
- Arma 3 client addons for UX and browser-hosted interfaces
- Arma 3 server addons for mission integration and authoritative flow control
- a Rust server extension for command routing and persistence
@ -394,10 +395,12 @@ Before starting a Forge-enabled dedicated server or local multiplayer test,
server owners and developers must start SurrealDB and make sure
\`config.toml\` is beside \`forge_server_x64.dll\`. The config values must match
the running SurrealDB endpoint, namespace, database, username, and password.
Servers must load \`@forge_mod\` as a normal mod and \`@forge_server\` as a
server-only mod.
Mission designers and players do not need their own SurrealDB instance unless
they are hosting locally, but the server they join must have these prerequisites
ready.
they are hosting locally, but they do need \`@forge_mod\` for shared Forge
mission classes. Players also load \`@forge_client\` for player-facing UI.
## Common Commands