octopos 1 Posted January 10, 2013 Hi, I saw later an great addon, Clay_Dogs, and though about integrate it in my mission as code, not as addon. So I made little changes on it, just to fit mission gameplay. This addon create new class, declared in config.cpp, so to use it in my mission, I wrote an #include "clay_dogs\config.cpp", but when I run that code: private "_type"; If (!(isNil {player getVariable "CLAY_DogType"})) Then { _type = player getVariable "CLAY_DogType"; } Else { _type = "CLAY_Dog"; }; I receive an error : Bad vehicle type CLAY_Dog In this forum I found some thread suggesting to use /*extern*/ in these class, to change scope to public, but none worked :( This is code about that file: #define true 1 #define false 0 #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 private 0 #define protected 1 #define public 2 class CfgPatches { /*extern*/ class CLAY_Dogs { units[] = {"CLAY_Dog", "CLAY_Dog2", "CLAY_DHM", "CLAY_WDM", "CLAY_GuardDogBLU", "CLAY_GuardDogOP", "CLAY_GuardDogIND", "CLAY_GuardDogUSMC", "CLAY_GuardDogRU", "CLAY_GuardDogGUE", "CLAY_DogHandlerUSMC", "CLAY_DogHandlerRU", "CLAY_DogHandlerGUE"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"CA_Animals2", "CACharacters2"}; version = "2010-02-03"; }; }; class CfgMovesAnimalsBase; class CfgMovesDog: CfgMovesAnimalsBase { /*extern*/ class States { class Dog_StopV1; /*extern*/ class CLAY_DogAttack: Dog_StopV1 { file = "\CA\animals2\dogs\data\anim\dogAttack.rtm"; speed = 1; looped = true; ConnectTo[] = {"Dog_Stop", 0.1}; InterpolateTo[] = {"Dog_Die", 0.02}; }; }; }; class CfgVehicles { class Pastor; /*extern*/ class CLAY_Dog: Pastor { scope = public; icon = "Awesome\CLAY_Dogs\i_dog.paa"; mapSize = 3; runDistanceMax = 100; minIdleTime = 30; maxIdleTime = 60; fsmDanger = ""; class EventHandlers {}; }; /*extern*/ class CLAY_Dog2: CLAY_Dog { model = "\ca\animals2\Dogs\Fin\Fin"; displayName = $STR_DN_DOG_FIN; }; class Logic; /*extern*/ class CLAY_DHM: Logic { displayName = "Dog Handler Module"; icon="\ca\ui\data\icon_animals_ca.paa"; vehicleClass = "Modules"; class EventHandlers { init = "_this execVM 'CLAY_Dogs\initDog.sqf'"; }; }; /*extern*/ class CLAY_WDM: Logic { displayName = "TO DO: Wild Dogs"; icon="\ca\ui\data\icon_animals_ca.paa"; vehicleClass = "Modules"; class EventHandlers { init = "_this execVM 'CLAY_Dogs\scripts\wildDogs.sqf'"; }; }; class USMC_Soldier; /*extern*/ class CLAY_GuardDogBLU: USMC_Soldier { displayName = "Guard Dog"; icon = "\Awesome\CLAY_Dogs\i_dog.paa"; class EventHandlers { init = "_this execVM 'CLAY_Dogs\scripts\guardDog.sqf'"; }; }; class RU_Soldier; /*extern*/ class CLAY_GuardDogOP: RU_Soldier { displayName = "Guard Dog"; icon = "\Awesome\CLAY_Dogs\i_dog.paa"; class EventHandlers { init = "_this execVM 'CLAY_Dogs\scripts\guardDog.sqf'"; }; }; class GUE_Soldier_1; /*extern*/ class CLAY_GuardDogIND: GUE_Soldier_1 { displayName = "Guard Dog"; icon = "\Awesome\CLAY_Dogs\i_dog.paa"; class EventHandlers { init = "_this execVM 'CLAY_Dogs\scripts\guardDog.sqf'"; }; }; }; Others files included in the same file as config.cpp are correctly included, so just don't know what to do... changed the name of the file to blabla.hpp/h, nothing changes :( It's very important to not use it as addon, so answers suggesting it aren't a solution. I want to make mission with a single file, not a mission needing to download mods Any way, thanks ;) Share this post Link to post Share on other sites
octopos 1 Posted January 11, 2013 Any one? That file containing CLAY_Dogs class is included in description.ext and description.ext(code) contain the following lines: class_CfgVehicles={ class_CLAY_DHM={ class_EventHandlers={ _init={ _this execVM 'Awesome\CLAY_Dogs\initDog.sqf' }; }; }; class_CLAY_WDM={ class_EventHandlers={ _init={ _this execVM 'Awesome\CLAY_Dogs\scripts\wildDogs.sqf' }; }; }; class_CLAY_GuardDogBLU={ class_EventHandlers={ _init={ _this execVM 'Awesome\CLAY_Dogs\scripts\guardDog.sqf' }; }; }; class_CLAY_GuardDogOP={ class_EventHandlers={ _init={ _this execVM 'Awesome\CLAY_Dogs\scripts\guardDog.sqf' }; }; }; class_CLAY_GuardDogIND={ class_EventHandlers={ _init={ _this execVM 'Awesome\CLAY_Dogs\scripts\guardDog.sqf' }; }; }; }; I changed in script.sqf _type = "CLAY_Dog" to _type = "CLAY_GuardDogBLU", but it only changes the error message to :"Bad vehicle type CLAY_GuardDogBLU" So I'm lost, tried every thing in my mind, nothing works... so pls guys, help me ;) The mod link is:http://www.armaholic.com/page.php?id=12758 , and remember I'm trying to use mod script in my mission code without the needing of clients downloading and installing the mod explicitly . Best Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 11, 2013 Not the correct way to detect. A quick search would have found you the answers. http://forums.bistudio.com/showthread.php?109000-HowTo-Check-for-addon-presence&highlight=check+addon+present http://forums.bistudio.com/showthread.php?133061-Spawning-units-vehicles-from-add-ons&highlight=check+addon+present Share this post Link to post Share on other sites
octopos 1 Posted January 11, 2013 Gnat;2276470']Not the correct way to detect.A quick search would have found you the answers. http://forums.bistudio.com/showthread.php?109000-HowTo-Check-for-addon-presence&highlight=check+addon+present http://forums.bistudio.com/showthread.php?133061-Spawning-units-vehicles-from-add-ons&highlight=check+addon+present Maybe I didn't make my self clear' date=' I'm NOT using Clay_dogs as addon. I extracted the pbo of the addon and tried to integrate it to my mission code, so no addon for client and server. Correct me if I'm wrong, but the problem is that config.cpp of the addon isn't binarized for the mission, even in description.ext :(, so the class Clay_dog don't exist. This way to detect only tells me if an addon was successful loaded or not, right? Any way thanks for trying ='] Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 12, 2013 I extracted the pbo of the addon and tried to integrate it to my mission code, so no addon for client and server. Correct me if I'm wrong ..... !! .... sorry, will never work. Thats why you don't see even just 1 mission with Addon inside, its simply not possible. If Clay dogs was just script codes, then sure, you *might* be able to do it, but its not. Aside from that, what your doing (pulling apart someone else's addon, then planning to redistribute "parts") is VERY much against community rules! And very disrespectful If you had permissions, that would then be different. Share this post Link to post Share on other sites
octopos 1 Posted January 12, 2013 Gnat;2276960']!! .... sorry' date=' will never work.Thats why you don't see even just 1 mission with Addon inside, its simply not possible. If Clay dogs was just script codes, then sure, you *might* be able to do it, but its not. [b']Aside from that, what your doing (pulling apart someone else's addon, then planning to redistribute "parts") is VERY much against community rules![/b] And very disrespectful If you had permissions, that would then be different. I got a way to use the codes without needing to use the addon. And I didn't nothing out of common sense. I even changed the folder of scripts names, his "read me". I just used his scripts directly in mission code. And beside his config.cpp, all codes with be the same and with his authoring ^^ Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 12, 2013 Doesn't matter if you think its the "same", its not. And will likely cause major conflicts if anyone happens to have Clay_Dogs on their computer. Share this post Link to post Share on other sites
Franky 1 Posted January 23, 2013 How you managed it? I want to try these with our DayZ Server, i want to add some wilddogs in our missionfile for dayz, but i fail to try to put it into the mission file... Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 23, 2013 DayZ players and mod'er ..... obvious a whole different community animal .... *sigh* Share this post Link to post Share on other sites
BlenderRUS 6 Posted February 11, 2013 octopos: You need to modify config file, delete unnecessary functions and logic sync, modify dog init script which should be run from local client also client should be the owner of dog object. Share this post Link to post Share on other sites
MrSherenai 1 Posted February 11, 2013 I got a way to use the codes without needing to use the addon. And I didn't nothing out of common sense. I even changed the folder of scripts names, his "read me". I just used his scripts directly in mission code. And beside his config.cpp, all codes with be the same and with his authoring ^^ Not ment to sound rude but obviously not. You try to use a vehicle the engine simply does not know about, thats why you get this error. You simply CANT include any config.cpp in a mission, at least not when you want it to be broadcasted over MP. There is actually a missiontype (addon format) that allows addons to be included in the mission but those cant be downloaded in MP. While you can include some header files for dialogs for example you cant force the game to load any config related to an object. Those are loaded on gamestart, and only on gamestart. So even if you throw the config in the mission, #include it in the script or write its content in the description.ext the engine has no clue what to do with it, it simply cant process it. There is no way around dowloading an addon if you want to create new units. Share this post Link to post Share on other sites