McArcher 0 Posted January 16, 2010 How can I use my custom coin.sqf and coin_interface.sqf instead of original ones? I guess, I need somehow to create my own class for custom CoIn module? Or something else... How can I do it? I need them not like a new addon in arma2/addons/ but I want them to be inside my mission's folder. Is that possible? Thank you for help. ---------- Post added at 18:45 ---------- Previous post was at 18:40 ---------- I have unpacked Modules.pbo and unRapped config.bin. In CfgVehicles.hpp i see following: // Generated by unRap v1.06 by Kegetys class CfgVehicles { class Logic; // External class reference class ConstructionManager : Logic { displayName = $STR_COIN_NAME; icon = "\ca\ui\data\icon_COIN_ca.paa"; picture = "\ca\ui\data\icon_COIN_ca.paa"; vehicleClass = "Modules"; class Eventhandlers { init = "if (isServer) then {private [""_ok""];_ok = _this execVM ""ca\modules\coin\data\scripts\coin.sqf""};"; }; }; }; so, I need somehow to change the default path to ca\modules\coin\data\scripts\coin.sqf to my custom coin.sqf. If I change this file, what should I do next? ---------- Post added at 18:46 ---------- Previous post was at 18:45 ---------- how do I pack it and use in my mission's folder? i have never created addons and don't know how to include them into mission. ---------- Post added at 20:07 ---------- Previous post was at 18:46 ---------- ok... nobody helps... i decided to try it myself... modified CfgPatches.hpp as in the example... class CfgPatches { class mca_ConstructionManager { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"CA_Modules_Coin"}; }; }; CfgVehicles.hpp class CfgVehicles { class ConstructionManager; // Ext class mca_ConstructionManager : ConstructionManager { class Eventhandlers { init = "if (isServer) then {private [""_ok""];_ok = _this execVM ""data\scripts\coin.sqf""};"; }; }; }; config.cpp was the same #include "CfgPatches.hpp" #include "CfgVehicles.hpp" #include "CfgDefaultKeysMapping.hpp" all these files and original CfgDefaultKeysMapping.hpp are located at my mission's root folder. from game I'm trying to createUnit "mca_ConstructionManager" createUnit [ getPos player, _group, "COIN_RU_MHQ = this;"]; but it says: Bad vehicle type mca_ConstructionManager What am I doing wrong? Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 17, 2010 (edited) ? Not clear exactly what coin is, but in principle class CfgPatches { class mca_ConstructionManager { units[] = {}; weapons[] = {}; requiredVersion = 1.00; requiredAddons[] = {"CA_Modules_Coin"}; }; }; class CfgVehicles { class Logic; class ConstructionManager : Logic { class Eventhandlers { init = "if (isServer) then {private [""_ok""];_ok = _this execVM ""PATHTOMYSCRIPT""};"; }; }; }; Untested, but it you call above a "Config.cpp" file, place it in a folder and name it like "mca_ConstructionManager" then PBO the folder with Kegetys cPBO, you then have a replaement addon. This is a stand-alone addon, to support you mission (i guess), but this principle (mission requires special addon) may not be what you'd prefer. Obviously the problem is, the normal BIS COIN no longer works for everything else. I'm not 100% sure if the same principle can be executed ONLY when you run a mission by including some "code" within a mission. EDIT; Actually, looking again, seeing you seem to not need a replacement coin module, because you are CREATEUNIT calling it in scripts yourself, maybe below can be turned into a PBO and work along-side the existing BIS COIN without problems. class CfgPatches { class mca_ConstructionManager { units[] = {}; weapons[] = {}; requiredVersion = 1.00; requiredAddons[] = {"CA_Modules_Coin"}; }; }; class CfgVehicles { class ConstructionManager; class mca_ConstructionManager : ConstructionManager { displayName = "MCA_COIN Module"; class Eventhandlers { init = "if (isServer) then {private [""_ok""];_ok = _this execVM ""PATHTOMYSCRIPT""};"; }; }; }; Edited January 17, 2010 by [APS]Gnat Share this post Link to post Share on other sites