Skip to content

Commit

Permalink
Merge pull request #2929 from acemod/PabstMirror-patch-1
Browse files Browse the repository at this point in the history
Add Mission Parameter Information to ace wiki
  • Loading branch information
PabstMirror committed Dec 5, 2015
2 parents d4e888e + 272181c commit 03b18ea
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions wiki/framework/settings-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class ACE_Settings {
Settings are defined from the mod's config but can be adjusted through the following methods:
- Optional config entries
- Mission Parameters
- Mission modules
Expand All @@ -49,9 +50,10 @@ The load order for the settings are:
1. Mod Config
2. Server Config
3. Mission Config
4. Placed Mission Modules
4. Mission Paramaters
5. 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 4 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; it will 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?
Expand Down Expand Up @@ -103,3 +105,42 @@ class ACE_Settings {
As stated before, the server config gets loaded through the optional `ace_server.pbo`. This PBO is only required (and should only be used) on the server - clients do not need to have this! It is for this reason we have not signed this PBO.
Load the `ace_server.pbo` like any other addon on your server. It is advised to create an `@aceServer` mod folder with an `addons` sub folder where you would paste the `ace_server.pbo` and load that through `-serverMod=@aceServer`.
### 3.3 Changing ACE_settings dynamically with Mission Parameters
It is possible to change `ACE3 settings` via [Mission Parameters](https://community.bistudio.com/wiki/Arma_3_Mission_Parameters).
This can allow a single mission to be played with different realism settings.
They are read after all other configs but before modules. Mission Parameters are forced so they will override any module setting.
#### Basic Setup:
1. Add a Mission Parameter with the same name as an ace_setting
2. Add the `ACE_setting = 1;` flag
3. Add `values[]` and optionally `texts[]` to match the setting
<div class="panel callout">
<h5>Please note:</h5>
<p>For now only <code>BOOL</code> or <code>SCALAR</code> settings are supported.</p>
</div>
#### Example **description.ext**:
```c++
class Params {
class ace_medical_level { //This needs to match an ace_setting, this one is a "SCALAR"(number)
title = "Medical Level"; // Name that is shown
ACE_setting = 1; //Marks param to be read as an ace setting, without this nothing will happen!
values[] = {1, 2}; //Values that ace_medical_level can be set to
texts[] = {"Basic", "Advanced"}; //Text names to show for values (Basic will set level to 1, Advanced will set level to 2)
default = 2; //Default value used - Value should be in the values[] list
};
class ace_repair_addSpareParts { //This ia a "BOOL"
title = "$STR_ACE_Repair_addSpareParts_name"; //You can use ACE's stringtables
ACE_setting = 1;
values[] = {0, 1}; //setting is a BOOL, but values still need to be numbers, so 0 is false, 1 is true
texts[] = {"False", "True"};
default = 1;
};
};
```

Review the [biki](https://community.bistudio.com/wiki/Arma_3_Mission_Parameters) for more information on setting up Mission Parameters.

0 comments on commit 03b18ea

Please sign in to comment.