Jump to content
Pennyworth

Updated All in One Config Dumps

Recommended Posts

Here is the All in One Config for Apex, as of June 11th stable branch update (1.62.137494).

I will be updating these periodically and will include dumps with some of the larger and more popular mods. All of these will be view able from this directory, dependent on what game version the dump was on. The mods used will be listed in the file name, and I'll provide links to the most updated versions of those mods in this post. If you find any issues feel free to leave a comment on this thread, message me here on the forums, or message me on the main Arma discord.

All in One Configs for the following addons can now be found in the 1.63 folder, included are different combinations of addons frequently used together.

  • ACE
  • ALiVE
  • CBA
  • CUP
  • IFA3
  • RHS

The code used to generate these can be found below in the spoiler. I've only made minor edits to the script from it's original state, and that's mainly because there have been new commands introduced since it first written (2010). The script will require you to use an extension I wrote for writing to a file.
Credits:

Denis Usenko - wrote the original script

defunkt - the initial idea and code utilizing Map Builder's File IO Extension (used in previous version of this script)

NeoArmageddon - Map Builder Addon (used in previous version of this script)


Script

//
// dumpConfig.sqf
// Copyright (c) 2010 Denis Usenko, DenVdmj@gmail.com
// MIT-style license
//
// Modified by Pennyworth to write to file using ConfigDumpFileIO extension.

/*
======================================================================================

Dump config to the clipboard:

	[config HNDL, bool IncludeInheritedPropertiesFlag] call compile preprocessFileLineNumbers "dumpConfig.sqf"

This example put section CfgVehicles on the clipboard:

	[configFile >> "CfgVehicles"] call compile preprocessFileLineNumbers "dumpConfig.sqf"

This example will put on the clipboard class "RscDisplayArcadeUnit", all classes will contain all heritable properties, so you get a full and self-sufficient class, independent from the other classes.

	[configFile >> "RscDisplayArcadeUnit", true] call compile preprocessFileLineNumbers "dumpConfig.sqf"

More examples:

	[configFile >> "RscTitle", true] call compile preprocessFileLineNumbers "dumpConfig.sqf"
	[configFile >> "RscEdit", true] call compile preprocessFileLineNumbers "dumpConfig.sqf"
	[configFile >> "RscToolbox", true] call compile preprocessFileLineNumbers "dumpConfig.sqf"

Warning: don't attempt to get a large classes with switched on parameter "IncludeInheritedPropertiesFlag", eg don't do so:

	[configFile, true] call compile preprocessFileLineNumbers "dumpConfig.sqf"

Dump the entire config, it can take over ten seconds:

	[configFile] call compile preprocessFileLineNumbers "dumpConfig.sqf"

======================================================================================
*/

#define arg(x)		  (_this select (x))
#define argIf(x)		if(count _this > (x))
#define argIfType(x,t)  if(argIf(x)then{typeName arg(x) == (t)}else{false})
#define argSafe(x)	  argIf(x)then{arg(x)}
#define argOr(x,v)	  (argSafe(x)else{v})
#define push(a,v)	   (a)pushBack(v)

"ConfigDumpFileIO" callExtension format ["open:AiO.1.%1.%2.cpp", (productVersion select 2) % 100, productVersion select 3];

private _escapeString = {
	private _source = toArray _this;
	private _start = _source find 34;
	if(_start != -1) then {
		private _target = +_source;
		_target resize _start;
		for "_i" from _start to count _source - 1 do {
			private _charCode = _source select _i;
			push(_target, _charCode);
			if(_charCode isEqualTo 34) then {
				push(_target, _charCode);
			};
		};
		str toString _target;
	} else {
		str _this;
	};
};

private _collectInheritedProperties = {
	private _config = _this;
	private _propertyNameList = [];
	private _propertyNameLCList = [];
	while {
		private _className = configName _config;
		for "_i" from 0 to count _config - 1 do {
			private _propertyName = _config select _i;
			private _propertyNameLC = toLower configName _propertyName;
			if!(_propertyNameLC in _propertyNameLCList) then {
				push(_propertyNameList, _propertyName);
				push(_propertyNameLCList, _propertyNameLC);
			};
		};
		_className != "";
	} do {
		_config = inheritsFrom _config;
	};
	_propertyNameList;
};

private _dumpConfigTree = {
	private _includeInheritedProperties = argOr(1, false);
	private _specifyParentClass = argOr(2, !_includeInheritedProperties);

	private _result = [];
	private _indents = [""];
	private _depth = 0;
	
	private _pushLine = {
		if(_depth >= count _indents) then {
			_indents set [_depth, (_indents select _depth-1) + toString[9]];
		};
		_myString = (_indents select _depth) + (_this);
		"ConfigDumpFileIO" callExtension ("write:" +  _myString);
	};

	private _traverse = {
		private _confName = configName _this;
		if( isText _this ) exitwith {
			_confName + " = " + (getText _this call _escapeString) + ";" call _pushLine;
		};
		if( isNumber _this ) exitwith {
			_confName + " = " + str getNumber _this + ";" call _pushLine;
		};
		if( isArray _this ) exitwith {
			_confName + "[] = " + (getArray _this call _traverseArray) + ";" call _pushLine;
		};
		if( isClass _this ) exitwith {
			"class " + _confName + (
				configName inheritsFrom _this call {
					if( _this isEqualTo "" || !_specifyParentClass ) then { "" } else { ": " + _this }
				}
			) call _pushLine;
			"{" call _pushLine;
			if( _includeInheritedProperties ) then {
				_this = _this call _collectInheritedProperties;
			};
			_depth = _depth + 1;
			for "_i" from 0 to count _this - 1 do {
				_this select _i call _traverse
			};
			_depth = _depth - 1;
			"};" call _pushLine;
		};
	};
	
	private _traverseArray = {
		if(_this isEqualType []) exitwith {
			private _array = [];
			for "_i" from 0 to count _this - 1 do {
				push(_array, _this select _i call _traverseArray);
			};
			"{" + (_array joinString ", ") + "}";
		};
		if(_this isEqualType "") exitwith {
			_this call _escapeString;
		};
		str _this;
	};

	arg(0) call _traverse;
	
	"ConfigDumpFileIO" callExtension "close:yes";
	true
};

private _startTime = diag_tickTime;
private _finished = _this call _dumpConfigTree;
private _endTime = diag_tickTime;
hint format ["Ready\nNow get config from the ConfigDumpFileIO directory\ntime: %1", _endTime - _startTime];
false;

 

F. A. Q.

  • What is an All in One Config?
    • When you want to know how something works in Arma 3, you open the All in One Config with your favorite text editor, hit CTRL+F and search for the class you want to examine. That basically saves you from hours and hours of trial and error and/or unpacking all Arma 3 PBOs and checking every config.cpp one by one. - taken from NeoArmageddon's post here
  • Why use an extension?
    • It's necessary to use his extension when dumping large amounts of data, because starting with Arma 3 1.55+ strings had a maximum length of 10 million characters. That means that the previous method of copying the dump to your clipboard no longer works. While it's possible to work around this without an extension, it's just more simple and painless this way. As an example, the 1.63.16889 config dump was 31.8 million characters long.


Known Issues

  • Chinese characters (letters) are not displayed correctly in the config dump.
  • Like 13
  • Thanks 2

Share this post


Link to post
Share on other sites

The config dump for the Apex update (1.62) has been added. In the next few days I will also add dumps for addons as they are updated by their various authors.

Share this post


Link to post
Share on other sites

Thanks Pennyworth, 

 

I do the same thing but lost my sqf's....

Gotta rebuild em again, will use yours as my base this time around

Share this post


Link to post
Share on other sites

Thanks Pennyworth for this awesome tool.

 

For anyone else like me who is beginning to learn scripting etc here is the idiots guide:

 

1) As mentioned above download from https://github.com/pennyworth12345/ConfigDumpFileIO/releases

2) Move dumpconfig.sqf and ConfigDumpFileIO_x64.dll to Arma 3 root directory.

3) Load the ARMA 3 Launcher and be sure to select the Parameters --> Enable File-Patching and Disable Battle eye.

4) Launch ARMA 3 with the mods you want to dump

5) Run the script.

6) Find the dumped file in your ARMA 3 root directory.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
On 4/10/2017 at 4:13 PM, Mack. said:

Thanks Pennyworth for this awesome tool.

 

For anyone else like me who is beginning to learn scripting etc here is the idiots guide:

 

1) As mentioned above download from https://github.com/pennyworth12345/ConfigDumpFileIO/releases

2) Move dumpconfig.sqf and ConfigDumpFileIO_x64.dll to Arma 3 root directory.

3) Load the ARMA 3 Launcher and be sure to select the Parameters --> Enable File-Patching and Disable Battle eye.

4) Launch ARMA 3 with the mods you want to dump

5) Run the script.

6) Find the dumped file in your ARMA 3 root directory.

 

I followed this but no file is generated unless I'm missing something? I get no errors when executing the script, just the hint:

Quote

Ready

Now get config from the ConfigDumpFileIO

directory

time: 10.126

 

Am I doing something wrong?

Share this post


Link to post
Share on other sites

Expanding on point 5), in case anyone isn't sure about the exact method:

 

"Run the Script"

 

EDITOR 

Virtual Reality

Play Scenario (opens VR World with the Splendid Camera)

 

ESC key

In the Debug Console Execute window, paste:

[configFile] call compile preprocessFileLineNumbers "dumpConfig.sqf"

Click LOCAL EXE button

Wait for 20 seconds or more while the file is created

When the mouse receives focus back, 'Return to Eden Editor', then quit game.

 

The output file will be in the game root folder named "AiO.versionNumber.cpp".

 

Other config calls are available to produce output subsets. See the original post in Script <Hide Contents> for examples.

  • Like 1

Share this post


Link to post
Share on other sites

Has anyone run this for the latest Arma version? I can't seem to run this script, even with the extension installed. It hangs and then crashes my game everytime, and I don't even have that bad of a computer. I tried getting my friend to do it too who has a high end PC and it did the same for him too.

Share this post


Link to post
Share on other sites

Worked for me with latest build and lots of mods. Thanks for awesome info and files also. Much appreciated and very handy 

Share this post


Link to post
Share on other sites
7 hours ago, Rockapes said:

I do. What you need?

All of it.

Share this post


Link to post
Share on other sites

Lol... So you want all classnames etc. Will do in morning for you. At work right now

Share this post


Link to post
Share on other sites
1 hour ago, Rockapes said:

Lol... So you want all classnames etc. Will do in morning for you. At work right now

Already did it myself, thanks anyway.

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×