User Tools

Site Tools


arma2:config:extract-class-names-with-sqf

ArmA 2 Extract Class Names with SQF

ArmA 2 Forum, ArmA 2 Home, ArmA 2 Config, ArmA 2 File Formats, ArmA 2 Missions, ArmA 2 3D Modeling, ArmA 2 Scripting, ArmA 2 Terrain, ArmA 2 Texturing, ArmA 2 Tools

Here is excellent way to extract Class Names and the class descriptions from config.cpp using SQF script and RPT log.

SQF:

private["_getClassList"];
 
_getClassList =
{
	private["_type", "_name", "_cfg", "_n", "_class"];
 
	_type = _this select 0;
	_name = _this select 1;
 
	diag_log "";
	diag_log "";
	diag_log format["**ArmA 2 Combined Operations - %1**", _type];
	diag_log "";
	diag_log "^ Class Name ^ Name ^";
 
	_cfg = configFile >> _type;
	_n = 0;
	for "_i" from 0 to count _cfg - 1 do
	{
		_class = _cfg select _i;
		if (isClass _class) then
		{
			_n = _n + 1;
			diag_log format ["| %1 | %2 |", configName _class, getText (_class >> _name)];
		};
	};
};
 
["CfgMusic", "name"] call _getClassList;
["CfgWeapons", "displayName"] call _getClassList;
["CfgVehicles", "displayName"] call _getClassList;

Then just open RPT and clean out “ character's and you are ready to drop in the data into dokuwiki.

arma2/config/extract-class-names-with-sqf.txt · Last modified: 2024/08/01 17:04 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.