Arcurus 4 Posted November 2, 2018 I am attempting to write a replacement config for my Arma Unit to make the base game flashlights more powerful. I'm not getting any crashes or errors but the changes just aren't overwriting the base values. Here's my config.cpp class CfgPatches { class Flashlight_Fix { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Weapons_F"}; }; }; class CfgWeapons { class ItemCore; class acc_flashlight: ItemCore { class ItemInfo { class FlashLight { ambient[]={6,9,9}; intensity=240; coneFadeCoef=5; flareSize=8; flareMaxDistance="700.0f"; class Attenuation { start=0; linear=1; quadratic=1; hardLimitStart=100; hardLimitEnd=500; }; }; }; }; }; Share this post Link to post Share on other sites
Dedmen 2724 Posted November 2, 2018 Did you check in the ingame config viewer if your changed go through? Are you sure your inheritance is correct? including the subclasses? Share this post Link to post Share on other sites
Arcurus 4 Posted November 3, 2018 I did check the config viewer. And I do know that class ItemInfo has a parent class of InventoryFlashLightItem_Base_F. But when I call it, I get an error for an "Undefined base class: 'InventoryFlashLightItem_Base_F'." So I think, ok, maybe I need to call the parent class for that too (because it has one). But when I do, I get the same Undefined Base class. I am aware that this is telling me I'm the parent wrong, but where to put that parent, I've no idea. The code for those changes looks like this: class CfgPatches { class Flashlight_Fix { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Weapons_F"}; }; }; class CfgWeapons { class InventoryItem_Base_F; class ItemCore; class acc_flashlight: ItemCore { class ItemInfo: InventoryFlashLightItem_Base_F { class FlashLight { ambient[]={6,9,9}; intensity=240; coneFadeCoef=5; flareSize=8; flareMaxDistance="700.0f"; class Attenuation { start=0; linear=1; quadratic=1; hardLimitStart=100; hardLimitEnd=500; }; }; }; }; }; Share this post Link to post Share on other sites
gaverio 100 Posted November 4, 2018 This works. I've marked the lines that needed correction. class CfgPatches { class Flashlight_Fix { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Weapons_F_acc"}; // Here }; }; class CfgWeapons { class InventoryItem_Base_F; // Here (not needed) class ItemCore; class InventoryFlashLightItem_Base_F; // Here class acc_flashlight: ItemCore { class ItemInfo: InventoryFlashLightItem_Base_F { class FlashLight { ambient[]={6,9,9}; intensity=240; coneFadeCoef=5; flareSize=8; flareMaxDistance="700.0f"; class Attenuation { start=0; linear=1; quadratic=1; hardLimitStart=100; hardLimitEnd=500; }; }; }; }; }; 1 Share this post Link to post Share on other sites
Arcurus 4 Posted November 9, 2018 It works, thank you! 1 Share this post Link to post Share on other sites