alleycat 28 Posted October 31, 2013 I am creating a mod that removes thermal optics from certain infantry weapons. So far I have this: class CfgPatches { class cat_thermal { units[] = {}; requiredVersion = 1.000000; requiredAddons[] = {}; version = "1.0"; author[] = {"cat" }; //authorUrl = "http://dev-heaven.net/projects/cca"; }; }; class CfgWeapons { class launch_B_Titan_F { class OpticsModes { class StepScope { visionMode[] = {"Normal"}; }; }; }; }; However I get "no entry for...." errors for parameters in the same scope as visionMode. Is this an inheritance problem? And how do I fix that? Share this post Link to post Share on other sites
[aps]gnat 28 Posted October 31, 2013 If you're trying to OVERWRITE the existing unit, suggest you study up; http://forums.bistudio.com/showthread.php?166589-Tutorial-Replacement-configs If you're creating a copy, you need more, incuding class launch_B_Titan_F; class MYDIFFERENTWEAPON : launch_B_Titan_F { Share this post Link to post Share on other sites
alleycat 28 Posted November 1, 2013 (edited) So if I read this correctly I have to duplicate all lines in the stepscope class for it to work? Isnt inheritance supposed to inherit stuff up to that point so that I only have to replace the desired line instead of this? Edited November 1, 2013 by alleycat Share this post Link to post Share on other sites
charon productions 10 Posted November 1, 2013 (edited) So if I read this correctly I have to duplicate all lines in the stepscope class for it to work? Isnt inheritance supposed to inherit stuff up to that point so that I only have to replace the desired line instead of this? You problem might actually be that you did not consider using the requiredAddons line including the respective Arma3 addon that contains the launcher (something like A3_weapons_f or similar). Without that the contents of the imported launcher class might be simply empty thus leading up to that error. Apart from that you do certainly not have to repeat all lines from an inherited class, because that would defy the whole idea of inheritance as you stated. Sometimes you do have to explicitely state though the subclass that you want to inherit, but i am not sure if that applies to your case. class launch_B_Titan_F { class OpticsModes; }; Edited November 1, 2013 by Charon Productions Share this post Link to post Share on other sites
alleycat 28 Posted November 2, 2013 I have tried both, but I cant get the required mod part right. I have used the weapons_f.pbo with and without the .pbo extension but it always reports undefined parameter errors. Share this post Link to post Share on other sites
Kunsa 10 Posted November 2, 2013 is Titan in weapons_f_beta? Share this post Link to post Share on other sites
charon productions 10 Posted November 2, 2013 I have tried both, but I cant get the required mod part right. I have used the weapons_f.pbo with and without the .pbo extension but it always reports undefined parameter errors. You need also to state the inheritance relationship inside your actual weapon class. You forgot to explicitly write the parent class after the child class. This config does the job: class CfgPatches { class cat_thermal { units[] = {}; weapons[] = {"MYLAUNCHER"}; requiredVersion = 1.000000; requiredAddons[] = {"A3_Weapons_F","A3_Weapons_F_Beta"}; version = "1.0"; author[] = {"cat" }; }; }; class OpticsModes; class StepScope; class CfgWeapons { class Launcher; class Launcher_Base_F : Launcher{ class OpticsModes; } class launch_Titan_base : Launcher_Base_F{ class OpticsModes: OpticsModes { class StepScope; }; }; class MYLAUNCHER : launch_Titan_base { scope = 2; class OpticsModes : OpticsModes { class StepScope : StepScope { visionMode[] = {"Normal"}; testconfigvalue = "test"; }; }; }; }; Hope that gets you going. Share this post Link to post Share on other sites
alleycat 28 Posted November 2, 2013 (edited) How to find what pbo it is in? The pbo extractor cant open them. edit: wrote the above without seeing charons latest post. edit: thx for the example, replacing MYLAUNCHER with the launcher I wanted to be changed works. Edited November 2, 2013 by alleycat Share this post Link to post Share on other sites