-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added equipment tag to allow specialization of equipment #1152
base: main
Are you sure you want to change the base?
Conversation
07299cb
to
a3dfda6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have to straighten out the first few roles we have added. Then we can work on adding the "sidearm" tag for people who are authorized to carry a sidearm but don't have one equipped by default.
b335209
to
32ef8fb
Compare
1990a11
to
8324264
Compare
Wiki Article: Gear.mdcScripts Gear are our loadout script strongly inspired and taken from Poppy, our old loadout script. The gear system is rewritten and is greatly tailored to our community needs and have a extra simplification added to it. The loadout utilized a loadout array obtained from ace export loadout or the bis LoadoutsLoadouts are automatically applied to units on spawn based on the variable, variableName, classname or side. Loadouts are also saved when altered (See below). Loadouts using Loadout SavingWhen you alter your loadout it automatically get saved and reapplied on respawn. The save event is run when you alter the loadout in arsenal or when you close your inventory and only happens when your inside of a defined [[Staging Zone|staging zone]]. All gear related functions will honer the saved loadout. Permissions are also kept based on the core loadout used before the save was committed. How to gear upThe gear system is quite simple it utilized config values to obtain and apply your loadout. class CommonBlufor {};
class My_Loadout: CommonBlufor {
regiment = "";
company = "";
platoon = -1;
squad = -1;
team = "";
displayName = "";
scope = 0;
category[] = {};
loadout = [[],[],[],[],[],[],"","",[],["","","","","",""]];
equipmentTags[] = {};
icon = "";
insignia = "";
abilityMedic = 0;
abilityEngineer = 0;
abilityEOD = 0;
preLoadout = "";
postLoadout = "";
}; Config Propertiesclass CommonBlufor {};
class My_Loadout: CommonBlufor {
regiment = ""; // Style value
company = ""; // Used for arsenal whitelist based on side as well as gives your company callsign
platoon = -1; // Used for arsenal whitelist based on side as well as gives your platoon callsign
squad = -1; // Used for arsenal whitelist based on side as well as gives your squad callsign
team = ""; // Used for auto assign unit to a fire team color.
displayName = ""; // Used to make the selection label
scope = 0; // 0 private: not obtainable. 1 protected: can be used but not selected. 2 public: can be selected and used
category[] = {}; // Hardcoded category paths found in ".\cScripts\CavFnc\functions\systems\fn_setupLoadoutCategories.sqf"
loadout = [[],[],[],[],[],[],"","",[],["","","","","",""]]; // loadout array none quoted warped
equipmentTags[] = {}; // Equipment tags
icon = ""; // Style value (use classname of a unit icon)
insignia = ""; // Style value (use classname of a insignia)
abilityMedic = 0; // 0 Nothing, 1 Medic, 2 Doctor
abilityEngineer = 0; // 0 Nothing, 1 Repair Specialists, 2 Engineer
abilityEOD = 0; // 0 Nothing, 1 EOD Specialist
preLoadout = ""; // code that gets applied before loadout and abilities are applied
postLoadout = ""; // code that gets applied after loadout and abilities are applied
}; Simple loadout exsampleclass CommonBlufor {};
class My_Rifleman_Local: CommonBlufor {
displayName = "Rifleman";
scope = 2;
loadout = [[],[],[],[],[],[],"","",[],["","","","","",""]];
equipmentTags[] = {"BasicSoldierEquipment"};
};
class My_TeamLeader_Local: My_Rifleman_Local {
displayName = "Team Leader";
loadout = [[],[],[],[],[],[],"","",[],["","","","","",""]];
equipmentTags[] += {"TeamLeaderEquipment"};
};
class My_SquadLeader_Local: My_TeamLeader_Local {
displayName = "Squad Leader";
loadout = [[],[],[],[],[],[],"","",[],["","","","","",""]];
equipmentTags[] += {"SquadLeaderEquipment"};
};
class My_SpecialSoldier_Local: CommonBlufor {
displayName = "Engineer";
scope = 2;
abilityEngineer = 2;
loadout = [[],[],[],[],[],[],"","",[],["","","","","",""]];
equipmentTags[] = {"BasicSoldierEquipment", "EngineerEquipment"};
}; Loadout applicationsLoadouts can be applied in several ways. The main system used is the classname based system but it can also apply to units using variableName, setVariable or side. The loadout also need to be this setVariable ["cScripts_Gear_LoadoutClass", "Cav_B_C_Rifleman_F"]; Keep spawn LoadoutYou can keep the EDEN selected loadout by adding the following variable to a player unit: this setVariable ["cScripts_Gear_LoadoutClass", "default"]; In our current setup of our loadouts ArsenalThe arsenal is built automatically when opening the staging variant of the arsenal and utilizes side, company, weapon system and equipmentTags to construct the whitelist. Equipment TagsEquipment tags are defined in The system can also auto detect weapons (primary, pistols and launchers) to this in order to automatically provide you with variants and basic items the system uses a prefix followed by the top baseclass of weapon variant. class CfgEquipmentTags {
common[] = {"G_Aviator"};
commonBlufor[] = {
"rhs_weap_mk18_KAC_bk",
"rhs_weap_mk18_KAC",
"rhs_mag_30Rnd_556x45_M855A1_PMAG_Tracer_Red"
};
commonBluforCompanyCharlie[] = {"ace_banana"};
class_rhs_weap_m4a1[] = {
"rhs_weap_m4a1",
"rhs_weap_m4a1_carryhandle"
};
}; The tag system allow you to make collection and groups of items and you can also reference this collections from other tags by adding their name to the tag. class CfgEquipmentTags {
collection_all_rifles[] = {
"class_rhs_weap_m4a1",
"class_rhs_weap_m16a4",
"collection_rifle_magazines"
};
class_rhs_weap_m4a1[] = {
"rhs_weap_m4a1",
"rhs_weap_m4a1_carryhandle"
};
class_rhs_weap_m16a4[] = {
"rhs_weap_m16a4",
"rhs_weap_m16a4_carryhandle"
};
collection_rifle_magazines[] = {
"rhs_mag_30Rnd_556x45_M855A1_PMAG",
"rhs_mag_30Rnd_556x45_M855A1_PMAG_Tracer_Red"
};
}; See Also
|
70cfd27
to
af7f9ee
Compare
272fc6d
to
3d1cf12
Compare
Added addArsenal Wrapper to be used for missions were you want a action to be added.
2879b77
to
d072568
Compare
When merged this pull request will:
globaly (
common
), side (common<side>
), company (common<side>Company<company>
) and platoon (Common<side>Company<company><platoon>
).Note
This contians changes to the `description.ext´
It contains a addition of a include: