kilo1-1 1 Posted April 18, 2014 You put that wherever you put your addUniform beforehand.If you haven't, I'd put it either into their init-lines (the easy way), or create a script that adds the uniforms to specific units (the flexible and powerful way). (Just in case, I'm not implying, but we're clear on the fact that UNIT means the name of the unit and "UNIFORM" means the classname of the unit. You have to put them in for yourself.) It doesn't seem to be working correctly. It seems like the randomizer script is overwriting whatever I have set for my PMCs guys in their init lines. I tried using "removeuniform this;" to try to counteract that but that doesn't seem to be working. Here is what I have in my init line: removeUniform this; [[{}, a1 addUniform "U_PMC_CombatUniformRS_SSBPBB"], "BIS_fnc_spawn", true] call BIS_fnc_MP; Here is one of the scripts that randomizes their gear loadouts from the .pbo, which seems to be overwriting your code. if (isServer) then { waitUntil {!isNull _this}; }; _magazines = magazines _this; _items = items _this; // Medkits, ToolKits etc. _assitems = assignedItems _this; // NVG's, GPS etc. Removeuniform _this; Removevest _this; removeAllItems _this; _uniform = (ceil (random 28)); switch (_uniform ) do { case 1: { _this adduniform "U_PMC_CombatUniformRS_BSGPBB"; }; case 2: { _this adduniform "U_PMC_CombatUniformRS_BSGPSB"; }; case 3: { _this adduniform "U_PMC_CombatUniformRS_BSSPBB"; }; case 4: { _this adduniform "U_PMC_CombatUniformRS_BSSPSB"; }; case 5: { _this adduniform "U_PMC_CombatUniformRS_GSBPBB"; }; case 6: { _this adduniform "U_PMC_CombatUniformRS_GSSPBB"; }; case 7: { _this adduniform "U_PMC_CombatUniformRS_IndPBSBB"; }; case 8: { _this adduniform "U_PMC_CombatUniformRS_SSBPBB"; }; case 9: { _this adduniform "U_PMC_CombatUniformRS_SSGPBB"; }; case 10: { _this adduniform "U_PMC_CombatUniformRS_SSGPSB"; }; case 11: { _this adduniform "U_PMC_CombatUniformRS_ChckDBS_GPSB"; }; case 12: { _this adduniform "U_PMC_CombatUniformRS_ChckLB_GPBB"; }; case 13: { _this adduniform "U_PMC_CombatUniformRS_ChckLR_SPBB"; }; case 14: { _this adduniform "U_PMC_CombatUniformRS_ChckP_BPBB"; }; case 15: { _this adduniform "U_PMC_CombatUniformLS_BSGPBB"; }; case 16: { _this adduniform "U_PMC_CombatUniformLS_BSGPSB"; }; case 17: { _this adduniform "U_PMC_CombatUniformLS_BSSPBB"; }; case 18: { _this adduniform "U_PMC_CombatUniformLS_BSSPSB"; }; case 19: { _this adduniform "U_PMC_CombatUniformLS_GSBPBB"; }; case 20: { _this adduniform "U_PMC_CombatUniformLS_GSSPBB"; }; case 21: { _this adduniform "U_PMC_CombatUniformLS_IndPBSBB"; }; case 22: { _this adduniform "U_PMC_CombatUniformLS_SSBPBB"; }; case 23: { _this adduniform "U_PMC_CombatUniformLS_SSGPBB"; }; case 24: { _this adduniform "U_PMC_CombatUniformLS_SSGPSB"; }; case 25: { _this adduniform "U_PMC_CombatUniformLS_ChckDBS_GPSB"; }; case 26: { _this adduniform "U_PMC_CombatUniformLS_ChckLB_GPBB"; }; case 27: { _this adduniform "U_PMC_CombatUniformLS_ChckLR_SPBB"; }; case 28: { _this adduniform "U_PMC_CombatUniformLS_ChckP_BPBB"; }; }; //------------ Body Armour ------------ _armour = (ceil (random 6)); switch (_armour ) do { case 1: { _this addvest "V_PlateCarrier1_PMC_rgr"; }; case 2: { _this addvest "V_PlateCarrier1_PMC_blk"; }; case 3: { _this addvest "V_PlateCarrier1_PMC_marpat"; }; case 4: { _this addvest "V_PlateCarrier1_PMC_khki"; }; case 5: { _this addvest "V_PlateCarrierInd_PMC_blk"; }; case 6: { _this addvest "V_PlateCarrierInd_PMC_grn"; }; }; Removeheadgear _this; //------------ Helmet/Hat ------------ _hat = (ceil (random 4)); switch (_hat ) do { case 1: { _this addheadgear "H_Cap_pmc"; }; case 2: { _this addheadgear "H_Cap_tan_pmc"; }; case 3: { _this addheadgear "H_HelmetB_plain_blk"; }; case 4: {}; }; {_this addItem _x} forEach _items; {_this addMagazine _x} forEach _magazines; {_this addItem _x} forEach _assitems; {_this assignItem _x} forEach _assitems; Share this post Link to post Share on other sites
Belbo 462 Posted April 18, 2014 (edited) It doesn't seem to be working correctly. It seems like the randomizer script is overwriting whatever I have set for my PMCs guys in their init lines. I tried using "removeuniform this;" to try to counteract that but that doesn't seem to be working. I might redirect you to this: https://community.bistudio.com/wiki/Functions_Library_%28Arma_3%29#Initialization_Order You see, unit's init lines are called before almost everything else. That's the reason. First you get the uniform (from the init line) and then your randomizer removes the uniform again and can't give you a new one, because adduniform is local to the client who's calling it (and if the server is calling the addUniform, noone get's a uniform). You have to find a way around it - locality and global..i...ty... (is that even a word?)'s a bitch. Easiest way: switch (_uniform ) do { case 1: { [[{}, _this adduniform "U_PMC_CombatUniformRS_BSGPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 2: { [[{}, _this adduniform "U_PMC_CombatUniformRS_BSGPSB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 3 and so on... }; That's where you have to put the BIS_fnc_MP-calls. Everytime you have a "adduniform" command in any of your scripts (those that are called by every client locally excluded), you have to put in the BIS_fnc_MP-call. Edited April 18, 2014 by Pergor Share this post Link to post Share on other sites
kilo1-1 1 Posted April 18, 2014 Gotcha, looks like I'm just going have to edit the randomizer scripts. So if I edit these randomizers .sqfs in the .pbo to have the "call BIS_fnc_MP" lines and I put the modified .pbo up on my dedicated box where my missions are being played on, would everyone that is playing the mission need to have this modified .pbo or would the server just need to have it and have it properly display the uniforms on the PMC units? Share this post Link to post Share on other sites
Belbo 462 Posted April 18, 2014 Gotcha, looks like I'm just going have to edit the randomizer scripts. So if I edit these randomizers .sqfs in the .pbo to have the "call BIS_fnc_MP" lines and I put the modified .pbo up on my dedicated box where my missions are being played on, would everyone that is playing the mission need to have this modified .pbo or would the server just need to have it and have it properly display the uniforms on the PMC units? If you put it on the server and start the modified mission, then every player loads the mission on missionstart and will be able to play the mission with the changed randomization script. And if the gods are willing, it might even work. ;) I'd test it first though. I had this weird issue once, where the initPlayerLocal.sqf would call the loadout-scripts (so every player starts with their respective loadouts) - until i noticed that players who joined after the first player would have uniforms and the first player wouldn't. Basically the same problem, just a bit more work to resolve. ;) Share this post Link to post Share on other sites
kilo1-1 1 Posted April 18, 2014 Interesting. Well I am already starting on editing these .sqfs, I will report back later to see if they work correctly. Thanks for helping me out with this. I just don't get why Bohemia made all the addVest and addHeadgear commands global and left addUniform as local. Just doesn't make sense at all. If anyone else hasn't already, vote this issue up. http://feedback.arma3.com/view.php?id=15298 Share this post Link to post Share on other sites
Belbo 462 Posted April 18, 2014 Interesting. Well I am already starting on editing these .sqfs, I will report back later to see if they work correctly. Thanks for helping me out with this. I just don't get why Bohemia made all the addVest and addHeadgear commands global and left addUniform as local. Just doesn't make sense at all.If anyone else hasn't already, vote this issue up. http://feedback.arma3.com/view.php?id=15298 Yeah, already did. Locality problems have always been an issue - not just with addUniform. Good luck with your tryout, it's 5 am here, I'm off to bed. ;) Share this post Link to post Share on other sites
kilo1-1 1 Posted April 18, 2014 Unfortunately it doesn't work. I tried it locally and on my server. Locally, the units just have headgear and weapons with no uniforms or vests. On my server with clients running the official pomi_pmc.pbo and the server running the modified .pbo, the units appear naked with their headgear, vests, and weapons. This is what I have down for my edited randomize_CombatUniform.sqf. The rest of the randomize.sqf files have the similar edits. if (isServer) then { waitUntil {!isNull _this}; }; _vest = vest _this; _magazines = magazines _this; _items = items _this; // Medkits, ToolKits etc. _assitems = assignedItems _this; // NVG's, GPS etc. Removeuniform _this; Removevest _this; removeAllItems _this; _uniform = (ceil (random 28)); switch (_uniform ) do { case 1: { [[{}, _this adduniform "U_PMC_CombatUniformRS_BSGPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 2: { [[{}, _this adduniform "U_PMC_CombatUniformRS_BSGPSB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 3: { [[{}, _this adduniform "U_PMC_CombatUniformRS_BSSPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 4: { [[{}, _this adduniform "U_PMC_CombatUniformRS_BSSPSB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 5: { [[{}, _this adduniform "U_PMC_CombatUniformRS_GSBPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 6: { [[{}, _this adduniform "U_PMC_CombatUniformRS_GSSPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 7: { [[{}, _this adduniform "U_PMC_CombatUniformRS_IndPBSBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 8: { [[{}, _this adduniform "U_PMC_CombatUniformRS_SSBPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 9: { [[{}, _this adduniform "U_PMC_CombatUniformRS_SSGPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 10: { [[{}, _this adduniform "U_PMC_CombatUniformRS_SSGPSB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 11: { [[{}, _this adduniform "U_PMC_CombatUniformRS_ChckDBS_GPSB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 12: { [[{}, _this adduniform "U_PMC_CombatUniformRS_ChckLB_GPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 13: { [[{}, _this adduniform "U_PMC_CombatUniformRS_ChckLR_SPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 14: { [[{}, _this adduniform "U_PMC_CombatUniformRS_ChckP_BPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 15: { [[{}, _this adduniform "U_PMC_CombatUniformLS_BSGPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 16: { [[{}, _this adduniform "U_PMC_CombatUniformLS_BSGPSB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 17: { [[{}, _this adduniform "U_PMC_CombatUniformLS_BSSPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 18: { [[{}, _this adduniform "U_PMC_CombatUniformLS_BSSPSB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 19: { [[{}, _this adduniform "U_PMC_CombatUniformLS_GSBPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 20: { [[{}, _this adduniform "U_PMC_CombatUniformLS_GSSPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 21: { [[{}, _this adduniform "U_PMC_CombatUniformLS_IndPBSBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 22: { [[{}, _this adduniform "U_PMC_CombatUniformLS_SSBPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 23: { [[{}, _this adduniform "U_PMC_CombatUniformLS_SSGPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 24: { [[{}, _this adduniform "U_PMC_CombatUniformLS_SSGPSB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 25: { [[{}, _this adduniform "U_PMC_CombatUniformLS_ChckDBS_GPSB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 26: { [[{}, _this adduniform "U_PMC_CombatUniformLS_ChckLB_GPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 27: { [[{}, _this adduniform "U_PMC_CombatUniformLS_ChckLR_SPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; case 28: { [[{}, _this adduniform "U_PMC_CombatUniformLS_ChckP_BPBB";], "BIS_fnc_spawn", true] call BIS_fnc_MP; }; }; Removeheadgear _this; //------------ Helmet/Hat ------------ _hat = (ceil (random 3)); switch (_hat ) do { case 1: { _this addheadgear "H_Cap_pmc"; }; case 2: { _this addheadgear "H_Cap_tan_pmc"; }; case 3: { _this addheadgear "H_HelmetB_plain_blk"; }; }; _this addVest _vest; {_this addItem _x} forEach _items; {_this addMagazine _x} forEach _magazines; {_this addItem _x} forEach _assitems; {_this assignItem _x} forEach _assitems; While I am a script noob, I do not know why this simple addition is preventing the units from getting a uniform at all. It could just be a simple ; or bracket that is preventing this from working. Could it be because of the "isServer" command or does it not matter? Will it need to be change to the following for a dedicated server? if !(isDedicated) then { waitUntil { !IsNull Player }; }; Share this post Link to post Share on other sites
L3TUC3 32 Posted April 18, 2014 You can always use the empty *security contractor* template from pmc>men and dress those up. The random script doesn't run for those. Share this post Link to post Share on other sites
kilo1-1 1 Posted April 18, 2014 True but I already have a few missions where I have several dozen PMC units placed down. I would much rather try to fix the randomizer script itself than individually dressing up units. Share this post Link to post Share on other sites
Belbo 462 Posted April 18, 2014 (edited) Unfortunately it doesn't work. I tried it locally and on my server. Locally, the units just have headgear and weapons with no uniforms or vests. On my server with clients running the official pomi_pmc.pbo and the server running the modified .pbo, the units appear naked with their headgear, vests, and weapons.While I am a script noob, I do not know why this simple addition is preventing the units from getting a uniform at all. It could just be a simple ; or bracket that is preventing this from working. Could it be because of the "isServer" command or does it not matter? Will it need to be change to the following for a dedicated server? Start arma with -showscripterrors to see if a typo prevents the complete execution of the script. In your init.sqf you should have two "parts": One part in brackets with if (isServer) then{ yaddayadda; }; and one part without. The if (isServer)-part will of course only be executed on the server, the rest will be executed both on server and clients (if the client is present at mission start. If not, you'd have to create a "initPlayerLocal.sqf".). I'd say you could try to remove everything related to gear and loadouts from your init.sqf, create an initPlayerLocal.sqf with the following code: //waitUntil-player is initialized if (!isDedicated && player != player) then { waitUntil {player == player}; // to make sure the player is initialized. waitUntil {time > 1}; // because why not? } else { waitUntil {time > 1 && !isNull player && isPlayer player && alive player}; // not completely necessary but I'd like to have it in there to be sure... }; removeUniform player; //so every player looses his uniform. sleep 0.1; // a little rest for the wicked. execVM "yourgearaddingscript.sqf"; //you might have guessed: To execute you loadout-script. Just make sure, that yourgearaddingscript.sqf, be it your randomizer or whatever, does not contain anything that could affect other players. Every command should be executed with player as object (eg. don't have something like if ((side _x) == west) then { removeUniform _x;} forEach allunits; or removeUniform p1; ). With that you could make sure that every client executes the gearadding script. The addUniform still has to be executed with BIS_fnc_MP though. Edited April 18, 2014 by Pergor Share this post Link to post Share on other sites
kilo1-1 1 Posted April 18, 2014 I'm not sure how that's going to fix the entire problem. It seems like it will only affect players, instead of players and AI units. Furthermore, how does one even call .sqf files from .pbos? Because this randomizer script isn't something I made, it's inside the mod .pbo files. Anyways Pergor, thanks again for your help. I hope I can fix this annoying problem with relative ease. Share this post Link to post Share on other sites
nullrick 10 Posted April 19, 2014 Looks fantastic! Love the mod-specific Hummingbird! Any plans to give PGS-PMC Zeus compatibility? Share this post Link to post Share on other sites
BadHabitz 235 Posted April 19, 2014 Looks fantastic! Love the mod-specific Hummingbird! Any plans to give PGS-PMC Zeus compatibility?Unless something has changed, the mod creator has ended his work on the project and has moved on, so the answer would be 'no'. Unless something changes, of course.To add Zeus compatibility, all soldier/vehicle class names needs to be in the 'units' section of cfgPatches. If you know what that means then you can create your own configuration. Share this post Link to post Share on other sites
nullrick 10 Posted April 19, 2014 Unless something has changed, the mod creator has ended his work on the project and has moved on, so the answer would be 'no'. Unless something changes, of course.To add Zeus compatibility, all soldier/vehicle class names needs to be in the 'units' section of cfgPatches. If you know what that means then you can create your own configuration. I have no idea what any of that means except the context you used "configuration" in. But even with that I'm still fuzzy. Would I be right in thinking all that isn't something one can just pick up and start doing? Share this post Link to post Share on other sites
BadHabitz 235 Posted April 20, 2014 I have no idea what any of that means except the context you used "configuration" in. But even with that I'm still fuzzy. Would I be right in thinking all that isn't something one can just pick up and start doing?You'd have to start learning the dark art of config coding. Let me dig into it the next day or so and see if I can make something that would make this mod Zeus compatible. Share this post Link to post Share on other sites
nullrick 10 Posted April 20, 2014 Awesome! That'd be great. I'll start looking into it, myself too, though the title "dark art" makes me think some form of wizardry plays into it. Do I need to construct a horcrux? Does it involve any sort of blood magic and/or ritual to bring forth that which is unholy and impure? Or are those just things I don't need to worry about at this time? Share this post Link to post Share on other sites
BadHabitz 235 Posted April 20, 2014 Nothing sinister. All you have to do is read a bunch of stuff here, and then just experiment until you start understanding things. I started with the Arma series in A3 Alpha a year ago. I've become good enough to be a benefit to my group, although I still have plenty to learn. Share this post Link to post Share on other sites
nullrick 10 Posted April 20, 2014 Might have thrown off my sleep schedule reading over that material. Haven't made a dent. But thanks nonetheless. But now that I think about it - this would be something that could be posted on the Workshop as well, yes? It seems it could to me at least. Share this post Link to post Share on other sites
nullrick 10 Posted May 8, 2014 (edited) I'm afraid I had to abandon what little "progress" I made with giving PGS units/assets Zeus compatibility. But since the VAS mod, things are starting to look up in terms of Zeus gameplay. RobertHammer's weapons pack doesn't hurt either. http://i.imgur.com/18yegkV.jpg http://i.imgur.com/gPI1vsq.jpg Edited May 8, 2014 by Nullrick Share this post Link to post Share on other sites
Pomi Git 256 Posted May 8, 2014 I'll look at doing a patch when I get chance to make it Zeus compatible Share this post Link to post Share on other sites
nullrick 10 Posted May 8, 2014 I'll look at doing a patch when I get chance to make it Zeus compatible The ArmA gods be good this day. Let songs be sung and the spirits flow free. Oh yeah - and stripper dollars are on me. Share this post Link to post Share on other sites
cfx 10 Posted May 10, 2014 Hey there, is the field technician supposed to be not able to defuse anything - because I guess this could not be the case. I'm having this issue and he can not even deactivate or pick up his own explosive charges. This is really the only thing keeping me from using this mod for creating missions. Had a similar idea of a campaign with an evolving PMC like someone else in this thread. But with this issue, sadly, PG Services is unusable for me. I would love to be able to solve this issue. Share this post Link to post Share on other sites
Rath 10 Posted May 11, 2014 Pomi, thank you for this addon, my group loves it! The plaid uniforms are priceless. One of our Canadian members wears it and we also use the beard mod. He is now a Lumberjack Commando. Anyways, would it be possible to make BLUFOR units for them and have class names similar to the vanilla NATO units? Like... In the editor they would be under NATO - Contractors: Team Leader, Machinegunner, Medic, Engineer, Sniper, Explosives Specialist, Repair Specialist, Pilot. I know it is a lot to ask, and I understand if it is too much to ask, but I had to we love this mod! Thanks Share this post Link to post Share on other sites
FortyEight 10 Posted May 14, 2014 Hey Pomi, this mod is awesome! My clan uses this mod exclusively for our clothing in game. Our recruitment post has a couple videos of your mod in action: http://forums.bistudio.com/showthread.php?176635-Beck%E2%80%99s-Privateers-PMC-want-to-hire-you!-Semi-Realism Just one addition that would be nice is if the PMC could be adjusted to the BLUFOR team and maybe even the OPFOR team as well, as they can be hired. I would like to make missions against the AAF but the faction aligning prevents that a bit. A second request is to ask if we can get some of the logo's changed for a unit version that has BP instead of PG; If you are opposed to this no worries. It's just kind of funny because our introductory rank abbreviation is "PG". Again thank you for the mod, really sets in immersion in our PMC unit! Share this post Link to post Share on other sites
L3TUC3 32 Posted May 14, 2014 Hey Pomi, this mod is awesome! My clan uses this mod exclusively for our clothing in game. Our recruitment post has a couple videos of your mod in action: http://forums.bistudio.com/showthread.php?176635-Beck%E2%80%99s-Privateers-PMC-want-to-hire-you!-Semi-RealismJust one addition that would be nice is if the PMC could be adjusted to the BLUFOR team and maybe even the OPFOR team as well, as they can be hired. I would like to make missions against the AAF but the faction aligning prevents that a bit. A second request is to ask if we can get some of the logo's changed for a unit version that has BP instead of PG; If you are opposed to this no worries. It's just kind of funny because our introductory rank abbreviation is "PG". Again thank you for the mod, really sets in immersion in our PMC unit! It's a bit lame it has to be done this way, but when you're done with your mission, you can go into the mission.sqm and look up your PMC teams and change "Independent" to "West or "East". The only problem is you can't edit them again in the editor (they'll turn into default riflemen), but still move them around. BIS still hasn't implemented on the fly side changes. Share this post Link to post Share on other sites