diff --git a/.hemtt/launch.toml b/.hemtt/launch.toml index ae05b1942a5..f6880a315ce 100644 --- a/.hemtt/launch.toml +++ b/.hemtt/launch.toml @@ -35,3 +35,18 @@ workshop = [ "843593391", # RHS GREF Workshop ID "843632231", # RHS SAF Workshop ID ] + +[Wardrobe] +extends = "rhs" +workshop = [ + "2369477168", # Advanced Developer Tools + "1779063631", # ZEN +# "623475643", # eden enhanced +] +mission = "Wardrobe.VR" +dlc = [ +# "Western Sahara", +# "Reaction Forces", + "S.O.G. Prairie Fire", +# "gm" +] \ No newline at end of file diff --git a/.hemtt/missions/Wardrobe.VR/mission.sqm b/.hemtt/missions/Wardrobe.VR/mission.sqm new file mode 100644 index 00000000000..d3ab289f354 --- /dev/null +++ b/.hemtt/missions/Wardrobe.VR/mission.sqm @@ -0,0 +1,386 @@ +version=54; +class EditorData +{ + moveGridStep=2; + angleGridStep=0.2617994; + scaleGridStep=1; + autoGroupingDist=10; + toggles=517; + class ItemIDProvider + { + nextID=205; + }; + class Camera + { + pos[]={10.750697,7.5298214,-16.120056}; + dir[]={0.78896397,-0.42873386,-0.44013983}; + up[]={0.37441224,0.90343088,-0.20887361}; + aside[]={-0.48718709,-1.4901161e-08,-0.87329757}; + }; +}; +binarizationWanted=0; +sourceName="wardrobe"; +addons[]= +{ + "A3_Weapons_F", + "ace_realisticnames", + "ace_ballistics", + "A3_Characters_F", + "A3_Soft_F_Exp_Offroad_02", + "A3_Weapons_F_Ammoboxes", + "ace_intelitems", + "A3_Modules_F_Curator_Curator" +}; +class AddonsMetaData +{ + class List + { + items=6; + class Item0 + { + className="A3_Weapons_F"; + name="Arma 3 Alpha - Weapons and Accessories"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; + class Item1 + { + className="A3_Characters_F"; + name="Arma 3 Alpha - Characters and Clothing"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; + class Item2 + { + className="ace_ballistics"; + name="ACE3 - Ballistics"; + author="ACE-Team"; + url="https://ace3.acemod.org/"; + }; + class Item3 + { + className="A3_Soft_F_Exp"; + name="Arma 3 Apex - Unarmored Land Vehicles"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; + class Item4 + { + className="ace_intelitems"; + name="ACE3 - Intel Items"; + author="ACE-Team"; + url="https://ace3.acemod.org/"; + }; + class Item5 + { + className="A3_Modules_F_Curator"; + name="Arma 3 Zeus Update - Scripted Modules"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; + }; +}; +dlcs[]= +{ + "Expansion" +}; +randomSeed=4540948; +class ScenarioData +{ + author="Overlord Zorn"; +}; +class CustomAttributes +{ +}; +class Mission +{ + class Intel + { + timeOfChanges=1800.0002; + startWeather=0; + startWind=0.1; + startWaves=0.1; + forecastWeather=0; + forecastWind=0.1; + forecastWaves=0.1; + forecastLightnings=0.1; + wavesForced=1; + windForced=1; + year=2035; + day=28; + hour=13; + minute=37; + startFogDecay=0.014; + forecastFogDecay=0.014; + }; + class Entities + { + items=7; + class Item0 + { + dataType="Object"; + class PositionInfo + { + position[]={16,5,-12}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=196; + type="Weapon_hgun_Pistol_heavy_01_F"; + }; + class Item1 + { + dataType="Object"; + class PositionInfo + { + position[]={17.833,5.2840548,-13.012}; + }; + side="Empty"; + flags=4; + class Attributes + { + init="[this, flatten ([] call ACE_WARDROBE_fnc_getAllWardrobeItems)] call ace_arsenal_fnc_initBox;"; + }; + id=197; + type="ACE_Box_Ammo"; + class CustomAttributes + { + class Attribute0 + { + property="ace_arsenal_attribute"; + expression="if (!is3DEN) then {[_this, +_value] call ace_arsenal_fnc_attributeInit}"; + class Value + { + class data + { + singleType="ARRAY"; + class value + { + items=2; + class Item0 + { + class data + { + singleType="ARRAY"; + }; + }; + class Item1 + { + class data + { + singleType="SCALAR"; + value=0; + }; + }; + }; + }; + }; + }; + class Attribute1 + { + property="ammoBox"; + expression="[_this,_value] call bis_fnc_initAmmoBox;"; + class Value + { + class data + { + singleType="STRING"; + value="[[[[""hgun_Pistol_heavy_01_green_snds_F""],[1]],[[""11Rnd_45ACP_Mag""],[2]],[[],[]],[[],[]]],false]"; + }; + }; + }; + nAttributes=2; + }; + }; + class Item2 + { + dataType="Group"; + side="Civilian"; + class Entities + { + items=1; + class Item0 + { + dataType="Object"; + class PositionInfo + { + position[]={15.877691,5.0014391,-20.87595}; + }; + side="Civilian"; + flags=7; + class Attributes + { + isPlayer=1; + class Inventory + { + class uniform + { + typeName="gm_ge_uniform_soldier_rolled_90_flk"; + isBackpack=0; + }; + map="ItemMap"; + compass="ItemCompass"; + watch="ItemWatch"; + }; + }; + id=199; + type="C_man_polo_1_F"; + }; + }; + class Attributes + { + }; + id=198; + }; + class Item3 + { + dataType="Object"; + class PositionInfo + { + position[]={5,6.5695963,-27.110023}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=200; + type="C_Offroad_02_unarmed_F"; + class CustomAttributes + { + class Attribute0 + { + property="ammoBox"; + expression="[_this,_value] call bis_fnc_initAmmoBox;"; + class Value + { + class data + { + singleType="STRING"; + value="[[[[""FirstAidKit""],[6]],[[],[]],[[],[]],[[],[]]],false]"; + }; + }; + }; + nAttributes=1; + }; + }; + class Item4 + { + dataType="Object"; + class PositionInfo + { + position[]={18.822828,5,-13.759856}; + angles[]={0,1.0776811,0}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=202; + type="B_AssaultPack_blk"; + }; + class Item5 + { + dataType="Object"; + class PositionInfo + { + position[]={17.528999,5.0073819,-17.298}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=203; + type="acex_intelitems_document"; + class CustomAttributes + { + class Attribute0 + { + property="ace_intelitems_data"; + expression="[_this, _value] call ace_intelitems_fnc_setObjectData"; + class Value + { + class data + { + singleType="STRING"; + value="Funny Bean Toast Man struck again."; + }; + }; + }; + nAttributes=1; + }; + }; + class Item6 + { + dataType="Logic"; + class PositionInfo + { + position[]={26,5,-20}; + angles[]={0,4.6137218,0}; + }; + id=204; + type="ModuleCurator_F"; + class CustomAttributes + { + class Attribute0 + { + property="ModuleCurator_F_Owner"; + expression="_this setVariable ['Owner',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value=""; + }; + }; + }; + class Attribute1 + { + property="ModuleCurator_F_Forced"; + expression="_this setVariable ['Forced',_value,true];"; + class Value + { + class data + { + singleType="SCALAR"; + value=0; + }; + }; + }; + class Attribute2 + { + property="ModuleCurator_F_Name"; + expression="_this setVariable ['Name',_value,true];"; + class Value + { + class data + { + singleType="STRING"; + value=""; + }; + }; + }; + class Attribute3 + { + property="ModuleCurator_F_Addons"; + expression="_this setVariable ['Addons',_value,true];"; + class Value + { + class data + { + singleType="SCALAR"; + value=2; + }; + }; + }; + nAttributes=4; + }; + }; + }; +}; diff --git a/addons/compat_gm/compat_gm_wardrobe/CfgWardrobe.hpp b/addons/compat_gm/compat_gm_wardrobe/CfgWardrobe.hpp new file mode 100644 index 00000000000..704f461fcfa --- /dev/null +++ b/addons/compat_gm/compat_gm_wardrobe/CfgWardrobe.hpp @@ -0,0 +1,19 @@ +// Import Base Classes +class EGVAR(wardrobe,base); + +class EGVAR(wardrobe,base_H_visor_up); +class EGVAR(wardrobe,base_H_visor_down); + +class EGVAR(wardrobe,base_U_sleeves_up); +class EGVAR(wardrobe,base_U_sleeves_down); + +class EGVAR(wardrobe,base_U_gloves_on); +class EGVAR(wardrobe,base_U_gloves_off); + +class EGVAR(wardrobe,base_H_goggles_on); +class EGVAR(wardrobe,base_H_goggles_off); + +class CfgWeapons { + #include "Helmets.hpp" + #include "Uniforms.hpp" +}; diff --git a/addons/compat_gm/compat_gm_wardrobe/Helmets.hpp b/addons/compat_gm/compat_gm_wardrobe/Helmets.hpp new file mode 100644 index 00000000000..06b7fea1f5a --- /dev/null +++ b/addons/compat_gm/compat_gm_wardrobe/Helmets.hpp @@ -0,0 +1,130 @@ +// CfgWeapons + +// Base Classes +class gm_ge_headgear_psh77_cover_down_base; +class gm_ge_headgear_psh77_cover_up_base; +class gm_ge_headgear_psh77_down_base; +class gm_ge_headgear_psh77_up_base; + +class gm_ge_bgs_headgear_psh77_cover_down_smp: gm_ge_headgear_psh77_cover_down_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) { + modifiableTo[] = { "gm_ge_bgs_headgear_psh77_cover_up_smp" }; + }; +}; +class gm_ge_bgs_headgear_psh77_cover_up_smp: gm_ge_headgear_psh77_cover_up_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up) { + modifiableTo[] = { "gm_ge_bgs_headgear_psh77_cover_down_smp" }; + }; +}; +class gm_ge_bgs_headgear_psh77_cover_down_str: gm_ge_headgear_psh77_cover_down_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) { + modifiableTo[] = { "gm_ge_bgs_headgear_psh77_cover_up_str" }; + }; +}; +class gm_ge_bgs_headgear_psh77_cover_up_str: gm_ge_headgear_psh77_cover_up_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up) { + modifiableTo[] = { "gm_ge_bgs_headgear_psh77_cover_down_str" }; + }; +}; +class gm_ge_headgear_psh77_down_oli: gm_ge_headgear_psh77_down_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) { + modifiableTo[] = { "gm_ge_headgear_psh77_up_oli" }; + }; +}; +class gm_ge_headgear_psh77_up_oli: gm_ge_headgear_psh77_up_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up) { + modifiableTo[] = { "gm_ge_headgear_psh77_down_oli" }; + }; +}; + +#define GM_Helmet_Glasses(classWith,classWithout,baseWith,baseWithout,goggles)\ +class classWith: baseWith {\ + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) {\ + modifiableTo[] = { QUOTE(classWithout) };\ + components[] = { QUOTE(goggles) };\ + };\ + MASS(11);\ +};\ +class classWithout: baseWithout {\ + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) {\ + modifiableTo[] = { QUOTE(classWith) };\ + };\ +} + + +class gm_ge_headgear_m92_base; +class gm_ge_headgear_m92_cover_base; + +class gm_ge_headgear_m92_glasses_base: gm_ge_headgear_m92_base { + class ItemInfo; +}; + +class gm_ge_headgear_m92_cover_glasses_base: gm_ge_headgear_m92_base { + class ItemInfo; +}; + +GM_Helmet_Glasses(gm_ge_headgear_m92_cover_glasses_win,gm_ge_headgear_m92_cover_win,gm_ge_headgear_m92_cover_glasses_base,gm_ge_headgear_m92_cover_base,gm_ge_facewear_dustglasses); +GM_Helmet_Glasses(gm_ge_headgear_m92_cover_glasses_oli,gm_ge_headgear_m92_cover_oli,gm_ge_headgear_m92_cover_glasses_base,gm_ge_headgear_m92_cover_base,gm_ge_facewear_dustglasses); +GM_Helmet_Glasses(gm_ge_headgear_m92_cover_glasses_blk,gm_ge_headgear_m92_cover_blk,gm_ge_headgear_m92_cover_glasses_base,gm_ge_headgear_m92_cover_base,gm_ge_facewear_dustglasses); + +GM_Helmet_Glasses(gm_ge_headgear_m92_glasses_trp,gm_ge_headgear_m92_trp,gm_ge_headgear_m92_glasses_base,gm_ge_headgear_m92_base,gm_ge_facewear_dustglasses); +GM_Helmet_Glasses(gm_ge_headgear_m92_glasses_flk,gm_ge_headgear_m92_flk,gm_ge_headgear_m92_glasses_base,gm_ge_headgear_m92_base,gm_ge_facewear_dustglasses); + + +class gm_headgear_armored_base; +class gm_ge_headgear_m38_72_base; +class gm_ge_headgear_m38_72_goggles_base: gm_headgear_armored_base { + class ItemInfo; +}; +GM_Helmet_Glasses(gm_ge_bgs_headgear_m38_72_goggles_bgr,gm_ge_bgs_headgear_m38_72_bgr,gm_ge_headgear_m38_72_goggles_base,gm_ge_headgear_m38_72_base,gm_ge_facewear_acidgoggles); + +// Caps with M62 Helmets +// Base Classes +class gm_ge_headgear_hat_base; + +class gm_ge_headgear_hat_80_base: gm_ge_headgear_hat_base { + class ItemInfo; +}; +class gm_ge_headgear_sidecap_base; +class gm_ge_headgear_sidecap_80_base: gm_ge_headgear_sidecap_base { + class ItemInfo; +}; + +// Helmet Only +class gm_ge_headgear_m62_base; +class gm_ge_headgear_m62_net: gm_ge_headgear_m62_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = {"gm_ge_headgear_hgm_ge_headgear_sidecap_80_m62_oliat_80_oli", "gm_ge_headgear_hat_80_m62_oli"}; + components[] = {"gm_ge_headgear_m62_net"}; + }; +}; + +// Hats only +class gm_ge_headgear_hat_80_oli: gm_ge_headgear_hat_80_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = {"gm_ge_headgear_hat_80_m62_oli"}; + components[] = {"gm_ge_headgear_hat_80_oli"}; + }; +}; +class gm_ge_headgear_sidecap_80_oli: gm_ge_headgear_sidecap_80_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = {"gm_ge_headgear_sidecap_80_m62_oli"}; + components[] = {"gm_ge_headgear_sidecap_80_oli"}; + }; +}; + +// Hats + Helmets +class gm_ge_headgear_hat_80_m62_oli: gm_ge_headgear_hat_80_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = {"gm_ge_headgear_hat_80_oli","gm_ge_headgear_m62_net"}; + components[] = {"gm_ge_headgear_hat_80_oli","gm_ge_headgear_m62_net"}; + }; + MASS(20); +}; +class gm_ge_headgear_sidecap_80_m62_oli: gm_ge_headgear_sidecap_80_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = {"gm_ge_headgear_sidecap_80_oli","gm_ge_headgear_m62_net"}; + components[] = {"gm_ge_headgear_sidecap_80_oli","gm_ge_headgear_m62_net"}; + }; + MASS(20); +}; diff --git a/addons/compat_gm/compat_gm_wardrobe/Uniforms.hpp b/addons/compat_gm/compat_gm_wardrobe/Uniforms.hpp new file mode 100644 index 00000000000..6a548d214e6 --- /dev/null +++ b/addons/compat_gm/compat_gm_wardrobe/Uniforms.hpp @@ -0,0 +1,214 @@ +// CfgWeapons + +// Sleeves + +class gm_ge_bgs_uniform_special_80_base; +class gm_ge_bgs_uniform_special_rolled_80_base; + +class gm_ge_bgs_uniform_special_80_grn: gm_ge_bgs_uniform_special_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_ge_bgs_uniform_special_rolled_80_grn" }; + }; +}; +class gm_ge_bgs_uniform_special_rolled_80_grn: gm_ge_bgs_uniform_special_rolled_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_ge_bgs_uniform_special_80_grn" }; + }; +}; + +class gm_ge_bgs_uniform_special_80_blk: gm_ge_bgs_uniform_special_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_ge_bgs_uniform_special_rolled_80_blk" }; + }; +}; +class gm_ge_bgs_uniform_special_rolled_80_blk: gm_ge_bgs_uniform_special_rolled_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_ge_bgs_uniform_special_80_blk" }; + }; +}; + + +class gm_ge_army_uniform_pilot_base; +class gm_ge_army_uniform_pilot_rolled_base; + +class gm_ge_army_uniform_pilot_sar: gm_ge_army_uniform_pilot_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_ge_army_uniform_pilot_rolled_sar" }; + }; +}; +class gm_ge_army_uniform_pilot_rolled_sar: gm_ge_army_uniform_pilot_rolled_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_ge_army_uniform_pilot_sar" }; + }; +}; + +class gm_ge_army_uniform_pilot_oli: gm_ge_army_uniform_pilot_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_ge_army_uniform_pilot_oli" }; + }; +}; +class gm_ge_army_uniform_pilot_rolled_oli: gm_ge_army_uniform_pilot_rolled_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_ge_army_uniform_pilot_rolled_oli" }; + }; +}; + +class gm_ge_pol_uniform_pilot_grn: gm_ge_army_uniform_pilot_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_ge_pol_uniform_pilot_rolled_grn" }; + }; +}; +class gm_ge_pol_uniform_pilot_rolled_grn: gm_ge_army_uniform_pilot_rolled_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_ge_pol_uniform_pilot_grn" }; + }; +}; + +class gm_ge_uniform_pilot_commando_base; +class gm_ge_uniform_pilot_commando_rolled_base; + +class gm_ge_uniform_pilot_commando_oli: gm_ge_uniform_pilot_commando_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_ge_uniform_pilot_commando_rolled_oli" }; + }; +}; +class gm_ge_uniform_pilot_commando_rolled_oli: gm_ge_uniform_pilot_commando_rolled_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_ge_uniform_pilot_commando_oli" }; + }; +}; + +class gm_ge_uniform_pilot_commando_gry: gm_ge_uniform_pilot_commando_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_ge_uniform_pilot_commando_rolled_gry" }; + }; +}; +class gm_ge_uniform_pilot_commando_rolled_gry: gm_ge_uniform_pilot_commando_rolled_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_ge_uniform_pilot_commando_gry" }; + }; +}; + +class gm_ge_uniform_pilot_commando_blk: gm_ge_uniform_pilot_commando_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_ge_uniform_pilot_commando_rolled_blk" }; + }; +}; +class gm_ge_uniform_pilot_commando_rolled_blk: gm_ge_uniform_pilot_commando_rolled_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_ge_uniform_pilot_commando_blk" }; + }; +}; + +class gm_pl_uniform_soldier_80_base; + +class gm_pl_army_uniform_soldier_80_frog: gm_pl_uniform_soldier_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_pl_army_uniform_soldier_rolled_80_frog" }; + }; +}; +class gm_pl_army_uniform_soldier_rolled_80_frog: gm_pl_uniform_soldier_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_pl_army_uniform_soldier_80_frog" }; + }; +}; + +class gm_pl_army_uniform_soldier_80_moro: gm_pl_uniform_soldier_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_pl_army_uniform_soldier_rolled_80_moro" }; + }; +}; +class gm_pl_army_uniform_soldier_rolled_80_moro: gm_pl_uniform_soldier_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_pl_army_uniform_soldier_80_moro" }; + }; +}; + + +class gm_ge_uniform_soldier_90_base; + +class gm_ge_uniform_soldier_90_trp: gm_ge_uniform_soldier_90_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_ge_uniform_soldier_rolled_90_trp" }; + }; +}; +class gm_ge_uniform_soldier_rolled_90_trp: gm_ge_uniform_soldier_90_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_ge_uniform_soldier_90_trp" }; + }; +}; + +class gm_ge_uniform_soldier_90_flk: gm_ge_uniform_soldier_90_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) { + modifiableTo[] = { "gm_ge_uniform_soldier_rolled_90_flk" }; + }; +}; +class gm_ge_uniform_soldier_rolled_90_flk: gm_ge_uniform_soldier_90_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_ge_uniform_soldier_90_flk" }; + }; +}; + + +// Gloves + +class gm_gc_uniform_soldier_80_base; +class gm_gc_army_uniform_soldier_gloves_80_str: gm_gc_uniform_soldier_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_gloves_on) { + modifiableTo[] = { "gm_gc_army_uniform_soldier_80_str" }; + }; +}; +class gm_gc_army_uniform_soldier_80_str: gm_gc_uniform_soldier_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_gloves_off) { + modifiableTo[] = { "gm_gc_army_uniform_soldier_gloves_80_str" }; + }; +}; + +class gm_ge_uniform_soldier_80_base; +class gm_ge_army_uniform_soldier_gloves_80_ols: gm_ge_uniform_soldier_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_gloves_on) { + modifiableTo[] = { "gm_ge_army_uniform_soldier_80_ols" }; + }; +}; +class gm_ge_army_uniform_soldier_80_ols: gm_ge_uniform_soldier_80_base { + class ace_wardrobe: EGVAR(wardrobe,base_U_gloves_off) { + modifiableTo[] = { "gm_ge_army_uniform_soldier_gloves_80_ols" }; + }; +}; + + +// Mixed case -> Base Interaction +class gm_ge_army_uniform_soldier_bdu_80_wdl; +class gm_ge_army_uniform_soldier_bdu_rolled_80_wdl; + +class gm_xx_uniform_soldier_bdu_80_wdl: gm_ge_army_uniform_soldier_bdu_80_wdl { + class ace_wardrobe: EGVAR(wardrobe,base_U_gloves_on) { + modifiableTo[] = { "gm_xx_uniform_soldier_bdu_rolled_80_wdl", "gm_xx_uniform_soldier_bdu_nogloves_80_wdl" }; + }; +}; +class gm_xx_uniform_soldier_bdu_rolled_80_wdl: gm_ge_army_uniform_soldier_bdu_rolled_80_wdl { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_xx_uniform_soldier_bdu_80_wdl", "gm_xx_uniform_soldier_bdu_nogloves_80_wdl" }; + }; +}; +class gm_xx_uniform_soldier_bdu_nogloves_80_wdl: gm_ge_army_uniform_soldier_bdu_80_wdl { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "gm_xx_uniform_soldier_bdu_80_wdl", "gm_xx_uniform_soldier_bdu_rolled_80_wdl" }; + }; +}; + +class gm_xx_uniform_soldier_bdu_80_oli: gm_ge_army_uniform_soldier_bdu_80_wdl { + class ace_wardrobe: EGVAR(wardrobe,base_U_gloves_on) { + modifiableTo[] = { "gm_xx_uniform_soldier_bdu_rolled_80_oli", "gm_xx_uniform_soldier_bdu_nogloves_80_oli" }; + }; +}; +class gm_xx_uniform_soldier_bdu_rolled_80_oli: gm_ge_army_uniform_soldier_bdu_rolled_80_wdl { + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) { + modifiableTo[] = { "gm_xx_uniform_soldier_bdu_80_oli", "gm_xx_uniform_soldier_bdu_nogloves_80_oli" }; + }; +}; +class gm_xx_uniform_soldier_bdu_nogloves_80_oli: gm_ge_army_uniform_soldier_bdu_80_wdl { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "gm_xx_uniform_soldier_bdu_80_oli", "gm_xx_uniform_soldier_bdu_rolled_80_oli" }; + }; +}; diff --git a/addons/compat_gm/compat_gm_wardrobe/config.cpp b/addons/compat_gm/compat_gm_wardrobe/config.cpp new file mode 100644 index 00000000000..1045ac7f1b5 --- /dev/null +++ b/addons/compat_gm/compat_gm_wardrobe/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "ace_wardrobe", + "gm_core" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"OverlordZorn [CVO]"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgWardrobe.hpp" diff --git a/addons/compat_gm/compat_gm_wardrobe/script_component.hpp b/addons/compat_gm/compat_gm_wardrobe/script_component.hpp new file mode 100644 index 00000000000..33ff700f410 --- /dev/null +++ b/addons/compat_gm/compat_gm_wardrobe/script_component.hpp @@ -0,0 +1,5 @@ +#define SUBCOMPONENT wardrobe +#define SUBCOMPONENT_BEAUTIFIED Wardrobe +#include "..\script_component.hpp" + +#include "\z\ace\addons\wardrobe\script_macros_wardrobe.hpp" diff --git a/addons/compat_rf/compat_rf_wardrobe/CfgWardrobe.hpp b/addons/compat_rf/compat_rf_wardrobe/CfgWardrobe.hpp new file mode 100644 index 00000000000..10ae7cb65aa --- /dev/null +++ b/addons/compat_rf/compat_rf_wardrobe/CfgWardrobe.hpp @@ -0,0 +1,116 @@ +class EGVAR(wardrobe,base); +class EGVAR(wardrobe,base_U_sleeves_up); +class EGVAR(wardrobe,base_U_sleeves_down); +class EGVAR(wardrobe,base_U_jacket_open); +class EGVAR(wardrobe,base_U_jacket_closed); +class EGVAR(wardrobe,base_H_visor_up); +class EGVAR(wardrobe,base_H_visor_down); + +class CfgWeapons +{ + //// Helmets + // Macros + #define CN(color) H_HelmetHeavy_##color##_RF + #define CN_VU(color) H_HelmetHeavy_VisorUp_##color##_RF + + #define HELMET_VARIANT(color)\ + class CN(color): H_HelmetHeavy_Black_RF {\ + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) {\ + modifiableTo[] = { QUOTE(CN_VU(color)) };\ + };\ + };\ + class CN_VU(color): H_HelmetHeavy_VisorUp_Black_RF {\ + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up){\ + modifiableTo[] = { QUOTE(CN(color)) };\ + };\ + } + + // Base Classes + class H_HelmetAggressor_F; + + class H_HelmetHeavy_Black_RF: H_HelmetAggressor_F { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) { + modifiableTo[] = { "H_HelmetHeavy_VisorUp_Black_RF" }; + }; + }; + class H_HelmetHeavy_VisorUp_Black_RF: H_HelmetHeavy_Black_RF { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up){ + modifiableTo[] = { "H_HelmetHeavy_Black_RF" }; + }; + }; + // Variants + HELMET_VARIANT(Hex); + HELMET_VARIANT(GHex); + HELMET_VARIANT(Sand); + HELMET_VARIANT(Olive); + HELMET_VARIANT(White); + + //// Uniforms + class Uniform_Base; + + // Macros + #define UNIFORM_BASE(class1,class2)\ + class class1: Uniform_Base {\ + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) {\ + modifiableTo[] = { QUOTE(class2) };\ + };\ + };\ + class class2: Uniform_Base {\ + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) {\ + modifiableTo[] = { QUOTE(class1) };\ + };\ + } + + // Sleeves up/down + UNIFORM_BASE(U_C_FirefighterFatigues_RF,U_C_FirefighterFatigues_RolledUp_RF); + UNIFORM_BASE(U_BG_Guerrilla_6_1,U_BG_Guerrilla_RF); + + + // Pilot Jackets + class U_C_PilotJacket_black_RF: Uniform_Base { + class ace_wardrobe: EGVAR(wardrobe,base_U_jacket_closed) { + modifiableTo[] = { "U_C_PilotJacket_open_black_RF" }; + }; + }; + class U_C_PilotJacket_open_black_RF: U_C_PilotJacket_black_RF { + class ace_wardrobe: EGVAR(wardrobe,base_U_jacket_open) { + modifiableTo[] = { "U_C_PilotJacket_black_RF" }; + }; + }; + + class U_C_PilotJacket_brown_RF: U_C_PilotJacket_black_RF { + class ace_wardrobe: EGVAR(wardrobe,base_U_jacket_closed) { + modifiableTo[] = { "U_C_PilotJacket_open_brown_RF" }; + }; + }; + class U_C_PilotJacket_open_brown_RF: U_C_PilotJacket_brown_RF { + class ace_wardrobe: EGVAR(wardrobe,base_U_jacket_open) { + modifiableTo[] = { "U_C_PilotJacket_brown_RF" }; + }; + }; + + class U_C_PilotJacket_lbrown_RF: U_C_PilotJacket_black_RF { + class ace_wardrobe: EGVAR(wardrobe,base_U_jacket_closed) { + modifiableTo[] = { "U_C_PilotJacket_open_lbrown_RF" }; + }; + }; + class U_C_PilotJacket_open_lbrown_RF: U_C_PilotJacket_lbrown_RF { + class ace_wardrobe: EGVAR(wardrobe,base_U_jacket_open) { + modifiableTo[] = { "U_C_PilotJacket_lbrown_RF" }; + }; + }; + + + // Cap (Ion) Forward and Reversed + class lxWS_H_CapB_rvs_blk; + class lxWS_H_CapB_rvs_blk_ION: lxWS_H_CapB_rvs_blk { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "H_Cap_headphones_ion_lxws" }; + }; + }; + class H_Cap_headphones_ion_lxws: lxWS_H_CapB_rvs_blk_ION { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "lxWS_H_CapB_rvs_blk_ION" }; + }; + }; +}; diff --git a/addons/compat_rf/compat_rf_wardrobe/config.cpp b/addons/compat_rf/compat_rf_wardrobe/config.cpp new file mode 100644 index 00000000000..8039ddb493e --- /dev/null +++ b/addons/compat_rf/compat_rf_wardrobe/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "ace_wardrobe", + "RF_Data_Loadorder" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"OverlordZorn [CVO]"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgWardrobe.hpp" diff --git a/addons/compat_rf/compat_rf_wardrobe/script_component.hpp b/addons/compat_rf/compat_rf_wardrobe/script_component.hpp new file mode 100644 index 00000000000..33ff700f410 --- /dev/null +++ b/addons/compat_rf/compat_rf_wardrobe/script_component.hpp @@ -0,0 +1,5 @@ +#define SUBCOMPONENT wardrobe +#define SUBCOMPONENT_BEAUTIFIED Wardrobe +#include "..\script_component.hpp" + +#include "\z\ace\addons\wardrobe\script_macros_wardrobe.hpp" diff --git a/addons/compat_sog/compat_sog_wardrobe/Booniehats.hpp b/addons/compat_sog/compat_sog_wardrobe/Booniehats.hpp new file mode 100644 index 00000000000..9cc5a49843c --- /dev/null +++ b/addons/compat_sog/compat_sog_wardrobe/Booniehats.hpp @@ -0,0 +1,112 @@ +// CfgWeapons + +// Variations +// 01 sides up 02 normal 03 front up 04 l side up 05 r side up +// 06-08 anzac +// 09 rebel - not compatible +//Colors +// 01 green 02 tiger 03 black 04 spray 05 tiger green 06 erdl brown 07 leopard 08 erdl +// 09 gray <- Fuck this - inheritance is fucking horrible as fuck. + + +// Macros +#define CN(variation,color) vn_b_boonie_##variation##_##color +#define QCN(variation,color) QUOTE(CN(variation,color)) + +// Base Boonie +#define CAMO_BASE 01 + +class CN(02,CAMO_BASE): vn_b_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,CAMO_BASE), QCN(03,CAMO_BASE), QCN(04,CAMO_BASE), QCN(05,CAMO_BASE) }; + }; +}; +class CN(01,CAMO_BASE): CN(02,CAMO_BASE) { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(02,CAMO_BASE), QCN(03,CAMO_BASE), QCN(04,CAMO_BASE), QCN(05,CAMO_BASE) }; + }; +}; +class CN(03,CAMO_BASE): CN(02,CAMO_BASE) { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,CAMO_BASE), QCN(02,CAMO_BASE), QCN(04,CAMO_BASE), QCN(05,CAMO_BASE) }; + }; +}; +class CN(04,CAMO_BASE): CN(02,CAMO_BASE) { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,CAMO_BASE), QCN(02,CAMO_BASE), QCN(03,CAMO_BASE), QCN(05,CAMO_BASE) }; + }; +}; +class CN(05,CAMO_BASE): CN(02,CAMO_BASE) { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,CAMO_BASE), QCN(02,CAMO_BASE), QCN(03,CAMO_BASE), QCN(04,CAMO_BASE) }; + }; +}; + + +#define CN_COLORS(CAMO)\ +class CN(02,CAMO): CN(02,01) {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(01,CAMO), QCN(03,CAMO), QCN(04,CAMO), QCN(05,CAMO) };\ + };\ +};\ +class CN(01,CAMO): CN(02,CAMO) {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(02,CAMO), QCN(03,CAMO), QCN(04,CAMO), QCN(05,CAMO) };\ + };\ +};\ +class CN(03,CAMO): CN(02,CAMO) {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(01,CAMO), QCN(02,CAMO), QCN(04,CAMO), QCN(05,CAMO) };\ + };\ +};\ +class CN(04,CAMO): CN(02,CAMO) {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(01,CAMO), QCN(02,CAMO), QCN(03,CAMO), QCN(05,CAMO) };\ + };\ +};\ +class CN(05,CAMO): CN(02,CAMO) {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(01,CAMO), QCN(02,CAMO), QCN(03,CAMO), QCN(04,CAMO) };\ + };\ +} + +CN_COLORS(02); +CN_COLORS(03); +CN_COLORS(04); +CN_COLORS(05); + + +// Base classes in CfgWeapons.hpp +// 06-08 anzac + +class CN(06,01): CN(02,01) { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(07,01), QCN(08,01) }; + }; +}; +class CN(07,01): CN(06,01) { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(06,VAR), QCN(08,01) }; + }; +}; +class CN(08,01): CN(06,01) { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(06,01), QCN(07,01) }; + }; +}; + +class CN(06,02): CN(06,01) { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(07,02), QCN(08,02) }; + }; +}; +class CN(07,02): CN(06,01) { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(06,02), QCN(08,02) }; + }; +}; +class CN(08,02): CN(06,01) { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(06,02), QCN(07,02) }; + }; +}; diff --git a/addons/compat_sog/compat_sog_wardrobe/CfgWardrobe.hpp b/addons/compat_sog/compat_sog_wardrobe/CfgWardrobe.hpp new file mode 100644 index 00000000000..0c7ea554e95 --- /dev/null +++ b/addons/compat_sog/compat_sog_wardrobe/CfgWardrobe.hpp @@ -0,0 +1,34 @@ + + +class EGVAR(wardrobe,base); + +class EGVAR(wardrobe,base_H_visor_up); +class EGVAR(wardrobe,base_H_visor_down); + +class EGVAR(wardrobe,base_U_sleeves_up); +class EGVAR(wardrobe,base_U_sleeves_down); + +class EGVAR(wardrobe,base_H_goggles_on); +class EGVAR(wardrobe,base_H_goggles_off); + + + +class CfgWeapons { + // Base Classes + class H_Booniehat_khk; + class vn_b_headgear_base; + class vn_o_headgear_base: H_Booniehat_khk { + class ItemInfo; + }; + + + #include "Helmets.hpp" + #include "Booniehats.hpp" + #include "Uniforms_B.hpp" + #include "Uniforms_O.hpp" +}; + + +class CfgGlasses { + #include "Facewear.hpp" +}; \ No newline at end of file diff --git a/addons/compat_sog/compat_sog_wardrobe/Facewear.hpp b/addons/compat_sog/compat_sog_wardrobe/Facewear.hpp new file mode 100644 index 00000000000..a042b76cd65 --- /dev/null +++ b/addons/compat_sog/compat_sog_wardrobe/Facewear.hpp @@ -0,0 +1,104 @@ +// Common Base +class vn_glasses_base; + + +// Scarf +class vn_b_acc_rag_01: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_rag_02" }; + }; +}; +class vn_b_acc_rag_02: vn_b_acc_rag_01 { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_rag_01" }; + }; +}; + + +// Towel +class vn_b_acc_towel_01: vn_b_acc_rag_02 { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_towel_02" }; + }; +}; +class vn_b_acc_towel_02: vn_b_acc_towel_01 { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_towel_01" }; + }; +}; + + +// Pilot Air Mask +class vn_b_acc_ms22001_01: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_ms22001_02" }; + alternativeDisplayName = ECSTRING(wardrobe,maskOn); + }; +}; +class vn_b_acc_ms22001_02: vn_b_acc_ms22001_01 { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_acc_ms22001_01" }; + alternativeDisplayName = ECSTRING(wardrobe,maskOff); + }; +}; + +// Bandana + Aviators +class vn_b_aviator: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_bandana_a" }; + components[] = {"vn_b_aviator"}; + }; +}; + +class vn_o_bandana_b: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_bandana_a" }; + components[] = {"vn_o_bandana_b"}; + }; +}; + +class vn_b_bandana_a: vn_o_bandana_b { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_b_aviator", "vn_o_bandana_b" }; + components[] = {"vn_b_aviator", "vn_o_bandana_b"}; + }; +}; + + + +// US Combat Goggles, used by vn_b_helmet_m1_20_01 & vn_b_helmet_m1_20_02 +class vn_b_acc_goggles_01: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + components[] = {"vn_b_acc_goggles_01"}; + }; +}; + +// VN Pilot Glasses + Mask +// Pilot Mask +class vn_o_acc_km32_01: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_o_acc_goggles_03" }; + components[] = {"vn_o_acc_km32_01"}; + }; +}; +// VN Crew Goggles +class vn_o_acc_goggles_01: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + components[] = {"vn_o_acc_goggles_01"}; + }; +}; +// Goggles +class vn_o_acc_goggles_02: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_o_acc_goggles_03" }; + components[] = {"vn_o_acc_goggles_02"}; + }; +}; +// Goggles with Mask +class vn_o_acc_goggles_03: vn_glasses_base { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "vn_o_acc_km32_01", "vn_o_acc_goggles_02" }; + components[] = { "vn_o_acc_km32_01", "vn_o_acc_goggles_02"}; + }; + mass = 4; +}; \ No newline at end of file diff --git a/addons/compat_sog/compat_sog_wardrobe/Helmets.hpp b/addons/compat_sog/compat_sog_wardrobe/Helmets.hpp new file mode 100644 index 00000000000..f08c966fae7 --- /dev/null +++ b/addons/compat_sog/compat_sog_wardrobe/Helmets.hpp @@ -0,0 +1,187 @@ +// CfgWeapons + + +// Macros +#define CN01(side,var1,var2) vn_##side##_helmet_##var1##_01_##var2 +#define CN02(side,var1,var2) vn_##side##_helmet_##var1##_02_##var2 + + +#define HELMET_VARIANT(side,var1,var2)\ +class CN01(side,var1,var2): base_class_up {\ + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up) {\ + modifiableTo[] = { QUOTE(CN02(side,var1,var2)) };\ + };\ +};\ +class CN02(side,var1,var2): base_class_dn {\ + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) {\ + modifiableTo[] = { QUOTE(CN01(side,var1,var2)) };\ + };\ +} + + +class vn_b_helmet_m1_01_01: vn_b_headgear_base { + class ItemInfo; +}; + + +// Parent Version aph6 & svh4 +#define base_class_up vn_b_headgear_base +#define base_class_dn vn_b_headgear_base +HELMET_VARIANT(b,aph6,01); +HELMET_VARIANT(b,svh4,01); + +// Child Version aph6 +#undef base_class_up +#undef base_class_dn +#define base_class_up CN01(b,aph6,01) +#define base_class_dn CN02(b,aph6,01) + +HELMET_VARIANT(b,aph6,02); +HELMET_VARIANT(b,aph6,03); +HELMET_VARIANT(b,aph6,04); +HELMET_VARIANT(b,aph6,05); + +// Child Version svh4 +#undef base_class_up +#undef base_class_dn +#define base_class_up CN01(b,svh4,01) +#define base_class_dn CN02(b,svh4,01) + +HELMET_VARIANT(b,svh4,02); +HELMET_VARIANT(b,svh4,03); +HELMET_VARIANT(b,svh4,04); +HELMET_VARIANT(b,svh4,05); +HELMET_VARIANT(b,svh4,06); + +#undef base_class_up +#undef base_class_dn + + +// Special Case zsh3 +class vn_o_helmet_zsh3_01: vn_o_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_up) { + modifiableTo[] = { "vn_o_helmet_zsh3_02" }; + }; +}; +class vn_o_helmet_zsh3_02: vn_o_helmet_zsh3_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_visor_down) { + modifiableTo[] = { "vn_o_helmet_zsh3_01" }; + }; +}; + +// Helmets with/without Goggles +class vn_b_helmet_m1_14_01: vn_b_helmet_m1_01_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_b_helmet_m1_20_01" }; + }; + +}; +class vn_b_helmet_m1_14_02: vn_b_helmet_m1_14_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_b_helmet_m1_20_02" }; + }; +}; + +class vn_b_helmet_m1_20_01 : vn_b_helmet_m1_14_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_b_helmet_m1_14_01" }; + components[] = {"vn_b_acc_goggles_01"}; + }; + MASS(12); +}; +class vn_b_helmet_m1_20_02 : vn_b_helmet_m1_20_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_b_helmet_m1_14_02" }; + components[] = {"vn_b_acc_goggles_01"}; + }; + MASS(12); +}; + + +//// VN Pilot Helmet +// With Goggles +class vn_o_helmet_shl61_01: vn_o_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_o_helmet_shl61_02" }; + components[] = {"vn_o_acc_goggles_02"}; + }; + MASS(12); +}; +// Without Goggles +class vn_o_helmet_shl61_02: vn_o_helmet_shl61_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_o_helmet_shl61_01" }; + };MASS(10); +}; + + +// US Vic Crew Helmets +class vn_b_helmet_t56_01_01: vn_b_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_b_helmet_t56_02_01" }; + }; + class ItemInfo; +}; +class vn_b_helmet_t56_02_01: vn_b_helmet_t56_01_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_b_helmet_t56_01_01" }; + components[] = {"vn_b_acc_goggles_01"}; + }; + MASS(12); +}; + +class vn_b_helmet_t56_01_02: vn_b_helmet_t56_01_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_b_helmet_t56_02_02" }; + }; +}; +class vn_b_helmet_t56_02_02: vn_b_helmet_t56_02_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_b_helmet_t56_01_02" }; + components[] = {"vn_b_acc_goggles_01"}; + }; + MASS(12); +}; + +class vn_b_helmet_t56_01_03: vn_b_helmet_t56_01_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_b_helmet_t56_02_03" }; + }; +}; +class vn_b_helmet_t56_02_03: vn_b_helmet_t56_02_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_b_helmet_t56_01_03" }; + components[] = {"vn_b_acc_goggles_01"}; + }; + MASS(12); +}; + + +// VN Vic Crew Helmet // 1 with goggles +// vn_o_acc_goggles_01 +class vn_o_helmet_tsh3_01: vn_o_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_o_helmet_tsh3_02" }; + components[] = {"vn_o_acc_goggles_01"}; + }; +}; +class vn_o_helmet_tsh3_02: vn_o_helmet_tsh3_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_o_helmet_tsh3_01" }; + }; +}; + +// VN Pith Helmet with Crew Goggles +class vn_o_helmet_nva_01: vn_o_headgear_base { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "vn_o_helmet_nva_05" }; + }; + class ItemInfo; +}; +class vn_o_helmet_nva_05: vn_o_helmet_nva_01 { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "vn_o_helmet_nva_01" }; + components[] = {"vn_o_acc_goggles_02"}; + }; + MASS(12); +}; diff --git a/addons/compat_sog/compat_sog_wardrobe/Uniforms_B.hpp b/addons/compat_sog/compat_sog_wardrobe/Uniforms_B.hpp new file mode 100644 index 00000000000..d062edb7a53 --- /dev/null +++ b/addons/compat_sog/compat_sog_wardrobe/Uniforms_B.hpp @@ -0,0 +1,94 @@ +// CfgWeapons + +class Uniform_Base; +class vn_b_uniform_base: Uniform_Base { + class ItemInfo; +}; + + +// Macros +#define ITEMINFO_FIX()\ +class ItemInfo: ItemInfo {\ + containerClass = "Supply70";\ + mass = 70;\ +} + + +#define UNIFORM_BASE_B(class1,class2)\ +class class1: vn_b_uniform_base {\ + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) {\ + modifiableTo[] = { QUOTE(class2) };\ + };\ +};\ +class class2: vn_b_uniform_base {\ + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) {\ + modifiableTo[] = { QUOTE(class1) };\ + };\ +} + +#define UNIFORM_BASE_B_ITEMINFO_FIX(class1,class2)\ +class class1: vn_b_uniform_base {\ + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) {\ + modifiableTo[] = { QUOTE(class2) };\ + };\ +};\ +class class2: vn_b_uniform_base {\ + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) {\ + modifiableTo[] = { QUOTE(class1) };\ + };\ + ITEMINFO_FIX();\ +} + +#define B_U(div,var,camo) vn_b_uniform_##div##_##var##_##camo +#define B_U_PAIR(div,down,up,camo) UNIFORM_BASE_B(B_U(div,down,camo),B_U(div,up,camo)) + +#define B_U_PAIR_FIX(div,down,up,camo) UNIFORM_BASE_B_ITEMINFO_FIX(B_U(div,down,camo),B_U(div,up,camo)) + + +// Simple Variants +// ACZAC +UNIFORM_BASE_B(vn_b_uniform_aus_01_01,vn_b_uniform_aus_02_01); +UNIFORM_BASE_B(vn_b_uniform_aus_03_01,vn_b_uniform_aus_04_01); +UNIFORM_BASE_B(vn_b_uniform_aus_05_01,vn_b_uniform_aus_06_01); +UNIFORM_BASE_B(vn_b_uniform_aus_07_01,vn_b_uniform_aus_08_01); +UNIFORM_BASE_B(vn_b_uniform_aus_09_01,vn_b_uniform_aus_10_01); + +// NZ +UNIFORM_BASE_B(vn_b_uniform_NZ_01_01,vn_b_uniform_NZ_02_01); +UNIFORM_BASE_B(vn_b_uniform_NZ_03_01,vn_b_uniform_NZ_04_01); +UNIFORM_BASE_B(vn_b_uniform_NZ_05_01,vn_b_uniform_NZ_06_01); + +// SEAL STUFF +UNIFORM_BASE_B(vn_b_uniform_seal_01_01,vn_b_uniform_seal_02_01); +UNIFORM_BASE_B(vn_b_uniform_seal_01_02,vn_b_uniform_seal_02_02); +UNIFORM_BASE_B(vn_b_uniform_seal_01_05,vn_b_uniform_seal_02_05); +UNIFORM_BASE_B(vn_b_uniform_seal_01_06,vn_b_uniform_seal_02_06); +UNIFORM_BASE_B(vn_b_uniform_seal_01_07,vn_b_uniform_seal_02_07); + +// MACV +#define OLIVE_FIELD 01 +#define TIGER 02 +#define TIGER_GREEN 05 +#define ERDL_BROWN 06 +#define OLIVE 07 +#define LEOPARD 08 +#define ERDL 15 +#define LIZARD 16 +#define BDQ 17 +#define FROG 18 + +// macv 05 and 04 have inconsistency between them -> different uniform maxLoad. This likely will cause the player to loose items when the uniform is filled to the brim. Difference is 1lb which translates to 16~17x ace bandages or 1x 1l blood +#define B_U_PAIR_SET(camo)\ +B_U_PAIR(macv,02,03,camo);\ +B_U_PAIR_FIX(macv,05,04,camo) + +B_U_PAIR_SET(OLIVE_FIELD); +B_U_PAIR_SET(TIGER); +B_U_PAIR_SET(TIGER_GREEN); +B_U_PAIR_SET(ERDL_BROWN); +B_U_PAIR_SET(OLIVE); +B_U_PAIR_SET(LEOPARD); +B_U_PAIR_SET(ERDL); +B_U_PAIR_SET(LIZARD); +B_U_PAIR_SET(BDQ); +B_U_PAIR_SET(FROG); diff --git a/addons/compat_sog/compat_sog_wardrobe/Uniforms_O.hpp b/addons/compat_sog/compat_sog_wardrobe/Uniforms_O.hpp new file mode 100644 index 00000000000..f4b20fca32e --- /dev/null +++ b/addons/compat_sog/compat_sog_wardrobe/Uniforms_O.hpp @@ -0,0 +1,93 @@ +class vn_o_uniform_base; + +#define UNIFORM_BASE_O(class1,class2)\ +class class1: vn_o_uniform_base {\ + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) {\ + modifiableTo[] = { QUOTE(class2) };\ + };\ +};\ +class class2: vn_o_uniform_base {\ + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) {\ + modifiableTo[] = { QUOTE(class1) };\ + };\ +} + +// OPFOR + +// NVA Sailors +UNIFORM_BASE_O(vn_o_uniform_nva_navy_01,vn_o_uniform_nva_navy_03); +UNIFORM_BASE_O(vn_o_uniform_nva_navy_02,vn_o_uniform_nva_navy_04); + +// NVA_Army_AA_BB +// brown: 01,02 03,04 | GREEN: 01..12 +#define BROWN 01 +#define BROWN_FIELD 02 +#define GREEN 03 +#define GREEN_FIELD 04 +#define O_U_NVA_ARMY(var,camo) vn_o_uniform_nva_army_##var##_##camo +#define O_U_NVA_ARMY_PAIR(down,up,camo) UNIFORM_BASE_O(O_U_NVA_ARMY(down,camo),O_U_NVA_ARMY(up,camo)) +O_U_NVA_ARMY_PAIR(01,02,BROWN); +O_U_NVA_ARMY_PAIR(03,04,BROWN); +O_U_NVA_ARMY_PAIR(01,02,BROWN_FIELD); +O_U_NVA_ARMY_PAIR(03,04,BROWN_FIELD); + +O_U_NVA_ARMY_PAIR(01,02,GREEN); +O_U_NVA_ARMY_PAIR(03,04,GREEN); +O_U_NVA_ARMY_PAIR(05,06,GREEN); +O_U_NVA_ARMY_PAIR(07,08,GREEN); +O_U_NVA_ARMY_PAIR(09,10,GREEN); +O_U_NVA_ARMY_PAIR(11,12,GREEN); +O_U_NVA_ARMY_PAIR(01,02,GREEN_FIELD); +O_U_NVA_ARMY_PAIR(03,04,GREEN_FIELD); +O_U_NVA_ARMY_PAIR(05,06,GREEN_FIELD); +O_U_NVA_ARMY_PAIR(07,08,GREEN_FIELD); +O_U_NVA_ARMY_PAIR(09,10,GREEN_FIELD); +O_U_NVA_ARMY_PAIR(11,12,GREEN_FIELD); + +// PL ARMY +#define DARK 11 +#define DARK_FIELD 12 +#define LIGHT 13 +#define LIGHT_FIELD 14 +#define O_U_PL_ARMY(var,camo) vn_o_uniform_pl_army_##var##_##camo +#define O_U_PL_ARMY_PAIR(down,up,camo) UNIFORM_BASE_O(O_U_PL_ARMY(down,camo),O_U_PL_ARMY(up,camo)) + +O_U_PL_ARMY_PAIR(01,02,DARK); +O_U_PL_ARMY_PAIR(03,04,DARK); +O_U_PL_ARMY_PAIR(01,02,DARK_FIELD); +O_U_PL_ARMY_PAIR(03,04,DARK_FIELD); +O_U_PL_ARMY_PAIR(01,02,LIGHT); +O_U_PL_ARMY_PAIR(03,04,LIGHT); +O_U_PL_ARMY_PAIR(01,02,LIGHT_FIELD); +O_U_PL_ARMY_PAIR(03,04,LIGHT_FIELD); + + +#define O_U(div,var,camo) vn_o_uniform_##div##_##var##_##camo +#define O_U_PAIR(div,down,up,camo) UNIFORM_BASE_O(O_U(div,down,camo),O_U(div,up,camo)) +// VC MF +#define VC_MF 07 +O_U_PAIR(vc_mf,01,02,VC_MF); +O_U_PAIR(vc_mf,03,04,VC_MF); +O_U_PAIR(vc_mf,09,10,VC_MF); +O_U_PAIR(vc_mf,11,12,VC_MF); + +// VC REG +O_U_PAIR(vc_reg,11,12,08); +O_U_PAIR(vc_reg,11,12,09); +O_U_PAIR(vc_reg,11,12,10); + +// VC BLACK 01 BLACK_WHITE 02 GREY_TAN 03 BLUE 04 WHITE_BLACK 05 BLUE_WHITE 06 BLUE_GREY 07 +O_U_PAIR(vc,01,02,01); +O_U_PAIR(vc,03,04,01); +O_U_PAIR(vc,01,02,02); +O_U_PAIR(vc,03,04,02); +O_U_PAIR(vc,01,02,03); +O_U_PAIR(vc,03,04,03); +O_U_PAIR(vc,01,02,04); +O_U_PAIR(vc,03,04,04); +O_U_PAIR(vc,01,02,05); +O_U_PAIR(vc,03,04,05); +O_U_PAIR(vc,01,02,06); +O_U_PAIR(vc,03,04,06); +O_U_PAIR(vc,01,02,07); +O_U_PAIR(vc,03,04,07); diff --git a/addons/compat_sog/compat_sog_wardrobe/config.cpp b/addons/compat_sog/compat_sog_wardrobe/config.cpp new file mode 100644 index 00000000000..108f13ae1be --- /dev/null +++ b/addons/compat_sog/compat_sog_wardrobe/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "ace_wardrobe", + "vn_data_f" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"OverlordZorn [CVO]"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgWardrobe.hpp" diff --git a/addons/compat_sog/compat_sog_wardrobe/script_component.hpp b/addons/compat_sog/compat_sog_wardrobe/script_component.hpp new file mode 100644 index 00000000000..33ff700f410 --- /dev/null +++ b/addons/compat_sog/compat_sog_wardrobe/script_component.hpp @@ -0,0 +1,5 @@ +#define SUBCOMPONENT wardrobe +#define SUBCOMPONENT_BEAUTIFIED Wardrobe +#include "..\script_component.hpp" + +#include "\z\ace\addons\wardrobe\script_macros_wardrobe.hpp" diff --git a/addons/compat_ws/compat_ws_wardrobe/CfgWardrobe.hpp b/addons/compat_ws/compat_ws_wardrobe/CfgWardrobe.hpp new file mode 100644 index 00000000000..bab07ff8f04 --- /dev/null +++ b/addons/compat_ws/compat_ws_wardrobe/CfgWardrobe.hpp @@ -0,0 +1,92 @@ +class EGVAR(wardrobe,base); +class EGVAR(wardrobe,base_H_goggles_on); +class EGVAR(wardrobe,base_H_goggles_off); + + +class CfgGlasses { + class G_Combat; + class G_Combat_lxWS: G_Combat { + class ace_wardrobe: EGVAR(wardrobe,base) { + components[] = {"G_Combat_lxWS"}; + }; + }; +}; + + +class CfgWeapons { + + class ItemCore; + class HelmetBase: ItemCore { + class ItemInfo; + }; + + #include "Turbans.hpp" + + // Cap (Ion) Forward and Reversed + class lxWS_H_CapB_rvs_blk; + class lxWS_H_CapB_rvs_blk_ION: lxWS_H_CapB_rvs_blk { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "H_Cap_headphones_ion_lxws" }; + }; + }; + class H_Cap_headphones_ion_lxws: lxWS_H_CapB_rvs_blk_ION { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "lxWS_H_CapB_rvs_blk_ION" }; + }; + }; + + // Helmets + class H_PASGT_basic_base_F; + + //// RF Helmets with Glasses + class lxWS_H_PASGT_goggles_UN_F: HelmetBase { + MASS(32); + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "lxWS_H_PASGT_basic_UN_F" }; + components[] = {"G_Combat_lxWS"}; + }; + }; + class lxWS_H_PASGT_goggles_black_F: lxWS_H_PASGT_goggles_UN_F { + MASS(32); + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "H_PASGT_basic_black_F" }; + components[] = {"G_Combat_lxWS"}; + }; + }; + class lxWS_H_PASGT_goggles_olive_F: lxWS_H_PASGT_goggles_UN_F { + MASS(32); + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "H_PASGT_basic_olive_F" }; + components[] = {"G_Combat_lxWS"}; + }; + }; + class lxWS_H_PASGT_goggles_white_F: lxWS_H_PASGT_goggles_UN_F { + MASS(32); + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_on) { + modifiableTo[] = { "H_PASGT_basic_white_F" }; + components[] = {"G_Combat_lxWS"}; + }; + }; + + // Without + class lxWS_H_PASGT_basic_UN_F: HelmetBase { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "lxWS_H_PASGT_goggles_UN_F" }; + }; + }; + class H_PASGT_basic_black_F: H_PASGT_basic_base_F { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "lxWS_H_PASGT_goggles_black_F" }; + }; + }; + class H_PASGT_basic_olive_F: H_PASGT_basic_base_F { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "lxWS_H_PASGT_goggles_olive_F" }; + }; + }; + class H_PASGT_basic_white_F: H_PASGT_basic_base_F { + class ace_wardrobe: EGVAR(wardrobe,base_H_goggles_off) { + modifiableTo[] = { "lxWS_H_PASGT_goggles_white_F" }; + }; + }; +}; diff --git a/addons/compat_ws/compat_ws_wardrobe/Turbans.hpp b/addons/compat_ws/compat_ws_wardrobe/Turbans.hpp new file mode 100644 index 00000000000..e071106faa2 --- /dev/null +++ b/addons/compat_ws/compat_ws_wardrobe/Turbans.hpp @@ -0,0 +1,122 @@ +// CfgWeapons + +// MACROS +#define CN(version,color) lxWS_H_turban_##version##_##color +#define QCN(version,color) QUOTE(CN(version,color)) + +#define COLORGROUP(COLOR)\ +class CN(01,COLOR): lxWS_H_turban_01_black {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(02,COLOR), QCN(03,COLOR), QCN(04,COLOR) };\ + };\ +};\ +class CN(02,COLOR): lxWS_H_turban_02_black {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(01,COLOR), QCN(03,COLOR), QCN(04,COLOR) };\ + };\ +};\ +class CN(03,COLOR): lxWS_H_turban_03_black {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(01,COLOR), QCN(02,COLOR), QCN(04,COLOR) };\ + };\ +};\ +class CN(04,COLOR): lxWS_H_turban_04_black {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(01,COLOR), QCN(02,COLOR), QCN(03,COLOR) };\ + };\ +} + + +#define COLORGROUP_SPECIAL(COLOR)\ +class CN(02,COLOR): lxWS_H_turban_02_green {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(03,COLOR) };\ + };\ +};\ +class CN(03,COLOR): lxWS_H_turban_03_black {\ + class ace_wardrobe: EGVAR(wardrobe,base) {\ + modifiableTo[] = { QCN(02,COLOR) };\ + };\ +} + + +// BASECLASS +class H_Shemag_khk; +class HeadgearItem; + +class H_turban_02_mask_black_lxws: H_Shemag_khk { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,black), QCN(02,black), QCN(03,black), QCN(04,black) }; + components[] = { "lxWS_H_bmask_base" }; + }; + class ItemInfo: HeadgearItem { + mass = 26; + }; +}; + +class lxWS_H_turban_01_black: H_Shemag_khk { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(02,black), QCN(03,black), QCN(04,black), "H_turban_02_mask_black_lxws" }; + }; +}; +class lxWS_H_turban_02_black: lxWS_H_turban_01_black { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,black), QCN(03,black), QCN(04,black), "H_turban_02_mask_black_lxws" }; + }; +}; +class lxWS_H_turban_03_black: lxWS_H_turban_01_black { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,black), QCN(02,black), QCN(04,black), "H_turban_02_mask_black_lxws" }; + }; +}; +class lxWS_H_turban_04_black: lxWS_H_turban_01_black { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,black), QCN(02,black), QCN(03,black), "H_turban_02_mask_black_lxws" }; + }; +}; + +// VARIATIONS +COLORGROUP(blue); +COLORGROUP(blue_una); +COLORGROUP(green); +COLORGROUP(red); +COLORGROUP(gray); +COLORGROUP(yellow); + +// Special Variations +COLORGROUP_SPECIAL(green_pattern); + + +// Super Special Manual blabla +class H_turban_02_mask_snake_lxws: H_turban_02_mask_black_lxws { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,sand), QCN(02,sand), QCN(03,sand), QCN(04,sand), "H_turban_02_mask_hex_lxws" }; + components[] = {"H_bmask_snake_lxws"}; + }; +}; +class H_turban_02_mask_hex_lxws: H_turban_02_mask_black_lxws { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,sand), QCN(02,sand), QCN(03,sand), QCN(04,sand), "H_turban_02_mask_snake_lxws" }; + components[] = {"lxWS_H_bmask_hex"}; + }; +}; +class lxWS_H_turban_01_sand: lxWS_H_turban_01_black { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(02,sand), QCN(03,sand), QCN(04,sand), "H_turban_02_mask_snake_lxws", "H_turban_02_mask_hex_lxws" }; + }; +}; +class lxWS_H_turban_02_sand: lxWS_H_turban_02_black { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,sand), QCN(03,sand), QCN(04,sand), "H_turban_02_mask_snake_lxws", "H_turban_02_mask_hex_lxws" }; + }; +}; +class lxWS_H_turban_03_sand: lxWS_H_turban_03_black { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,sand), QCN(02,sand), QCN(04,sand), "H_turban_02_mask_snake_lxws", "H_turban_02_mask_hex_lxws" }; + }; +}; +class lxWS_H_turban_04_sand: lxWS_H_turban_04_black { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { QCN(01,sand), QCN(02,sand), QCN(03,sand), "H_turban_02_mask_snake_lxws", "H_turban_02_mask_hex_lxws" }; + }; +}; \ No newline at end of file diff --git a/addons/compat_ws/compat_ws_wardrobe/config.cpp b/addons/compat_ws/compat_ws_wardrobe/config.cpp new file mode 100644 index 00000000000..f5df153e6a4 --- /dev/null +++ b/addons/compat_ws/compat_ws_wardrobe/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "ace_wardrobe", + "Characters_f_lxWS_headgear" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"OverlordZorn [CVO]"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgWardrobe.hpp" diff --git a/addons/compat_ws/compat_ws_wardrobe/script_component.hpp b/addons/compat_ws/compat_ws_wardrobe/script_component.hpp new file mode 100644 index 00000000000..67ddb91ef0a --- /dev/null +++ b/addons/compat_ws/compat_ws_wardrobe/script_component.hpp @@ -0,0 +1,5 @@ +#define SUBCOMPONENT wardrobe +#define SUBCOMPONENT_BEAUTIFIED Wardrobe +#include "..\script_component.hpp" + +#include "\z\ace\addons\wardrobe\script_macros_wardrobe.hpp" \ No newline at end of file diff --git a/addons/compat_ws/script_component.hpp b/addons/compat_ws/script_component.hpp index 7607cd056bc..2c5ebd6ba49 100644 --- a/addons/compat_ws/script_component.hpp +++ b/addons/compat_ws/script_component.hpp @@ -2,5 +2,4 @@ #define COMPONENT_BEAUTIFIED Western Sahara Compatibility #include "\z\ace\addons\main\script_mod.hpp" - #include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/wardrobe/$PBOPREFIX$ b/addons/wardrobe/$PBOPREFIX$ new file mode 100644 index 00000000000..a04885ddda0 --- /dev/null +++ b/addons/wardrobe/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\wardrobe diff --git a/addons/wardrobe/Baseclass.hpp b/addons/wardrobe/Baseclass.hpp new file mode 100644 index 00000000000..0ba855dd7f4 --- /dev/null +++ b/addons/wardrobe/Baseclass.hpp @@ -0,0 +1,79 @@ +#define CN_SOUND(base,dur) QUOTE(TRIPLES(ADDON,base,dur)) + +class GVAR(base) { + + modifiableTo[] = {""}; + + // describes the components of the current item. + // When the current wearable is being changed into something, that does not have these + components[] = {}; + + // Supports Multiple Sounds, will pick one by random. + sound[] = {CN_SOUND(fabric,06),CN_SOUND(fabric,07),CN_SOUND(fabric,16),CN_SOUND(fabric,20),CN_SOUND(fabric,25)}; + sound_timing = 0; // [0..1] 0 at the start of the action, 0.5 half way during the duration of the action - always, if completed or not. 1 at the end, only when completed. + + // Gesture + gesture = "Gear"; + + // These will be read from the Target Class, so for example, the uniformclass with the rolled up sleaves, it should say "Roll Up Sleeves" + alternativePicture = ""; + alternativeDisplayName = ""; + + duration = 1; // Minimum Value: 1 - Anything above will produce a progressbar. +}; + +// Common Base Class for Uniforms with Sleeves Up/Down Variants +class GVAR(base_U_sleeves_up): GVAR(base) { + alternativeDisplayName = CSTRING(sleevesUp); +}; +class GVAR(base_U_sleeves_down): GVAR(base) { + alternativeDisplayName = CSTRING(sleevesDown); +}; + +// Common Base Class for Uniforms with Gloves On/Off Variants +class GVAR(base_U_gloves_on): GVAR(base) { + alternativeDisplayName = CSTRING(glovesOn); +}; +class GVAR(base_U_gloves_off): GVAR(base) { + alternativeDisplayName = CSTRING(glovesOff); +}; + +// Common Base Class for Uniforms who are open/closed in the front +class GVAR(base_U_jacket_open): GVAR(base) { + alternativeDisplayName = CSTRING(jacketOpen); +}; +class GVAR(base_U_jacket_closed): GVAR(base) { + alternativeDisplayName = CSTRING(jacketClose); +}; + +// Common Base Class for Helmets with a Visor that can be flipped up or down +class GVAR(base_H_visor_up): GVAR(base) { + duration = 0.25; + gesture ="gestureNod"; + + sound[] = {CN_SOUND(helmet_visor,05)}; + sound_timing = 0; + + alternativeDisplayName = CSTRING(visorUp); +}; + +class GVAR(base_H_visor_down): GVAR(base) { + duration = 0.25; + gesture ="gestureNod"; + + sound[] = {CN_SOUND(helmet_visor,05)}; + sound_timing = 0; + + alternativeDisplayName = CSTRING(visorDown); +}; + +// Common Base Class for Headgear with goggles that can be used as a facewear item. +class GVAR(base_H_goggles_on): GVAR(base) { + gesture ="GestureWipeFace"; + alternativeDisplayName = CSTRING(gogglesOn); +}; + +class GVAR(base_H_goggles_off): GVAR(base) { + gesture ="GestureWipeFace"; + alternativeDisplayName = CSTRING(gogglesOff); +}; diff --git a/addons/wardrobe/CfgEventHandlers.hpp b/addons/wardrobe/CfgEventHandlers.hpp new file mode 100644 index 00000000000..b777f210098 --- /dev/null +++ b/addons/wardrobe/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/wardrobe/CfgSounds.hpp b/addons/wardrobe/CfgSounds.hpp new file mode 100644 index 00000000000..8fd5d3b4ed7 --- /dev/null +++ b/addons/wardrobe/CfgSounds.hpp @@ -0,0 +1,20 @@ +// Duration in this case is 10th of secounds. so 10 -> 1 sec, 15 -> 1.5sec, ... +#define ENTRY(base,dur)\ +class GVAR(DOUBLES(base,dur)) {\ + name = QUOTE(base dur);\ + sound[] = { QPATHTOF(data\DOUBLES(base,dur)##.ogg), 1, 1, 100 };\ + titles[] = { 0, "" };\ + forceTitles = 0;\ + titlesStructured = 0;\ +} + +class CfgSounds { + sounds[] = {}; + ENTRY(fabric,06); + ENTRY(fabric,07); + ENTRY(fabric,16); + ENTRY(fabric,20); + ENTRY(fabric,25); + + ENTRY(helmet_visor,05); +}; diff --git a/addons/wardrobe/CfgVehicles.hpp b/addons/wardrobe/CfgVehicles.hpp new file mode 100644 index 00000000000..c24fa239e63 --- /dev/null +++ b/addons/wardrobe/CfgVehicles.hpp @@ -0,0 +1,17 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class ADDON { + displayName = CSTRING(actionTitle); // Text shown to user + icon = QPATHTOF(data\wardrobe_logo.paa); + condition = QUOTE([_player] call FUNC(addActions_condition)); + statement = ""; + insertChildren = QUOTE([_player] call FUNC(addActions)); + exceptions[] = {"isNotSwimming","isNotSitting"}; + }; + }; + }; + }; +}; diff --git a/addons/wardrobe/CfgWardrobe.hpp b/addons/wardrobe/CfgWardrobe.hpp new file mode 100644 index 00000000000..b7de9e608b9 --- /dev/null +++ b/addons/wardrobe/CfgWardrobe.hpp @@ -0,0 +1,8 @@ + +class CfgWeapons { + #include "Uniforms.hpp" +}; + +class CfgGlasses { + #include "Facewear.hpp" +}; diff --git a/addons/wardrobe/Facewear.hpp b/addons/wardrobe/Facewear.hpp new file mode 100644 index 00000000000..75f4a68de40 --- /dev/null +++ b/addons/wardrobe/Facewear.hpp @@ -0,0 +1,130 @@ +// CfgGlasses + +// Parents +class None; +class G_WirelessEarpiece_base_F; +class G_EyeProtectors_base_F; + +// Common Components +class G_Lowprofile: None { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Balaclava_lowprofile" }; + components[] = {"G_Lowprofile"}; + }; +}; +class G_Combat: None { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Balaclava_combat", "G_Balaclava_TI_G_blk_F", "G_Balaclava_TI_G_tna_F" }; + components[] = {"G_Combat"}; + }; +}; + +class G_Aviator: None { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Bandanna_aviator" }; + components[] = {"G_Aviator"}; + }; +}; +class G_Shades_Black: None { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Bandanna_shades" }; + components[] = {"G_Shades_Black"}; + }; +}; + + +// Balaclava, black +class G_Balaclava_blk: None { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Balaclava_lowprofile", "G_Balaclava_combat" }; + components[] = { "G_Balaclava_blk" }; + }; +}; +class G_Balaclava_combat: G_Balaclava_blk { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Balaclava_blk" }; + components[] = {"G_Balaclava_blk", "G_Combat"}; + }; +}; +class G_Balaclava_lowprofile: G_Balaclava_blk { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Balaclava_blk" }; + components[] = { "G_Balaclava_blk", "G_Lowprofile" }; + }; +}; + +// Stealth Balaclava, black +class G_Balaclava_TI_blk_F: None { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Balaclava_TI_G_blk_F" }; + components[] = { "G_Balaclava_TI_blk_F" }; + }; +}; +class G_Balaclava_TI_G_blk_F: G_Balaclava_TI_blk_F { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Balaclava_TI_blk_F" }; + components[] = { "G_Balaclava_TI_blk_F", "G_Combat" }; + }; +}; + +// Stealth Balaclava, green(tanoa) +class G_Balaclava_TI_tna_F: G_Balaclava_TI_blk_F { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Balaclava_TI_G_tna_F" }; + components[] = { "G_Balaclava_TI_tna_F" }; + }; +}; +class G_Balaclava_TI_G_tna_F: G_Balaclava_TI_tna_F { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Balaclava_TI_tna_F" }; + components[] = { "G_Balaclava_TI_tna_F", "G_Combat" }; + }; +}; + +// Bandana, Black +class G_Bandanna_blk: G_Balaclava_blk { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Bandanna_aviator", "G_Bandanna_sport", "G_Bandanna_shades" }; + components[] = { "G_Bandanna_blk" }; + }; +}; + +class G_Bandanna_shades: G_Bandanna_blk { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Bandanna_blk", "G_Shades_Black" }; + components[] = { "G_Bandanna_blk", "G_Shades_Black" }; + }; +}; +class G_Bandanna_sport: G_Bandanna_shades { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Bandanna_blk", "G_Sport_Blackred" }; + components[] = { "G_Bandanna_blk", "G_Sport_Blackred" }; + }; +}; +class G_Bandanna_aviator: G_Bandanna_shades { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_Bandanna_blk", "G_Aviator" }; + components[] = { "G_Bandanna_blk", "G_Aviator" }; + }; +}; + + +// Eye Protector +class G_EyeProtectors_F: G_EyeProtectors_base_F { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_EyeProtectors_Earpiece_F" }; + components[] = { "G_EyeProtectors_F" }; + }; +}; +class G_EyeProtectors_Earpiece_F: G_EyeProtectors_base_F { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_EyeProtectors_F", "G_WirelessEarpiece_F" }; + components[] = { "G_EyeProtectors_F", "G_WirelessEarpiece_F" }; + }; +}; +class G_WirelessEarpiece_F: G_WirelessEarpiece_base_F { + class ace_wardrobe: EGVAR(wardrobe,base) { + modifiableTo[] = { "G_EyeProtectors_Earpiece_F" }; + components[] = { "G_WirelessEarpiece_F" }; + }; +}; diff --git a/addons/wardrobe/Uniforms.hpp b/addons/wardrobe/Uniforms.hpp new file mode 100644 index 00000000000..f40cc377517 --- /dev/null +++ b/addons/wardrobe/Uniforms.hpp @@ -0,0 +1,30 @@ +// CfgWeapons +class Uniform_Base; + +// Macros +#define UNIFORM_BASE(class1,class2)\ +class class1: Uniform_Base {\ + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_down) {\ + modifiableTo[] = { QUOTE(class2) };\ + };\ +};\ +class class2: Uniform_Base {\ + class ace_wardrobe: EGVAR(wardrobe,base_U_sleeves_up) {\ + modifiableTo[] = { QUOTE(class1) };\ + };\ +} + + +// Vanilla CTRG Uniform +UNIFORM_BASE(U_B_CTRG_1,U_B_CTRG_3); + +// AAF Fatigues +UNIFORM_BASE(U_I_CombatUniform,U_I_CombatUniform_shortsleeve); + +// APEX CTRG Uniforms +UNIFORM_BASE(U_B_CTRG_Soldier_F,U_B_CTRG_Soldier_3_F); +UNIFORM_BASE(U_B_CTRG_Soldier_Arid_F,U_B_CTRG_Soldier_3_Arid_F); +UNIFORM_BASE(U_B_CTRG_Soldier_urb_1_F,U_B_CTRG_Soldier_urb_3_F); + +// Contact - LDF Fatigues +UNIFORM_BASE(U_I_E_Uniform_01_F,U_I_E_Uniform_01_shortsleeve_F); diff --git a/addons/wardrobe/XEH_PREP.hpp b/addons/wardrobe/XEH_PREP.hpp new file mode 100644 index 00000000000..417a9cc8cb4 --- /dev/null +++ b/addons/wardrobe/XEH_PREP.hpp @@ -0,0 +1,36 @@ +PREP(isModifiable); +PREP(compare_components); +PREP(canModifyTo); +// ace_intel +PREP(getIndexFromMagID); +PREP(setIndexForMagID); +// getItems +PREP(getItems_all); +PREP(getItems_modifiable_all); +PREP(getItems_modifiable_current); +PREP(getItems_modifiableTo); +// Replace +PREP(replace); +PREP(replace_other); +PREP(replace_container); +// Compat +PREP(spareBarrel_updateMagIDs); +// Ace Actions +PREP(addActions); +PREP(addActions_condition); +PREP(addActions_children); +PREP(getAction_Name); +PREP(getAction_Icon); +// Cache +PREP(cache_get); +PREP(cache_set); +PREP(clearOnClosed_InteractionMenu); +// Config +PREP(getCfgDataRandom); +// Debug +PREP(getAllWardrobeItems); +PREP(compare_container_maxLoad); +// CBA Context Menu +PREP(enable_contextMenu); +PREP(do_nextVariant); +PREP(getNextVariant); diff --git a/addons/wardrobe/XEH_postInit.sqf b/addons/wardrobe/XEH_postInit.sqf new file mode 100644 index 00000000000..cece4f6f968 --- /dev/null +++ b/addons/wardrobe/XEH_postInit.sqf @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +[ QGVAR(EH_updateMagIDs), FUNC(spareBarrel_updateMagIDs) ] call CBA_fnc_addEventHandler; + +[ + QGVAR(EH_say3d), + { + params [["_source", objNull, [objNull]],["_sound",[""],["", []]]]; + if (_sound isEqualType [] && {_sound#0 == ""} || {_sound isEqualType "" && {_sound == ""}}) exitWith {}; + _sound params [ + "_className", + ["_distance", 50, [0]], + ["_pitch", 0.95 + random 0.1, [0]] + ]; + _source say3D [_className, _distance, _pitch]; + nil + } +] call CBA_fnc_addEventHandler; diff --git a/addons/wardrobe/XEH_preInit.sqf b/addons/wardrobe/XEH_preInit.sqf new file mode 100644 index 00000000000..6d5fd0a42f7 --- /dev/null +++ b/addons/wardrobe/XEH_preInit.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#include "initSettings.inc.sqf" + +missionNamespace setVariable [QGVAR(cache), createHashMap]; + +ADDON = true; diff --git a/addons/wardrobe/config.cpp b/addons/wardrobe/config.cpp new file mode 100644 index 00000000000..966dd4a903e --- /dev/null +++ b/addons/wardrobe/config.cpp @@ -0,0 +1,31 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + author = ECSTRING(common,ACETeam); + authors[] = {"OverlordZorn [CVO]"}; + url = ECSTRING(main,URL); + + VERSION_CONFIG; + requiredVersion = REQUIRED_VERSION; + + requiredAddons[] = { + "ace_interact_menu", + "ace_goggles" + }; + skipWhenMissingDependencies = 1; + + units[] = {}; + weapons[] = {}; + }; +}; + +#include "CfgEventHandlers.hpp" + +#include "CfgVehicles.hpp" +#include "CfgSounds.hpp" + +#include "Baseclass.hpp" + +#include "CfgWardrobe.hpp" diff --git a/addons/wardrobe/data/attribution.md b/addons/wardrobe/data/attribution.md new file mode 100644 index 00000000000..417747726ff --- /dev/null +++ b/addons/wardrobe/data/attribution.md @@ -0,0 +1,13 @@ +fabric_06, fabric_07, fabric_16, fabric_20, fabric_25 +Nylon Jacket or Raincoat +by IENBA +https://freesound.org/s/658410/ +License: Creative Commons 0 + +helmet_visor_05 + +Click of a Motorcycle Helmet Visor + by rylandbrooks + https://freesound.org/s/328103/ + License: Creative Commons 0 + \ No newline at end of file diff --git a/addons/wardrobe/data/fabric_06.ogg b/addons/wardrobe/data/fabric_06.ogg new file mode 100644 index 00000000000..e8356428698 Binary files /dev/null and b/addons/wardrobe/data/fabric_06.ogg differ diff --git a/addons/wardrobe/data/fabric_07.ogg b/addons/wardrobe/data/fabric_07.ogg new file mode 100644 index 00000000000..5a26d62a9fa Binary files /dev/null and b/addons/wardrobe/data/fabric_07.ogg differ diff --git a/addons/wardrobe/data/fabric_16.ogg b/addons/wardrobe/data/fabric_16.ogg new file mode 100644 index 00000000000..ce46a5e5376 Binary files /dev/null and b/addons/wardrobe/data/fabric_16.ogg differ diff --git a/addons/wardrobe/data/fabric_20.ogg b/addons/wardrobe/data/fabric_20.ogg new file mode 100644 index 00000000000..e9e43cd28ce Binary files /dev/null and b/addons/wardrobe/data/fabric_20.ogg differ diff --git a/addons/wardrobe/data/fabric_25.ogg b/addons/wardrobe/data/fabric_25.ogg new file mode 100644 index 00000000000..86a251fa16b Binary files /dev/null and b/addons/wardrobe/data/fabric_25.ogg differ diff --git a/addons/wardrobe/data/helmet_visor_05.ogg b/addons/wardrobe/data/helmet_visor_05.ogg new file mode 100644 index 00000000000..a438aaf1242 Binary files /dev/null and b/addons/wardrobe/data/helmet_visor_05.ogg differ diff --git a/addons/wardrobe/data/wardrobe_logo.paa b/addons/wardrobe/data/wardrobe_logo.paa new file mode 100644 index 00000000000..2910c92cd71 Binary files /dev/null and b/addons/wardrobe/data/wardrobe_logo.paa differ diff --git a/addons/wardrobe/data/wardrobe_logo.png b/addons/wardrobe/data/wardrobe_logo.png new file mode 100644 index 00000000000..cb1b7a064b1 Binary files /dev/null and b/addons/wardrobe/data/wardrobe_logo.png differ diff --git a/addons/wardrobe/functions/fnc_addActions.sqf b/addons/wardrobe/functions/fnc_addActions.sqf new file mode 100644 index 00000000000..3f781a81423 --- /dev/null +++ b/addons/wardrobe/functions/fnc_addActions.sqf @@ -0,0 +1,40 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * This function creates children for the main wardrobe action - one for every modifiable Item. + * Each Modifiable Item will have its own children in regard of the items it can be changed towards. + * + * Arguments: + * 0: The Unit who's wearable shall be changed - usually the player themselves + * + * Return Value: + * Array of ACE Child Actions + * + * Example: + * [_player] call ace_wardrobe_fnc_addActions + * + * Public: No + */ + +params ["_unit"]; + + +private _modifiableItems = [_unit] call FUNC(getItems_modifiable_current); +private _actions = []; +{ + private _cfg = _x#0; + private _aceAction = [ + configName _cfg, + getText (_cfg >> "displayName"), + getText (_cfg >> "picture"), + {}, + {true}, + FUNC(addActions_children), + [_cfg, _x#1] + ] call ace_interact_menu_fnc_createAction; + _actions pushBack [_aceAction, [], _target]; + +} forEach _modifiableItems; + +_actions diff --git a/addons/wardrobe/functions/fnc_addActions_children.sqf b/addons/wardrobe/functions/fnc_addActions_children.sqf new file mode 100644 index 00000000000..3f40fed0097 --- /dev/null +++ b/addons/wardrobe/functions/fnc_addActions_children.sqf @@ -0,0 +1,44 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to create the ace action children, one for each possible variant of the current item. + * + * Arguments: + * 0: target + * 1: player + * 2: Multiple input types + * - 0: Current Variant + * - 1: Array of Configs Possible Variants + * + * Return Value: + * Array of ACE Child Actions + * + * Example: + * _this call ace_wardrobe_fnc_addActions_children + * + * Public: No + */ + +params ["_target", "_player", "_actionParams"]; +_actionParams params ["_cfg_origin", "_newItems"]; + + +private _actions = []; + +{ + private _cfg_target = _x; + private _aceAction = [ + configName _cfg_target, + [_cfg_target] call FUNC(getAction_Name), + [_cfg_target] call FUNC(getAction_Icon), + FUNC(replace), + {true}, + {}, + [_cfg_origin, _cfg_target] + ] call ace_interact_menu_fnc_createAction; + _actions pushBack [_aceAction, [], _target]; + +} forEach _newItems; + +_actions diff --git a/addons/wardrobe/functions/fnc_addActions_condition.sqf b/addons/wardrobe/functions/fnc_addActions_condition.sqf new file mode 100644 index 00000000000..d4561680cba --- /dev/null +++ b/addons/wardrobe/functions/fnc_addActions_condition.sqf @@ -0,0 +1,25 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Condition check: Is wardrobe enabled & if the player has an item that can be modified + * + * Arguments: + * 0: _player from the Ace Action + * + * Return Value: + * condition + * + * Example: + * [_player] call ace_wardrobe_fnc_addActions_condition + * + * Public: No + */ + +params ["_player"]; + +missionNamespace getVariable [QSET(enable_action), false] +&& +{ + count ([_player] call FUNC(getItems_modifiable_current)) > 0 +} diff --git a/addons/wardrobe/functions/fnc_cache_get.sqf b/addons/wardrobe/functions/fnc_cache_get.sqf new file mode 100644 index 00000000000..ba8d74ae5a4 --- /dev/null +++ b/addons/wardrobe/functions/fnc_cache_get.sqf @@ -0,0 +1,28 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * To retrieve a value from the database. returns "404" if not stored or, when provided, will execute the alternative code and return and store said result + * + * Arguments: + * 0: Key + * 1: Code to run when there is no value stored (optional) + * + * Return Value: + * Return or "404" if no entry found and no code provided + * + * + * Example: + * ["tag_loadout", { getUnitLoadout player }] call ace_wardrobe_fnc_cache_get + * + * Public: Yes + */ + + +params [ [ "_key", "", [""] ], [ "_else", "404", [{}] ] ]; + +if (_else isEqualTo "404") then { + GVAR(cache) getOrDefault [_key, "404"]; +} else { + GVAR(cache) getOrDefaultCall [_key, _else, true]; +}; \ No newline at end of file diff --git a/addons/wardrobe/functions/fnc_cache_set.sqf b/addons/wardrobe/functions/fnc_cache_set.sqf new file mode 100644 index 00000000000..7640c9d7e3e --- /dev/null +++ b/addons/wardrobe/functions/fnc_cache_set.sqf @@ -0,0 +1,28 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to store a value behind a key into the addons cache + * + * Arguments: + * 0: Key + * 1: Value + * + * Return Value: + * success + * + * Example: + * ['tag_myKey', ["some","data"]] call ace_wardrobe_fnc_cache_set + * + * Public: Yes + */ + + + +params [ ["_key", "", [""] ], ["_value", "404"] ]; + +if (_value isEqualTo "404") exitWith { false }; + +GVAR(cache) set [_key, _value]; + +true diff --git a/addons/wardrobe/functions/fnc_canModifyTo.sqf b/addons/wardrobe/functions/fnc_canModifyTo.sqf new file mode 100644 index 00000000000..8e7dfce0d88 --- /dev/null +++ b/addons/wardrobe/functions/fnc_canModifyTo.sqf @@ -0,0 +1,28 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Condition Check if the unit can modify from current variant to target variant. Checks and compares components. + * + * Arguments: + * 0: Unit + * 1: Current Variant + * 2: Desired Variant + * 3: Cache Result of fnc_getitems_all (default: true) + * + * Return Value: + * The return value + * + * Example: + * [_unit, _cfg_origin, _cfg_target] call ace_wardrobe_fnc_canModifyTo + * + * Public: No + */ + +params ["_unit", "_cfg_origin", "_cfg_target", ["_cache", true, [true]]]; + +[_cfg_origin, _cfg_target] call FUNC(compare_components) params ["_missing", "_surplus"]; + +private _currentItems = [_unit, _cache] call FUNC(getItems_all); + +count ( _missing select { ! (_x in _currentItems) } ) == 0 diff --git a/addons/wardrobe/functions/fnc_clearOnClosed_InteractionMenu.sqf b/addons/wardrobe/functions/fnc_clearOnClosed_InteractionMenu.sqf new file mode 100644 index 00000000000..f7e54eef1cf --- /dev/null +++ b/addons/wardrobe/functions/fnc_clearOnClosed_InteractionMenu.sqf @@ -0,0 +1,41 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to request the clearing of the cache on closing of the menu + * + * Arguments: + * 0: The first argument + * + * Return Value: + * None + * + * Example: + * ["tag_myDataEntry"] call ace_wardrobe_fnc_clearOnClosed_InteractionMenu + * + * Public: yes + */ + +params [ ["_key", "", [""]] ]; + +private _queue = missionNamespace getVariable [QGVAR(menu_clear_queue), "404"]; + +if (_queue isEqualTo "404") then { + _queue = []; + [ + "ace_interactMenuClosed", + { + if (_this isNotEqualTo [1]) exitWith {}; + + { GVAR(cache) deleteAt _x } forEach ( missionNamespace getVariable [QGVAR(menu_clear_queue), [] ] ); + + missionNamespace setVariable [QGVAR(menu_clear_queue), nil ]; + [_thisType, _thisId] call CBA_fnc_removeEventHandler; + } + ] call CBA_fnc_addEventHandlerArgs; + missionNamespace setVariable [QGVAR(menu_clear_queue), _queue]; +}; + +_queue pushBackUnique _key; + +nil diff --git a/addons/wardrobe/functions/fnc_compare_components.sqf b/addons/wardrobe/functions/fnc_compare_components.sqf new file mode 100644 index 00000000000..6271f1ffbc4 --- /dev/null +++ b/addons/wardrobe/functions/fnc_compare_components.sqf @@ -0,0 +1,37 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to compare the components of the current and target wearables. + * + * Arguments: + * 0: current variant + * 1: desired variant + * + * Return Value: + * Nested array + * - configs of missing components + * - configs of surplus components + * + * Example: + * [_cfg_origin, _cfg_tgt] call ace_wardrobe_fnc_compare_components + * + * Public: No + */ + +params ["_cfg_origin", "_cfg_tgt"]; + +private _current = getArray (_cfg_origin >> "ace_wardrobe" >> "components"); +private _needed = getArray (_cfg_tgt >> "ace_wardrobe" >> "components"); + +private _missing = []; + +{ + if (_x in _current) then { + _current = _current - [_x] + } else { + _missing pushBack _x + }; +} forEach _needed; + +[_missing, _current] diff --git a/addons/wardrobe/functions/fnc_compare_container_maxLoad.sqf b/addons/wardrobe/functions/fnc_compare_container_maxLoad.sqf new file mode 100644 index 00000000000..65c5d988dff --- /dev/null +++ b/addons/wardrobe/functions/fnc_compare_container_maxLoad.sqf @@ -0,0 +1,45 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * WIP - This function will compare the maxLoad of all modifiable Items with its modifiableTo Variants and will provide an RPT output. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_wardrobe_fnc_compare_container_maxLoad + * + * Public: yes + */ + +// TODO + +private _allWardrobeItems = [true] call FUNC(getAllWardrobeItems) select { + switch ( getNumber (_x >> "ItemInfo" >> "type") ) do { + case TYPE_GOGGLE: { false; }; + case TYPE_HEADGEAR: { false; }; + case default { true }; + }; +}; + +private _established = []; + +{ + private _origin_cfg = _x; + private _origin_className = configName _origin_cfg; + + + if (_origin_className in _established) then { continue }; + _established pushBack _origin_className; + + private _targets = [_origin] call FUNC(getItems_modifiableTo); + + // formulate + + + +} forEach _allWardrobeItems; diff --git a/addons/wardrobe/functions/fnc_do_nextVariant.sqf b/addons/wardrobe/functions/fnc_do_nextVariant.sqf new file mode 100644 index 00000000000..dd7ab23312d --- /dev/null +++ b/addons/wardrobe/functions/fnc_do_nextVariant.sqf @@ -0,0 +1,44 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Statement of CBA Context Menu Entry - Request the Next Variant. + * + * Arguments: + * 0: Player + * 1: Container + * 2: Classname + * 3: Slot + * 4: Arguments + * + * Return Value: + * nothing + * + * Example: + * [_unit, _container, _item, _slot, _params] call ace_wardrobe_fnc_do_nextVariant + * + * Public: No + */ + +params ["_unit", "_container", "_item", "_slot", "_params"]; + +private _current_cfg = [_item] call cba_fnc_getItemConfig; + +private _cfg_tgt = [ _current_cfg ] call FUNC(getNextVariant); + +if (_cfg_tgt isEqualTo false) exitWith {}; + +private _canModifyTo = [_unit, _current_cfg, _cfg_tgt, false] call FUNC(canModifyTo); + +if !(_canModifyTo) exitWith { + [ + [LLSTRING(cannotSwitchTo)], + [getText (_cfg_tgt >> "displayName")], + [LLSTRING(missingComponents)], + true + ] call CBA_fnc_notify; +}; + +[_unit, _unit, [_current_cfg, _cfg_tgt], true] call FUNC(replace); + +nil diff --git a/addons/wardrobe/functions/fnc_enable_contextMenu.sqf b/addons/wardrobe/functions/fnc_enable_contextMenu.sqf new file mode 100644 index 00000000000..87410477159 --- /dev/null +++ b/addons/wardrobe/functions/fnc_enable_contextMenu.sqf @@ -0,0 +1,39 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * CBA Setting - On Setting Changed - Function to activate the Wardrobe related CBA Context Menu Options + * + * Arguments: + * 0: CBA Setting Value + * + * Return Value: + * None + * + * Example: + * [true] call ace_wardrobe_fnc_enable_contextMenu + * + * Public: No + */ + + +params [["_enable", true, [true]]]; + +if (_enable && {!(missionNamespace getVariable [QGVAR(contextmenu_enabled), false])}) then { + missionNamespace setVariable [QGVAR(contextmenu_enabled), true]; + + [ + "#ALL", + "CLOTHES", + "Switch to next Variant", + [], + QPATHTOF(data\wardrobe_logo.paa), + [ + {true}, + {true} + ], + FUNC(do_nextVariant), + false, + [] + ] call CBA_fnc_addItemContextMenuOption; +}; diff --git a/addons/wardrobe/functions/fnc_getAction_Icon.sqf b/addons/wardrobe/functions/fnc_getAction_Icon.sqf new file mode 100644 index 00000000000..8cda6ab602a --- /dev/null +++ b/addons/wardrobe/functions/fnc_getAction_Icon.sqf @@ -0,0 +1,24 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * This Function checks if the Target Item has an alternative Picture for the Action, if not, it returns the picture property + * + * Arguments: + * 0: Config of desired Variant + * + * Return Value: + * Path to Icon or "" + * + * Example: + * [_cfg] call ace_wardrobe_fnc_getAction_Icon + * + * Public: No + */ + +params [ ["_cfg", configNull, [configNull] ] ]; + +if (isNull _cfg) exitWith {}; + +private _altDispIcon = getText (_cfg >> QADDON >> "alternativePicture"); +if (_altDispIcon isEqualTo "") then { getText (_cfg >> "picture") } else { _altDispIcon } diff --git a/addons/wardrobe/functions/fnc_getAction_Name.sqf b/addons/wardrobe/functions/fnc_getAction_Name.sqf new file mode 100644 index 00000000000..679d39ee4b8 --- /dev/null +++ b/addons/wardrobe/functions/fnc_getAction_Name.sqf @@ -0,0 +1,22 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * This Function checks if the Target Item has an Alternative String for the Action, if not, it returns the displayName property + * + * Arguments: + * 0: Desired Variant + * + * Return Value: + * The return value + * + * Example: + * ['something', player] call ace_wardrobe_fnc_getAction_Name + * + * Public: No + */ + +params [ ["_cfg", configNull, [configNull] ] ]; + +private _altDispName = getText (_cfg >> QADDON >> "alternativeDisplayName"); +if (_altDispName isEqualTo "") then { getText (_cfg >> "displayName") } else { _altDispName }; diff --git a/addons/wardrobe/functions/fnc_getAllWardrobeItems.sqf b/addons/wardrobe/functions/fnc_getAllWardrobeItems.sqf new file mode 100644 index 00000000000..82809a400e0 --- /dev/null +++ b/addons/wardrobe/functions/fnc_getAllWardrobeItems.sqf @@ -0,0 +1,25 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Debug - Function to retrieve all existing Wardrobe items. + * + * Arguments: + * 0: Return as Config? (default: false) + * + * Return Value: + * Array Wardobe Items, ether as Classname or as Config + * + * Example: + * [true] call ace_wardrobe_fnc_getAllWardrobeItems; + * [this, flatten ([] call ace_wardrobe_fnc_getAllWardrobeItems)] call ace_arsenal_fnc_initBox; + * + * Public: Yes + */ + + +params [["_asConfig", false, [true]]]; + +private _return = flatten ( ["CfgWeapons", "CfgGlasses"] apply { ( QUOTE([_x] call FUNC(isModifiable)) configClasses (configFile >> _x) ) } ); + +if (_asConfig) then { _return } else { _return apply { configName _x } } diff --git a/addons/wardrobe/functions/fnc_getCfgDataRandom.sqf b/addons/wardrobe/functions/fnc_getCfgDataRandom.sqf new file mode 100644 index 00000000000..9be9e65d03a --- /dev/null +++ b/addons/wardrobe/functions/fnc_getCfgDataRandom.sqf @@ -0,0 +1,28 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * This function extracts data from a config property. If it is an Array, it will select a random entry from the array, otherwise it will simply return the provided data. + * + * Arguments: + * 0: configPath + * + * Return Value: + * Value + * + * Example: + * [_cfg] call ace_wardrobe_fnc_getCfgDataRandom + * + * Public: yes + */ + +params [ + [ "_cfg", configNull, [configNull] ] +]; + +if (_cfg isEqualTo configNull) exitWith {nil}; + +private _data = [_cfg] call BIS_fnc_getCfgData; +if (_data isEqualType []) then { _data = selectRandom _data }; + +_data diff --git a/addons/wardrobe/functions/fnc_getIndexFromMagID.sqf b/addons/wardrobe/functions/fnc_getIndexFromMagID.sqf new file mode 100644 index 00000000000..f70989ddd89 --- /dev/null +++ b/addons/wardrobe/functions/fnc_getIndexFromMagID.sqf @@ -0,0 +1,25 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * function to return the data index based of the magazine ID + * + * Arguments: + * 0: magazine ID + * + * Return Value: + * The return value + * + * Example: + * [_magID] call ace_wardrobe_fnc_getIndexFromMagID + * + * Public: Yes + */ + +params [ + ["_magazineID", "", [""] ] +]; + +if !(_magazineID in allVariables EGVAR(intelItems,intelMap)) exitWith { -1 }; + +EGVAR(intelItems,intelMap) getVariable _magazineID diff --git a/addons/wardrobe/functions/fnc_getItems_all.sqf b/addons/wardrobe/functions/fnc_getItems_all.sqf new file mode 100644 index 00000000000..29e6165e957 --- /dev/null +++ b/addons/wardrobe/functions/fnc_getItems_all.sqf @@ -0,0 +1,33 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Retrieves a list of all items of unit - can be cached for the duration of the ace interaction. + * + * Arguments: + * 0: Unit + * 1: Cache Return? + * + * Return Value: + * All Items of the Unit + * + * Example: + * [player, false] call ace_wardrobe_fnc_getItems_all + * + * Public: No + */ + +params [ + ["_unit", objNull, [objNull]], + ["_cache", true, [true]] +]; + + +private _code = { flatten getUnitLoadout _unit select { _x isEqualType "" && { _x != ""}}; }; + +private _caching = { + ["items_all"] call FUNC(clearOnClosed_InteractionMenu); + ["items_all", _code] call FUNC(cache_get); // returns the result +}; + +if (_cache) then _caching else _code; diff --git a/addons/wardrobe/functions/fnc_getItems_modifiableTo.sqf b/addons/wardrobe/functions/fnc_getItems_modifiableTo.sqf new file mode 100644 index 00000000000..bbfef931543 --- /dev/null +++ b/addons/wardrobe/functions/fnc_getItems_modifiableTo.sqf @@ -0,0 +1,21 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to return an array the config of desired target items. Also checks if those items exist: CBA_fnc_getItemConfig returns configNull when item not found. + * + * Arguments: + * 0: Current Variant + * + * Return Value: + * Array of all possible variants as config + * + * Example: + * [_cfg_current] call ace_wardrobe_fnc_getItems_modifiableTo + * + * Public: No + */ + +params ["_cfg_current"]; + +[_cfg_current >> QADDON >> "modifiableTo"] call BIS_fnc_getCfgDataArray apply { [_x] call CBA_fnc_getItemConfig } select { !isNull _x } diff --git a/addons/wardrobe/functions/fnc_getItems_modifiable_all.sqf b/addons/wardrobe/functions/fnc_getItems_modifiable_all.sqf new file mode 100644 index 00000000000..021d56bd76d --- /dev/null +++ b/addons/wardrobe/functions/fnc_getItems_modifiable_all.sqf @@ -0,0 +1,54 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to retrieve modifiable items of a unit. Can be cached for the duration of the interaction menu. + * + * Arguments: + * 0: Unit + * 1: Cache Return? + * + * Return Value: + * modifiable Items of the Unit + * + * Example: + * [player, false] call ace_wardrobe_fnc_getItems_modifiable_all + * + * Public: Yes + */ + +params [ + ["_unit", objNull, [objNull]], + ["_cache", true, [true]] +]; + + +private _code = { + + [_unit] call FUNC(getItems_all) + apply + { [_x] call CBA_fnc_getItemConfig } + select + { [_x] call FUNC(isModifiable) } + apply + { [_x, [_x] call FUNC(getItems_modifiableTo) ] } + select + { count (_x#1) > 0 } + apply + { + private _origin_cfg = _x#0; + [ + _origin_cfg, + _x#1 select { [_unit, _origin_cfg, _x] call FUNC(canModifyTo) } + ] + } + select + { count (_x#1) > 0 } +}; + +private _caching = { + ["items_modifiable_all"] call FUNC(clearOnClosed_InteractionMenu); + ["items_modifiable_all", _code] call FUNC(cache_get); // returns the result +}; + +if (_cache) then _caching else _code; diff --git a/addons/wardrobe/functions/fnc_getItems_modifiable_current.sqf b/addons/wardrobe/functions/fnc_getItems_modifiable_current.sqf new file mode 100644 index 00000000000..3d498395b55 --- /dev/null +++ b/addons/wardrobe/functions/fnc_getItems_modifiable_current.sqf @@ -0,0 +1,55 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to retrieve currently worn, modifiable items. Return can be cached for the duration of the interaction menu. + * + * Arguments: + * 0: Unit + * 1: Cache Return? + * + * Return Value: + * modifiable Items of the Unit + * + * Example: + * [player, false] call ace_wardrobe_fnc_getItems_modifiable_current + * + * Public: Yes + */ + +params [ + ["_unit", objNull, [objNull]], + ["_cache", true, [true]] +]; + + +private _code = { + + ( [headgear _unit, goggles _unit, uniform _unit, vest _unit, backpack _unit] - [""] ) + apply + { [_x] call CBA_fnc_getItemConfig } + select + { [_x] call FUNC(isModifiable) } + apply + { [_x, [_x] call FUNC(getItems_modifiableTo) ] } // will return an array, even if the target variants are not available. + select + { count (_x#1) > 0 } + apply + { + private _origin_cfg = _x#0; + [ + _origin_cfg, + _x#1 select { [_unit, _origin_cfg, _x] call FUNC(canModifyTo) } + ] + } + select + { count (_x#1) > 0 } +}; + + +private _caching = { + ["items_modifiable_current"] call FUNC(clearOnClosed_InteractionMenu); + ["items_modifiable_current", _code] call FUNC(cache_get); // returns the result +}; + +if (_cache) then _caching else _code; diff --git a/addons/wardrobe/functions/fnc_getNextVariant.sqf b/addons/wardrobe/functions/fnc_getNextVariant.sqf new file mode 100644 index 00000000000..5ff9894fa3f --- /dev/null +++ b/addons/wardrobe/functions/fnc_getNextVariant.sqf @@ -0,0 +1,60 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Context Menu - Return config the "next" variant - if multiple Variants are defined, it will choose randomly. + * Maintains a Histroy of the current and chosen variants as long as the Inventory is open. + * Already used variants from the History will be removed from the availabe options. + * Once all options have been exhausted, the history will be purged and start over. + * + * Arguments: + * 0: Current Variant + * + * Return Value: + * Desired Variant + * + * Example: + * [_cfg_current] call ace_wardrobe_fnc_getNextVariant + * + * Public: No + */ + + +params ["_cfg_current"]; + +private _modifiableTo_cfg = [_cfg_current, false] call FUNC(getItems_modifiableTo); + +if (count _modifiableTo_cfg == 0) exitWith {false}; + +private _history_cfg = missionNamespace getVariable [QGVAR(variant_history_cfg), "404"]; + +if (_history_cfg isEqualTo "404") then { + + _history_cfg = []; + _history_cfg pushBackUnique _cfg_current; + + missionNamespace setVariable [QGVAR(variant_history_cfg), _history_cfg]; + + player addEventHandler ["InventoryClosed", { + missionNamespace setVariable [QGVAR(variant_history_cfg), nil ]; + player removeEventHandler [_thisEvent, _thisEventhandler]; + }]; +}; + + +private _remaining = _modifiableTo_cfg - _history_cfg; + + +// Returns ether a random remaining item or alternatively, a random one from the complete array. +private _return = if (count _remaining > 0) then { + selectRandom _remaining +} else { + // _history_cfg select { !(_x in _modifiableTo_cfg) }; + _history_cfg = []; + missionNamespace setVariable [QGVAR(variant_history_cfg), [] ]; + _history_cfg pushBackUnique _cfg_current; + selectRandom _modifiableTo_cfg; +}; + +_history_cfg pushBackUnique _return; +_return diff --git a/addons/wardrobe/functions/fnc_isModifiable.sqf b/addons/wardrobe/functions/fnc_isModifiable.sqf new file mode 100644 index 00000000000..9ca0fd3f256 --- /dev/null +++ b/addons/wardrobe/functions/fnc_isModifiable.sqf @@ -0,0 +1,27 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to check if the provided wearable Item (Config) item is defined as a modifiable Wardrobe Item. + * Will not return true on fully inherited "ace_wardrobe" subclass + * + * Arguments: + * 0: Wearable Item + * + * Return Value: + * The return value + * + * Example: + * [_cfg] call ace_wardrobe_fnc_isModifiable + * + * Public: No + */ + +params [ + ["_cfg", configNull, [configNull]] +]; + + +if (isNull _cfg) exitWith {false}; +// Checks if the config has the property without it being inherited(!) +count ( QUOTE(configName _x isEqualTo QQ(ace_wardrobe)) configClasses _cfg ) > 0 diff --git a/addons/wardrobe/functions/fnc_replace.sqf b/addons/wardrobe/functions/fnc_replace.sqf new file mode 100644 index 00000000000..df489586bcf --- /dev/null +++ b/addons/wardrobe/functions/fnc_replace.sqf @@ -0,0 +1,95 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Ace Action Statement - Removes the modifiableItem and replaces it with the target item + * + * Arguments: + * 0: Action Target + * 1: Action Player + * 2: Action Params + * - 0: Current Variant + * - 0: Desired Variant + * 3: Replace Now? (default: false) + * + * Return Value: + * None + * + * Example: + * _this call ace_wardrobe_fnc_replace + * + * Public: No + */ + +params ["_target", "_unit", "_actionParams", ["_replaceNow", false, [true]]]; +_actionParams params ["_cfg_origin", "_cfg_tgt"]; + +// Duration of the "animation" +private _duration = getNumber (_cfg_tgt>> QADDON >> "duration"); +if (_replaceNow) then { _duration = 0; }; + +// Replace the Main Item. +private _additionalParams = ""; +private _typeNumber = getNumber (_cfg_origin >> "ItemInfo" >> "type"); +private _replaceCode = switch ( _typeNumber ) do { + case TYPE_HEADGEAR: { _additionalParams = "HEADGEAR"; FUNC(replace_other) }; + case TYPE_UNIFORM: { _additionalParams = "UNIFORM"; FUNC(replace_container) }; + case TYPE_VEST: { _additionalParams = "VEST"; FUNC(replace_container) }; + case TYPE_BACKPACK: { _additionalParams = "BACKPACK"; FUNC(replace_container) }; + default { + // CfgGlasses items do not have a ItemInfo Subclass and therefore, not TypeNumber. + switch (true) do { + case (isClass (configFile >> "CfgGlasses" >> configName _cfg_origin)): { _additionalParams = "FACEWEAR"; FUNC(replace_other) }; + default { false }; + }; + }; +}; + +if (_replaceCode isEqualType false) exitWith { ERROR_2("typeNumber undefined: %1 - %2",_typeNumber,configName _cfg_origin); }; +[ _replaceCode, [_unit, _cfg_origin, _cfg_tgt, _additionalParams ], _duration] call CBA_fnc_waitAndExecute; + +//// Handle Components +// Add Surplus +[_cfg_origin, _cfg_tgt] call FUNC(compare_components) params ["_missing", "_surplus"]; +{ + if (configName _cfg_tgt != _x) then { + if ( isClass (configFile >> "CfgGlasses" >> _x) && { goggles _unit == "" } ) then { + _unit addGoggles _x; + } else { + [_unit, _x, true] call CBA_fnc_addItem; + }; + }; +} forEach _surplus; + +// Remove Missing +{ + if (configName _cfg_origin != _x) then { + + switch (true) do { + case (goggles _unit == _x): { removeGoggles _unit; }; + default { [_unit, _x] call CBA_fnc_removeItem; }; + }; + }; +} forEach _missing; + + +//// Handle Effects +// Animation/Gestures +[ _unit, getText (_cfg_tgt >> QADDON >> "gesture") ] call ace_common_fnc_doGesture; + +// Plays Random Sound At the Beginning +private _sound = [_cfg_tgt >> QADDON >> "sound"] call FUNC(getCfgDataRandom); +if (_sound != "") then { + [ + CBA_fnc_globalEvent, + [QGVAR(EH_say3d), [_unit,_sound]], + (getNumber (_cfg_tgt>> QADDON >> "sound_timing") max 0 min 1) * _duration + ] call CBA_fnc_waitAndExecute; +}; + +// Notification +private _notify_img = getText (_cfg_tgt >> "picture"); +if !(".paa" in _notify_img) then { _notify_img = [_notify_img,"paa"] joinString "." }; +[ CBA_fnc_notify, [[ _notify_img, 4], [getText (_cfg_tgt >> "displayName")], true ], _duration * 1.2 ] call CBA_fnc_waitAndExecute; + +nil diff --git a/addons/wardrobe/functions/fnc_replace_container.sqf b/addons/wardrobe/functions/fnc_replace_container.sqf new file mode 100644 index 00000000000..baffd697ec0 --- /dev/null +++ b/addons/wardrobe/functions/fnc_replace_container.sqf @@ -0,0 +1,63 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to replace a persons Uniform while maintaining the content of the uniform. + * + * Arguments: + * 0: Unit + * 1: Current Variant + * 2: Desired Variant + * 2: Type of Wearable Container + * + * Return Value: + * None + * + * Example: + * [_player, _cfg_origin, _cfg_tgt, _case] call ace_wardrobe_fnc_replace_uniform + * + * Public: No + */ + +params ["_player", "_cfg_origin", "_cfg_tgt", "_case"]; + +toFixed 0; +private _magazineDetails = (magazinesAmmoFull _player) apply { [_x#0, _x#-2, _x#-1] }; +private _loadout = [_player] call CBA_fnc_getLoadout; + + +//// Handle Special Cases - Pre Replace +// ACE Intel Items +INTEL_PRE(_hasDocument,acex_intelitems_document); +INTEL_PRE(_hasNotepad,acex_intelitems_notepad); +INTEL_PRE(_hasPhoto,acex_intelitems_photo); + +// ACE Overheating +private _hasSpareBarrel = _magazineDetails findIf { _x#0 isEqualTo "ACE_SpareBarrel" } > -1; +if (_hasSpareBarrel) then { _hasSpareBarrel = [_player, "ACE_SpareBarrel" ] call CBA_fnc_getMagazineIndex }; + + +//// Replace Wearable +// Change Wearable +switch (_case) do { + case "UNIFORM": { _loadout # 0 # 3 set [0, configName _cfg_tgt]; }; + case "VEST": { _loadout # 0 # 4 set [0, configName _cfg_tgt]; }; + case "BACKPACK": { _loadout # 0 # 5 set [0, configName _cfg_tgt]; }; + default { ERROR_1("Case undefined: %1",_case); }; +}; + +// Apply new Loadout +[_player, _loadout] call CBA_fnc_setLoadout; + + +//// Handle Special Cases - Post Replace +// ACE Intel Items +INTEL_POST(_hasDocument,acex_intelitems_document); +INTEL_POST(_hasNotepad,acex_intelitems_notepad); +INTEL_POST(_hasPhoto,acex_intelitems_photo); + +// ACE Overheating +if (_hasSpareBarrel isEqualType [] ) then { + private _SpareBarrel_new_MagIDs = [_player, "ACE_SpareBarrel"] call CBA_fnc_getMagazineIndex; + [QGVAR(EH_updateMagIDs), [_hasSpareBarrel, _SpareBarrel_new_MagIDs]] call CBA_fnc_serverEvent; +}; diff --git a/addons/wardrobe/functions/fnc_replace_other.sqf b/addons/wardrobe/functions/fnc_replace_other.sqf new file mode 100644 index 00000000000..92797622476 --- /dev/null +++ b/addons/wardrobe/functions/fnc_replace_other.sqf @@ -0,0 +1,32 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to replace a person's goggles/facewear. + * + * Arguments: + * 0: Unit + * 1: Current Variant + * 2: Desired Variant + * + * Return Value: + * None + * + * Example: + * [_player, _cfg_origin, _cfg_tgt] call ace_wardrobe_fnc_replace_facewear + * + * Public: No + */ + +params ["_player", "_cfg_origin", "_cfg_tgt", "_additionalParams"]; + +switch (_additionalParams) do { + case "HEADGEAR": { + removeHeadgear _player; + _player addHeadgear configName _cfg_tgt; + }; + case "FACEWEAR": { + removeGoggles _player; + _player addGoggles configName _cfg_tgt; + }; +}; diff --git a/addons/wardrobe/functions/fnc_setIndexForMagID.sqf b/addons/wardrobe/functions/fnc_setIndexForMagID.sqf new file mode 100644 index 00000000000..187076ad39e --- /dev/null +++ b/addons/wardrobe/functions/fnc_setIndexForMagID.sqf @@ -0,0 +1,27 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Sets the data-index for a magID + * + * Arguments: + * 0: Magazine ID + * 1: Index + * + * Return Value: + * None + * + * Example: + * [_magID, _index] call ace_wardrobe_fnc_setIndexForMagID + * + * Public: No + */ + +params [ + ["_magID", "", [""]], + ["_index", 0, [0]] +]; + +if (_index == -1) exitWith {}; + +EGVAR(intelItems,intelMap) setVariable [_magID, _index, true]; diff --git a/addons/wardrobe/functions/fnc_spareBarrel_updateMagIDs.sqf b/addons/wardrobe/functions/fnc_spareBarrel_updateMagIDs.sqf new file mode 100644 index 00000000000..843c04bb009 --- /dev/null +++ b/addons/wardrobe/functions/fnc_spareBarrel_updateMagIDs.sqf @@ -0,0 +1,33 @@ +#include "../script_component.hpp" + +/* + * Author: OverlordZorn + * Function to update ACE Overheating's Serverside SpareBarrel DataBase with new MagIDs. + * + * Arguments: + * 0: old magIDs + * 1: new magIDs + * + * Return Value: + * The return value + * + * Example: + * [_old, _new] call ace_wardrobe_fnc_spareBarrel_updateMagIDs + * + * Public: No + */ + +if (!isServer) exitWith {}; + +params ["_old_magIDs", "_new_magIDs"]; + +if (count _old_magIDs != count _new_magIDs) exitWith { ERROR_2("Not Equal Number of magID's provided: %1 - %2",_old_magIDs,_new_magIDs); systemChat "Errorrrrrrrrrrr"; }; + +private _map = EGVAR(overheating,storedSpareBarrels); + +{ + private _oldID = _x; + if !(_oldID in _map) then { continue }; + _map set [ _new_magIDs # _forEachIndex , _map deleteAt _oldID ]; + +} forEach _old_magIDs; \ No newline at end of file diff --git a/addons/wardrobe/initSettings.inc.sqf b/addons/wardrobe/initSettings.inc.sqf new file mode 100644 index 00000000000..d22a804bebc --- /dev/null +++ b/addons/wardrobe/initSettings.inc.sqf @@ -0,0 +1,21 @@ +[ + QSET(enable_action), + "CHECKBOX", + LSTRING(enable_action), + [LSTRING(set_cat_main)], + true, + 1, + {}, + false +] call CBA_fnc_addSetting; + +[ + QSET(enable_contextMenu), + "CHECKBOX", + LSTRING(enable_contextMenu), + [LSTRING(set_cat_main)], + true, + 1, + FUNC(enable_contextMenu), + true +] call CBA_fnc_addSetting; diff --git a/addons/wardrobe/script_component.hpp b/addons/wardrobe/script_component.hpp new file mode 100644 index 00000000000..907b02485b8 --- /dev/null +++ b/addons/wardrobe/script_component.hpp @@ -0,0 +1,18 @@ +#define COMPONENT wardrobe +#define COMPONENT_BEAUTIFIED Wardrobe +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_VOLUME + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_VOLUME + #define DEBUG_SETTINGS DEBUG_SETTINGS_VOLUME +#endif + +#include "\z\ace\addons\main\script_macros.hpp" +#include "\z\ace\addons\wardrobe\script_macros_wardrobe.hpp" diff --git a/addons/wardrobe/script_macros_wardrobe.hpp b/addons/wardrobe/script_macros_wardrobe.hpp new file mode 100644 index 00000000000..d145ef346d9 --- /dev/null +++ b/addons/wardrobe/script_macros_wardrobe.hpp @@ -0,0 +1,31 @@ +// CBA Settings +#define SET(var1) TRIPLES(ADDON,set,var1) +#define QSET(var1) QUOTE(SET(var1)) +#define QQSET(var1) QQ(SET(var1)) +#define ESET(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),SET,var2) +#define QESET(var1,var2) QUOTE(ESET(var1,var2)) +#define QQESET(var1,var2) QQ(ESET(var1,var2)) + +// LSTRING for cba Settings +#define SETLSTRING(key) [LSTRING(DOUBLES(set,key)),LSTRING(TRIPLES(set,key,desc))] + +// QOL +#define QQ(var1) QUOTE(QUOTE(var1)) +#define QADDON QUOTE(ADDON) + + +// REPLACE +#define INTEL_PRE(varName,className)\ +private varName = _magazineDetails findIf { _x select 0 == QUOTE(className) } > -1;\ +if (varName) then { _hasDocument = [_player, QUOTE(className)] call CBA_fnc_getMagazineIndex apply { [_x] call FUNC(getIndexFromMagID) } } + +#define INTEL_POST(varName,className)\ +if (varName isEqualType []) then { { [_x, varName select _forEachIndex] call FUNC(setIndexForMagID); } forEach ( [_player, QUOTE(className)] call CBA_fnc_getMagazineIndex ); } + + +// Config +//// Adjust Weight of CfgWeapons Wearables. +#define MASS(var)\ +class ItemInfo: ItemInfo {\ + mass = var;\ +} diff --git a/addons/wardrobe/stringtable.xml b/addons/wardrobe/stringtable.xml new file mode 100644 index 00000000000..98c59311ddc --- /dev/null +++ b/addons/wardrobe/stringtable.xml @@ -0,0 +1,71 @@ + + + + + + ACE Wardrobe + ACE Gaderobe + + + + + ACE Interaction + Aktivieren ACE Interaction + + + CBA Context Menu + Aktiviere CBA Context Menu + + + + + Wardrobe + Gaderobe + + + Take gloves off + + + Wear gloves + + + Take goggles off + + + Put goggles on + + + Close Jacket + + + Open Jacket + + + Take mask off + + + Put mask on + + + Roll sleeves down + + + Roll sleeves up + + + Visor down + + + Visor up + + + + + Cannot switch to + + + due to missing components + + + + diff --git a/docs/wiki/framework/wardrobe-framework.md b/docs/wiki/framework/wardrobe-framework.md new file mode 100644 index 00000000000..fda3f4ff1a7 --- /dev/null +++ b/docs/wiki/framework/wardrobe-framework.md @@ -0,0 +1,300 @@ +--- +layout: wiki +title: Wardrobe Framework +description: Explains the wardrobe system and how to make a compat. +group: framework +order: 5 +parent: wiki +mod: ace +version: + major: 3 + minor: 20 + patch: 0 +--- + + +## 1. Overview + +The Wardrobe Addon gives the player the opportunity to change/modify their current wearables into different variants. + +For example, if a uniform has a normal variant and a "Rolled-Up Sleeves" variant, the player will be able to use ether an ACE Self Interaction or the CBA Context Menu in the Inventory. + +Since there is no reliable, common pattern in terms of class inheritance, not even within the same DLC, each possible variant has to be defined individually within the classes' config properties. + +### 1.1 Components + +Components are an optional assistance to define a group of variants where a variant is made of one or more components. +For example, a bandanna with sunglasses would have the the bandanna and the sunglasses as components, while the bandanna and sunglasses themself only have themselves as a component. + +If the player switches from a variant with more components to a variant with less components, the surplus components will be deposited in their inventory. Vise Versa, if the player wants to change from a variant with less components to a variant with more components, they are required to have the missing components in their inventory, which will be removed on conversion. + +More examples can be found below. + +### 1.2 Config Guidelines + +- A Container (Uniform, Vest, Backpack) should never change its `maxLoad`, unless there is a really good reason for it. This will result in the loss of items. +- Variants should never "magically" add/remove parts of themselves, unless its handled through a component. +- There should not be a difference in weight between the different variants unless compoents get added/removed. + - For Example: `Mass of Helmet with Goggles = Mass of Helmet + Mass of Goggles.` + +## 2. Config + +Only directly defined Subclasses will be taken into account. A fully inherited subclass will be ignored and will not provide any interaction. The `ace_wardrobe` properties are to be found as a subclass of the item itself. Multiple base configs are designed at root of `configFile`. + +## 2.1 Properties + + +| Class Property | Data Type | Description | +| -------------- | ----------- | ----------- | +| `modifiableTo[]` | Array of Classnames | possible Variants this item can be turned into. | +| `components[]` | Array of Classnames | Components the current variant contains within itself | +| `sound[]` | Array of CfgSound Entries | to be chosen by random when the action is performed | +| `sound_timing` | Number 0..1 | defines the point time relative to the duration when the sound is played | +| `gesture` | String of Classname | Gesture to be played when the action is performed | +| `alternativePicture` | String of path to icon | to be used instead of target variant picture | +| `alternativeDisplayName` | String | Will be used instead of the target variants displayname | +| `duration` | Number in seconds | Duration of action. Items are being replaced at the end. | + +### 2.2 Base Classes + +#### 2.2.1 Base + +```cpp +// root of configFile +class ace_wardrobe_base { + + modifiableTo[] = {""}; + + components[] = {}; + + // Supports Multiple Sounds, will pick one by random. + sound[] = { "ace_wardrobe_fabric_06", "ace_wardrobe_fabric_07", "ace_wardrobe_fabric_16", "ace_wardrobe_fabric_20", "ace_wardrobe_fabric_25"}; + sound_timing = 0; // [0..1] 0 at the start of the action, 0.5 half way during the duration of the action - always, if completed or not. 1 at the end, only when completed. + + // Gesture + gesture = "Gear"; + + // These will be read from the Target Class, so for example, the uniformclass with the rolled up sleaves, it should say "Roll Up Sleeves" + alternativePicture = ""; + alternativeDisplayName = ""; + + duration = 1; // Minimum Value: 1 - Anything above will produce a progressbar. +}; + +``` + +#### 2.2.2 Base Uniform Sleeves Up / Down +Common Base Class for Uniforms with Sleeves Up/Down Variants +```cpp +class ace_wardrobe_base_U_sleeves_up: ace_wardrobe_base { + alternativeDisplayName = CSTRING(sleevesUp); +}; +class ace_wardrobe_base_U_sleeves_down: ace_wardrobe_base { + alternativeDisplayName = CSTRING(sleevesDown); +}; +``` +#### 2.2.3 Base Uniform Gloves On / Off +Common Base Class for Uniforms with Gloves On/Off Variants +```cpp +class ace_wardrobe_base_U_gloves_on: ace_wardrobe_base { + alternativeDisplayName = CSTRING(glovesOn); +}; +class ace_wardrobe_base_U_gloves_off: ace_wardrobe_base { + alternativeDisplayName = CSTRING(glovesOff); +}; +``` +#### 2.2.4 Base Uniform Jacket Open / Closed +Common Base Class for Uniforms who are open/closed in the front +```cpp +class ace_wardrobe_base_U_jacket_open: ace_wardrobe_base { + alternativeDisplayName = CSTRING(jacketOpen); +}; +class ace_wardrobe_base_U_jacket_closed: ace_wardrobe_base { + alternativeDisplayName = CSTRING(jacketClose); +}; +``` + +#### 2.2.5 Base Helmet Visor Up / Down +Common Base Class for Helmets with a Visor that can be flipped up or down. +Here, the duration is carefully timed to be aligned with the "click" of the soun. + +```cpp +class ace_wardrobe_base_H_visor_up: ace_wardrobe_base { + duration = 0.25; + gesture ="gestureNod"; + + sound[] = {CN_SOUND(helmet_visor,05)}; + sound_timing = 0; + + alternativeDisplayName = CSTRING(visorUp); +}; + +class ace_wardrobe_base_H_visor_down: ace_wardrobe_base { + duration = 0.25; + gesture ="gestureNod"; + + sound[] = {"ace_wardrobe_05"}; + sound_timing = 0; + + alternativeDisplayName = CSTRING(visorDown); +}; +``` +#### 2.2.6 Base Headgear with Goggles on / off +Common Base Class for Headgear with goggles that can be used as a facewear item. +```cpp +class ace_wardrobe_base_H_goggles_on: ace_wardrobe_base { + gesture ="GestureWipeFace"; + alternativeDisplayName = CSTRING(gogglesOn); +}; + +class ace_wardrobe_base_H_goggles_off: ace_wardrobe_base { + gesture ="GestureWipeFace"; + alternativeDisplayName = CSTRING(gogglesOff); +}; +``` + + +## 3. Examples + +### 3.1 Linear Example + +- First, we import the wardrobe base classes `ace_wardrobe_base_U_sleeves_down` and `ace_wardrobe_base_U_sleeves_up` at the root of `configFile`. +- The uniform we would like to configure is part of `CfgWeapons` and inherits from `Uniform_Base`. +- Then we edit the desired classes and create the `ace_wardrobe` subclass by inheriting from the parent base classes. +- Afterwards, we define which variants this class can be modified to. +- This example does not require the use of components since we're not adding or removing anything. +```cpp +// config.cpp +class ace_wardrobe_base_U_sleeves_down; +class ace_wardrobe_base_U_sleeves_up; + +class CfgWeapons { + class Uniform_Base; + + // Sleeves Down Variant + class U_B_CTRG_1: Uniform_Base { + class ace_wardrobe: ace_wardrobe_base_U_sleeves_down { + modifiableTo[] = { "U_B_CTRG_3" }; + components[] = {}; + }; + }; + + // Sleeves Up Variant + class U_B_CTRG_3: Uniform_Base { + class ace_wardrobe: ace_wardrobe_base_U_sleeves_up { + modifiableTo[] = { "U_B_CTRG_1" }; + components[] = {}; + }; + }; +}; +``` +### 3.2 Complex example with partial use of components + + +```cpp +// config.cpp +class ace_wardrobe_base; + +class CfgWeapons { + // BASECLASS + class H_Shemag_khk; + + // WS Turban with Ballistic Mask + class H_turban_02_mask_black_lxws: H_Shemag_khk { + class ace_wardrobe: ace_wardrobe_base { + modifiableTo[] = { "lxWS_H_turban_01_black", "lxWS_H_turban_02_black", "lxWS_H_turban_03_black", "lxWS_H_turban_04_black" }; + components[] = { "lxWS_H_bmask_base" }; + }; + }; + // WS Turban Variant 1 + class lxWS_H_turban_01_black: H_Shemag_khk { + class ace_wardrobe: ace_wardrobe_base { + modifiableTo[] = { "lxWS_H_turban_02_black", "lxWS_H_turban_03_black", "lxWS_H_turban_04_black", "H_turban_02_mask_black_lxws" }; + components[] = { }; // not needed when empty - only shown as an example for how/when to use components + }; + }; + // WS Turban Variant 2 + class lxWS_H_turban_02_black: lxWS_H_turban_01_black { + class ace_wardrobe: ace_wardrobe_base { + modifiableTo[] = { "lxWS_H_turban_01_black", "lxWS_H_turban_03_black", "lxWS_H_turban_04_black", "H_turban_02_mask_black_lxws" }; + components[] = { }; // not needed when empty - only shown as an example for how/when to use components + }; + }; + // WS Turban Variant 3 + class lxWS_H_turban_03_black: lxWS_H_turban_01_black { + class ace_wardrobe: ace_wardrobe_base { + modifiableTo[] = { "lxWS_H_turban_01_black", "lxWS_H_turban_02_black", "lxWS_H_turban_04_black", "H_turban_02_mask_black_lxws" }; + components[] = { }; // not needed when empty - only shown as an example for how/when to use components + }; + }; + // WS Turban Variant 4 + class lxWS_H_turban_04_black: lxWS_H_turban_01_black { + class ace_wardrobe: ace_wardrobe_base { + modifiableTo[] = { "lxWS_H_turban_01_black", "lxWS_H_turban_02_black", "lxWS_H_turban_03_black", "H_turban_02_mask_black_lxws" }; + components[] = { }; // not needed when empty - only shown as an example for how/when to use components + }; + }; +}; + +``` + + +### 3.3 Complex Example with thorough use of components + +```cpp +// config.cpp +class ace_wardrobe_base; + +class CfgGlasses { + class None; + class G_Balaclava_blk; + class G_Bandanna_shades; + + // Aviator Sunglasses + class G_Aviator: None { + class ace_wardrobe: ace_wardrobe_base { + modifiableTo[] = { "G_Bandanna_aviator" }; + components[] = {"G_Aviator"}; + }; + }; + // Bandana, Black with Aviator Sunglasses + class G_Bandanna_aviator: G_Bandanna_shades { + class ace_wardrobe: ace_wardrobe_base { + modifiableTo[] = { "G_Bandanna_blk", "G_Aviator" }; + components[] = { "G_Bandanna_blk", "G_Aviator" }; + }; + }; + // Bandana, Black + class G_Bandanna_blk: G_Balaclava_blk { + class ace_wardrobe: ace_wardrobe_base { + modifiableTo[] = { "G_Bandanna_aviator" }; + components[] = { "G_Bandanna_blk" }; + }; + }; +}; +``` + +## 4. Addon Settings + + + +## 5. Sounds + +The following `CfgSounds` classes are integrated in `ace_wardrobe` and are the default sounds for the `ace_wardrobe_base` and `ace_wardrobe_base_H_visor_up`/`ace_wardrobe_base_H_visor_down` base classes. + +### 5.1 Integrated Sounds + +The number at the end of the classnames indicates the length of the file in 1/10th seconds. +10 -> 1 sec, 15 -> 1.5sec, ... + +- `ace_wardrobe_fabric_06` +- `ace_wardrobe_fabric_07` +- `ace_wardrobe_fabric_16` +- `ace_wardrobe_fabric_20` +- `ace_wardrobe_fabric_25` +- `ace_wardrobe_helmet_visor_05` + +## 6. Compatibility +Currently, `ace_IntelItems` and `ace_overheating` (spare barrels) are being directly supported. + +If an addon or mod utilizes a magazine's `magazineID` to handle additional data about items carried by the player, then the process of modifying a wearable container (uniform, vest, backpack) to another variant will result in new `magazineID`s for all magazines on the player.