somebloke 0 Posted July 17, 2008 Hey guys, Recently I took up the idea of sticking Sigma's police lightbar (Yes I have permission) onto the Original ArmA Datsun. Â I got all the texture/modelling aspect out the way. It's for a Sahrani Police addon i'm throwing round. The problem I have now is I have no idea how to config the addon so it is in game, without overwriting it in the 'Wheeled.pbo' file. Any help would be really appreciated. Share this post Link to post Share on other sites
andersson 285 Posted July 17, 2008 Ok, I have no possibility of testing this so you have to try this config and see if it works (sitting on a course and is to bored of doing anything work related.. ). The config is not ready, but you can base your on this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches { class TAG_nameofcar { units[] = {"TAG_nameofcar"}; weapons[] = {}; requiredAddons[]={"CAWheeled","CAwheeled3"}; requiredVersion = 1.00; }; }; class CfgVehicles { class datsun1_civil_1_open; class TAG_nameofcar: datsun1_civil_1_open { name = "name of the car as visible in the editor and game"; model = "modelname.p3d"; }; }; What you need to do is to change TAG_nameofcar to your own tag and name of preference, put the correct modelname into model = "modelname.p3d"; and find a suitable name to the car. That should be enough to get your car ingame. BUT FIRST you should go to www.ofpec.com and get yourself a personal tag! Its important so noone else make another datsun addon with the same name. I hope it will work! edit: Assumption is the moder of all f-ups, but I assume you know that you write all that into a textfile.txt that you will rename to config.cpp and put into the folder that you will make a pbo of? Also remember to put your tag on your pbo-name.. Share this post Link to post Share on other sites
somebloke 0 Posted July 17, 2008 Yeah 6 years in the OFP community has taught me about assumptions Thanks for that bit of code, i'll see what happens Edit, Well....the game loads but All i have now in the editor are 2 green datsuns. Here's my config, this is really frustrating <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #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 #define WeaponNoSlot 0// dummy weapons #define WeaponSlotPrimary 1// primary weapons #define WeaponSlotSecondary 16// secondary weapons #define WeaponSlotItem 256// items #define WeaponSlotBinocular 4096// binocular #define WeaponHardMounted 65536 class CfgPatches { class SBLK_DatsunPolice { units[] = {"SBLK_DatsunPolice"}; weapons[] = {}; requiredAddons[]={"CAWheeled"}; requiredVersion = 1.00; }; }; class CfgVehicles { class All{}; class AllVehicles: All{}; class Land: AllVehicles{}; class LandVehicle: Land{}; class Car: LandVehicle{}; class datsun1_civil_3_open; class SBLK_PoliceDatsun: datsun1_civil_3_open { class Exhausts; class AnimationSources; class SBLK_PoliceDatsun: datsun1_civil_3_open { scope=public; model=\SBLK_datsunpolice\datsunpolice; Icon="\SBLK_datsunpolice\icomap_datsun_CA.paa"; mapSize = 7; nameSound="pickup"; name = Police Datsun Lightbar; displayname= "Sahrani Police"; side= Tcivlian; maxSpeed=155; turnCoef=2.5; soundEngine[]={\ca\wheeled\Data\Sound\Mini_3,db-20,0.8}; soundGear[]={\ca\wheeled\Data\Sound\shifter_v2,db-75,1}; SoundGetIn[]={\ca\wheeled\Data\Sound\4WD_DoorOpenClose1,db-20,1}; SoundGetOut[]={\ca\wheeled\Data\Sound\4WD_DoorOpenClose1,db-30,1}; typicalCargo[]={}; crew = Civilian4; transportSoldier = 1; driverAction = datsun_driver; cargoAction[] = {Hilux_cargo01}; class Library {libTextDesc = $STR_LIB_ADD_DATSUN;}; dammageHalf[] = { \datsunpolice\data\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr1_ca.paa, \datsunpolice\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr1_ca.paa }; dammageFull[] = { \datsunpolice\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr2_ca.paa, \datsunpolice\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr2_ca.paa }; class Damage { tex[]={}; mat[]={ "datsunpolice\datsun_interier.rvmat", "datsunpolice\datsun_interier.rvmat", "datsunpolice\datsun_interier_destruct.rvmat", "datsunpolice\datsun_trup.rvmat", "datsunpolice\detailmapy\datsun_trup.rvmat", "datsunpolice\datsun_trup_destruct.rvmat" }; class SBLK_PoliceDatsun: datsun1_civil_3_open { scope=public; model=\datsunpolice\datsun1_civil_3_open; Icon="\datsunpolice\icomap_datsun_CA.paa"; mapSize = 7; nameSound="pickup"; name = Police Datsun Rotators; displayname= "Sahrani Police"; side= Tcivlian; maxSpeed=155; turnCoef=2.5; soundEngine[]={\ca\wheeled\Data\Sound\Mini_3,db-20,0.8}; soundGear[]={\ca\wheeled\Data\Sound\shifter_v2,db-75,1}; SoundGetIn[]={\ca\wheeled\Data\Sound\4WD_DoorOpenClose1,db-20,1}; SoundGetOut[]={\ca\wheeled\Data\Sound\4WD_DoorOpenClose1,db-30,1}; typicalCargo[]={}; crew = Civilian4; transportSoldier = 1; driverAction = datsun_driver; cargoAction[] = {Hilux_cargo01}; class Library {libTextDesc = $STR_LIB_ADD_DATSUN;}; dammageHalf[] = { \datsunpolice\data\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr1_ca.paa, \datsunpolice\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr1_ca.paa }; dammageFull[] = { \datsunpolice\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr2_ca.paa, \datsunpolice\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr2_ca.paa }; class Damage { tex[]={}; mat[]={ "datsunpolice\datsun_interier.rvmat", "datsunpolice\datsun_interier.rvmat", "datsunpolice\datsun_interier_destruct.rvmat", "datsunpolice\datsun_trup.rvmat", "datsunpolice\detailmapy\datsun_trup.rvmat", "datsunpolice\datsun_trup_destruct.rvmat" }; }; }; Share this post Link to post Share on other sites
.kju 3245 Posted July 17, 2008 1. for code use ALWAYS: http://pastebin.com/ 2. fix this error Quote[/b] ]class CfgVehicles{ class All{}; class AllVehicles: All{}; class Land: AllVehicles{}; class LandVehicle: Land{}; class Car: LandVehicle{}; class datsun1_civil_3_open; class SBLK_PoliceDatsun: datsun1_civil_3_open { class Exhausts; class AnimationSources; class SBLK_PoliceDatsun: datsun1_civil_3_open { => <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgVehicles { class datsun1_civil_3_open; class SBLK_PoliceDatsun: datsun1_civil_3_open { 3. probably more in it. fix 1 und 2 first Share this post Link to post Share on other sites
somebloke 0 Posted July 17, 2008 Sorry, I'm not sure I follow what you mean. I'm not much of a config know it all, so you'll have to explain it to me simply. Share this post Link to post Share on other sites
mattxr 9 Posted July 17, 2008 Change your cfg.vehices into the one he posted underneith. Share this post Link to post Share on other sites
somebloke 0 Posted July 17, 2008 Ah ok, thanks guys. Well, that didn't work either...this is getting to be like a merry-go-round. You set it up, it goes round in circles, you take it down. Share this post Link to post Share on other sites
andersson 285 Posted July 17, 2008 Try this one? What I did was to change all the vehicles classes to what Q and me have suggested, then I got rid of all unnecessary stuff(?). People tend to fill the configs with alot of text.. F.ex all the defines are not necessary in this case as you dont use them. Try this config as it is, no more no less. I might have something wrong, but you dont need much text. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches { class SBLK_DatsunPolice { units[] = {"SBLK_DatsunPolice"}; weapons[] = {}; requiredAddons[]={"CAWheeled"}; requiredVersion = 1.00; }; }; class CfgVehicles { class datsun1_civil_3_open; class SBLK_DatsunPolice: datsun1_civil_3_open { model=\SBLK_datsunpolice\datsunpolice; Icon="\SBLK_datsunpolice\icomap_datsun_CA.paa"; name = Police Datsun Lightbar; displayname= "Sahrani Police"; dammageHalf[] = {\datsunpolice\data\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr1_ca.paa,\datsunpolice\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr1_ca.paa}; dammageFull[] = {\datsunpolice\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr2_ca.paa,\datsunpolice\datsun_skla_ca.paa,\datsunpolice\datsun_sklabr2_ca.paa}; class Damage { tex[]={}; mat[]={"datsunpolice\datsun_interier.rvmat","datsunpolice\datsun_interier.rvmat","datsunpolice\datsun_interier_destruct.rvmat","datsunpolice\datsun_trup.rvmat","datsunpolice\detailmapy\datsun_trup.rvmat","datsunpolice\datsun_trup_destruct.rvmat"}; }; }; }; edit: forgot one bracket... Share this post Link to post Share on other sites
somebloke 0 Posted July 17, 2008 Thank you very very much, that worked wonders. Thanks guys, it's been a real pain getting it to work. Share this post Link to post Share on other sites
andersson 285 Posted July 17, 2008 My pleasure. I know the frustration an joy this game can give Share this post Link to post Share on other sites
somebloke 0 Posted July 18, 2008 Interestingly, now the car wheels don't move, yet the car has motion... Share this post Link to post Share on other sites
.kju 3245 Posted July 18, 2008 maybe missing model.cfg or binarization of the model Share this post Link to post Share on other sites
somebloke 0 Posted July 18, 2008 Yeah that could be it. Share this post Link to post Share on other sites
somebloke 0 Posted August 4, 2008 I'm still having big problems with this config, despite the help I got from Messiah. Here's my current config. Basically, it's just a reskinned and ever so slightly modified Datsun. Pastebin link Share this post Link to post Share on other sites
Messiah 2 Posted August 4, 2008 Thats not quite what I told you to write :P First problem is cfgpatches - you open two brackets, but only close one. cfgmodels and skeletons should be in their seperate models.cfg file. config.cpp should read: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> (define stuff is ok, keep that) class cfgpatches {      class sblk_policedatsun      {           Units [] = "{sblk_DatsunPolice};           weapons[] = {};           requiredVersion = 1.14;           requiredAddons[] = {"CAWheeled"};      }; }; class CfgVehicleClasses {     class SBLK_Vehicles     {         displayName = "SBLK Vehicles";     }; }; Class CfgVehicles {      class datsun1_civil_1_open;      class sblk_datsunpolice : datsun1_civil_1_open      {         Model = "\sblk_DatsunPolice\DatsunPolice.p3d";         Picture="\Ca\wheeled\data\ico\Datsun.paa";         Icon="\Ca\wheeled\data\map_ico\icomap_Datsun_CA.paa";         vehicleClass = "SBLK_Vehicles";         displayName = "Sahrani Police Datsun";         maxSpeed=130;         transportMaxMagazines = 999;      }; }; (I'm not sure which datsun you're using, but I've reference this one - choice of 1,2,3) also remember how to use tags. Your datsunpolice folder should also have the sblk tag at the front. cfg models, as best as I can recall: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class Rotation; class CfgSkeletons { class Vehicle; class sblk_policedatsun_skeleton: Vehicle { skeletonInherit="Vehicle"; skeletonBones[]= { "volant", "", "levy predni tlumic", "", "pravy predni tlumic", "", "levy dalsi tlumic", "", "pravy dalsi tlumic", "", "levy predni zatoc", "levy predni tlumic", "pravy predni zatoc", "pravy predni tlumic", "levy dalsi zatoc", "levy dalsi tlumic", "pravy dalsi zatoc", "pravy dalsi tlumic", "levy prostredni tlumic", "", "pravy prostredni tlumic", "", "levy zadni tlumic", "", "pravy zadni tlumic", "", "levy predni", "levy predni zatoc", "pravy predni", "pravy predni zatoc", "levy dalsi", "levy dalsi zatoc", "pravy dalsi", "pravy dalsi zatoc", "levy prostredni", "levy prostredni tlumic", "pravy prostredni", "pravy prostredni tlumic", "levy zadni", "levy zadni tlumic", "pravy zadni", "pravy zadni tlumic", "ukaz_rychlo", "", "ukaz_rychlo2", "", "ukaz_rpm", "", "OtocVez", "", "OtocHlaven", "OtocVez", "fuel_01", "", "fuel_1", "", "prop_01", "", "prop_02", "", "prop_2", "", "prop_1", "", "damageHide", "", "damageVez", "OtocVez", "damageHlaven", "OtocHlaven" }; }; }; class cfgmodels { class sblk_datsun_base: Vehicle { sectionsInherit=""; sections[]= { "ammo", "sklo predni p", "sklo predni l", "zadni svetlo", "brzdove svetlo", "spz", "karoserie", "motor", "zbran", "vez", "zbytek", "levy predni", "levy prostredni", "levy zadni", "pravy predni", "pravy prostredni", "pravy zadni", "clan", "clan_sign", "zasleh", "P svetlo", "L svetlo", "palivo" }; skeletonName="Car"; };     class sblk_datsun_p3dname: sblk_datsun_base { class Animations: Animations { class IndicatorSpeed: IndicatorSpeed { maxValue=44.400002; angle0=0.087266; angle1=4.537856; }; class IndicatorRPM: IndicatorRPM { angle1="rad 175"; }; }; }; Thats my 11pm best shot... im confident the config.cpp is right, but hopefully someone's who's a little better with model.cfg's will be able to correct any mistakes in mine. Share this post Link to post Share on other sites
somebloke 0 Posted August 5, 2008 Thanks Messy, Somewhere between your explanation and me typing it my brain experienced a massive memory loss. Share this post Link to post Share on other sites
Messiah 2 Posted August 6, 2008 no problem, I come to expect it. You 'might' experience a 'no entry default' error with the model.cfg (something I've been battling with). If you do, then I know how to resolve that and all. Share this post Link to post Share on other sites
somebloke 0 Posted August 6, 2008 Well, now it's telling me it's finding errors such as "C encountered instead of }" Which is frustrating, because as I find it, and change it, it brings up another one. I'll chuck it over to you, if you want Messy. Share this post Link to post Share on other sites
Messiah 2 Posted August 6, 2008 it will have to be later this evening. Nothing jumps out of me in the config thats wrong, so I guess I mucked the model.cfg somewhere. Share this post Link to post Share on other sites
somebloke 0 Posted August 6, 2008 Well, it's throwing errors up around lines 20, 22 and 35. I'll send you it later on. Share this post Link to post Share on other sites
Messiah 2 Posted August 6, 2008 well, that doesnt help me till I get it in front of me - assuming you've added all the definition stuff to the top, then I'm not sure where line 20 is. I have spotted: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Units [] = "{sblk_DatsunPolice}; should read <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Units [] = {sblk_DatsunPolice}; I can't really see anything else wrong. The exact error would be good to have. Share this post Link to post Share on other sites
somebloke 0 Posted August 6, 2008 Yeah, it is hard to explain/see the prolbme, I did however already spot those mistakes and corrected them. Share this post Link to post Share on other sites