Jump to content
groshnak

Sector Control module created marker names?

Recommended Posts

Hey!

Could someone tell me how they are named? I need to hide some of them because they clutter the map so much when placed over towns.

Thank you!

Share this post


Link to post
Share on other sites
Hey!

Could someone tell me how they are named? I need to hide some of them because they clutter the map so much when placed over towns.

Thank you!

Nobody?

Don't think there is even a command for it, getmarkername or such :/

Share this post


Link to post
Share on other sites
Nobody?

Don't think there is even a command for it, getmarkername or such :/

To answer myself, the command to find them is hint format ["Nearest is %1", allmapmarkers] and they are named as follows:

"BIS_fnc_modulesector_area1835: <no shape>" <- This is the area marker, numbers seem random with little logic (so good luck with this...) the <no shape> is part of the marker name. Mind the space there.

"bis_fnc_modulesector_icontextSECTORNAME" <- Text after the sector icon (where sectorname is the name of your sector module)

"bis_fnc_modulesector_iconSECTORNAME" <- The big icon (where sectorname is the name of your sector module)

Someone could add this to some wiki :rolleyes:

Now could someone tell me how to do things with the sector control module HUD icons? I need to show/hide them depending on distance.

Edited by Groshnak

Share this post


Link to post
Share on other sites

The Marker for a sectors area are held in a variable called "marker" on the trigger, it is an array of [area marker, icon marker]. The trigger is held in a variable on the sector called "areas".

For example lets say you have named your sector S1 when you placed it in the editor and you have only set it up with one capture area (trigger).

//Get areas from sector
_areas = S1 getVariable "areas";
//Get a reference to the trigger of this area
_trigger = _areas select 0;
//Get the marker for this trigger
_trigMarker = (_trigger getVariable "markers") select 0;
//Hide the marker
_trigMarker setMarkerAlpha 0;

A list of all sector modules is kept in global variable called "BIS_fnc_moduleSector_sectors" so if you wanted to hide all area markers you could do something like

{
_sector = _x;
{
	_trigger = _x;
	_markerArea = (_trigger getVariable "markers") select 0;
	_markerArea setMarkerAlpha 0;
}forEach (_sector getVariable "areas");
}forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");

Now could someone tell me how to do things with the sector control module HUD icons? I need to show/hide them depending on distance.

The HUD icons seem to be updated dependent on the "BIS_fnc_moduleSector_sectors" variable. Removing them from this removes them from the display. Will need to be put through some testing to make sure it does not mess anything else up but....

h = [] spawn {
while {true} do {
	_toHide = [];
	{
		_sector = _x;
		if (player distance _sector > 10) then {
			_toHide set [count _toHide, _sector];
			_h = _sector spawn {
				waitUntil {player distance _this < 10};
				missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") + [_this]];
			};
		};
	}forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");
	missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") - _toHide];
};
};

Quickly tested in the editor from the debug console makes them disappear when you are greater than 10m and brings them back when you get in range again.

  • Like 3

Share this post


Link to post
Share on other sites
The Marker for a sectors area are held in a variable called "marker" on the trigger, it is an array of [area marker, icon marker]. The trigger is held in a variable on the sector called "areas".

For example lets say you have named your sector S1 when you placed it in the editor and you have only set it up with one capture area (trigger).

//Get areas from sector
_areas = S1 getVariable "areas";
//Get a reference to the trigger of this area
_trigger = _areas select 0;
//Get the marker for this trigger
_trigMarker = (_trigger getVariable "markers") select 0;
//Hide the marker
_trigMarker setMarkerAlpha 0;

A list of all sector modules is kept in global variable called "BIS_fnc_moduleSector_sectors" so if you wanted to hide all area markers you could do something like

{
_sector = _x;
{
	_trigger = _x;
	_markerArea = (_trigger getVariable "markers") select 0;
	_markerArea setMarkerAlpha 0;
}forEach (_sector getVariable "areas");
}forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");

The HUD icons seem to be updated dependent on the "BIS_fnc_moduleSector_sectors" variable. Removing them from this removes them from the display. Will need to be put through some testing to make sure it does not mess anything else up but....

h = [] spawn {
while {true} do {
	_toHide = [];
	{
		_sector = _x;
		if (player distance _sector > 10) then {
			_toHide set [count _toHide, _sector];
			_h = _sector spawn {
				waitUntil {player distance _this < 10};
				missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") + [_this]];
			};
		};
	}forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");
	missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") - _toHide];
};
};

Quickly tested in the editor from the debug console makes them disappear when you are greater than 10m and brings them back when you get in range again.

Thanks a million!

How could i make it show/hide the task with the HUD icons, so when you get close to a sector it will give you a task and show the hud marker? I could run this from init.sqf for each player with something simple like 'execvm "sectorcheck.sqf"' and then it would run on every client?

Share this post


Link to post
Share on other sites

Hi there @Larrow,

 

could you explain how to manipulate the "Sector Control"-module's created HUD at the top-right area of the screen, which displays the module's "Designation"-field's input (a single letter), please?

 

_designation = sectorVarName getVariable "designation";

 

I would like to change the letter via script (initServer.sqf), but it seems to be too advanced for my knowledge. I tried to get infos from the module's function and looked through the config viewer, but can't even say for sure, if I focused on the right stuff there.

 

Thanks a lot!

 

EDIT:

 

It seems to work with the following code:

Is it the right way to do, tho? :D

 

sectorVarName setVariable ["Designation","X"] ;
[sectorVarName,"BIS_fnc_moduleSector_sector"] call Bis_fnc_objectVar;

Share this post


Link to post
Share on other sites

I know this thread was for addressing the map markers, but on the topic of changing sector control functions, how would one proceed with organising the tasks for it? I was trying to sort things so each sector task was sorted into primary objectives parent ID, as opposed to being separate when my secondary objectives are organised in such a manner. 

 

On another note, is it possible to remove the sector control briefing tab too?

Share this post


Link to post
Share on other sites
On 8/29/2014 at 1:12 PM, Larrow said:

The Marker for a sectors area are held in a variable called "marker" on the trigger, it is an array of [area marker, icon marker]. The trigger is held in a variable on the sector called "areas".

For example lets say you have named your sector S1 when you placed it in the editor and you have only set it up with one capture area (trigger).

 


//Get areas from sector
_areas = S1 getVariable "areas";
//Get a reference to the trigger of this area
_trigger = _areas select 0;
//Get the marker for this trigger
_trigMarker = (_trigger getVariable "markers") select 0;
//Hide the marker
_trigMarker setMarkerAlpha 0;
 

 

A list of all sector modules is kept in global variable called "BIS_fnc_moduleSector_sectors" so if you wanted to hide all area markers you could do something like

 


{
_sector = _x;
{
	_trigger = _x;
	_markerArea = (_trigger getVariable "markers") select 0;
	_markerArea setMarkerAlpha 0;
}forEach (_sector getVariable "areas");
}forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");
 

 

The HUD icons seem to be updated dependent on the "BIS_fnc_moduleSector_sectors" variable. Removing them from this removes them from the display. Will need to be put through some testing to make sure it does not mess anything else up but....

 


h = [] spawn {
while {true} do {
	_toHide = [];
	{
		_sector = _x;
		if (player distance _sector > 10) then {
			_toHide set [count _toHide, _sector];
			_h = _sector spawn {
				waitUntil {player distance _this < 10};
				missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") + [_this]];
			};
		};
	}forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");
	missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") - _toHide];
};
};
 

Quickly tested in the editor from the debug console makes them disappear when you are greater than 10m and brings them back when you get in range again.

 

Larrow, I know it has been some time since this thread was active, but wanted to pick your brain as I have failed to find a solution...

 

I have successfully changed map icons for Sectors, but never their 3DIcons.

For the below Sector HUD Icons how do you go about changing their looks? 
a7b9743e36.png

 

I know how to change designation and how to hide them. but I would like to change said HUD Icons so they are the same as the Map Icons I already changed below:
6cffb0f656.png 

 

Iterating through allVariables for a sector produces the below variables:

Quote

L Bravo 2-3:1 REMOTE,["finalized","pos","tasks","designation","bis_fnc_moduleinit_status","bis_fnc_initmodules_activate","owner","bis_fnc_initmodules_priroty","sidescore","contested","areas","flags","#var","sides"]

 

None of which seems to correlate to changing the HUD Icons.

Share this post


Link to post
Share on other sites
On 12/27/2021 at 12:12 AM, Lockheed Martin said:

I would like to change said HUD Icons so they are the same as the Map Icons I already changed below

See... \a3\ui_f\scripts\igui\rscmissionstatus.sqf

 

Where you will find two sections...

line 55: //--- Show 3D sector icons

line 339: //--- Process sectors

 

Where the first section deals with the 3D icon, the one on the left in your picture.

This could possibly be easy to change by looking at the contents of missionnamespace getvariable ["RscMissionStatus_sectors3D",[]]

 

The second deals with the UI on the right.

Not so easy to change without a lot of effort.

Force the number of sectors above 7 and change RscMissionStatus_sectorDistance so as no sectors show.

Then use the section just before this //--- Show custom slots to make it show your own textures.

Copy the foreach _sectors section input your own texture and use custom slots to display it.

Maybe :shrug:would need experimenting with.

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
On 12/31/2021 at 11:25 PM, Larrow said:

See... \a3\ui_f\scripts\igui\rscmissionstatus.sqf

 

Where you will find two sections...

line 55: //--- Show 3D sector icons

line 339: //--- Process sectors

 

Where the first section deals with the 3D icon, the one on the left in your picture.

This could possibly be easy to change by looking at the contents of missionnamespace getvariable ["RscMissionStatus_sectors3D",[]]

 

The second deals with the UI on the right.

Not so easy to change without a lot of effort.

Force the number of sectors above 7 and change RscMissionStatus_sectorDistance so as no sectors show.

Then use the section just before this //--- Show custom slots to make it show your own textures.

Copy the foreach _sectors section input your own texture and use custom slots to display it.

Maybe :shrug:would need experimenting with.

 

 

Thank you so so much for this! I have been looking forever for a solution to this issue, you are a lifesaver. I was able to implement a check through MissionEventHandler using "Draw3D" to successfully change these icons to what I needed!

 

In regards to the second question of dealing with the UI on the right, I am just now diving into that, is there by chance any Event Handler for when a UI Element is drawn on your screen aka one of the right-hand side Slots for the sectors?

 

Also:

 

Digging through RscMissionStatus.sqf I see it interacts with the Slots in question:

_display = _this select 0;
            _slots = [
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT1,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT2,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT3,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT4,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT5,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT6,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT7,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT8,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT9,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT0
            ];
            _slotTexts = [
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT1TEXT,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT2TEXT,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT3TEXT,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT4TEXT,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT5TEXT,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT6TEXT,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT7TEXT,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT8TEXT,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT9TEXT,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT0TEXT
            ];
            _slotBackgrounds = [
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT1BACKGROUND,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT2BACKGROUND,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT3BACKGROUND,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT4BACKGROUND,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT5BACKGROUND,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT6BACKGROUND,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT7BACKGROUND,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT8BACKGROUND,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT9BACKGROUND,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT0BACKGROUND
            ];
            _slotProgresses = [
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT1PROGRESS,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT2PROGRESS,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT3PROGRESS,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT4PROGRESS,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT5PROGRESS,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT6PROGRESS,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT7PROGRESS,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT8PROGRESS,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT9PROGRESS,
                _display displayctrl IDC_RSCMISSIONSTATUS_SLOT0PROGRESS
            ];

Are you able to fetch user display then loop through these slots?

Attempting not to hide the original slots like you showcase up in this thread, as this would mean I would have to remake the features of a progress bar upon capturing a sector and flashing when capturing. Both of which I would not be confident in my skill replicating/remaking them.

Share this post


Link to post
Share on other sites
3 hours ago, Lockheed Martin said:

is there by chance any Event Handler for when a UI Element is drawn on your screen aka one of the right-hand side Slots for the sectors?

MissionEventHandler of OnEachFrame ? and then check the slots texture and change if necessary? May cause a blinking effect, again would need experimenting with.

There is no onDraw (only for map control) or onUpdate or anything like that.

 

Btw these IDC_RSCMISSIONSTATUS_# can be found in \a3\ui_f\hpp\defineresincldesign.inc and used by including said file into your script.

Just makes life easier to reference these UI elements.

  • Thanks 1

Share this post


Link to post
Share on other sites
4 hours ago, Lockheed Martin said:

Are you able to fetch user display then loop through these slots?

Spoiler

#include "\a3\ui_f\hpp\defineresincldesign.inc"

_textures = [
	[ "o_installation" call BIS_fnc_textureMarker, "someNewTexture" ], //East
	[ "b_installation" call BIS_fnc_textureMarker, "someNewTexture" ], //West
	[ "n_installation" call BIS_fnc_textureMarker, "someNewTexture" ], //Idep
	[ "n_installation" call BIS_fnc_textureMarker, "someNewTexture" ], //Civillian
	[ "u_installation" call BIS_fnc_textureMarker, "someNewTexture"  ] //SideUnknown
];

_display = uiNamespace getVariable "RscMissionStatus";

{
	_slot = _display displayCtrl _x;
	_currentTexture = ctrlText _slot;
	
	if !( _currentTexture isEqualTo "" ) then {
		_textureData = _textures select{ _x select 0 == _currentTexture } select 0;
		if !( isNil "_textureData" ) then {
			_textureData params[ "", "_newTexture" ];
			_slot ctrlSetText _newTexture;
		};
	};
}forEach[
	IDC_RSCMISSIONSTATUS_SLOT1, 
	IDC_RSCMISSIONSTATUS_SLOT2, 
	IDC_RSCMISSIONSTATUS_SLOT3, 
	IDC_RSCMISSIONSTATUS_SLOT4, 
	IDC_RSCMISSIONSTATUS_SLOT5, 
	IDC_RSCMISSIONSTATUS_SLOT6, 
	IDC_RSCMISSIONSTATUS_SLOT7, 
	IDC_RSCMISSIONSTATUS_SLOT8, 
	IDC_RSCMISSIONSTATUS_SLOT9, 
	IDC_RSCMISSIONSTATUS_SLOT0
];

untested, just as an example

 

  • Thanks 1

Share this post


Link to post
Share on other sites
17 hours ago, Larrow said:
  Hide contents


#include "\a3\ui_f\hpp\defineresincldesign.inc"

_textures = [
	[ "o_installation" call BIS_fnc_textureMarker, "someNewTexture" ], //East
	[ "b_installation" call BIS_fnc_textureMarker, "someNewTexture" ], //West
	[ "n_installation" call BIS_fnc_textureMarker, "someNewTexture" ], //Idep
	[ "n_installation" call BIS_fnc_textureMarker, "someNewTexture" ], //Civillian
	[ "u_installation" call BIS_fnc_textureMarker, "someNewTexture"  ] //SideUnknown
];

_display = uiNamespace getVariable "RscMissionStatus";

{
	_slot = _display displayCtrl _x;
	_currentTexture = ctrlText _slot;
	
	if !( _currentTexture isEqualTo "" ) then {
		_textureData = _textures select{ _x select 0 == _currentTexture } select 0;
		if !( isNil "_textureData" ) then {
			_textureData params[ "", "_newTexture" ];
			_slot ctrlSetText _newTexture;
		};
	};
}forEach[
	IDC_RSCMISSIONSTATUS_SLOT1, 
	IDC_RSCMISSIONSTATUS_SLOT2, 
	IDC_RSCMISSIONSTATUS_SLOT3, 
	IDC_RSCMISSIONSTATUS_SLOT4, 
	IDC_RSCMISSIONSTATUS_SLOT5, 
	IDC_RSCMISSIONSTATUS_SLOT6, 
	IDC_RSCMISSIONSTATUS_SLOT7, 
	IDC_RSCMISSIONSTATUS_SLOT8, 
	IDC_RSCMISSIONSTATUS_SLOT9, 
	IDC_RSCMISSIONSTATUS_SLOT0
];

untested, just as an example

 

Thank you so much for the explanation for iterating through each slot. Was successful using this to change the icons to what I desired. My method however isn't fool proof, what would be a method of hiding these slots from showing only whilst VisibleMap?

Do see the flickering issue you have mentioned, and understand need to create custom slots instead to fix this. Appreciate your help with these sector questions, been a long time searching!

Share this post


Link to post
Share on other sites

EXAMPLE_MISSION

 

Spoiler

Description.ext


class CfgFunctions {
	#include "LM\RscMissionStatus\functions\functions.fncs"
};

#include "LM\RscMissionStatus\ui\RscMissionStatus.gui"


class RscTitles {
	#include "LM\RscMissionStatus\ui\RscMPProgress.gui"
};

Here we include a new UI in RscMissionStatus.gui. It is a complete copy of the original BI UI other than it has been renamed to RscMissionStatus_LM (LM for Lockheed Martin).

 

We include in RscTitles a new UI for RscMPProgress which is the holder for RscMissionStatus. Here there have been several changes

  • The class name to RscMPProgress_LM
  • All script references to RscMissionStatus_LM
  • MPProgress to point to our new UI RscMissionStatus_LM

class RscMPProgress_LM
{
	idd=-1;
	duration=9.9999998e+010;
	fadeIn=0;
	scriptName="RscMissionStatus_LM";
	scriptPath="IGUI";
	onLoad="[""onLoad"",_this,""RscMissionStatus_LM"",'IGUI'] call 	(uinamespace getvariable 'BIS_fnc_initDisplay')";
	onUnload="[""onUnload"",_this,""RscMissionStatus_LM"",'IGUI'] call 	(uinamespace getvariable 'BIS_fnc_initDisplay')";
	class controls
	{
		class MPProgress: RscMissionStatus_LM
		{
		};
	};
};

We then have CfgFunctions...


class RscMissionStatus_LM {
	tag = "LM";
	class Displays {
		file = "LM\RscMissionStatus\functions";
		class RscMissionStatus {};
		class RscMissionStatus_init { postInit = 1; };
	};
};

Which defines two functions...

LM_fnc_RscMissionStatus which is a copy of the original BI script.

Where I have changed the name of the uiNamespace variable that holds a reference to the display (our new one) RscMissionStatus_LM_display.

The name of the draw3Dicon event to RscMissionStatus_LM_draw3D.

The name of the variable that holds the sector icons to RscMissionStatus_LM_sectors3D.

Also pointed any script reference to our new script RscMIssionStatus_LM_script. See init below where the new function is copied into uinamespace.

 

At line 185 you will find the textures that for testing I have changed to the destroy type, and are where you fill in whatever texture you want for each side...


//Change these to required texture for each side
_textures = [
	"loc_destroy" call bis_fnc_textureMarker, //East
	"loc_destroy" call bis_fnc_textureMarker, //West
	"loc_destroy" call bis_fnc_textureMarker, //Independent
	"loc_destroy" call bis_fnc_textureMarker, //Civilian
	"loc_destroy" call bis_fnc_textureMarker  //SideUnknown
];

None of the other variables names have been changed so as to keep compatibility with the rest of its function eg, showing scores, tickets, respawns, custom slots and time etc.

 

Then finally we have LM_fnc_RscMissionStatus_init which starts automatically at mission start (postInit = 1).


private _nul = [] spawn {

	//Wait for mission to start and original RscMissionStatus is shown
	waitUntil{ time > 0 && !isNil { uiNamespace getVariable "RscMissionStatus" } };

	//Close original RscMissionStatus UI
	uiNamespace getVariable "RscMissionStatus" closeDisplay 1;

	//Cancel Original draw3d sector icons event
	removeMissionEventHandler[ "draw3D", missionNamespace getVariable "RscMissionStatus_draw3D" ];

	//Copy new function to uinamespace
	uiNamespace setVariable[ "RscMissionStatus_LM_script", LM_fnc_RscMissionStatus ];

	//Show new version of RscMPProgress
	[ "RscMissionStatus_LM" ] call BIS_fnc_rscLayer cutRsc["RscMPProgress_LM","PLAIN"];
};

Hopefully, the comments here explain what is happening.

 

7 hours ago, Lockheed Martin said:

what would be a method of hiding these slots from showing only whilst VisibleMap

As it is now a new function of our design you can change whatever you want in it to function however you need.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 1/4/2022 at 4:01 AM, Larrow said:

EXAMPLE_MISSION

 

  Hide contents

Description.ext



class CfgFunctions {
	#include "LM\RscMissionStatus\functions\functions.fncs"
};

#include "LM\RscMissionStatus\ui\RscMissionStatus.gui"


class RscTitles {
	#include "LM\RscMissionStatus\ui\RscMPProgress.gui"
};

Here we include a new UI in RscMissionStatus.gui. It is a complete copy of the original BI UI other than it has been renamed to RscMissionStatus_LM (LM for Lockheed Martin).

 

We include in RscTitles a new UI for RscMPProgress which is the holder for RscMissionStatus. Here there have been several changes

  • The class name to RscMPProgress_LM
  • All script references to RscMissionStatus_LM
  • MPProgress to point to our new UI RscMissionStatus_LM


class RscMPProgress_LM
{
	idd=-1;
	duration=9.9999998e+010;
	fadeIn=0;
	scriptName="RscMissionStatus_LM";
	scriptPath="IGUI";
	onLoad="[""onLoad"",_this,""RscMissionStatus_LM"",'IGUI'] call 	(uinamespace getvariable 'BIS_fnc_initDisplay')";
	onUnload="[""onUnload"",_this,""RscMissionStatus_LM"",'IGUI'] call 	(uinamespace getvariable 'BIS_fnc_initDisplay')";
	class controls
	{
		class MPProgress: RscMissionStatus_LM
		{
		};
	};
};

We then have CfgFunctions...



class RscMissionStatus_LM {
	tag = "LM";
	class Displays {
		file = "LM\RscMissionStatus\functions";
		class RscMissionStatus {};
		class RscMissionStatus_init { postInit = 1; };
	};
};

Which defines two functions...

LM_fnc_RscMissionStatus which is a copy of the original BI script.

Where I have changed the name of the uiNamespace variable that holds a reference to the display (our new one) RscMissionStatus_LM_display.

The name of the draw3Dicon event to RscMissionStatus_LM_draw3D.

The name of the variable that holds the sector icons to RscMissionStatus_LM_sectors3D.

Also pointed any script reference to our new script RscMIssionStatus_LM_script. See init below where the new function is copied into uinamespace.

 

At line 185 you will find the textures that for testing I have changed to the destroy type, and are where you fill in whatever texture you want for each side...



//Change these to required texture for each side
_textures = [
	"loc_destroy" call bis_fnc_textureMarker, //East
	"loc_destroy" call bis_fnc_textureMarker, //West
	"loc_destroy" call bis_fnc_textureMarker, //Independent
	"loc_destroy" call bis_fnc_textureMarker, //Civilian
	"loc_destroy" call bis_fnc_textureMarker  //SideUnknown
];

None of the other variables names have been changed so as to keep compatibility with the rest of its function eg, showing scores, tickets, respawns, custom slots and time etc.

 

Then finally we have LM_fnc_RscMissionStatus_init which starts automatically at mission start (postInit = 1).



private _nul = [] spawn {

	//Wait for mission to start and original RscMissionStatus is shown
	waitUntil{ time > 0 && !isNil { uiNamespace getVariable "RscMissionStatus" } };

	//Close original RscMissionStatus UI
	uiNamespace getVariable "RscMissionStatus" closeDisplay 1;

	//Cancel Original draw3d sector icons event
	removeMissionEventHandler[ "draw3D", missionNamespace getVariable "RscMissionStatus_draw3D" ];

	//Copy new function to uinamespace
	uiNamespace setVariable[ "RscMissionStatus_LM_script", LM_fnc_RscMissionStatus ];

	//Show new version of RscMPProgress
	[ "RscMissionStatus_LM" ] call BIS_fnc_rscLayer cutRsc["RscMPProgress_LM","PLAIN"];
};

Hopefully, the comments here explain what is happening.

 

As it is now a new function of our design you can change whatever you want in it to function however you need.

This is more than I could ask for!

I've dug through this for a few hours, I've noticed however no errors on init but when calling missionnamespace variables such as "RscMissionStatus_sectors3D" their values populate but whereas calling "RscMissionStatus_LM_sectors3D" returns empty.

When you tested the mission did you see the 3D Icons and Side Bar? As in-game I do not see them present (waypoint in picture is Sector location):

 

Seems this is taking affect, but incorrect somewheres. Thank you and I apologize, as stated this is still well over my head for troubleshooting.
1dbbc3aecb.jpg

 

[[B Alpha 1-1:1 (Lockheed Martin),[4095.76,4195.67,0],"A","\A3\ui_f\data\map\markers\nato\b_installation.paa",[0,0.3,0.6,1]]]

766886f01d.jpg

0cb82470b6.jpg

Share this post


Link to post
Share on other sites
29 minutes ago, Lockheed Martin said:

whereas calling "RscMissionStatus_LM_sectors3D" returns empty.

When you tested the mission did you see the 3D Icons and Side Bar? As in-game I do not see them present:

Dont know what to suggest, example mission works fine for me...

A3_LM_Sectors.png?raw=1

  • Thanks 1

Share this post


Link to post
Share on other sites
On 1/5/2022 at 5:30 AM, Larrow said:

Dont know what to suggest, example mission works fine for me...

A3_LM_Sectors.png?raw=1

 

I apologize, when I initially tried this it was very late, got the better of myself and screwed something up.

Thank you one last time for all your help! Your solution in-fact worked, for my mission I simply forgot to update the filepath in functions.fncs. 3D Icons and Slots are now updating correctly to desired images!
For your demo mission, just reset the files, suspect I messed something up experimenting or maybe it was a mod acting up.

  • Like 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

×