Skip to content

Commit

Permalink
feat: infantry groups
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjydev committed Jan 23, 2024
1 parent eab6b17 commit 611d8d7
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ workshop = [
"463939057", # ace
"1661066023", # RKSL Studios - Attachments v3.02
"843577117", # RHSUSAF
"1875281645", # ILBE Assault Pack
"894678801", # TFAR
]
42 changes: 42 additions & 0 deletions addons/factions/CfgGroups.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
class CfgGroups {
class WEST {
class PMCS_B {
name = "PMC Sentinel";

class Infantry {
name = "Infantry";

class pmcs_b_inf_sq {
name = "Squad";
side = 1;
faction = "PMCS_B";
icon = "\A3\ui_f\data\map\markers\nato\b_inf.paa";
rarityGroup = 0.5;

UNIT_0(SERGEANT,PMCS_B_SquadLeader);
UNIT_1(CORPORAL,PMCS_B_Marksman);
UNIT_2(PRIVATE,PMCS_B_Rifleman);
UNIT_3(CORPORAL,PMCS_B_Rifleman_LAT);

UNIT_4(SERGEANT,PMCS_B_TeamLeader);
UNIT_5(CORPORAL,PMCS_B_Autorifleman);
UNIT_6(PRIVATE,PMCS_B_Rifleman);
UNIT_7(CORPORAL,PMCS_B_Rifleman_LAT);
};

class pmcs_b_inf_ft {
name = "Fire Team";
side = 1;
faction = "PMCS_B";
icon = "\A3\ui_f\data\map\markers\nato\b_inf.paa";
rarityGroup = 0.5;

UNIT_0(SERGEANT,PMCS_B_TeamLeader);
UNIT_1(CORPORAL,PMCS_B_Autorifleman);
UNIT_2(PRIVATE,PMCS_B_Rifleman);
UNIT_3(CORPORAL,PMCS_B_Rifleman_LAT);
};
};
};
};
};
3 changes: 2 additions & 1 deletion addons/factions/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ class CfgPatches {
};
};

#include "CfgFactionClasses.hpp"
#include "CfgFactionClasses.hpp"
#include "CfgGroups.hpp"
3 changes: 2 additions & 1 deletion addons/factions/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_UNITS
#endif

#include "\z\pmcs\addons\main\script_macros.hpp"
#include "\z\pmcs\addons\main\script_macros.hpp"
#include "script_macros.hpp"
30 changes: 30 additions & 0 deletions addons/factions/script_macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#define UNIT_XX(IDX,POS,RANK,UNIT) class Unit##IDX## { \
position[] = POS; \
rank = QUOTE(RANK); \
side = 1; \
vehicle = QUOTE(UNIT); \
}

#define UNIT_0_POS {0,0,0}
#define UNIT_0(RANK,UNIT) UNIT_XX(0,UNIT_0_POS,RANK,UNIT)

#define UNIT_1_POS {5,-5,0}
#define UNIT_1(RANK,UNIT) UNIT_XX(1,UNIT_1_POS,RANK,UNIT)

#define UNIT_2_POS {-5,-5,0}
#define UNIT_2(RANK,UNIT) UNIT_XX(2,UNIT_2_POS,RANK,UNIT)

#define UNIT_3_POS {10,-10,0}
#define UNIT_3(RANK,UNIT) UNIT_XX(3,UNIT_3_POS,RANK,UNIT)

#define UNIT_4_POS {0,-5,0}
#define UNIT_4(RANK,UNIT) UNIT_XX(4,UNIT_4_POS,RANK,UNIT)

#define UNIT_5_POS {5,-10,0}
#define UNIT_5(RANK,UNIT) UNIT_XX(5,UNIT_5_POS,RANK,UNIT)

#define UNIT_6_POS {-5,-10,0}
#define UNIT_6(RANK,UNIT) UNIT_XX(6,UNIT_6_POS,RANK,UNIT)

#define UNIT_7_POS {10,-15,0}
#define UNIT_7(RANK,UNIT) UNIT_XX(7,UNIT_7_POS,RANK,UNIT)
6 changes: 6 additions & 0 deletions addons/units/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
</Key>

<!-- Units -->
<Key ID="STR_PMCS_Units_Soldier_SquadLeader">
<English>Squad Leader</English>
</Key>
<Key ID="STR_PMCS_Units_Soldier_TeamLeader">
<English>Team Leader</English>
</Key>
<Key ID="STR_PMCS_Units_Soldier_Rifleman">
<English>Rifleman</English>
</Key>
Expand Down
27 changes: 27 additions & 0 deletions addons/units/units/soldiers_b.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,33 @@ class PMCS_B_Soldier_base : B_Soldier_base_F {
respawnLinkedItems[] = { "VSM_LBT6094_operator_multicam", "VSM_OPS_multicam", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "ACE_Vector" };
};

class PMCS_B_SquadLeader : PMCS_B_Soldier_base {
displayName = CSTRING(Soldier_SquadLeader);

scope = 2; // available in 3den
scopeCurator = 2; // available in Zeus
scopeArsenal = 2; // available in arsenal

canDeactivateMines = 0;
engineer = 0;
attendant = 0; // Has Medic trait

backpack = "tfw_ilbe_whip_mc";

weapons[] = { "PMCS_MCX_Virtus_14_f_s4", "rhsusf_weap_glock17g4", "Throw", "Put" };
respawnWeapons[] = { "PMCS_MCX_Virtus_14_f_s4", "rhsusf_weap_glock17g4", "Throw", "Put" };

Items[] = { "FirstAidKit" };
RespawnItems[] = { "FirstAidKit" };

magazines[] = { MAG_5(30Rnd_556x45_Stanag), MAG_2(rhsusf_mag_17Rnd_9x19_JHP), "SmokeShell", "SmokeShellGreen", "Chemlight_green", "Chemlight_green", MAG_2(HandGrenade) };
respawnMagazines[] = { MAG_5(30Rnd_556x45_Stanag), MAG_2(rhsusf_mag_17Rnd_9x19_JHP), "SmokeShell", "SmokeShellGreen", "Chemlight_green", "Chemlight_green", MAG_2(HandGrenade) };
};

class PMCS_B_TeamLeader : PMCS_B_SquadLeader {
displayName = CSTRING(Soldier_TeamLeader);
};

class PMCS_B_Rifleman : PMCS_B_Soldier_base {
displayName = CSTRING(Soldier_Rifleman);

Expand Down

0 comments on commit 611d8d7

Please sign in to comment.