ColonelKernel 4 Posted September 14, 2017 Hi. How can I patch a mod? To be more specific, here's what I want to do: Let's say I have a mod identified by: class CfgPatches { class My_mod { units[] = { }; weapons[] = { }; requiredAddons[] = {"CBA_Extended_EventHandlers"}; version = "0.993"; versionStr = "0.993"; versionDesc= "My mod"; versionAr[] = {1,0,0}; author[] = {"Me"}; }; }; All scripts are in the main mod folder (for example, \My_mod\...) Now I want to patch this mod by altering some scripts and adding a few more scripts to the mod folder. Is it possible to use the same class for this patch as well (i.e My_mod)? Should I change the name of the patch folder? ( \My_mod\ ) Should the script I want to "patch" (i.e fix) have the same name as the script in the original mod? I'd appreciate any help with this. 1 Share this post Link to post Share on other sites
Crazy538 14 Posted September 14, 2017 Hi. How can I patch a mod? To be more specific, here's what I want to do: Let's say I have a mod identified by:class CfgPatches{class My_mod { units[] = { }; weapons[] = { }; requiredAddons[] = {"CBA_Extended_EventHandlers"}; version = "0.993"; versionStr = "0.993"; versionDesc= "My mod"; versionAr[] = {1,0,0}; author[] = {"Me"}; };}; All scripts are in the main mod folder (for example, \My_mod\...) Now I want to patch this mod by altering some scripts and adding a few more scripts to the mod folder. Is it possible to use the same class for this patch as well (i.e My_mod)? Should I change the name of the patch folder? ( \My_mod\ ) Should the script I want to "patch" (i.e fix) have the same name as the script in the original mod? I'd appreciate any help with this.To 'patch' a mod, add the mods CfgPatches classname to your mods requiredAddons property. This forces Arma to load yours after 'My_mod'.To then over write a script, simply define the CfgFunctions class of the script in your patch mod and point the file property to your updated version.Hope this helps. 1 Share this post Link to post Share on other sites
ColonelKernel 4 Posted September 15, 2017 Thank you for you answer @crazy538. I've been studying other addons configs to see how they've done it. For example, this is taken from CBA: class CfgFunctions { class CBA { class Config { class getConfigEntry { file = "\x\cba\addons\common\fnc_getConfigEntry.sqf"; recompile = 0; }; class getObjectConfig { file = "\x\cba\addons\common\fnc_getObjectConfig.sqf"; recompile = 0; }; . . . There are a few things I don't understand: 1. On 9/14/2017 at 11:35 PM, crazy538 said: To then over write a script, simply define the CfgFunctions class of the script in your patch mod and point the file property to your updated version. Let's say I add a function (in my patch mod) like this: class CfgFunctions { class My_patch { class mysqfPatch { file = "\my_patch\mysqf.sqf"; recompile = 0; }; where mysqf.sqf is the same file as the one used in the original mod that I want to patch now. What I don't understand is what should I do with this now?! If it's a function, it needs to be called right? If so, how do I do it? 2. Should I add any cfgFunctions to my original mod? 3. Should all classes have different names? For example, in the above code should I add another class with a different name for another script (e.g adding a class named "mysqf1Patch" for a file named "mysqf1.sqf") or can I stick with mysqfPatch? 4. In the example code from CBA, how does that folder structure work exactly? (/x/cba/addons/...) 5. Should I add "recompile = 0" or not? Should the assigned value be 0 or can it be something else? Sorry for all these questions. I'm new to modding. 1 Share this post Link to post Share on other sites