userconfig: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Added category.) |
||
Line 22: | Line 22: | ||
[[campaignConfigFile]] is similar but for a campaign | [[campaignConfigFile]] is similar but for a campaign | ||
[[configFile]] is about the "global config" of unit types, vehicle types, and so on - this is the area added to by addons. | [[configFile]] is about the "global config" of unit types, vehicle types, and so on - this is the area added to by addons. | ||
[[Category:ArmA_2:_Editing]] |
Revision as of 16:59, 11 November 2011
How to do Userconfig:
Some quick notes from what I learned while trying to use it for a mission. (a.k.a. What I wish somebody had written already)
description.ext:
class X { #include "\userconfig\somefile.hpp" };
userconfig\somefile.hpp:
class Y { key = value; }
script:
ucval = getNumber (missionConfigFile >> "X" >> "Y" >> "key")
Skipping class X means the user could introduce anything into the description.ext Note that #include WILL fail with a CTD if the somefile.hpp doesn't exist.
missionConfigFile is used when the mission does the include from description.ext campaignConfigFile is similar but for a campaign configFile is about the "global config" of unit types, vehicle types, and so on - this is the area added to by addons.