Skip to content

Faaction: HIPA#1184

Open
AnAngrySalad1 wants to merge 4 commits intomainfrom
faction_hipa
Open

Faaction: HIPA#1184
AnAngrySalad1 wants to merge 4 commits intomainfrom
faction_hipa

Conversation

@AnAngrySalad1
Copy link
Contributor

When merged this pull request will:

  • Adds the HIPA faction (Horizon Islands Peoples Army)

Copy link
Member

@tbeswick96 tbeswick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Found 9 issues across the HIPA faction addon.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

Comment on lines +6 to +58
units[] = {
QGVAR(Soldier_Underwear),
QGVAR(Soldier_Base),
QGVAR(Rifleman),
QGVAR(Squad_Leader),
QGVAR(Autorifleman),
QGVAR(Rifleman_LAT),
QGVAR(Sharpshooter),
QGVAR(Machine_Gunner),
QGVAR(Rifleman_HAT),
QGVAR(Armour_Crewman),
QGVAR(Officer),
QGVAR(Signaller),
QGVAR(Heli_Pilot),
QGVAR(Jet_Pilot),
QGVAR(Sniper),
QGVAR(Crewman),
QGVAR(Rifleman_AA),
QGVAR(Paratrooper),
QGVAR(Operator),
QGVAR(Grenadier),
// Vehicles
QGVAR(MTVR),
QGVAR(MTVR_Ammo),
QGVAR(MTVR_Refuel),
QGVAR(MTVR_Repair),
QGVAR(Radar_System),
QGVAR(SAM_System),
QGVAR(Ship_MRLS),
QGVAR(ZU23),
QGVAR(L134A1),
QGVAR(M252),
QGVAR(M119),
QGVAR(Dragon),
QGVAR(HMG_02),
QGVAR(RBS70),
QGVAR(HMG_01),
QGVAR(Leopard2A6),
QGVAR(T55),
QGVAR(Boxer_HMG),
QGVAR(Boxer_GMG),
QGVAR(Boxer_Empty),
QGVAR(MBT_Arty),
QGVAR(APC_AA),
QGVAR(Heli_Light_Dynamic),
QGVAR(Heli_Light),
QGVAR(AW159),
QGVAR(AW159_Unarmed),
QGVAR(CH_54_Armed),
QGVAR(CH_54_Transport),
QGVAR(CH47F),
QGVAR(JAS39),
QGVAR(C130J)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

units[] has multiple issues:

Name mismatches -- these don't match their actual class definitions:

  • QGVAR(Autorifleman) (line 11) -- actual class is GVAR(sf_autorifleman)
  • QGVAR(Operator) (line 25) -- actual class is GVAR(sf_operator)
  • QGVAR(Grenadier) (line 26) -- actual class is GVAR(sf_grenadier)
  • QGVAR(HMG_01) (line 42) -- actual class is GVAR(auto_hmg)

Completely undefined -- no class definition exists anywhere in this addon:

  • QGVAR(Armour_Crewman) (line 16)
  • QGVAR(Jet_Pilot) (line 20)
  • QGVAR(Paratrooper) (line 24)

Missing from units[] -- these are defined with scope = 2 but not registered:

  • GVAR(sf_operator), GVAR(sf_sfc), GVAR(sf_grenadier), GVAR(sf_autorifleman), GVAR(sf_LAT)
  • GVAR(Officer_HQ)
  • GVAR(LSV_01_unarmed_SF), GVAR(LSV_01_armed_SF)
  • GVAR(auto_hmg), GVAR(Mini_Radar_Dish)

Comment on lines +60 to +72
weapons[] = {
QGVAR(CUP_arifle_G36C_VFG_ACE_optic_MRCO_2D_acc_flashlight),
QGVAR(CUP_arifle_G36K_RIS_AG36_ACE_optic_MRCO_2D_acc_flashlight),
QGVAR(CUP_lmg_MG3),
QGVAR(arifle_SPAR_03_blk_F_optic_AMS),
QGVAR(srifle_DMR_02_camo_F_optic_KHS_old),
QGVAR(CUP_arifle_G36C),
QGVAR(CUP_arifle_G36C_VFG_CUP_optic_HensoldtZO_low_RDS_CUP_acc_ANPEQ_15_Black),
QGVAR(CUP_glaunch_M32),
QGVAR(CUP_arifle_MG36_CUP_optic_HensoldtZO_low_RDS_CUP_acc_ANPEQ_15_Black),
QGVAR(CUP_arifle_G36C_VFG_ACE_optic_MRCO_2D_acc_flashlight_suppressed),
QGVAR(CUP_arifle_MG36_CUP_optic_HensoldtZO_low_RDS_CUP_acc_ANPEQ_15_Black_suppressed)
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weapons[] lists class names that don't exist:

No GVAR wrapper defined -- these are stock CUP/vanilla classes used bare in unit definitions, not custom weapons:

  • QGVAR(CUP_lmg_MG3) (line 63)
  • QGVAR(CUP_arifle_G36C) (line 66)
  • QGVAR(CUP_glaunch_M32) (line 68)

Wrong variant name:

  • QGVAR(CUP_arifle_G36C_VFG_CUP_optic_HensoldtZO_low_RDS_CUP_acc_ANPEQ_15_Black) (line 67) -- only the _suppressed variant is defined
  • QGVAR(CUP_arifle_MG36_CUP_optic_HensoldtZO_low_RDS_CUP_acc_ANPEQ_15_Black) (line 69) -- only the _suppressed variant is defined
  • QGVAR(CUP_arifle_G36C_VFG_ACE_optic_MRCO_2D_acc_flashlight_suppressed) (line 70) -- only the non-suppressed variant is defined

QGVAR(CUP_arifle_MG36_CUP_optic_HensoldtZO_low_RDS_CUP_acc_ANPEQ_15_Black_suppressed)
};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"uksf_common"};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GVAR(T55) in CfgArmored.hpp inherits from uksf_eug_T55, but uksf_eug is not in requiredAddons[]. This dependency is needed to guarantee correct load order.

Comment on lines +133 to +137
#include "CfgFactionClasses.hpp"
#include "CfgGroups.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgEditorSubcategories.hpp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These #include directives should be in alphabetical order. Current order:

CfgFactionClasses -> CfgGroups -> CfgVehicles -> CfgWeapons -> CfgEditorSubcategories

Alphabetical:

CfgEditorSubcategories -> CfgFactionClasses -> CfgGroups -> CfgVehicles -> CfgWeapons

Comment on lines +31 to +32
weapons[] = {QGVAR(CUP_arifle_G36C_VFG_ACE_optic_MRCO_2D_acc_flashlight)};
respawnWeapons[] = {QGVAR(CUP_arifle_G36C_VFG_ACE_optic_MRCO_2D_acc_flashlight)};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soldier_Base overrides weapons[] from O_Soldier_base_F but does not include "Put" and "Throw". This strips the ability to throw grenades and place inventory items from every unit that inherits without overriding weapons[] (Rifleman, Officer, Signaller, etc.).

Should be:

weapons[] = {QGVAR(CUP_arifle_G36C_VFG_ACE_optic_MRCO_2D_acc_flashlight), "Put", "Throw"};
respawnWeapons[] = {QGVAR(CUP_arifle_G36C_VFG_ACE_optic_MRCO_2D_acc_flashlight), "Put", "Throw"};

Other units that override weapons[] are also missing Put/Throw: Squad_Leader, Sharpshooter, sf_autorifleman, Officer_HQ, Sniper, Crewman.

Comment on lines +18 to +19
weapons[] = {CUP_lmg_MG3};
respawnWeapons[] = {CUP_lmg_MG3};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unquoted class name -- CUP_lmg_MG3 needs to be a quoted string "CUP_lmg_MG3". Bare identifiers in arrays will fail to resolve correctly.

Also missing "Put" and "Throw".

Comment on lines +22 to +23
weapons[] = {CUP_glaunch_M32};
respawnWeapons[] = {CUP_glaunch_M32};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unquoted class name -- CUP_glaunch_M32 needs to be a quoted string "CUP_glaunch_M32". Also missing "Put" and "Throw".

Comment on lines +68 to +69
weapons[] = {CUP_arifle_G36C};
respawnWeapons[] = {CUP_arifle_G36C};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unquoted class name -- CUP_arifle_G36C needs to be a quoted string "CUP_arifle_G36C". Also missing "Put" and "Throw".

Comment on lines +43 to +47
class Armor {
name = "Armor";
// Add armor groups
};
// Add other categories
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two issues here:

  1. UK English: Armor should be Armour (class name and displayName). CLAUDE.md requires UK English spelling.

  2. Placeholder TODO comments: // Add armor groups and // Add other categories indicate incomplete work. Either add the group definitions or remove the empty class and comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants