Persian MO 82 Posted September 14, 2015 Awesome work. Can do this for factions? for example csat with rhs mod have 3 factions with infantry and each factions have their own redressing. ---- Any variable to exclude unit from redressing when spawn in middle of mission via script? ------------ Also would be nice have a system like this for vehicle textures, if its possible. Share this post Link to post Share on other sites
redarmy 422 Posted October 23, 2015 Hi Jshock Great script and exactly what i need.Im having one issue that is quite simple but i dont know where or how exactly to write the paramater... I want to outfit all faction east west guer,respectively( survivorish look,not for a mil campaign) so if some west units are wearing the same as east its not an issue. Can you give me an example of how i write in the init for outfiting all sides with the redress script? Thanks again for this masterpiece you have saved me many hours of setting up a mission Share this post Link to post Share on other sites
jshock 513 Posted October 23, 2015 Awesome work. Can do this for factions? for example csat with rhs mod have 3 factions with infantry and each factions have their own redressing. ---- Any variable to exclude unit from redressing when spawn in middle of mission via script? ------------ Also would be nice have a system like this for vehicle textures, if its possible. Sorry Persian, literally just saw this today, must have missed the notification, anyhow, I currently don't have the system setup to handle factions directly (aside from the exclusion of certain factions). The variable you can use is: unit setVariable ["JSHK_doneRedress",true]; As far as vehicle textures and such, vehicles weren't the intent of this system, however, the framework provide should make it simple enough to extrapolate for use with vehicles. Hi Jshock Great script and exactly what i need.Im having one issue that is quite simple but i dont know where or how exactly to write the paramater... I want to outfit all faction east west guer,respectively( survivorish look,not for a mil campaign) so if some west units are wearing the same as east its not an issue. Can you give me an example of how i write in the init for outfiting all sides with the redress script? Thanks again for this masterpiece you have saved me many hours of setting up a mission All you should have to do is execVM the redressInit.sqf for each side from within the init.sqf, basically a thread per side that you want redressed. _eastHandle = [EAST, true, true] execVM "JSHK_Redress\redressInit.sqf"; _westHandle = [WEST, true, true] execVM "JSHK_Redress\redressInit.sqf"; _civHandle = [CIVILIAN, true, true] execVM "JSHK_Redress\redressInit.sqf"; Share this post Link to post Share on other sites
redarmy 422 Posted October 24, 2015 I was tryna enter something different in the redress init .... Thanks Comrade!! Share this post Link to post Share on other sites
Xerxes-AUS 3 Posted October 27, 2015 Hi John, I've been looking, but can't see that this question has been answered yet. Is there an array for faces? Using the SetFace command? If not, would you consider adding it in? Thanks! Share this post Link to post Share on other sites
jshock 513 Posted October 27, 2015 In the redressInit.sqf: //Gear classes names go below! //----------------------------- JSHK_weaponArr = ["LMG_Zafir_F","arifle_Mk20_F"]; JSHK_uniformArr = ["U_IG_Guerilla3_1","U_IG_Guerilla3_2","U_IG_Guerilla1_1","U_IG_Guerilla2_1","U_IG_Guerilla2_2","U_IG_Guerilla2_3","U_IG_leader"]; JSHK_vestArr = ["V_BandollierB_khk", "Vest_V_BandollierB_rgr", "Vest_V_Chestrig_rgr"]; JSHK_headArr = ["H_Shemag_olive","H_ShemagOpen_khk","H_ShemagOpen_tan"]; JSHK_goggleArr = [""]; JSHK_backpackArr = ["B_FieldPack_cbr","B_OutdoorPack_tan"]; //********************************** JSHK_faceArr = ["classname","classname"];//<<<<<<<Add this line //----------------------------- And then in the fn_Redress.sqf after line 65: _face = JSHK_faceArr call BIS_fnc_selectRandom; And on line 81 add: _x setFace _face; 2 Share this post Link to post Share on other sites
Xerxes-AUS 3 Posted October 28, 2015 I figured I could just add one in, but you've done all the hard work for me, thank you! :D Share this post Link to post Share on other sites
zagor64bz 1225 Posted February 26, 2016 Sorry if the question it's been already answered, but couldn't find it. How do I ( or it's even possible to ) redress different faction with different array? Example: EAST redress like ISIS, with one array of uniform and weapons; CIV redress like takistan locals with their own array of clothing ecc. WEST..same as above.. Thanks and great script Share this post Link to post Share on other sites
jshock 513 Posted February 26, 2016 Sorry if the question it's been already answered, but couldn't find it. How do I ( or it's even possible to ) redress different faction with different array? Example: EAST redress like ISIS, with one array of uniform and weapons; CIV redress like takistan locals with their own array of clothing ecc. WEST..same as above.. Thanks and great script You'll have to essentially make a "new" copy of the functions and scripts, it doesn't handle different gear for different factions. Share this post Link to post Share on other sites
zagor64bz 1225 Posted February 26, 2016 You'll have to essentially make a "new" copy of the functions and scripts, it doesn't handle different gear for different factions. Thank you Jshock! That would be out of my knowledge. Let me ask you this: if I redress EAST and CIV with the same array, will civ spawn without weapons? (or with, since they are in the array?) Share this post Link to post Share on other sites
jshock 513 Posted February 26, 2016 Thank you Jshock! That would be out of my knowledge. Let me ask you this: if I redress EAST and CIV with the same array, will civ spawn without weapons? (or with, since they are in the array?) With. 1 Share this post Link to post Share on other sites
zagor64bz 1225 Posted February 26, 2016 With. Damn armed Insurgent.... :D I guess I'll ave to live with it then....everyone has an AK over there, after all :P :P :P Share this post Link to post Share on other sites
redarmy 422 Posted February 27, 2016 J shock since last update im getting error messages on loading and while ingame Something about : "error in expression redress init sqf line 33...individual 1 etc etc. script runs ok except spawned opfor are nor being redressed anymore. i mean spawned after mission start Share this post Link to post Share on other sites
zagor64bz 1225 Posted February 27, 2016 Never mind!!I'm still such a noob :D ...I figured out how to do it .... For other noobs like me that stil haven't figure it out this is what I did: I copied the folder JSHK_Redress and paste in the mission folder. Remamed it JSHK_Redress2 and changed the array in the redressInit.sqf. In the MISSION init, I put the following: null = [WEST, true, true] execVM "JSHK_Redress\redressInit.sqf"; null = [CIVILIAN, true, true] execVM "JSHK_Redress2\redressInit.sqf"; Now west has one array, civis has another. Was much easier than what I thought. Share this post Link to post Share on other sites
jshock 513 Posted February 27, 2016 J shock since last update im getting error messages on loading and while ingame Something about : "error in expression redress init sqf line 33...individual 1 etc etc. script runs ok except spawned opfor are nor being redressed anymore. i mean spawned after mission start Well, what happens to be the expression on line 33 that has an error....paste the redressInit because your 33 could be much different from mine if you've made any changes and such. Do you have indv1/indv2 actually defined in your mission, if not, there would be an error. Share this post Link to post Share on other sites
redarmy 422 Posted February 28, 2016 Well, what happens to be the expression on line 33 that has an error....paste the redressInit because your 33 could be much different from mine if you've made any changes and such. Do you have indv1/indv2 actually defined in your mission, if not, there would be an error. Well, what happens to be the expression on line 33 that has an error....paste the redressInit because your 33 could be much different from mine if you've made any changes and such. Do you have indv1/indv2 actually defined in your mission, if not, there would be an error. Ah yes of course it would be different i didnt even take that into account. i dont have ind v defined to the best of my knowledge because im not even entirely sure what you mean. Can i simply take that line out of the init? Share this post Link to post Share on other sites
jshock 513 Posted February 28, 2016 Just make that array empty don't delete it or you will get more errors. Share this post Link to post Share on other sites
Persian MO 82 Posted June 5, 2016 /*//////////////////////////////////// Author: J.Shock Function File: fn_Redress.sqf Parameters: 1- Units to be redress: (array) 2- Use special units: (boolean) 3- Side of units: (side) 4- Loop through units: (boolean) Description: The redressing process of the defined units. Return: None **DISCLAIMER** Do not remove the header from this file. Any reproduced portions of this code must include credits to the author (J.Shock). *//////////////////////////////////// //if (isServer) then //{ private ["_scopez","_scopezlist","_arr","_units", "_unitSide", "_continuous", "_special", "_uniform", "_ATunits", "_Medunits", "_AAunits", "_weapon", "_goggle", "_head", "_vest", "_backpack"]; _units = (_this select 0); _special = (_this select 1); _unitSide = (_this select 2); _continuous = (_this select 3); _factionExclude = (_this select 4); if ((count _units) < 1) exitWith { if (_continuous) then { [_unitSide,_special,_factionExclude] spawn JSHK_fnc_countLoop; }; }; _ATunits = []; _Medunits = []; _AAunits = []; if (_special) then { { if (typeOf _x in JSHK_ATunits) then { _ATunits pushBack _x; }; if (typeOf _x in JSHK_Medicalunits) then { _Medunits pushBack _x; }; if (typeOf _x in JSHK_AAunits) then { _AAunits pushBack _x; }; } foreach _units; }; //The redressing process... { _uniform = JSHK_uniformArr call BIS_fnc_selectRandom; _weapon = JSHK_weaponArr call BIS_fnc_selectRandom; _backpack = JSHK_backpackArr call BIS_fnc_selectRandom; _head = JSHK_headArr call BIS_fnc_selectRandom; _vest = JSHK_vestArr call BIS_fnc_selectRandom; _goggle = JSHK_goggleArr call BIS_fnc_selectRandom; _muzzles = getArray(configfile >> "cfgWeapons" >> (_weapon) >> "muzzles"); _unit = _x; _x unassignItem "NVGoggles_OPFOR"; _x unassignItem "NVGoggles"; _x unassignItem "NVGoggles_INDEP"; clearItemCargo _x; clearWeaponCargo _x; clearMagazineCargo _x; removeallWeapons _x; removeAllHandgunItems _x; removeHeadgear _x; removeGoggles _x; removeUniform _x; removeBackpack _x; _x forceaddUniform _uniform; _x addBackpack _backpack; _x addHeadgear _head; _x addVest _vest; _x addGoggles _goggle; _x addMagazines ["HandGrenade", 2]; _x addMagazines ["SmokeShell", 2]; { if (_x=="this") then { _mags = getArray(configfile >> "cfgWeapons" >> (_weapon) >> "magazines"); { _unit addMagazines [_x, 5]; } forEach [_mags select 0]; } else { _mags = getArray(configfile >> "cfgWeapons" >> (_weapon) >> _x >> "magazines"); { _unit addMagazines [_x, 5]; } forEach [_mags select 0]; }; } forEach _muzzles; _x addWeapon _weapon; _arr = []; _scopezlist = [_weapon, 201] call CBA_fnc_compatibleItems; if !(_scopezlist isEqualTo _arr) then { _scopez = _scopezlist call BIS_fnc_selectRandom; _x addPrimaryWeaponItem _scopez; }; _x setVariable ["JSHK_doneRedress",true]; } foreach _units; if !(_special) exitWith { if (_continuous) then { [_unitSide,_special,_factionExclude] spawn JSHK_fnc_countLoop; }; }; if ((count _ATunits) > 0) then { { _x addWeapon "rhs_weap_rpg7"; _x addMagazine ["rhs_rpg7_PG7VL_mag", 2]; } foreach _ATunits; }; if ((count _Medunits) > 0) then { { clearAllItemsFromBackpack _x; _x addItemToBackpack "Medikit"; _x addItemToBackpack "FirstAidKit"; _x addItemToBackpack "FirstAidKit"; _x addItemToBackpack "FirstAidKit"; } foreach _Medunits; }; if ((count _AAunits) > 0) then { { _x addWeapon "rhs_weap_igla"; _x addMagazine ["rhs_mag_9k38_rocket", 2]; } foreach _AAunits; }; if (_continuous) then { [_unitSide,_special,_factionExclude] spawn JSHK_fnc_countLoop; }; //}; I changed a lit bit the script to add scopes to weapons.it worked fine however sometime mags not match with weapons in dedicated server sometimes.unitl last update for arma, 1.60 i receiving a error all the time here is rpt: Error in expression <>> "magazines"); { _unit addMagazines [_x, 5]; } forEach [_mags select 0]; };> 12:41:44 Error position: <_x, 5]; } forEach [_mags select 0]; };> 12:41:44 Error Undefined variable in expression: _x 12:41:44 File C:\Users\Persian MO\Documents\Arma 3\missions\PMC.Takistan\JSHK_Redress\fn_Redress.sqf, line 102 any solution? Share this post Link to post Share on other sites
jshock 513 Posted June 5, 2016 Hm, the only reason '_x' would be undefined on that particular line would be if _muzzles was empty, so the return of this line: _muzzles = getArray(configfile >> "cfgWeapons" >> (_weapon) >> "muzzles"); Is not giving a proper return (which I wouldn't think is the issue), or the weapons you have defined do not have proper configs. Share this post Link to post Share on other sites
Magnus Hatli 0 Posted June 6, 2016 This is so great, I use it in nearly all my maps :D. Share this post Link to post Share on other sites
vurelo 3 Posted October 4, 2016 can someone post the link again, I am unable to download from armaholic. Thank you. Share this post Link to post Share on other sites
diehardfc 41 Posted January 12, 2017 This is an amazing script that I think will be incredibly useful. My hat is off to you, jshock! I wonder if you might help me with an error I'm seeing. It comes up when I place units with Zeus, and references: fn_Redress.sqf, line 102 undefined variable in expression: _x I looked at line 102 and it doesn't appear any different from line 95 that precedes it. The only thing that appears different between the first magazine addition and the second is that line 100 has the _x variable whereas line 93 does not. I honestly don't know if that means anything or not, but thought I'd mention it. The script still runs and the units still get redressed, but it appears the special unit commands after line 102 are not being executed; that is, instead of being given a replacement launcher, my AT unit is only given gear from the general (non-special) replacement array. Any thoughts on what might be happening? Thanks again - great work on this! Share this post Link to post Share on other sites
diehardfc 41 Posted January 14, 2017 (edited) Something else I just discovered: the script seems to do a simple redressing of my Tanoan Syndikat bandits when tested locally, but when I upload to a multiplayer server, the African units are all turned into non-Africans. Is that normal? Why would it differ? I tried to set the face array to African, but it didn't seem to have an effect. Any thoughts? EDIT: So sorry I tried to pin this on your script. I removed the script and tested again on the server and the Tanoans are STILL having their identity set to non-African. It looks like it has something to do with some code I put in their group init. Edited January 14, 2017 by diehardfc Further testing Share this post Link to post Share on other sites
diehardfc 41 Posted January 23, 2017 On 1/12/2017 at 0:19 PM, diehardfc said: This is an amazing script that I think will be incredibly useful. My hat is off to you, jshock! I wonder if you might help me with an error I'm seeing. It comes up when I place units with Zeus, and references: fn_Redress.sqf, line 102 undefined variable in expression: _x The script still runs and the units still get redressed, but it appears the special unit commands after line 102 are not being executed; that is, instead of being given a replacement launcher, my AT unit is only given gear from the general (non-special) replacement array. Any thoughts on what might be happening? Thanks again - great work on this! This is so weird: the AT unit doesn't get redressed locally, but he does on the dedicated server. I have no idea why. He doesn't seem to have the ammo I designated, either, but that's probably a mistake with classnames. Share this post Link to post Share on other sites
locky09 0 Posted January 9, 2018 Hi i can not for the life on me get this to work do you have a you tube clip of the steps or could you go over step by step on what i have to do im trying to change west units that spawn into the map into a usm 90s desert model but its staying vanilla. Share this post Link to post Share on other sites