alleycat 28 Posted January 30, 2013 I would like to ask a few things about addons. I do a lot of mission scripting but I never did any addons before. 1. If I wanted to create a new soldier type that can be placed in the editor, which would be just a clone of an existing one in terms of textures and model (except for the loadout), would this be achievable by cloning, de-pboing some unit and changing up a script file? Or is that something that needs more involvement? 2. Same question for items. Share this post Link to post Share on other sites
Graz 1 Posted January 30, 2013 It's easier then it looks, but you need to know what your doing. If your ok with depboing and repboing (which will wreck any .bisign attached to it) it's very simple, as you can just copy+paste the vehicle throw a _custom to it's class name and go from there. Creating your own mod will need external references, so you'll need to reference the soldier then build your own. Make a copy of things like wheeled.pbo and wheeled_e.pbo (the common and expansion wheeled vehicles) and look at how they do it. A really good example to look at is the TK vehicles, as they are taken (via references) from the regular vehicle bases. Share this post Link to post Share on other sites
alleycat 28 Posted February 2, 2013 Thanks for the answer. Some questions though: 1. The reason I want to clone an existing soldier is because I want to have a default guy with default loadout without having to mess with equipment and JIP while scripting. 2. What is a bisign and what are these for? 3. When I want to create new objects/units this way, can I do that with just pbo extraction and cloning without having to install the whole editing suite and unpacking all the addons and having a virtual drive? The goal is to create new items like the evidence things that have no special behaviour, except new 3d model and inventory image. Share this post Link to post Share on other sites
[aps]gnat 28 Posted February 2, 2013 No need to De-PBO anything ! Doing that will mean you'll be booted from servers as a hacker You can do what you wanted via a very simple addon Note that the server and all clients will also have to have your addon too. Here is an example BIS solder configeration. class USMC_Soldier_GL: USMC_Soldier_Base { scope = 2; displayName = "Grenadier"; picture = "\Ca\characters\data\Ico\i_null_CA.paa"; icon = "\Ca\characters2\data\icon\i_soldier_CA.paa"; cost = 60000; accuracy = 3.9; weapons[] = {"M16A4_acg_gl","NVGoggles","Throw","Put","ItemMap","ItemCompass","ItemWatch","ItemRadio"}; magazines[] = {"30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","1Rnd_HE_M203","1Rnd_HE_M203","1Rnd_HE_M203","1Rnd_HE_M203","1Rnd_HE_M203","1Rnd_HE_M203","1Rnd_HE_M203","1Rnd_HE_M203"}; respawnWeapons[] = {"M16A4_acg_gl","NVGoggles","Throw","Put","ItemMap","ItemCompass","ItemWatch","ItemRadio"}; respawnMagazines[] = {"30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","1Rnd_HE_M203","1Rnd_HE_M203","1Rnd_HE_M203","1Rnd_HE_M203"}; model = "\ca\characters2\USMC\usmc_soldier_TL"; }; You can make an addon by writing your own config.cpp, putting it in a folder with you tag naming then using BinPBO to turn that folder into a PBO file. Heres an example of your new CONFIG.CPP class CfgPatches { class TAG_MYCustomSoldier { units[] = {}; weapons[] = {}; requiredVersion = 1.00; requiredAddons[] = {}; }; }; class CfgVehicles { class USMC_Soldier_GL; //inherit class class TAG_MY_USMC_Soldier_GL: USMC_Soldier_GL { displayName = "My Grenadier"; weapons[] = {Pick/Put your weapons here}; magazines[] = {Pick/Put your mags here}; respawnWeapons[] = {Pick/Put your weapons here}; respawnMagazines[] = {Pick/Put your mags here}; }; }; Share this post Link to post Share on other sites
alleycat 28 Posted February 3, 2013 Where do I find the cpp files for existing objects? I wanted to clone the evidence items but in the misc.pbo there only are p3d files. Share this post Link to post Share on other sites
alleycat 28 Posted February 3, 2013 (edited) Found a config.cpp in the misc.pbo (I am looking for the evidence items) and derapped it. But there is no config.cpp that relates to the object I want. nevermind found it in another pbo Edited February 3, 2013 by alleycat Share this post Link to post Share on other sites
max power 21 Posted February 3, 2013 No need to depbo anything. If you need to know what a config looks like go here: http://browser.six-projects.net/ Share this post Link to post Share on other sites
alleycat 28 Posted February 3, 2013 class CfgPatches { class ALLEY_Drink { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {}; }; }; class CfgVehicleClasses { class ALLEY_CobraItems { displayName = "Cobra Items"; }; }; class CfgVehicles { class All; class Small_items : Thing { vehicleClass = "Small_items"; destrType = "DestructNo"; animated = false; mapSize = 2; }; class Thing; // External class reference class EvPhoto : Small_items { scope = public; model = "\Ca\misc\SmallObj_File_photos"; icon = "\CA\misc\data\icons\picture_photo_folder_ca.paa"; displayName = "Cobra 1"; }; }; This is supposed to clone an evidence items,however during binarizing 2 error messages appear. ---------- Post added at 07:36 AM ---------- Previous post was at 05:49 AM ---------- class CfgPatches { class ALLEY_Drink { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {}; }; }; class CfgVehicleClasses { class ALLEY_CobraItems { displayName = "Cobra Items"; }; }; class CfgVehicles { class All; class Thing; class Small_items : Thing { vehicleClass = "Small_items"; destrType = "DestructNo"; animated = false; mapSize = 2; }; class Cobra_Drink1 : Small_items { scope = public; model = "\Ca\misc\SmallObj_File_photos"; icon = "\CA\misc\data\icons\picture_photo_folder_ca.paa"; displayName = "Cobra 1"; //vehicleClass = ALLEY_CobraItems; destrType = "DestructNo"; animated = false; mapSize = 2; vehicleClass = "Small_items"; }; }; No errors, but the object is nowhere to befound ingame. The "CobraItems category is not there and the object is not under small items. Anyone got a clue what is wrong with this? Share this post Link to post Share on other sites
[aps]gnat 28 Posted February 3, 2013 scope = public; But "public" has not been defined. Either change it to scope = 2; Or place this at the beginning of ANY config you write. #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define true 1 #define false 0 // type scope #define private 0 #define protected 1 #define public 2 Share this post Link to post Share on other sites