- Revised README.md for the Forge Client Example Addon to clarify its purpose as a template. - Enhanced MODULE_REFERENCE.md to categorize guides into Server and Extension guides and Client guides. - Created detailed usage guides for various client addons including Actor, Bank, CAD, Garage, Locker, Notifications, Organization, Phone, and Store. - Added a Client Common Usage Guide to outline shared browser UI bridge patterns. - Introduced a Client Main Usage Guide to define the foundational elements for client addons. - Established authoritative state notes and usage rules across new guides to ensure clarity on server ownership and client responsibilities.
49 lines
1.4 KiB
Markdown
49 lines
1.4 KiB
Markdown
# Client Main Usage Guide
|
|
|
|
The client `main` addon provides the shared mod identity, version metadata,
|
|
CBA settings, and macro foundation used by the Forge client addons.
|
|
|
|
## Purpose
|
|
|
|
Use `forge_client_main` as the foundation dependency for client addons that
|
|
need Forge macros, function naming, settings, or mod-level configuration.
|
|
|
|
Feature logic should stay in the owning addon. `main` should remain limited to
|
|
shared client configuration and compile infrastructure.
|
|
|
|
## Key Files
|
|
|
|
| File | Purpose |
|
|
| --- | --- |
|
|
| `script_mod.hpp` | Client mod identity. |
|
|
| `script_version.hpp` | Client mod version values. |
|
|
| `script_macros.hpp` | Shared client macros. |
|
|
| `CfgSettings.hpp` | Client CBA settings. |
|
|
| `config.cpp` | Addon config and mod wiring. |
|
|
|
|
## Dependency Pattern
|
|
|
|
Feature addons normally depend on `forge_client_main` in their `config.cpp`.
|
|
|
|
```cpp
|
|
class forge_client_example {
|
|
requiredAddons[] = {
|
|
"forge_client_main"
|
|
};
|
|
};
|
|
```
|
|
|
|
## Usage Notes
|
|
|
|
- Put domain UI, repositories, and event handling in feature addons.
|
|
- Put reusable browser bridge behavior in `forge_client_common`.
|
|
- Put server-only behavior in `arma/server/addons`.
|
|
- Keep settings in `CfgSettings.hpp` when they apply to the client mod as a
|
|
whole or to a client feature toggle.
|
|
|
|
## Related Guides
|
|
|
|
- [Client Usage Guide](./CLIENT_USAGE_GUIDE.md)
|
|
- [Client Common Usage Guide](./CLIENT_COMMON_USAGE_GUIDE.md)
|
|
- [Development Guide](./DEVELOPMENT_GUIDE.md)
|