Jump to content
Sign in to follow this  
CastorWillis

Custom Designed Markers for Map

Recommended Posts

Hi guys/gals,

I have been trying to put custom markers into the CfgMarkers folder to no avail. I do realise that the idea is fraught with danger, perhaps even impossibilities, however that is not something that has stopped me so far.

I am hoping that someone here could lend some thoughts, suggestions or help in general.

We are running a server through WOMBAT servers in Australia. They provide the core server files. We have got a A3Wasteland server running with ATM's, persistent players, custom load outs, Indy whitelist, etc... The server is pretty bug free...

I found the CfgMarkers folder inside a3\Curator\Addons\ui_f_curator.PBO\Data

Inside the ui_f_curator.PBO there is also a config.bin file, a %prefix% file, a TexHeader.bin file and three folders; Data (with CfgMarkers inside), Objects and UI.

Inside the CfgMarkers folder there are 3 .paa files. minefield_ca.paa , minefieldap_ca.paa , kia_ca.paa

I want to add 3 more markers named cgeneralstore_ca.paa , cgunstore_ca.paa and cvehiclestore_ca.paa

I first unpacked the ui_f_curator.PBO and placed inside the CfgMarkers folder my 3 new custom markers as above.

I checked the config.bin file after converting it to .cpp and found the following section of code relating to the original .paa files found in CfgMarkers:

class CfgMarkers
{
class KIA
{
	name="$STR_A3_CfgMarkers_KIA_0";
	icon="\a3\Ui_F_Curator\Data\CfgMarkers\kia_ca.paa";
	color[]={0,0,0,1};
	shadow=0;
	scope=1;
	size=29;
};
       class Minefield
{
	name="$STR_A3_CfgMarkers_Minefield_0";
	icon="\a3\Ui_F_Curator\Data\CfgMarkers\minefield_ca.paa";
	color[]={0.89999998,0,0,1};
	shadow=0;
	scope=1;
	size=29;
};
class MinefieldAP: Minefield
{
	name="$STR_A3_CfgMarkers_MinefieldAP_0";
	icon="\a3\Ui_F_Curator\Data\CfgMarkers\minefieldAP_ca.paa";
};
};

So I added the following lines to the above code and then repacked the config.cpp file back into a config.bin file using CfgConvert.

class CfgMarkers
{
class KIA
{
	name="$STR_A3_CfgMarkers_KIA_0";
	icon="\a3\Ui_F_Curator\Data\CfgMarkers\kia_ca.paa";
	color[]={0,0,0,1};
	shadow=0;
	scope=1;
	size=29;
};
class Cgeneralstore
{
	name="$STR_A3_CfgMarkers_Cgeneralstore_0";
	icon="\a3\Ui_F_Curator\Data\CfgMarkers\cgeneralstore_ca.paa";
	color[]={0,0,0,1};
	shadow=0;
	scope=1;
	size=29;
};
class Cgunstore
{
	name="$STR_A3_CfgMarkers_Cgunstore_0";
	icon="\a3\Ui_F_Curator\Data\CfgMarkers\cgunstore_ca.paa";
	color[]={0,0,0,1};
	shadow=0;
	scope=1;
	size=29;
};
class Cvehiclestore
{
	name="$STR_A3_CfgMarkers_Cvehiclestore_0";
	icon="\a3\Ui_F_Curator\Data\CfgMarkers\cvehiclestore_ca.paa";
	color[]={0,0,0,1};
	shadow=0;
	scope=1;
	size=29;
};
class Minefield
{
	name="$STR_A3_CfgMarkers_Minefield_0";
	icon="\a3\Ui_F_Curator\Data\CfgMarkers\minefield_ca.paa";
	color[]={0.89999998,0,0,1};
	shadow=0;
	scope=1;
	size=29;
};
class MinefieldAP: Minefield
{
	name="$STR_A3_CfgMarkers_MinefieldAP_0";
	icon="\a3\Ui_F_Curator\Data\CfgMarkers\minefieldAP_ca.paa";
};
};

I also found some binarized code inside the TexHeader.bin file relating to the original .paa files. To cut a long story short, I found that if you delete the TexHeader.bin file and then repack the PBO using BinPBO PERSONAL EDTION then it will recreate a TexHeader.bin file with the new custom .paa files included. So this I did.

I also found a $PREFIX$ file with the following line only:

a3\ui_f_curator

I changed this to:

a3\Curator\Addons\ui_f_curator

So now I had an unpacked ui_f_curator.PBO folder with the following inside:

1. Data folder - Inside this I had a CfgMarkers folder (among others) with my 3 new .paa files inside.

2. Objects folder

3. UI folder

4. config.bin

5. $PREFIX$ file

I then created a new key using DSCreateKey.

I then packed the ui_f_curator folder into a .PBO using the ADDON BUILDER from the ARMA 3 TOOLBOX

I set the options to binarize, add signature, clear temp folder and used the following file types in the "List of files to copy directly" section:

*.pac;*.cpp;*.paa;*.rtm;*.sqf;*.sqs;*.bikb;*.fsm;*.wss;*.ogg;*.wav;*.fxy;*.csv;*.html;*.lip;*.txt;*.bisurf ;*.sqm;*.ext;*.dbf;*.prj;*.shx;*.shp

The ui_f_curator.PBO was packed along with a ui_f_curator.pbo.a3.bisign key file.

I unpacked the ui_f_curator.PBO to check that everything was correct, and sure enough the TexHeader file had been created with the inclusion of references to my 3 new files.

So I then unpacked my A3Wasteland_v1.0b.Altis.PBO and went client\functions\createGeneralStoreMarkers.sqf and found the following code within:

// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
//	@file Version: 1.0
//	@file Name: createGeneralStoreMarkers.sqf
//	@file Author: [404] Deadbeat, [404] Costlyy
//	@file Created: 28/11/2012 05:19
//	@file Args:

//Creates the markers around general stores.
{
if (!isPlayer _x && {["GenStore", vehicleVarName _x] call fn_startsWith}) then
{
	_npcPos = getPosATL _x;

	// General store title
	_markerName = format["marker_shop_title_%1",_x];
	deleteMarkerLocal _markerName;
	_marker = createMarkerLocal [_markerName, _npcPos];
	_markerName setMarkerShapeLocal "ICON";
	_markerName setMarkerTypeLocal "mil_dot";
	_markerName setMarkerColorLocal "ColorBlue";
	_markerName setMarkerSizeLocal [1,1];
	_markerName setMarkerTextLocal "General Store";
};
} forEach entities "CAManBase";

I then altered it as follows:

// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
//	@file Version: 1.0
//	@file Name: createGeneralStoreMarkers.sqf
//	@file Author: [404] Deadbeat, [404] Costlyy
//	@file Created: 28/11/2012 05:19
//	@file Args:

//Creates the markers around general stores.
{
if (!isPlayer _x && {["GenStore", vehicleVarName _x] call fn_startsWith}) then
{
	_npcPos = getPosATL _x;

	// General store title
	_markerName = format["marker_shop_title_%1",_x];
	deleteMarkerLocal _markerName;
	_marker = createMarkerLocal [_markerName, _npcPos];
	_markerName setMarkerShapeLocal "ICON";
	_markerName setMarkerTypeLocal "Cgeneralstore";
	_markerName setMarkerColorLocal "ColorBlue";
	_markerName setMarkerSizeLocal [1,1];
	_markerName setMarkerTextLocal "";
};
} forEach entities "CAManBase";

I did this also for the createVehicleStore.sqf file.

The createGunStore.sqf file was a little different. It was originally:

// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
//	@file Version: 1.0
//	@file Name: createGunStoreMarkers.sqf
//	@file Author: [404] Deadbeat, [404] Costlyy, [GoT] JoSchaap
//	@file Args:

_radius = 70;
_status = [];
_gunStores = [];
_col_empty = "ColorYellow";
_col_enemy = "ColorRed";
_col_friendly = "ColorGreen";
_col_mixed = "ColorOrange";

//Creates the markers around gunstores.
{
if (!isPlayer _x && {["GunStore", vehicleVarName _x] call fn_startsWith}) then
{
	_npcPos = getPosATL _x;

	if (["A3W_showGunStoreStatus"] call isConfigOn) then
	{
		// Circle zone
		_markerName = format["marker_shop_zone_%1",_x];
		deleteMarkerLocal _markerName;
		_marker = createMarkerLocal [_markerName, _npcPos];
		_markerName setMarkerShapeLocal "ELLIPSE";
		_markerName setMarkerColorLocal _col_empty;
		_markerName setMarkerSizeLocal [_radius, _radius];
		_markerName setMarkerBrushLocal "Grid";
		_markerName setMarkerAlphaLocal 0.5;
	};

	/*
	// Gun store title
	_markerName = format["marker_shop_title_%1",_x];
	deleteMarkerLocal _markerName;
	_marker = createMarkerLocal [_markerName, _npcPos];
	_markerName setMarkerShapeLocal "ICON";
	_markerName setMarkerTypeLocal "mil_dot";
	_markerName setMarkerColorLocal "ColorRed";
	_markerName setMarkerSizeLocal [1,1];
	_markerName setMarkerTextLocal "WEAPONS MARKET";
	*/

	// Gun store description
	_markerName = format["marker_shop_desc_%1",_x];
	deleteMarkerLocal _markerName;
	// _npcPos set [1, (_npcPos select 1) - 100];
	_marker = createMarkerLocal [_markerName, _npcPos];
	_markerName setMarkerShapeLocal "ICON";
	_markerName setMarkerTypeLocal "mil_dot";
	_markerName setMarkerColorLocal _col_empty;
	_markerName setMarkerSizeLocal [1,1];
	_markerName setMarkerTextLocal "WEAPONS MARKET";
	// _markerName setMarkerAlphaLocal 0.5;

	_status pushBack "EMPTY";

	_gunStores pushBack _x;
};
} forEach entities "CAManBase";

//Used to set the status of each store.
_setStatus =
{
if(_status select (_this select 0) == (_this select 1)) exitWith {};

_markerNameZone = format ["marker_shop_zone_%1", _gunStores select (_this select 0)];
_markerNameDescription = format ["marker_shop_desc_%1", _gunStores select (_this select 0)];
switch(_this select 1) do {
	case "EMPTY": {
		_markerNameZone setmarkerColorLocal _col_empty;
		_markerNameDescription setmarkerColorLocal _col_empty;
		_markerNameDescription setMarkerTextLocal "WEAPONS MARKET";
	};
	case "ENEMY": {
		_markerNameZone setmarkerColorLocal _col_enemy;
		_markerNameDescription setmarkerColorLocal _col_enemy;
		_markerNameDescription setMarkerTextLocal "WEAPONS MARKET (Enemies)";
	};
	case "FRIENDLY": {
		_markerNameZone setmarkerColorLocal _col_friendly;
		_markerNameDescription setmarkerColorLocal _col_friendly;
		_markerNameDescription setMarkerTextLocal "WEAPONS MARKET (Allies)";
	};
	case "MIXED": {
		_markerNameZone setmarkerColorLocal _col_mixed;
		_markerNameDescription setmarkerColorLocal _col_mixed;
		_markerNameDescription setMarkerTextLocal "WEAPONS MARKET (Enemies and Allies)";
	};
};

if (["A3W_gunStoreIntruderWarning"] call isConfigOn) then
{
	if((_this select 2) && ((_this select 1) in ["ENEMY", "MIXED"])) then {
		hintSilent parseText format ["<t size='2' color='#ff0000'>%1</t><br/><br/>%2.","BE WARY DANIEL-SAN!!!","Enemy Ninja just entered the area! STAY FROSTY!!"];
	};
};

_status set [_this select 0, _this select 1];
};

if (["A3W_showGunStoreStatus"] call isConfigOn) then
{
//Check each store to see if their state has changed and then calls the update function to make the display the correct state.
showmarkers = true;
while {showmarkers} do
{
	{
		_npc = _x;
		_friendlyCount = 0;
		_enemyCount = 0;

		{
			if (isPlayer _x && alive _x && _x distance _npc < _radius) then
			{
				if ((side group _x == playerSide && playerSide in [bLUFOR,OPFOR]) || group _x == group player) then
				{
					_friendlyCount = _friendlyCount + 1;
				}
				else
				{
					_enemyCount = _enemyCount + 1;
				};
			};
		} forEach playableUnits;

		if (player distance _npc < _radius) then
		{
			if(_enemyCount > 0) then
			{
				if (_friendlyCount > 0) then
				{
					[_forEachIndex, "MIXED", true] call _setStatus;
				}
				else
				{
					[_forEachIndex, "ENEMY", true] call _setStatus;
				};
			}
			else
			{
				[_forEachIndex, "FRIENDLY", true] call _setStatus;
			};
		}
		else
		{
			if (_enemyCount > 0) then
			{
				if (_friendlyCount > 0) then
				{
					[_forEachIndex, "MIXED", false] call _setStatus;
				}
				else
				{
					[_forEachIndex, "ENEMY", false] call _setStatus;
				};
			}
			else
			{
				if (_friendlyCount > 0) then
				{
					[_forEachIndex, "FRIENDLY", false] call _setStatus;
				}
				else
				{
					[_forEachIndex, "EMPTY", false] call _setStatus;
				};
			};
		};
	} forEach _gunStores;

	sleep 1;
};
};

So I changed it to:

// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
//	@file Version: 1.0
//	@file Name: createGunStoreMarkers.sqf
//	@file Author: [404] Deadbeat, [404] Costlyy, [GoT] JoSchaap
//	@file Args:

_radius = 70;
_status = [];
_gunStores = [];
_col_empty = "ColorYellow";
_col_enemy = "ColorRed";
_col_friendly = "ColorGreen";
_col_mixed = "ColorOrange";

//Creates the markers around gunstores.
{
if (!isPlayer _x && {["GunStore", vehicleVarName _x] call fn_startsWith}) then
{
	_npcPos = getPosATL _x;

	if (["A3W_showGunStoreStatus"] call isConfigOn) then
	{
		// Circle zone
		_markerName = format["marker_shop_zone_%1",_x];
		deleteMarkerLocal _markerName;
		_marker = createMarkerLocal [_markerName, _npcPos];
		_markerName setMarkerShapeLocal "ELLIPSE";
		_markerName setMarkerColorLocal _col_empty;
		_markerName setMarkerSizeLocal [_radius, _radius];
		_markerName setMarkerBrushLocal "Grid";
		_markerName setMarkerAlphaLocal 0.5;
	};

	/*
	// Gun store title
	_markerName = format["marker_shop_title_%1",_x];
	deleteMarkerLocal _markerName;
	_marker = createMarkerLocal [_markerName, _npcPos];
	_markerName setMarkerShapeLocal "ICON";
	_markerName setMarkerTypeLocal "Cgunstore";
	_markerName setMarkerColorLocal "ColorRed";
	_markerName setMarkerSizeLocal [1,1];
	_markerName setMarkerTextLocal "";
	*/

	// Gun store description
	_markerName = format["marker_shop_desc_%1",_x];
	deleteMarkerLocal _markerName;
	// _npcPos set [1, (_npcPos select 1) - 100];
	_marker = createMarkerLocal [_markerName, _npcPos];
	_markerName setMarkerShapeLocal "ICON";
	_markerName setMarkerTypeLocal "Cgunstore";
	_markerName setMarkerColorLocal _col_empty;
	_markerName setMarkerSizeLocal [1,1];
	_markerName setMarkerTextLocal "";
	// _markerName setMarkerAlphaLocal 0.5;

	_status pushBack "EMPTY";

	_gunStores pushBack _x;
};
} forEach entities "CAManBase";

//Used to set the status of each store.
_setStatus =
{
if(_status select (_this select 0) == (_this select 1)) exitWith {};

_markerNameZone = format ["marker_shop_zone_%1", _gunStores select (_this select 0)];
_markerNameDescription = format ["marker_shop_desc_%1", _gunStores select (_this select 0)];
switch(_this select 1) do {
	case "EMPTY": {
		_markerNameZone setmarkerColorLocal _col_empty;
		_markerNameDescription setmarkerColorLocal _col_empty;
		_markerNameDescription setMarkerTextLocal "";
	};
	case "ENEMY": {
		_markerNameZone setmarkerColorLocal _col_enemy;
		_markerNameDescription setmarkerColorLocal _col_enemy;
		_markerNameDescription setMarkerTextLocal "Enemies";
	};
	case "FRIENDLY": {
		_markerNameZone setmarkerColorLocal _col_friendly;
		_markerNameDescription setmarkerColorLocal _col_friendly;
		_markerNameDescription setMarkerTextLocal "Allies";
	};
	case "MIXED": {
		_markerNameZone setmarkerColorLocal _col_mixed;
		_markerNameDescription setmarkerColorLocal _col_mixed;
		_markerNameDescription setMarkerTextLocal "Enemies and Allies";
	};
};

if (["A3W_gunStoreIntruderWarning"] call isConfigOn) then
{
	if((_this select 2) && ((_this select 1) in ["ENEMY", "MIXED"])) then {
		hintSilent parseText format ["<t size='2' color='#ff0000'>%1</t><br/><br/>%2.","BE WARY DANIEL-SAN!!!","Enemy Ninja just entered the area! STAY FROSTY!!"];
	};
};

_status set [_this select 0, _this select 1];
};

if (["A3W_showGunStoreStatus"] call isConfigOn) then
{
//Check each store to see if their state has changed and then calls the update function to make the display the correct state.
showmarkers = true;
while {showmarkers} do
{
	{
		_npc = _x;
		_friendlyCount = 0;
		_enemyCount = 0;

		{
			if (isPlayer _x && alive _x && _x distance _npc < _radius) then
			{
				if ((side group _x == playerSide && playerSide in [bLUFOR,OPFOR]) || group _x == group player) then
				{
					_friendlyCount = _friendlyCount + 1;
				}
				else
				{
					_enemyCount = _enemyCount + 1;
				};
			};
		} forEach playableUnits;

		if (player distance _npc < _radius) then
		{
			if(_enemyCount > 0) then
			{
				if (_friendlyCount > 0) then
				{
					[_forEachIndex, "MIXED", true] call _setStatus;
				}
				else
				{
					[_forEachIndex, "ENEMY", true] call _setStatus;
				};
			}
			else
			{
				[_forEachIndex, "FRIENDLY", true] call _setStatus;
			};
		}
		else
		{
			if (_enemyCount > 0) then
			{
				if (_friendlyCount > 0) then
				{
					[_forEachIndex, "MIXED", false] call _setStatus;
				}
				else
				{
					[_forEachIndex, "ENEMY", false] call _setStatus;
				};
			}
			else
			{
				if (_friendlyCount > 0) then
				{
					[_forEachIndex, "FRIENDLY", false] call _setStatus;
				}
				else
				{
					[_forEachIndex, "EMPTY", false] call _setStatus;
				};
			};
		};
	} forEach _gunStores;

	sleep 1;
};
};

I then packed the mission .PBO and put all of my work into a single folder for organisational reasons.

At this stage I created a copy of the folder and unpacked all my work for review. It was all as I have laid out above. Tick for being diligent huh!

So, I took the plunge and uploaded my 2 new .PBO's and the .bikey file. The files I uploaded are as follows:

A3Wasteland_v1.0b.Altis.pbo

ui_f_curator.pbo

ui_f_curator.pbo.knight.bikey

EDIT* I also put the public key (knight.bikey) into the keys folder in the main directory of the folder.

And with a fingers crossed attitude I hit the server "START" option. The server kicked off.

I then booted up Arma 3 and watched as it started loading; so did my eyebrows as the anxiety built up. The Multiplayer option was selected and I held my breath as the servers started populating the screen...

BUT ALAS!! My server never showed up! I felt like a teenager being stood up on one of my first dates...

Can ANYONE help shed some light on where any possible slips/oversights/outright screw-ups may be? Has anyone else ever tried what I have attempted? If so, was there any success?

As of yet, I have not found any sites that have the above attempt.

I would dearly like to achieve this with out the use of external addons.

Any help would be absolutely and greatly appreciated. ;)

Thanks guys/gals..

Castor

Edited by CastorWillis

Share this post


Link to post
Share on other sites

Coincidentally, I was trying myself to add custom markers to A3W just an hour ago, and it turns out you can't do it without external addons (adding CfgMarkers in description.ext doesn't work). Even if you add them to a server-side PBO, anybody connecting to your server will need to have the same changes on their machine, otherwise they will get "config.bin/xxxxx not found" messages and won't see the custom markers.

Share this post


Link to post
Share on other sites

From the Rev no less.... In that case, I will bow out gracefully! lol

Thanks for taking the time to read my post, it was a bit lengthy in retrospect.

Time to shift into addon territory me thinks!

Thanks again.

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
Sign in to follow this  

×