01-17-2018, 12:04 AM
It depends on what you want to do, really. For my missions, I have configuration data stored via CBA (which, obviously, becomes a requirement then). It allows people to set the view range for my missions on a per-map basis:
in description.ext:
then in scripts\XEH_preinit.sqf:
Note that my _settingNames are generic, i.e. they will be available in every mission that uses this XEH. If you name them mission-specific, you can have mission-specific settings. The variable named e.g. FHQ_ShadowViewDistance_Altis will become a global variable in your mission.
As I said, it depends on what exactly you want to do with the userconfig/settings file.
in description.ext:
Code:
class Extended_PreInit_EventHandlers {
FHQMission = "call compile preprocessFileLineNumbers ""scripts\XEH_preinit.sqf"";";
};
then in scripts\XEH_preinit.sqf:
Code:
_settingName = "FHQ_ViewDistance_" + worldName;
[
_settingName,
"SLIDER",
worldName + " View Distance",
"FHQ Mission Settings",
[200, 8000, viewDistance, 0],
nil,
{
params ["_value"];
setViewDistance _value;
}
] call CBA_Settings_fnc_init;
_settingName = "FHQ_ObjectViewDistance_" + worldName;
[
_settingName,
"SLIDER",
worldName + " Object View Distance",
"FHQ Mission Settings",
[200, 8000, getObjectViewDistance select 0, 0],
nil,
{
params ["_value"];
setObjectViewDistance _value;
}
] call CBA_Settings_fnc_init;
_settingName = "FHQ_ShadowViewDistance_" + worldName;
[
_settingName,
"SLIDER",
worldName + " Shadow View Distance",
"FHQ Mission Settings",
[10, 200, getObjectViewDistance select 1, 0],
nil,
{
params ["_value"];
setObjectViewDistance [getObjectViewDistance select 0, _value];
}
] call CBA_Settings_fnc_init;
As I said, it depends on what exactly you want to do with the userconfig/settings file.
I don't need luck, I have ammo.