Making a component that uses CBA

Version 8 (Sickboy, 07/06/2009 21:33)

1 1 Spooner
h1. Making a component that uses CBA
2 1 Spooner
3 1 Spooner
h2. Requiring CBA for an addon
4 1 Spooner
5 5 Spooner
In your @CfgPatches@ configuration, ensure that _CBA_main_ is one of the required addons (this will require all the other CBA PBOs, including Extended EventHandlers, for you).
6 1 Spooner
<code class="cpp">
7 3 kju
requiredAddons[] = {"CBA_main"};
8 1 Spooner
9 5 Spooner
10 5 Spooner
Any addon that just requires _Extended_EventHandlers_ will work also with CBA, since XEH is a sub-component of CBA. However, the other CBA features will not be available to that addon.
11 1 Spooner
12 8 Sickboy
h3. Binarizing CBA enabled Addons
13 8 Sickboy
14 8 Sickboy
Binarizing can be done with the PBOTools by Mikero (MakePBO + Rapify, and optionally binarize p3d's etc with BI BINPbo)
15 8 Sickboy
16 7 Spooner
h2. Requiring CBA for a mission
17 1 Spooner
18 6 Spooner
In the editor, place a *_Game Logics\CBA\Require CBA_* object anywhere in your mission. The only effect of this is that it will force any player to have CBA running as a mod before they can join the mission. CBA will start itself in any mission anyway, regardless of whether that logic has been placed.