+
Note:
+
This is just the necessary to make explosives using the framework, this is not a guide to make your own explosives.
+
+
## 1. Explosives
### 1.1 Setting the magazine
-```
+```c++
class CfgMagazines {
class CA_Magazine;
-
class banana_satchel_remote_mag: CA_Magazine {
ACE_Placeable = 1; // Can be placed
useAction = 0; // Disable the vanilla interaction
- ACE_SetupObject = "banana_satchel_place"; // The object placed before te explosive is armed.
+ ACE_SetupObject = "banana_satchel_place"; // The object placed before the explosive is armed
class ACE_Triggers { // Trigger configurations
- SupportedTriggers[] = {"Timer","Command", "MK16_Transmitter", "DeadmanSwitch"}; // Triggers that can be used.
+ SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; // Triggers that can be used
class Timer {
- FuseTime = 0.5; // Time for the fuse to burn.
+ FuseTime = 0.5; // Time for the fuse to burn
};
class Command {
FuseTime = 0.5;
@@ -36,31 +40,27 @@ class CfgMagazines {
### 1.2 Setting the ammo
-```
+```c++
class CfgAmmo {
-
class PipeBombBase;
class SatchelCharge_Remote_Ammo: PipeBombBase {
- soundActivation[] = {"", 0, 0, 0}; // No sound on activation.
- soundDeactivation[] = {"", 0, 0, 0}; // No sound on deactivation.
+ soundActivation[] = {"", 0, 0, 0}; // No sound on activation
+ soundDeactivation[] = {"", 0, 0, 0}; // No sound on deactivation
+ triggerWhenDestroyed = 1; // (Optional) Explode when the object is shot and destroyed (after being placed) (0-disabled, 1-enabled).
+ ACE_explodeOnDefuse = 0.02; // (Optional) Add a chance for the explosive to detonate after being disarmed (in percent)
};
};
```
-Some optionnal parameters:
-- triggerWhenDestroyed = 1; // Explode when the object is shot and destroyed (after being placed) (0= disabled, 1= enabled).
-- ACE_explodeOnDefuse = 0.02; // Add a chance for the explosive to detonate after being disarmed. (in percent)
-
### 1.3 Adding the place item
-```
+```c++
class CfgVehicles {
-
class ACE_Explosives_Place;
class banana_satchel_place: ACE_Explosives_Place {
displayName = "Banana satchel"; // Name of the item
model = ""; // Path to your model
- ACE_offset[] = {0,0,0}; // Offset of the interaction point from the model in meters on the X,Y,Z axis.
+ ACE_offset[] = {0, 0, 0}; // Offset of the interaction point from the model in meters on the X,Y,Z axis.
};
};
```
@@ -70,17 +70,15 @@ class CfgVehicles {
### 2.1 Setting the magazine
-_Pretty much the same as Explosives except that we inherit from_ `ATMine_Range_Mag` _instead of_ `CA_Magazine`
+_Pretty much the same as Explosives except that we inherit from_ `ATMine_Range_Mag` _instead of_ `CA_Magazine`.
-```
+```c++
class CfgMagazines {
-
class ATMine_Range_Mag;
-
class BananaMine_Range_Mag: ATMine_Range_Mag {
- ACE_SetupObject = "BananaMine_Place"; // The object placed before the mine is armed.
+ ACE_SetupObject = "BananaMine_Place"; // The object placed before the mine is armed
class ACE_Triggers { // Triggers
- SupportedTriggers[] = {"PressurePlate"}; // This mine only support pressure plate activation.
+ SupportedTriggers[] = {"PressurePlate"}; // This mine only support pressure plate activation
class PressurePlate {
digDistance = 0.05;
};
@@ -95,33 +93,31 @@ The class you inherit from depends of what type of trigger you are using, for `P
Directional mines inherit from `DirectionalBombBase`.
+
## 3. Adding your own detonators
-```
+```c++
class CfgWeapons {
-
- class ACE_ItemCore; // ACE3 base item class.
- class ACE_Clacker; // Clacker base class.
-
+ class ACE_ItemCore; // ACE3 base item class
+ class ACE_Clacker; // Clacker base class
class banana_clacker: ACE_Clacker {
- displayName = "banana clacker"; // Name of the item.
- picture = ""; // Path to the item's picture.
- ACE_Range = 9000; // Explosives activation range in meters.
+ displayName = "banana clacker"; // Name of the item
+ picture = ""; // Path to the item's picture
+ ACE_Range = 9000; // Explosives activation range in meters
};
};
```
+
+
## 4. Trigger list
Name | Use
---- | -----
-Command | Explode when activated via clacker.
-MK16_Transmitter | Explode when activated via M26 clacker.
-DeadManSwitch | Explode after activated via the switch or the person dies.
-Cellphone | Explode when the number is called.
-PressurePlate | Explode upon being stepped upon.
-IRSensor | Explode after movement is detected in front of the mine.
-Timer | Explode after timer drop to 0.
-Tripwire | Explode when something touch the tripwire.
-
-
-## 5. Events
+`Command` | Explode when activated via clacker.
+`MK16_Transmitter` | Explode when activated via M26 clacker.
+`DeadManSwitch` | Explode after activated via the switch or the person dies.
+`Cellphone` | Explode when the number is called.
+`PressurePlate` | Explode upon being stepped upon.
+`IRSensor` | Explode after movement is detected in front of the mine.
+`Timer` | Explode after timer drop to 0.
+`Tripwire` | Explode when something touch the tripwire.
diff --git a/documentation/framework/settings.md b/documentation/framework/settings-framework.md
similarity index 58%
rename from documentation/framework/settings.md
rename to documentation/framework/settings-framework.md
index 58208a873d..456a294c04 100644
--- a/documentation/framework/settings.md
+++ b/documentation/framework/settings-framework.md
@@ -1,78 +1,71 @@
---
layout: wiki
title: Settings Framework
-description: ACE3 contains an extensive settings framework that allows you to tweak the modification without having to mess around with deleting pbos.
+description: ACE3 contains an extensive settings framework that allows you to tweak the modification without having to mess around with deleting PBOs.
group: framework
order: 5
parent: wiki
---
-ACE3 contains an extensive settings framework that allows you to tweak the modification without having to mess around with deleting pbos. These settings are all handled server side and broadcasted to the clients connecting to that server. This ensures that everyone playing on the server will have a uniform experience.
+ACE3 contains an extensive settings framework that allows you to tweak the modification without having to mess around with deleting PBOs. These settings are all handled server side and broadcasted to the clients connecting to that server. This ensures that everyone playing on the server will have a uniform experience.
Part of this settings framework are global settings and client settings. Both use the same underlaying framework, with the difference that client settings can be adjusted by clients, where global settings can not.
## 1. How do they work
-Settings are entries in the config that get translated to `missionnamespace` global variables. An example settings entry looks like this:
+Settings are entries in the config that get translated to `missionNamespace` global variables. An example settings entry looks like this:
```c++
class ACE_module_sampleSetting {
- // Value
- value = 1;
+ // Following 2 entries are redundant if isClientSettable = 0
+ displayName = "$STR_ACE_Common_SettingName"; // Stringtable entry with the setting name
+ description = "$STR_ACE_Common_SettingDescription"; // Stringtable entry with the setting description
- // Type (SCALAR, BOOL, STRING, ARRAY, COLOR)
- typeName = "SCALAR";
+ isClientSettable = 1; // Show in client options menu (0-no, 1-yes)
+ typeName = "SCALAR"; // Type (BOOL/SCALAR/STRING/ARRAY/COLOR)
+ value = 1; // Value
- // Force the setting?
- force = 0;
+ // Following entry is redundant if typeName is NOT "SCALAR"
+ values[] = {"Disabled", "Enabled", "Only Cursor", "Only On Keypress", "Only Cursor and KeyPress"}; // (Optional) Stringtable entries that describe the options
- // Does it appear on the options menu?
- isClientSettable = 1;
-
- // The following settings only apply when isClientSettable == 1
- // Stringtable entry with the setting name
- displayName = "$STR_ACE_Common_SettingName";
-
- // Stringtable entry with the setting description
- description = "$STR_ACE_Common_SettingDescription";
-
- // Stringtable entries that describe the options
- // Only applies if typeName == "SCALAR"; and is optional
- values[] = {"Disabled", "Enabled", "Only Cursor", "Only On Keypress", "Only Cursor and KeyPress"};
+ // Following entry is present only in export
+ force = 0; // Force the setting (0-no, 1-yes), exported settings are forced by default
};
```
-Settings are defined from the mods config but can be adjusted through the following methods:
+Settings are defined from the mod's config but can be adjusted through the following methods:
* Optional config entries
-* Mission side modules
+* Mission modules
+
## 2. Load order
The load order for the settings are:
-* 1. Mod config
-* 2. Server config
-* 3. Mission config
-* 4. Placed down mission modules
+1. Mod Config
+2. Server Config
+3. Mission Config
+4. Placed Mission Modules
+
+What this means is that at any the 3 points after the Mod Config it is possible to insert your adjusted settings and force those (optionally). This is a powerful tool for server admins, whom can ensure that everyone is using uniform settings across the board on their server. And it provides mission makers the ability to easily set settings for their mission, without creating a large dependency on ACE3; you do not have to place down mission modules.
-What this means is that at any the 3 points after the mod config it is possible to insert your adjusted settings and force those (optionally). This is a powerful tool for server admins, whom can ensure that everyone is using uniform settings across the board on their server. And it provides mission makers the ability to easily set settings for their mission, without creating a large dependency on ACE3; you do not have to place down mission modules.
## 3. How do I use them?
-In the 'how do they work' chapter an example of settings was shown. This is the same for any settings config. The only difference is the location. For ACE3 modules, the settings are placed in the class `ACE_settings`. The same goes for the mission config.
+In the 'how do they work' chapter an example of settings was shown. This is the same for any settings config. The only difference is the location. For ACE3 modules, the settings are placed in the class `ACE_Settings`. The same goes for the mission config.
-The server config setting entries are done through our optional ACE_server.pbo, which can be found in the optionals folder of @ace. It also contains a `userconfig` folder, which inside contains the file `ace\serverconfig.hpp`. This is the location ACE3 settings are placed. There is no need for a sub class.
+The server config setting entries are done through our optional `ace_server.pbo`, which can be found in the optionals folder of `@ace`. It also contains a `userconfig` folder, which inside contains the file `ace\serverconfig.hpp`. This is the location where ACE3 settings are placed. There is no need for a sub-class.
### 3.1 Getting all the settings!
-ACE3 contains a lot of settings; for that reason tweaking everything to your liking manually can be quite a task. We have provided the option to export all settings in the editor (single-player). For this, follow these simple steps:
+ACE3 contains a lot of settings, for that reason tweaking everything to your liking manually can be quite a task. We have provided the option to export all settings in the editor (single-player). For this, follow these simple steps:
* Open the editor (single-player).
-* Under modules (