badluckburt 78 Posted February 6, 2015 Hi, I'm currently in the process of creating an addon that will hide all objects in the editor and I'm not sure how to set it up exactly. Could somebody please nudge me in the right direction? I think I need to set the scope to 1 on classes that have it set to 2 like this: Car_F is just an example class I made up. CfgPatches { class Burt_EditorOverride { units[] = {"Car_F"//whatever units I overwrite}; weapons[] = {//whatever weapons I overwrite}; magazines[] = {//whatever magazines I overwrite}; requiredVersion = 0.1; requiredAddons[] = {//All the addons I'm overwriting}; }; }; CfgVehicles { class Car_F: Car_F { scope = 1; }; }; Or do I need to include the classes I'm overwriting and extend them like this? CfgPatches { class Burt_EditorOverride { units[] = {"Car_F"//whatever units I overwrite}; weapons[] = {//whatever weapons I overwrite}; magazines[] = {//whatever magazines I overwrite}; requiredVersion = 0.1; requiredAddons[] = {//All the addons I'm overwriting}; }; }; CfgVehicles { class Car_F; class Car_F: Car_F { scope = 1; }; }; Share this post Link to post Share on other sites
Redphoenix 1540 Posted February 6, 2015 that wont work, cause you can't override classes like that. You must create a new class deriving from that and then set scope = 0 Share this post Link to post Share on other sites
badluckburt 78 Posted February 6, 2015 that wont work, cause you can't override classes like that.You must create a new class deriving from that and then set scope = 0 Like this you mean? CfgPatches { class Burt_EditorOverride { units[] = {"Burt_Car_F"// <- isn't that a new unit?}; weapons[] = {//whatever weapons I overwrite}; magazines[] = {//whatever magazines I overwrite}; requiredVersion = 0.1; requiredAddons[] = {//All the addons I'm overwriting}; }; }; CfgVehicles { class Burt_Car_F : Car_F { scope = 0; }; }; But how would that hide the original Arma 3 class? (which is what I aim to do with this addon) Share this post Link to post Share on other sites
Redphoenix 1540 Posted February 6, 2015 Well, if you want to hide all the vehicles, you have to do it like this: class DefaultEventhandlers; class CfgPatches { class RVE_dmax { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Soft_F_Offroad_01"}; }; }; class CfgVehicles { class Car_F; class C_Offroad_01_F: Car_F { scope = 0; } }; Than keep repeating it for all vehicles, or other objects. Share this post Link to post Share on other sites
badluckburt 78 Posted February 6, 2015 (edited) Thank you. I suppose there's no sense filling up the units[] array when you're hiding the stuff you're overwriting. This seems easy enough, just redeclare the class by extending the original base class and setting scope to 0. I'll give it a try later tonight and release the addon if I get it working. And I know it may seem like an odd thing to do, hiding all the objects but someone requested it in the Request Addon thread. I've been working on a database similar to Six Config Browser that I can generate config's from and this seemed like a nice test for it. Thanks again for your help, much appreciated :) - edit Thanks again RedPhoenix. It took me a little longer to get around to this but I've taken the config you posted, turned it into a template, wrote the script to run against my database and populated the template with the results. Apart from some DLC contents which I apparently missed, the editor is now a barren place when running this: https://www.dropbox.com/s/xw6y7yljbetndma/%40burt.zip?dl=0 I do have two errors when the game loads up but they seem harmless and I'll resolve them later, other than that it wurreks Once the errors are resolved I'll do an official release but to anyone reading this, feel free to download the current version but remember to update once I release it. Edited February 23, 2015 by BadLuckBurt Share this post Link to post Share on other sites