Jump to content
Sign in to follow this  
HaZZarD

custom loadout wont work in MP for non-host players

Recommended Posts

Waiting until the player variable exists works fine aslong as the code is being ran on the client where player variable can be valid.

So the main cause of the problem was that I was running it on the dedicated client as well, and because of that, the way that GDSN showed here

init.sqf
JIP = {

if (!isDedicated) then {

waitUntil {(!isNull player) && (player == player) && (time > 5)};

};

};

should work better?

That sounds somewhat weird (shouldn't the server be aware of the stuff people are carrying? And if not, why would running it on the dedicated server among others screw things up?), but I'll give it a try. Thanks guys.

Running the loadouts through a pre-init function (in the way I described in post 9) seems to have worked for us as well, at least so far.

Edited by Magirot

Share this post


Link to post
Share on other sites

Error with custom load-outs in coop

I'm new on the BI forums, so please bear with me. Apologies for digging up this thread,I've checked through the various threads on custom load-outs and this seems the closest to the issue I am having and the most recent, although it is not a dead-ringer. Needless to say if you know any existing forum posts or online resources that potentially cover the issue, do link it in your reply.

A friend and I have started playing with the editor to make some custom missions and play together in co-op. However, we have been having some major errors in getting custom load-outs for the starting squad to work. Initially we were trying to get custom load-outs by copying the load-out script into each units initialization box in editor from a notepad text file. This is an example of the sort of thing we were copying:

removeallweapons this; 
removeallassigneditems this; 
removebackpack this; 
removevest this; 
removeuniform this;
removeheadgear this;
this addVest 'V_mas_usr_PlateCarrierGL_rgr_g';
this addBackPack 'B_AssaultPack_rgr';
this addHeadgear 'H_mas_usn_Balaclava_ht_b';    
this addmagazine '30Rnd_mas_556x45_stanag';
this addWeapon 'arifle_mas_m4';   
this addPrimaryWeaponItem 'optic_mas_Arco_blk';
this addmagazine '30Rnd_mas_556x45_stanag';
this addmagazine '30Rnd_mas_556x45_stanag';
this addmagazine '30Rnd_mas_556x45_stanag';
this addmagazine '30Rnd_mas_556x45_stanag';
this addmagazine '30Rnd_mas_556x45_stanag';
this addmagazine '30Rnd_mas_556x45_stanag';
this addmagazine '30Rnd_mas_556x45_stanag';
this addmagazine '30Rnd_mas_556x45_T_stanag';
this addmagazine '30Rnd_mas_556x45_T_stanag';
this addmagazine '30Rnd_mas_556x45_T_stanag';
this addmagazine '30Rnd_mas_556x45_T_stanag';
this addmagazine '12Rnd_mas_45acp_Mag';
this addWeapon 'hgun_mas_acp_F';
this addmagazine '12Rnd_mas_45acp_Mag';
this addmagazine '12Rnd_mas_45acp_Mag';
this addmagazine '12Rnd_mas_45acp_Mag';
this addmagazine '12Rnd_mas_45acp_Mag';
this addmagazine '12Rnd_mas_45acp_Mag';
this addmagazine '12Rnd_mas_45acp_Mag';
this addmagazine '12Rnd_mas_45acp_Mag';
this additem 'nvgoggles';
this additem 'ItemWatch';
this additem 'ItemCompass';
this additem 'ItemMap';
this additem 'ItemRadio';
this additem 'itemgps';
this assignitem 'nvgoggles';
this assignitem 'ItemWatch';
this assignitem 'ItemCompass';
this assignitem 'ItemMap';
this assignitem 'ItemRadio';
this assignitem 'itemgps';
this addmagazine "handgrenade";
this addmagazine "handgrenade";
this addmagazine "handgrenade";
this addmagazine "handgrenade";
this addmagazine 'smokeshell';
this addmagazine 'smokeshell';
this addmagazine 'smokeshellgreen';
this addmagazine 'smokeshellgreen';
this addmagazine 'smokeshellred';
this addmagazine 'smokeshellred';
this addmagazine 'Chemlight_green'; 
this addmagazine 'Chemlight_green';
this addmagazine 'Chemlight_green';
this addweapon 'Binocular';
(unitBackpack this) addmagazineCargo ["DemoCharge_Remote_Mag",2];
this addUniform 'U_B_CombatUniform_mcam_worn';
this additem "FirstAidKit";
this additem "FirstAidKit";
this addGoggles 'shemagh_faceOD';

While in single player, or any preview with only one player, this load-out works perfectly. However, any friends joining cause errors in the load-out and commonly cause the host to have an empty vest and those joining to have empty backpacks. This error occurs only in multi-player.

Following this, we starting looking at putting the load-outs in .sqf files in the mission folders. Currently the .sqf file we are using for the test layout reads like so:

removeallweapons _this; 
removeallassigneditems _this; 
removebackpack _this; 
removevest _this; 
removeuniform _this;
removeheadgear _this;
removeGoggles _this;
_this addVest 'V_mas_usr_PlateCarrierGL_rgr_g';
_this addUniform 'U_B_CombatUniform_mcam_worn';
_this additem 'FirstAidKit';
_this additem 'FirstAidKit';
_this addGoggles 'shemagh_faceOD';
_this addHeadgear 'H_mas_usn_Balaclava_ht_b'; 
_this addweapon 'Binocular';
_this addmagazine '30Rnd_mas_556x45_stanag';
_this addWeapon 'arifle_mas_m4';     
_this addPrimaryWeaponItem 'optic_mas_Arco_blk';
_this addmagazine '30Rnd_mas_556x45_stanag';
_this addmagazine '30Rnd_mas_556x45_stanag';
_this addmagazine '30Rnd_mas_556x45_stanag';
_this addmagazine '30Rnd_mas_556x45_stanag';
_this addmagazine '30Rnd_mas_556x45_stanag';
_this addmagazine '30Rnd_mas_556x45_stanag';
_this addmagazine '30Rnd_mas_556x45_stanag';
_this addmagazine '30Rnd_mas_556x45_T_stanag';
_this addmagazine '30Rnd_mas_556x45_T_stanag';
_this addmagazine '30Rnd_mas_556x45_T_stanag';
_this addmagazine '30Rnd_mas_556x45_T_stanag';  
_this addbackpack 'B_AssaultPack_rgr';
(unitBackpack _this) addmagazineCargo ['handgrenade',3];
(unitBackpack _this) addmagazineCargo ['smokeshell',2];
(unitBackpack _this) addmagazineCargo ['smokeshellgreen',2];
(unitBackpack _this) addmagazineCargo ['smokeshellred',2];
(unitBackpack _this) addmagazineCargo ['Chemlight_green',3]; 
(unitBackpack _this) addmagazineCargo ['DemoCharge_Remote_Mag',2]; 
_this addmagazine '12Rnd_mas_45acp_Mag';
_this addWeapon 'hgun_mas_acp_F';
_this addmagazine '12Rnd_mas_45acp_Mag';
_this addmagazine '12Rnd_mas_45acp_Mag';
_this addmagazine '12Rnd_mas_45acp_Mag';
_this addmagazine '12Rnd_mas_45acp_Mag';
_this addmagazine '12Rnd_mas_45acp_Mag';
_this addmagazine '12Rnd_mas_45acp_Mag';
_this addmagazine '12Rnd_mas_45acp_Mag';
_this additem 'nvgoggles';
_this additem 'ItemWatch';
_this additem 'ItemCompass';
-this additem 'ItemMap';
_this additem 'ItemRadio';
_this additem 'itemgps';
_this assignitem 'nvgoggles';
_this assignitem 'ItemWatch';
_this assignitem 'ItemCompass';
-this assignitem 'ItemMap';
-this assignitem 'ItemRadio';
_this assignitem 'itemgps';

We then put the command:

init_Handle = this execVM "test.sqf";

into the units initialisation box. Initially, this seemed much more successful. However two major problems have arisen. Firstly, the watch, compass and NVGs are not equipped at the start of the game and the map, radio and GPS are missing entirely. Secondly, using the same command above in multiple unit init boxes seems not to work after the first unit. This usually results in missing uniform and large chunks of gear, particularly magazines, being absent.

We've spent quite some time trying to troubleshoot the problem on our own and despite having looked at the issue for a long time, it is still quite difficult to articulate the problem and figure out what is just a byproduct of the error! To anyone able to offer help or advice, many thanks in advance.

Share this post


Link to post
Share on other sites

This guys is really unbelievable to me, this problem is there since months now, no magazines, no uniforms and still nothing official to fix this...........

We need something official to make custom gear not a pain in the A$$ , there are too many troubles even using methods that try to go around this problem.

What is the point of having all these nice custom gears in AIII if then in the missions you make as soon as you make custom gear you run in troubles.......

Guys we must organize something , a petition, a ticket with lot of votes I don't know but the Devs must check this problem

Share this post


Link to post
Share on other sites

Agree this is getting very tiresome these issue should have been fixed in ALPHA / BETA not on full release Come on BIS sort this stuff out!!!!

Share this post


Link to post
Share on other sites

Many thanks Major_Shepard, we were definitely missing that script. We did in fact go back to the LEA just after my initial post, and while it is not foolproof it does solve the immediate uniform/vest/backpack problem. We will soon compare the LEA script to our own hand written script, I will post again if we have any useful progress to share.

HaZZard, I agree entirely, its madness that it requires so many workarounds and so much trial and error simply to set up custom load-outs. Lets hope it is featured in a patch soon.

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  

×