Jump to content
Sign in to follow this  
araxiel

Respawn loadout such as in "Defend Kamino"

Recommended Posts

Edit:

I just stumbled upon this: http://community.bistudio.com/wiki/Arma_3_Respawn#MenuInventory

It's exactly what I'm looking for. I thought I searched enough before I wrote this, but it seems like it didn't.

/Edit

So me and a friend had great fun with the "Defend Kamino" mission.

Now I'm planning on making a similar mission of my own and I really love the "loadout" feature; how you can see and (potentially) chose different loadouts and unlock new ones down the road.

However, I have no clue on how the heck this is done, since it seems to be new to Arma.

Is there a connection with the description.ext and its class Weapons?

So if someone could please elaborate on how this feature can be implemented in custom missions would be really great.

If only I could extract the mission itself and look how it's made; but for some weird reasons BI is not letting players look at how the missions are made, which seems really weird to me considering how forthcoming BI is when it comes to the community and custom content.

Edited by Araxiel

Share this post


Link to post
Share on other sites

The page you linked to already describes the configuration. Loadout menu is a respawn template called MenuInventory. Templates are are defined in Description.ext:

respawnTemplates[] = {"MenuInventory"};

Available loadouts can be set using CfgRespawnInventory class also in Description.ext (see expandable code in the template info, right below the picture). You can either define every item separately, or you can simply link to an existing unit class and the loadout will be copied from it.

Share this post


Link to post
Share on other sites

Thanks, I was a bit confused for a bit on how the respawnTemplates work.

Is there a way to randomize the load out slightly? Or is there a way to load the loadout from another script file?

Also, I found the a Gameplay module called "Mode - Defense (beta)" and it seems it's the one used in Defend Kamino. How exactly does it work?

Share this post


Link to post
Share on other sites

I would like to know this as well. It would be great to have a look at the mission files for "defend kamino" however, I cant extract the pbo

Share this post


Link to post
Share on other sites

I am trying to make a similar mission to Defend Kamino, using both the "defense" module and the respawn templates.

I already managed to create two respawn points and the menu to choose them, but then to create the templates I just can't make it work. The menu does appear, but there are no options to choose.

This is the code I am using, and I am unable to see why the templates do not appear in the respawn menu. I am using predefined classes for the time being, not custom templates:

Description.ext

respawn = "BASE";
respawnDelay = 15;
respawnDialog = 1;
respawnTemplates[] = {"MenuInventory","MenuPosition"};







class CfgRespawnInventory
{
class WEST1
{
	vehicle = "B_soldier_SL_F"
};
class WEST2
{
	vehicle = "B_soldier_AR_F"
};
class WEST3
{
	vehicle = "B_soldier_LAT_F"
};
class WEST4
{
	vehicle = "B_medic_F"
};

class WEST5
{
	vehicle = "B_soldier_exp_F"
};
class WEST6
{
	vehicle = "B_soldier_M_F"
};
};

Then, for the defense module I have this configuration:

http://i.imgur.com/O1BoIaa.jpg (166 kB)

(the links that go down from OF and BF are for a second sector-area-trigger cluster)

But when previewing it's giving me this error:

Error: BIS_fnc_moduleMPTypeDefense -- No enemy sides synchronized to Defense mission type

What am I missing? And how do I spawn the different waves of enemies?

Share this post


Link to post
Share on other sites
I am trying to make a similar mission to Defend Kamino, using both the "defense" module and the respawn templates.

I already managed to create two respawn points and the menu to choose them, but then to create the templates I just can't make it work. The menu does appear, but there are no options to choose.

This is the code I am using, and I am unable to see why the templates do not appear in the respawn menu. I am using predefined classes for the time being, not custom templates:

Description.ext

respawn = "BASE";
respawnDelay = 15;
respawnDialog = 1;
respawnTemplates[] = {"MenuInventory","MenuPosition"};







class CfgRespawnInventory
{
class WEST1
{
	vehicle = "B_soldier_SL_F"
};
class WEST2
{
	vehicle = "B_soldier_AR_F"
};
class WEST3
{
	vehicle = "B_soldier_LAT_F"
};
class WEST4
{
	vehicle = "B_medic_F"
};

class WEST5
{
	vehicle = "B_soldier_exp_F"
};
class WEST6
{
	vehicle = "B_soldier_M_F"
};
};

Then, for the defense module I have this configuration:

http://i.imgur.com/O1BoIaa.jpg (166 kB)

(the links that go down from OF and BF are for a second sector-area-trigger cluster)

But when previewing it's giving me this error:

What am I missing? And how do I spawn the different waves of enemies?

I'm having the same issue.

Share this post


Link to post
Share on other sites

After reverse engineering the Defend Kamino mission, I have narrowed down the necessary components to making the loadout menu work.

Firstly, you can find the mission under \Addons\missions_f_beta\a3\missions_f_beta\MPScenarios\MP_COOP_m04.Stratis

I found that the key to making the menu work properly are the: unlock.sqf, initServer.sqf, cfgRespawnInventory.hpp, and a gameplay mode defense module placed somewhere in the editor.

This is unlock.sqf.

EDIT: I've pruned off some of the unnecessary code, I think the switch statement could also be replaced if you wanted all the classes to be accessible from the start of the mission.


switch BIS_fnc_moduleMPTypeDefense_tier do {
case 0: {
	[west,"WEST1"] call bis_fnc_addrespawninventory;
	[resistance,"GUER1"] call bis_fnc_addrespawninventory;
};
case 1: {
};
case 2: {
	BIS_arty_2 call _sync;
	[west,"WEST2"] call bis_fnc_addrespawninventory;
	[resistance,"GUER2"] call bis_fnc_addrespawninventory;
};
case 3: {
	BIS_cas_3 call _sync;
};
case 4: {
	BIS_arty_2 call _sync;
	[west,"WEST3"] call bis_fnc_addrespawninventory;
	[resistance,"GUER3"] call bis_fnc_addrespawninventory;
};
case 5: {

};
case 6: {
	BIS_arty_2 call _sync;
};
case 7: {

};
};

This chunk of initServer.sqf is the only nessasary part. I'm no coding expert, but near as I can tell this calls the function RespawnMenuInventory for all playable characters.

[west,resistance,"unlock.sqf"] call bis_fnc_tridentExecute;

{
[_x,objnull] call bis_fnc_respawnMenuInventory;
_x addmpeventhandler [
	"mprespawn",
	{
		if !(isplayer (_this select 0)) then {
			_this call bis_fnc_respawnMenuInventory;
		};
	}
];
} foreach (playableunits + switchableunits);

I've got no idea what I'm doing when it comes to code, but from what I've found this code is only called when bis_fnc_tridentExecute (this either is or is called by the defense module from what I can tell) has been placed in the mission.

Can anyone tell me what I could use as an alternate to "call bis_fnc_tridentExecute" that will execute on mission startup? I've tried several functions, but none seem to work, or maybe I was just doing it wrong.

Edited by KareemOWheat

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  

×