col_kurtz1979 0 Posted October 25, 2003 Im new to creating my own config.cpp files and im having a couple of problems with this code: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgWeapons { class default {}; class tactical_binocular: Default { scopeWeapon=2; scopeMagazine=1; model="dalekohled_proxy"; modelOptics="optika_dalekohled"; weaponType=WeaponSlotBinocular; magazineType=0; ammo=""; displayName="Tactical binoculars"; reloadTime=0.000000; sound[]={"",0,1}; canLock=0; optics=1; forceOptics=1; primary=0; opticsZoomMin=0.0085000; opticsZoomMax=0.85000; magazines[]={}; }; }; Firstly, the forceOptics=1; has no effect..... and secondly, when the player selects these binoculars from the action menu the unit just stands as if nothing has changed (ie. he doesnt put his gun away and pull out a pair of binoculars). The optics for the binocular show when 'v' is pressed however, and the zoom function works fine. Can anyone tell me where Im going wrong? Share this post Link to post Share on other sites
dm 9 Posted October 25, 2003 Can anyone tell me where Im going wrong? Yes, you're trying to replace something that's hard coded into the game. Quote[/b] ]Im new to creating my own config.cpp files But for this reason I'll let you off Sorry mate, its been tried, and tried, and tried again, but its just not possible to add new binoculars, nvg's or other slot 4069 objects into the game. Share this post Link to post Share on other sites
quakergamer 0 Posted October 25, 2003 The only way you may be able to do it is to replace original BIS Model... As deadmeat said, impossible to replace those objects in game! Share this post Link to post Share on other sites
col_kurtz1979 0 Posted October 25, 2003 Thats a shame Thanks anyway guys Share this post Link to post Share on other sites
bmgarcangel 0 Posted October 25, 2003 My friend has a picture of his watch, he replaced the bis watch with his nice indiglo one. Then the binoculars he replaced too with these cool looking ones with tinted lens. But since he replaced them, he has to now copy the files he put them into, and then go and reinstall ofp or he can't install new patches!!! Sucks Share this post Link to post Share on other sites
@cero 0 Posted October 26, 2003 Well, you could allways make a weapon addon like a pistol, that when you model it it looks like a set of bioculars, then make a scope for it like the binocular one, and change the animation with scripts so the unit handle the addon like the binoculars. But in the gear will come like secon weapon instead of binocular or NVG. Now days it should be posible, and if is posible to do, we could be able to have spoter scopes or monoculars, or whatever, something like that. Make it zoomable and you'll be in the go then. Only if is posible. Do anybody tryed jet? Share this post Link to post Share on other sites
dm 9 Posted October 26, 2003 That would work @cero, but then you wouldnt be able to carry a pistol and the new "binocs/scope" Share this post Link to post Share on other sites
Peanut 0 Posted October 26, 2003 Quote[/b] ]That would work @cero, but then you wouldnt be able to carry a pistol and the new "binocs/scope" Hmm there comes an idea to my mind. Isn't there a weaponchanging-script? Someone mentioned it with INQ's M24 which could be camoflaged due to a script which changed the weapon ingame. Couldn't there be a similar solution for the Binoc/secondary weapon preoblem? Share this post Link to post Share on other sites
@cero 0 Posted October 26, 2003 Isn't there a weaponchanging-script? Someone mentioned it with INQ's M24 which could be camoflaged due to a script which changed the weapon ingame. Couldn't there be a similar solution for the Binoc/secondary weapon preoblem? Yep, that could do aswell, I supose two ideas in one go. DeadMeat, I very rarelly use the hand guns, I wouldn't mind to sacrifice the hand gun for that. Besides, it could work with the AT weapons slot, and a monocular would be better. So instead of a LAW you would pull a spoting scope. That could be a secret idea for BAS? EDIT: Quote[/b] ]"QUI VULT DARE PARVA NON DEBET MAGNA ROGARE" - HE WHO WISHES TO GIVE LITTLE SHOULD NOT ASK FOR MUCH." Nice one DM, I like that one mate. Share this post Link to post Share on other sites
dm 9 Posted October 26, 2003 Besides, it could work with the AT weapons slot, and a monocular would be better. So instead of a LAW you would pull a spoting scope.That could be a secret idea for BAS? Probably not Quote[/b] ]EDIT: Quote[/b] ]"QUI VULT DARE PARVA NON DEBET MAGNA ROGARE" - HE WHO WISHES TO GIVE LITTLE SHOULD NOT ASK FOR MUCH." Nice one DM, I like that one mate. hehe, kudos should really go to Soul Assassin, he had it in his sig first, but its so true I thought I'd put it too Share this post Link to post Share on other sites
Drill Sergeant 0 Posted October 27, 2003 class Default {}; class Binocular : Default{}; class tactical_binocular: Binocular Try useing that. Share this post Link to post Share on other sites
maatz 1 Posted October 27, 2003 like this? [mg]http://ofp.gamezone.cz/news/pics/nightvision02.jpg[/img] >100kb maatz Share this post Link to post Share on other sites
@cero 0 Posted October 27, 2003 That's a nice set of NVG. How do you managed to do that? Oh, that must be you'r standart NVG that you are using in replacement of the BIS ones, is it? Share this post Link to post Share on other sites
dm 9 Posted October 27, 2003 class Default {};class Binocular : Default{}; class tactical_binocular: Binocular Try useing that. Wont work... No matter how you try to config it, it will not work, as it is hard coded into the game. Its just NOT possible (even Suma has said that) Share this post Link to post Share on other sites
@cero 0 Posted October 29, 2003 I was thinking if someone would be up to the chalenge on trying to make an addon like we said above, by creating a binocular or monocular addon instead of a handgun. Anybody feel adventurous enough? Share this post Link to post Share on other sites
Guest Posted October 30, 2003 Ya, been there tried that.... It's possible to get a model in configged up as binocs. The point that always hung for me was the animations and the optics. The optics I could probably get around, but the animations! Â Since this stuff is not going to be used, I can show you an earlier experiment. No idea about this config....I know I had one working up to a point for a while...but no animations/optics: EDIT: probably the force optics bit...just re-read it and it's a slightly dud config, but if it helps anyone... Quote[/b] ]class CfgVehicles{ class All{}; class AllVehicles:All{}; class Land:AllVehicles{}; class Man:Land{}; class Soldier:Man{}; class SoldierWB:Soldier{}; class SoldierWSniper:SoldierWB{}; class ds_canteen:SoldierWSniper { displayName="US WaterDude"; weapons[]={us_canteen}; nightVision=0; camouflage=0.600000; }; }; class CfgWeapons { class Default {}; class Binocular: Default {}; class canteen: Binocular { scopeMagazine=2; valueWeapon=5; weaponType=WeaponSlotBinocular; picture=""; sound[]={"",0,1}; useAction=0; useActionTitle=""; optics=0; forceOptics=0; scope=2; canDrop=1; }; class ir_canteen: canteen { model="\ds_canteen\canteen.p3d"; displayName="Iraqi Canteen"; }; class us_canteen: canteen { model="\ds_canteen\us_canteen.p3d"; displayName="US Canteen"; }; }; class CfgNonAIVehicles { class ProxyWeapon {}; class ProxyCanteen: ProxyWeapon {}; }; Share this post Link to post Share on other sites
Guest Posted October 30, 2003 Again, just in case it helps anyone....(this is 1.90 config stuff): Quote[/b] ]#define MANACTBINOCOFF 54#define MANPOSBINOCSTAND 13 #define MANPOSBINOCLYING 2 #define MANPOSBINOC 12 #define MANACTBINOCON 53 class CfgManActions { BinocOn=""; BinocOff=""; } class CfgMovesMC { access=1; vehicleActions="CfgVehicleActions"; class Actions { class StandActions: NoActions { binocOn="BinocStand"; binocOff="Stand"; } class CombatActions: NoActions { binocOn="Binoc"; binocOff="Combat"; } class CrouchActions: CombatActions { binocOn="BinocCrouch"; binocOff="Crouch"; } class LyingActions: NoActions { binocOn="BinocLying"; binocOff="Lying"; } class BinocActions: CombatNoMoveActions { stop="Binoc"; default="Binoc"; binocOff="Combat"; upDegree=MANPOSBINOC; }; class BinocLyingActions: LyingActions { stop="BinocLying"; default="BinocLying"; binocOff="Lying"; walkF=""; walkLF=""; walkRF=""; walkL=""; walkR=""; walkLB=""; walkRB=""; walkB=""; slowF=""; slowLF=""; slowRF=""; slowL=""; slowR=""; slowLB=""; slowRB=""; slowB=""; fastF=""; fastLF=""; fastRF=""; fastL=""; fastR=""; fastLB=""; fastRB=""; fastB=""; turnL=""; turnR=""; turnLRelaxed=""; turnRRelaxed=""; upDegree=MANPOSBINOCLYING; turnSpeed=1; }; class BinocStandActions: StandActions { stop="BinocStand"; default="BinocStand"; binocOff="Stand"; walkF=""; walkLF=""; walkRF=""; walkL=""; walkR=""; walkLB=""; walkRB=""; walkB=""; slowF=""; slowLF=""; slowRF=""; slowL=""; slowR=""; slowLB=""; slowRB=""; slowB=""; fastF=""; fastLF=""; fastRF=""; fastL=""; fastR=""; fastLB=""; fastRB=""; fastB=""; turnL=""; turnR=""; turnLRelaxed=""; turnRRelaxed=""; upDegree=MANPOSBINOCSTAND; turnSpeed=2; }; class BinocCrouchActions: CrouchActions { stop="BinocCrouch"; default="BinocCrouch"; binocOff="Crouch"; walkF=""; walkLF=""; walkRF=""; walkL=""; walkR=""; walkLB=""; walkRB=""; walkB=""; slowF=""; slowLF=""; slowRF=""; slowL=""; slowR=""; slowLB=""; slowRB=""; slowB=""; fastF=""; fastLF=""; fastRF=""; fastL=""; fastR=""; fastLB=""; fastRB=""; fastB=""; turnL=""; turnR=""; turnLRelaxed=""; turnRRelaxed=""; upDegree=MANPOSBINOC; turnSpeed=2; }; }; class Default { enableBinocular=0; } class States { class CombatToBinoc: Default { actions="CombatActions"; file="sdalek.rtm"; speed=-1.000000; looped=0; disableWeapons=1; showItemInHand=1; soundEnabled=0; }; class Binoc: Default { actions="BinocActions"; file="sdalekstat.rtm"; speed=10000000000.000000; looped=1; disableWeapons=0; showItemInHand=1; soundEnabled=0; enableBinocular=1; head="headNo"; }; class BinocToCombat: Default { actions="CombatActions"; file="sdalek2.rtm"; speed=-1.000000; looped=0; disableWeapons=1; showItemInHand=1; soundEnabled=0; }; class LyingToBinocLying: Default { actions="LyingActions"; file="plazenidalek.rtm"; speed=-2.000000; looped=0; disableWeapons=1; soundEnabled=0; showItemInHand=1; onLandBeg=1; onLandEnd=1; }; class BinocLying: Default { actions="BinocLyingActions"; file="plazenidalekstat.rtm"; speed=10000000000.000000; looped=1; disableWeapons=0; showItemInHand=1; soundEnabled=0; enableBinocular=1; onLandBeg=1; onLandEnd=1; duty=-1; }; class BinocLyingToLying: Default { actions="LyingActions"; file="plazenidalek2.rtm"; speed=-2.000000; looped=0; disableWeapons=1; showItemInHand=1; soundEnabled=0; onLandBeg=1; onLandEnd=1; }; class StandToBinocStand: Default { actions="StandActions"; file="bezdalek.rtm"; speed=-1.000000; looped=0; disableWeapons=1; showItemInHand=1; soundEnabled=0; connectFrom[]={"Stand",2}; }; class BinocStand: Default { actions="BinocStandActions"; file="bezdalekstat.rtm"; speed=10000000000.000000; looped=1; disableWeapons=0; showItemInHand=1; soundEnabled=0; enableBinocular=1; connectFrom[]={"StandToBinocStand",1}; connectTo[]={"BinocStandToStand",1}; }; class BinocStandToStand: Default { actions="StandActions"; file="bezdalek2.rtm"; speed=-1.000000; looped=0; disableWeapons=1; showItemInHand=1; soundEnabled=0; connectTo[]={"Stand",2}; }; class CrouchToBinocCrouch: Default { actions="CrouchActions"; file="klekdalekstart.rtm"; speed=-1.000000; looped=0; disableWeapons=1; showItemInHand=1; soundEnabled=0; connectFrom[]={"Crouch",2}; }; class BinocCrouch: Default { actions="BinocCrouchActions"; file="klekdalekstat.rtm"; speed=10000000000.000000; looped=1; disableWeapons=0; showItemInHand=1; soundEnabled=0; enableBinocular=1; connectFrom[]={"CrouchToBinocCrouch",1}; connectTo[]={"BinocCrouchToCrouch",1}; }; class BinocCrouchToCrouch: Default { actions="CrouchActions"; file="klekdalekend.rtm"; speed=-1.000000; looped=0; disableWeapons=1; showItemInHand=1; soundEnabled=0; connectTo[]={"Crouch",2}; }; class Interpolations { }; transitionsInterpolated[]={}; transitionsSimple[]={"CombatToBinoc",2,"CombatToBinoc","Binoc",2,"Binoc&quo t;,"BinocToCombat",2,"BinocToCombat","LyingToBinocLying",2,& quot;LyingToBinocLying","BinocLying",2,"BinocLying","BinocLy ingToLying",2,"BinocLyingToLying"}; transitionsDisabled[]={}; }; class CfgWeapons { access=1; class Binocular: Default { scopeWeapon=2; scopeMagazine=1; model="dalekohled_proxy"; modelOptics="optika_dalekohled"; valueWeapon=5; weaponType=4096; magazineType=0; ammo=""; displayName="$STR_DN_BINOCULAR"; reloadTime=0.000000; sound[]={"",0,1}; canLock=0; optics=1; forceOptics=1; primary=0; opticsZoomMin=0.085000; opticsZoomMax=0.085000; magazines[]={}; }; class NVGoggles: Binocular { displayName="$STR_DN_NV_GOGGLES"; showEmpty=0; valueWeapon=5; opticsZoomMin=1.000000; opticsZoomMax=1.000000; modelOptics="optika_night"; model="nvg_proxy"; }; class Phone: Binocular { scopeWeapon=1; displayName="$STR_DN_PHONE"; showEmpty=0; opticsZoomMin=1.000000; opticsZoomMax=1.000000; model="sluchatko_proxy"; modelOptics=""; }; } Share this post Link to post Share on other sites
Sgt_Wilson 0 Posted October 30, 2003 You can change the animations slightly to allow you to use your own binoculars with scripts. One of the problem is you cant use the keyboard to switch between binocs and weapons, you would have to define user actions to activate and deactivate the binocs. Place this addon in the editor and call playmove "FOBinoc" using a radio trigger. http://www.ofpec.com/yabbse....d=13099 And select Iron sights to actually look through them, which highlights another problem. At the moment when you do, it will switch to the ironsights of the weapon you placed on the floor as part of the FOBinoc anim, and the view looks like you are spinning around. Which is a major obstical AFAIK? There is a video camera addon kicking around somewhere, with different anims and model, you might have the basics for your own optics? Share this post Link to post Share on other sites
@cero 0 Posted October 30, 2003 So, the problems so far, sighting, animations, the way to call the addon into action( wiil have to be the action menu), conflict with another weapons sight??? This is just my sugestions, or what I (as a player, one more from the thousends in the comunity) would be happy with. I'm allso saying that I'm not an addon maker or anything, and all my sugestions or ideas are based on things that I read or I think that they are common sense. So here we go. The binocular or monocular or spoting scope, could be made like that. -Make a pistol that looks like a set of binoculars. -Don't create any kind of amunition for it and don't create any sound files for firing, dry, or change magazine, because is not a weapon -create a sight picture like if you were going to use a scope for the weapon. Make it as a monocular or a binocular shape. As far as I know, it can be on any shape color and form, so a binocular shape should be possible. -you can add a mil-relation formula reticle to it and make it really something worth and speciall. Like the one in this pic. -For the animation. Well, I think that it shouldn't be a problem, it have to be a way to script it so that the unit uses the binocular animation when this addon is used, or even better, create a whole new animation, and find or create or get someone to create a script that call this animation when the addon is selected. -The way to call the addon into action (make the unit use it). I would be happy if it was the same way you would call what it really is, a secondary weapon, but it wouldn't be a weapon Last problem I can think so far? Quote[/b] ]And select Iron sights to actually look through them, which highlights another problem. At the moment when you do, it will switch to the ironsights of the weapon you placed on the floor as part of the FOBinoc anim, and the view looks like you are spinning around. Which is a major obstical AFAIK? You wouldn't use iron sights(field sights) You would be using the scope. and the binocular, or whatever it will be, is a contained peace of gear on its selfe, so you don't have to drop a weapon, just swich from assault rifle to secodary, the binocular addon in this case. I think an addon like that would be ideal for multiplayer in particular, to have to players, one the sniper and the other the spoter, for example, and don't have them grouped togueder for whatever reason the mission editor decided no to group them. Live reall information of the target's distance, and anything that can be ovtained throught the binoculars, monoculars, etc, etc. Like I said above, I'm not a addon creator, not a scripter, so you masters of addon creation will probably prove me wrong in all the sugestions I presented here. After all, they are just sugestions, or should I say hopes. Thanks for the attention. @CERO. Share this post Link to post Share on other sites
tankieboy 0 Posted October 30, 2003 This is a great idea if someone could pull it off. I like the idea of having it in the pistol slot so a quick "Y" would switch to it. If you realy need a pistol you can chuck it in your back pack (the fantastic one released) along with other "tools for the job". Share this post Link to post Share on other sites
@cero 0 Posted October 30, 2003 I just looked at the back pack addon, and I think it could go very well with a binocular addon. Maybe Neon would like to add this things to his FIA mod. hint hint Share this post Link to post Share on other sites
@cero 0 Posted November 1, 2003 I would hate if this topic dies off. I think is alot of potenciall in here. No one has come with a prove that this won't work, and it don't look like if anybody is trying to experiment on it. Or at list no body said so. If this could work it can open alot of dors for other addons. Now days, nothing is impossible. Share this post Link to post Share on other sites
@cero 0 Posted November 4, 2003 Is somebody having at list a look to that? Any worth news? Share this post Link to post Share on other sites
Raproboter 0 Posted November 5, 2003 Can anyone tell me where Im going wrong? Yes, you're trying to replace something that's hard coded into the game. Quote[/b] ]Im new to creating my own config.cpp files But for this reason I'll let you off Sorry mate, its been tried, and tried, and tried again, but its just not possible to add new binoculars, nvg's or other slot 4069 objects into the game. Inquisitor made a custom nvg! Share this post Link to post Share on other sites
dm 9 Posted November 5, 2003 Can anyone tell me where Im going wrong? Yes, you're trying to replace something that's hard coded into the game. Quote[/b] ]Im new to creating my own config.cpp files But for this reason I'll let you off Sorry mate, its been tried, and tried, and tried again, but its just not possible to add new binoculars, nvg's or other slot 4069 objects into the game. Inquisitor made a custom nvg! Yawn... Inquisitors "custom" NVG's simply replaced the BIS ones ingame, by overwriting the BIS files for the NVG's... Hence they fall under the: "the only way you can do it is to replace the files in Data.pbo and Data2D.pbo" category... Share this post Link to post Share on other sites