userconfig: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Added category.)
(added to arma 3 editing category; cleaned up formatting; rephrased;)
Line 1: Line 1:
=How to do Userconfig:=
=How to make a Userconfig:=
Some quick notes from what I learned while trying to use it for a mission.
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)
(a.k.a. What I wish somebody had written already) ''--MaHuJa''


description.ext:
 
The '''\userconfig''' folder should be located in the root Arma 3 game directory, typically in your main Steam folder, \Steam\steamapps\common\Arma 3\
 
 
'''Description.ext'''
  class X {
  class X {
#include "\userconfig\somefile.hpp"
  #include "\userconfig\MY_addon\Somefile.hpp"
  };
  };


userconfig\somefile.hpp:
 
'''\userconfig\MY_addon\Somefile.hpp'''
  class Y {
  class Y {
   key = value;
   key = value;
  }
  }


script:
 
'''Use:'''
  ucval = [[getNumber]] ([[missionConfigFile]] >> "X" >> "Y" >> "key")
  ucval = [[getNumber]] ([[missionConfigFile]] >> "X" >> "Y" >> "key")


Skipping class X means the user could introduce anything into the description.ext
Skipping class X means the user could introduce anything into the description.ext
Line 24: Line 31:


[[Category:ArmA_2:_Editing]]
[[Category:ArmA_2:_Editing]]
[[Category:Arma_3:_Editing]]

Revision as of 20:00, 1 November 2014

How to make a 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) --MaHuJa


The \userconfig folder should be located in the root Arma 3 game directory, typically in your main Steam folder, \Steam\steamapps\common\Arma 3\


Description.ext

class X {
  #include "\userconfig\MY_addon\Somefile.hpp"
};


\userconfig\MY_addon\Somefile.hpp

class Y {
  key = value;
}


Use:

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.