Jump to content

Recommended Posts

I need help setting up roles and classes. I still keep getting an error that the roles are not loading up, and so its switching to the default. 

 

Things I've tried V

Spoiler

class CfgRespawnInventory
 {
 
    class CfgRoles
 {
      class Test
      {
           displayName = "Test";
           icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
      };
 };
 
      class WEST1
      {
           displayName = "Light"; // Name visible in the menu
           icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Icon displayed next to the name
           role = "Test";
 
           // Loadout definition, uses same entries as CfgVehicles classes
           weapons[] = {
                "arifle_MXC_F",
                "Binocular"
           };
           magazines[] = {
                "30Rnd_65x39_caseless_mag",
                "30Rnd_65x39_caseless_mag",
                "SmokeShell"
           };
           items[] = {
                "FirstAidKit"
           };
           linkedItems[] = {
                "V_Chestrig_khk",
                "H_Watchcap_blk",
                "optic_Aco",
                "acc_flashlight",
                "ItemMap",
                "ItemCompass",
                "ItemWatch",
                "ItemRadio"
           };
           uniformClass = "U_B_CombatUniform_mcam_tshirt";
           backpack = "B_AssaultPack_mcamo";
      };
      class WEST2
      {
           // Alternative configuration pointing to a CfgVehicles class. Loadout will be copied from it.
           vehicle = "B_soldier_AR_F"
      };
 };

class CfgRespawnInventory
 {
 
 
 
      class WEST1
      {
           displayName = "Light"; // Name visible in the menu
           icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Icon displayed next to the name
           role = "Test";
 
           // Loadout definition, uses same entries as CfgVehicles classes
           weapons[] = {
                "arifle_MXC_F",
                "Binocular"
           };
           magazines[] = {
                "30Rnd_65x39_caseless_mag",
                "30Rnd_65x39_caseless_mag",
                "SmokeShell"
           };
           items[] = {
                "FirstAidKit"
           };
           linkedItems[] = {
                "V_Chestrig_khk",
                "H_Watchcap_blk",
                "optic_Aco",
                "acc_flashlight",
                "ItemMap",
                "ItemCompass",
                "ItemWatch",
                "ItemRadio"
           };
           uniformClass = "U_B_CombatUniform_mcam_tshirt";
           backpack = "B_AssaultPack_mcamo";
      };
      class WEST2
      {
           // Alternative configuration pointing to a CfgVehicles class. Loadout will be copied from it.
           vehicle = "B_soldier_AR_F"
      };
 };

   class CfgRoles
 {
      class Test
      {
           displayName = "Test";
           icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
      };
 };

 

 

 

https://community.bistudio.com/wiki/Arma_3_Respawn:_New_Respawn_Screen

 

 

And the only thing in my mission init is ... [missionNamespace,["WEST1",5,10]] call BIS_fnc_addRespawnInventory;

Share this post


Link to post
Share on other sites

what error? Can you copy paste the lines from rpt files (error)?

Share this post


Link to post
Share on other sites
50 minutes ago, pierremgi said:

what error? Can you copy paste the lines from rpt files (error)?

 

It just says role not defined. There are no errors, Or well is the orange writing at the bottom an actual error? Because that is all its telling me.

Share this post


Link to post
Share on other sites

OK, Try with cfgRoles apart, not included in cfgRespawnInventory. (Two different classes. CfgRoles is not a sub class).

cfgRoles then cfgRespawnInventoriy

Share this post


Link to post
Share on other sites
57 minutes ago, pierremgi said:

OK, Try with cfgRoles apart, not included in cfgRespawnInventory. (Two different classes. CfgRoles is not a sub class).

cfgRoles then cfgRespawnInventoriy

 

I should of separated the blocks of code, but anyway ive tried loading cfgRoles before the cfgRespawnInventory. But yes, running them as two separate classes doesn't work either.

Share this post


Link to post
Share on other sites

I changed the name to Description.ext... notice the capital D.  But now i get errors that im missing a ; on the first line of my init.sqf. I only have one line of code in there, and its

 [missionNamespace,["WEST1",5,10]] call BIS_fnc_addRespawnInventory;

 

Share this post


Link to post
Share on other sites

This worked for me after quickly testing:
 

description.ext

Spoiler

class CfgRoles {
	class Test {
		displayName = "Test";
		icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
	};
};

class CfgRespawnInventory {
	class WEST1 {
		displayName = "Light"; // Name visible in the menu
		icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Icon displayed next to the name
		role = "Test";
 
		// Loadout definition, uses same entries as CfgVehicles classes
		weapons[] = {
			"arifle_MXC_F",
			"Binocular"
		};
		magazines[] = {
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"SmokeShell"
		};
		items[] = {
			"FirstAidKit"
		};
		linkedItems[] = {
			"V_Chestrig_khk",
			"H_Watchcap_blk",
			"optic_Aco",
			"acc_flashlight",
			"ItemMap",
			"ItemCompass",
			"ItemWatch",
			"ItemRadio"
		};
		uniformClass = "U_B_CombatUniform_mcam_tshirt";
		backpack = "B_AssaultPack_mcamo";
	};
	class WEST2 {
		// Alternative configuration pointing to a CfgVehicles class. Loadout will be copied from it.
		vehicle = "B_soldier_AR_F"
	};
};

 

 

init.sqf

Spoiler

[missionNamespace, ["WEST1", 5, 10]] call BIS_fnc_addRespawnInventory;
[missionNamespace, ["WEST2", 5, 10]] call BIS_fnc_addRespawnInventory;

 

 

And then, the respawn settings I was testing with:

respawn = 2;
respawnOnStart = 1;
respawnDelay = 30;
respawnTemplates[] = {"MenuInventory","MenuPosition"};

 

Share this post


Link to post
Share on other sites
3 minutes ago, HallyG said:

This worked for me after quickly testing:
 

description.ext

  Hide contents


class CfgRoles {
	class Test {
		displayName = "Test";
		icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
	};
};

class CfgRespawnInventory {
	class WEST1 {
		displayName = "Light"; // Name visible in the menu
		icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Icon displayed next to the name
		role = "Test";
 
		// Loadout definition, uses same entries as CfgVehicles classes
		weapons[] = {
			"arifle_MXC_F",
			"Binocular"
		};
		magazines[] = {
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"SmokeShell"
		};
		items[] = {
			"FirstAidKit"
		};
		linkedItems[] = {
			"V_Chestrig_khk",
			"H_Watchcap_blk",
			"optic_Aco",
			"acc_flashlight",
			"ItemMap",
			"ItemCompass",
			"ItemWatch",
			"ItemRadio"
		};
		uniformClass = "U_B_CombatUniform_mcam_tshirt";
		backpack = "B_AssaultPack_mcamo";
	};
	class WEST2 {
		// Alternative configuration pointing to a CfgVehicles class. Loadout will be copied from it.
		vehicle = "B_soldier_AR_F"
	};
};

 

 

init.sqf

  Hide contents


[missionNamespace, ["WEST1", 5, 10]] call BIS_fnc_addRespawnInventory;
[missionNamespace, ["WEST2", 5, 10]] call BIS_fnc_addRespawnInventory;

 

 

And then, the respawn settings I was testing with:


respawn = 2;
respawnOnStart = 1;
respawnDelay = 30;
respawnTemplates[] = {"MenuInventory","MenuPosition"};

 

 

Alrighty, well i just copied your setting and now its working. Thanks, i was plugging in all the settings through the Eden editor.

Share this post


Link to post
Share on other sites

Hey is there a way to give the load outs you have assigned with (vehicle = "blah"), a custom role? apparently adding ( role = "test" ) doesn't move the machine gunner to test.

Share this post


Link to post
Share on other sites

I think the most important part is having "MenuInventory" in the respawnTemplates array.

 

I don't think so, I believe it is either or since it copies the loadout from cfgVehicles.

Edited by HallyG

Share this post


Link to post
Share on other sites

Well so i have automated the pulling of vehicle classes from groups.... 

 

This in your init puts every infantry unit from the U S army into one role.

configs = [
	(configFile >> "CfgGroups" >> "Indep" >> "LIB_US_ARMY" >> "Infantry"),
	1,
	false
] call BIS_fnc_returnChildren select {inheritsFrom _x isEqualTo (configFile >> "Man")};

loadouts = [];
{loadouts pushBack getText (_x >> 'vehicle')} forEach configs; 
publicVariable "loadouts";

{ 
[resistance,[_x]] call BIS_fnc_addRespawnInventory;
} forEach loadouts;

 

I would very much like to at least give different factions different roles. IF i were to add more infantry groups, then they would all be under the same role, and under the same name. Which i think we can all agree, is less ideal than just going through every config and copying their loadout by hand.

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

×