teeha 22 Posted June 11, 2014 I've been working recently on a mod that puts NVG-18's into the game and I have all of the models completed and everything but for some reason my config has yet to work. I've tried all the examples from previous people who had problems with NVG's and none of them have done anything differently. Maybe there's something major i'm missing entirely but I don't know because i've never done anything related to NV as of yet. This is pretty much what I have ATM but I have had different things in the past. Unsure what I need to add/change. class cfgWeapons { class Binocular; class NVGoggles: Binocular{}; class NVG18: NVGoggles { displayName = "L-3 GPNVG-18"; picture = "\A3\Weapons_F\Data\UI\gear_nvg_CA.paa"; model = "nv\data\gogs_on.p3d"; class ItemInfo { type = 616; hmdType = 0; uniformModel = "nv\data\gogs_on.p3d"; modelOff = "nv\data\gogs_off.p3d"; mass = 4; }; }; }; Thanks a ton in advance! Share this post Link to post Share on other sites
surpher 1 Posted June 12, 2014 Is this your whole config? Share this post Link to post Share on other sites
teeha 22 Posted June 13, 2014 Here's the entire config. Not sure if this is correct as i'm really guessing at this point. Sorry if this is a stupid question, i'm still learning how addon development works. enum { DESTRUCTENGINE = 2, DESTRUCTDEFAULT = 6, DESTRUCTWRECK = 7, DESTRUCTTREE = 3, DESTRUCTTENT = 4, STABILIZEDINAXISX = 1, STABILIZEDINAXESXYZ = 4, STABILIZEDINAXISY = 2, STABILIZEDINAXESBOTH = 3, DESTRUCTNO = 0, STABILIZEDINAXESNONE = 0, DESTRUCTMAN = 5, DESTRUCTBUILDING = 1, }; class cfgWeapons { class Binocular; class NVGoggles: Binocular{}; class NVG18: NVGoggles { displayName = "L-3 GPNVG-18"; picture = "\A3\Weapons_F\Data\UI\gear_nvg_CA.paa"; model = "nv\data\gogs_on.p3d"; class ItemInfo { type = 616; hmdType = 0; uniformModel = "nv\data\gogs_on.p3d"; modelOff = "nv\data\gogs_off.p3d"; mass = 4; }; }; }; Share this post Link to post Share on other sites
surpher 1 Posted June 13, 2014 (edited) You are missing a CfgPatches class. Place it before the CfgWeapons class. class CfgPatches { class GiveMeAName { units[] = {}; weapons[] = {}; requiredVersion = 0.01; requiredAddons[] = {}; }; }; Edited June 14, 2014 by surpher spelling Share this post Link to post Share on other sites
warlord554 2065 Posted June 14, 2014 Are we going to see a community release? Share this post Link to post Share on other sites
teeha 22 Posted June 14, 2014 Planning on it! Here is the model that we came up with originally but we had to drop the poly count as this one is about 38,000 poly's... http://grab.by/xpF0 I have done other basic addon development before but newly models items are something new for me but we are both working through it. Right now, i'm working on getting it bound to the player's head and not just on the ground only changing directions when I move the characters entire body but things don't seem to be working. I've been looking through the forums for a few hours trying to find the thread I saw before but I can't seem to find it. ): If you have any info on how I can go about doing that it would be but for now, i'm going to keep searching. :) Share this post Link to post Share on other sites
warlord554 2065 Posted June 14, 2014 Looks amazing. Won't be hard to optimize it. If im not mistaken it should just be linked to a simple NVG proxy Share this post Link to post Share on other sites
teeha 22 Posted June 14, 2014 Hmmmmm. Well i've been trying to figure this whole proxy thing out but now the item doesn't want to exist in-game anymore. I just need it to be mounted to the players helmet where the normal NVG's are located. Would you mind telling me what i'm doing wrong with this? enum { DESTRUCTENGINE = 2, DESTRUCTDEFAULT = 6, DESTRUCTWRECK = 7, DESTRUCTTREE = 3, DESTRUCTTENT = 4, STABILIZEDINAXISX = 1, STABILIZEDINAXESXYZ = 4, STABILIZEDINAXISY = 2, STABILIZEDINAXESBOTH = 3, DESTRUCTNO = 0, STABILIZEDINAXESNONE = 0, DESTRUCTMAN = 5, DESTRUCTBUILDING = 1, }; class CfgPatches { class NVG18CFG { units[] = {}; weapons[] = {}; requiredVersion = 0.01; requiredAddons[] = {"A3_Weapons_F"}; }; }; class cfgNonAIVehicles{ class ProxyGoggles; class ProxyNVG18 : ProxyGoggles { scope = public; model = "\a3\weapons_f\binocular\NVG_proxy.p3d"; }; }; class cfgWeapons { class Binocular; class NVGoggles: Binocular{}; class NVG18: NVGoggles { displayName = "L-3 GPNVG-18"; picture = "\A3\Weapons_F\Data\UI\gear_nvg_CA.paa"; model = "nv\data\gogs_on.p3d"; class ItemInfo { type = 616; hmdType = 0; uniformModel = "nv\data\gogs_on.p3d"; modelOff = "nv\data\gogs_off.p3d"; mass = 4; }; }; }; Sorry i'm not great at this. New to addon development and I dont know a whole lot yet. Thanks a ton for what you guys have helped me with!! Share this post Link to post Share on other sites
warlord554 2065 Posted June 14, 2014 Your nvgoggle class is missing core values that it cannot inherit from binoculars. simulation = "NVGoggles"; showEmpty = 0; muzzlePos = "usti hlavne"; muzzleEnd = "konec hlavne"; value = 5; opticsZoomMin = 1; opticsZoomMax = 1; modelOptics = "\A3\Weapons_f\reticle\optics_night"; Also scope = 2 instead of public. Don't really know if that matters but try it Share this post Link to post Share on other sites
teeha 22 Posted June 14, 2014 Well, the nv part of the goggles seems to be working with what I have ATM but the goggles arent actually attached to the players head but rather they are just by the players feet only changing direction when the entire character model turns. I did add what you said to in the nvgoggle class and things seem to be working fine for it actually functioning as night vision but the goggles are still at the players feet. Extremely stuck on this one. Is there any other Classes I have to include to get this to work? Any other files or anything like that I need to make? Share this post Link to post Share on other sites
warlord554 2065 Posted June 14, 2014 (edited) Make sure inside O2 that the properties window is empty(bottom left hand side). Perhaps you have non needed properties listed? I am using the A2 sample nvg as reference Edited June 14, 2014 by WarLord554 Share this post Link to post Share on other sites
surpher 1 Posted June 14, 2014 Have you got the model in the correct position in what ever modeling program you are using. There is a NVG slot model in the A3 samples to use as a guide. Share this post Link to post Share on other sites
teeha 22 Posted June 14, 2014 Things are correct in the modeling program we are using (blender) and the properties window is empty. We are thinking about building off of the NV mount included in the sample since it has the correct size and angle because ATM we have been just been using trial and error to try and get things the correct size but it's be difficult since the NVG's are still by the players feet. Does it look like i'm missing something in my config that would be contributing to the goggles not being mounted the players head? enum { DESTRUCTENGINE = 2, DESTRUCTDEFAULT = 6, DESTRUCTWRECK = 7, DESTRUCTTREE = 3, DESTRUCTTENT = 4, STABILIZEDINAXISX = 1, STABILIZEDINAXESXYZ = 4, STABILIZEDINAXISY = 2, STABILIZEDINAXESBOTH = 3, DESTRUCTNO = 0, STABILIZEDINAXESNONE = 0, DESTRUCTMAN = 5, DESTRUCTBUILDING = 1, }; class CfgPatches { class NVG18CFG { units[] = {}; weapons[] = {}; requiredVersion = 0.01; requiredAddons[] = {"A3_Weapons_F"}; }; }; class cfgNonAIVehicles{ class ProxyGoggles; class ProxyNVG18 : ProxyGoggles { scope = 2; model = "\a3\weapons_f\binocular\NVG_proxy.p3d"; }; }; class cfgWeapons { class Binocular; class NVGoggles: Binocular{}; class NVG18: NVGoggles { displayName = "L-3 GPNVG-18"; picture = "\A3\Weapons_F\Data\UI\gear_nvg_CA.paa"; model = "nv\data\gogs_on.p3d"; simulation = "NVGoggles"; showEmpty = 0; muzzlePos = "usti hlavne"; muzzleEnd = "konec hlavne"; value = 5; opticsZoomMin = 1; opticsZoomMax = 1; modelOptics = "\A3\Weapons_f\reticle\optics_night"; class ItemInfo { type = 616; hmdType = 0; uniformModel = "nv\data\gogs_on.p3d"; modelOff = "nv\data\gogs_off.p3d"; mass = 4; }; }; }; Share this post Link to post Share on other sites
warlord554 2065 Posted June 14, 2014 Config looks good. I just created a working unit from the samples using your config. Has to be related to the model Share this post Link to post Share on other sites
teeha 22 Posted June 14, 2014 If export the NVGslot headgear template as 3ds and then build from that then re-import it back into O2 and save it as a P3D would it still carry over the correct properties? Share this post Link to post Share on other sites
warlord554 2065 Posted June 14, 2014 Not sure. I have the p3d blender plugin, so I export directly to p3d format. Share this post Link to post Share on other sites
teeha 22 Posted June 14, 2014 Didn't know that was a real thing. I'm going to get that right now. Ill give it a shot and let you guys know whether it worked or not. Share this post Link to post Share on other sites
warlord554 2065 Posted June 14, 2014 Make sure to highlight the entire model and in the tools tab scroll down and click "make arma object". Then export directly to p3d Share this post Link to post Share on other sites
teeha 22 Posted June 14, 2014 Well unfortunately that hasn't seemed to work either. It ended up just being on the ground again. The NV part still works but the model just doesn't want to be where it should be. It's driving me crazy! :icon_frown: Share this post Link to post Share on other sites
warlord554 2065 Posted June 14, 2014 Post your model.cfg, or send it Share this post Link to post Share on other sites
teeha 22 Posted June 14, 2014 See now here's the problem. I have done nothing with any model.cfg and the model config editor in O2 is completely broken looking. This is what it looks like. http://puu.sh/9tLeU/d727447745.png Share this post Link to post Share on other sites
warlord554 2065 Posted June 14, 2014 Well the A2 just inherits from optics. So try class _modelname: optics {}; Share this post Link to post Share on other sites
teeha 22 Posted June 14, 2014 Sorry if this is a stupid question, but where is the model.cfg located? Is there a way I can modify it outside of O2? Share this post Link to post Share on other sites
warlord554 2065 Posted June 15, 2014 Absolutely, just a standard text file saved as a .cfg format. Can look in the samples for examples Share this post Link to post Share on other sites