PMC websites shut down November 13th 2025 unless web hosting fees are paid. See up to date status from PMC Website Hosting and Domain Registration Fee Status forum topic. Please Support PMC to help keep these websites online.

Enjoyed or found this pages content useful, please Support PMC to help me keep this web page online beyond November 13th 2025 when web hosting fees are due.

User Tools

Site Tools


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

This is an old revision of the document!


Extract Class Names with SQF

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.1436770048.txt.gz · Last modified: 2015/07/13 06:47 by snakeman