OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Teryan on 08 Apr 2004, 22:26:54
-
Hi, thanks for looking.
I'm really new at this, and haveing a hard time geting this to work. Here is the config file.
//some basic defines
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
//true or lie
#define true 1
#define false 0
//visibility
#define private 0
#define protected 1
#define public 1
class CfgPatches
{
class M49 Observational Scope
{
units[]={};
weapons[]={M49 Observation};
worlds[]={};
requiredVersion=1.96;
};
};
class CfgWeapons
{
class Default {};
class Binocular: Default {};
class M49 Observation: Binocular
{
scopeWeapon=2;
scopeMagazine=1;
modle = "\M49\m49telecope.p3d";
optics = true;
opticsZoomMin = 20;
opticsZoomMax = 20;
distanceZoomMin = 20;
distanceZoomMax = 20;
};
};
Also, any tips on texturing I would apprecate. One problem I am having is with my m40a3, my stock looks like crap, I tried making bigger textures, and tried more polyes, but in game it still looks faded and like crap. Any help their would be apprecated greatly.
-
Haven't looked at this in detail yet, but:
modle = "\M49\m49telecope.p3d";
One spelling error.........modle......should be model.
Planck
-
you can try adding sharp and smooth edges by pressing "u" for sharp and "i" for smooth
-
Thanks for your help guys. I guess I should be a little more exact in the problem. After I compress pbo tool it and start flashpoint resitance, I get this:
m49\config.cpp/cfgPatchs/:'O' encountered insted of '{'
I dont see the problem still. Thanks for the help.
-
Yes.......that could be your naming.
class M49 Observational Scope
{
units[]={};
weapons[]={M49 Observation};
worlds[]={};
requiredVersion=1.96;
};
};
I think you are not allowed spaces in the names, so.....
class M49 Observational Scope
could be changed to:
class M49_Observational_Scope
Go through the whole config and change the relevant names so they no longer have spaces in them.
Planck
-
Thanks, but I still have the same problem, here is the updated config file:
//some basic defines
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
//true or lie
#define true 1
#define false 0
//visibility
#define private 0
#define protected 1
#define public 1
class CfgPatches
{
class M49_Observational_Scope
{
units[]={};
weapons[]={M49_Observation};
worlds[]={};
requiredVersion=1.85;
};
};
class CfgWeapons
{
class Default {};
class Binocular:Default {};
class M49_Observation:Binocular
{
scopeWeapon=2;
scopeMagazine=1;
model = "\M49\m49telecope.p3d";
optics = true;
opticsZoomMin = 20;
opticsZoomMax = 20;
distanceZoomMin = 20;
distanceZoomMax = 20;
};
};
-
This one needs changing also:
class M49_Observation:Binocular
try:
class M49_Observation_Binocular
EDIT: Also I think, weapons[]={M49_Observation}; should be weapons[]={M49_Observation_Binocular};
Planck
-
Actually I should go to bed.......I misread that bit.
Ignore me
Planck
-
OK......a couple of questions and I will go to bed.
I will read the answers tomorrow.
Is your PBO called M49_Observation_Scope.pbo?
Do you think you might need a cfgModels section in this config.?
Do you still get the same error message?
OK....I lied it was 3 questions
Planck
-
Is your PBO called M49_Observation_Scope.pbo?
No. Should it be?
Do you think you might need a cfgModels section in this config.?
I have no idea. What does it do?
Do you still get the same error message?
Err, I thought you said to ignor you.... I'll give it a try. Back in a few.
*Err, new error. Check out the pic.
Good night :)
Ok, here is how it looks now:
//some basic defines
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
//true or lie
#define true 1
#define false 0
//visibility
#define private 0
#define protected 1
#define public 1
class CfgPatches
{
class M49_Observational_Scope:Binocular // did not have :Binocular
{
units[]={};
weapons[]={M49_Observation_Binocular}; // was weapons[]={M49_Observation};
worlds[]={};
requiredVersion=1.85;
};
};
class CfgWeapons
{
class Default {};
class Binocular:Default {};
class M49_Observation:Binocular
{
scopeWeapon=2;
scopeMagazine=1;
model = "\M49\m49telecope.p3d";
optics = true;
opticsZoomMin = 20;
opticsZoomMax = 20;
distanceZoomMin = 20;
distanceZoomMax = 20;
};
};
-
I don't think you need that ....:Binocular in cfgPatches.
Anyway.....try the one below.....no guarantees but it might give you an entirely new error message..........which is nice.
I added a cfgModels section........it may not be needed, but it won't do any harm to be there.
As it appears from this line:
model = "\M49\m49telecope.p3d";
that your PBO is called M49.pbo, I have changed the class names accordingly.
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
//true or lie
#define true 1
#define false 0
//visibility
#define private 0
#define protected 1
#define public 1
class CfgModels
{
class Default { };
class M49: Default
{
sections[]={""};
sectionsInherit="";
};
};
class CfgPatches
{
class M49
{
units[]={};
weapons[]={M49_Observation};
worlds[]={};
requiredVersion=1.96;
};
};
class CfgWeapons
{
class Default {};
class Binocular: Default {};
class M49_Observation: Binocular
{
scopeWeapon=2;
scopeMagazine=1;
model = "\M49\m49telecope.p3d";
optics = true;
opticsZoomMin = 20;
opticsZoomMax = 20;
distanceZoomMin = 20;
distanceZoomMax = 20;
};
};
Planck
-
Ok, thanks.
Got past the start up with no error messages their (thow I had to change the version to 1.85). Got to mission editor and put down a regular grunt, went to int and put 'this addweapon "M49";' went to stat the mission and I got this:
Well, getting closer! :)
-
Hmmmm............try:
this addweapon "M49_Observation"
Planck
-
:) Closer still.
-
What is w_m49_observation.paa ?
Is it one of your models texture files?
If so, it is looking for it in an equip\w folder.
Is this texture included in the PBO, if so, make sure the path is correct in Oxygen.
Planck
-
humm, I dont have anything named w_m49_observation.paa, but i might have had at one time (name was probly too long so i chnaged it). Let me retexture it, back in about an hour.
-
I know its a bit late to be interjecting this info, but you can NOT add new binoculars to the game, its been tried and tried, and unfortunately it just doesnt work (because the binoculars are hardcoded into the game engine, as they are bound to the 'B' key)
Sorry mate, but you're gonna have to config it as something other than Binoculars, as it will simply not work. :-\
-
I knew there might be a problem with basing this on Binocular, but I think it is worth seeing how far it goes before trying to base it on something else.
There is no optics model defined for it yet either, so that might be another problem to come yet.
Planck
-
S@#! :(
Thanks, might have done this all weekend if you did not tell me.... Maby do it as a gun that can go in the binocular slot?
-
As far as I see Teryan......we have got it as far as just missing a texture for the basic telescope model.
It is easy enough to change the base class, I think you could just use Default.:
class CfgWeapons
{
class Default {};
class M49_Observation: Default
But I might be wrong.
The only other difficulty I can see is doing the optics model for this.
Planck
-
Ok, here is the new config file. How would I get it to go into the binocular slot? No need to have only a binocular to see people and no gun to shoot them with! ;)
#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
class CfgModels
{
class Default { };
class M49: Default
{
sections[]={""};
sectionsInherit="";
};
};
class CfgPatches
{
class M49
{
units[]={};
weapons[]={M49_Observation};
worlds[]={};
requiredVersion=1.85;
};
};
class CfgAmmo
{
   class default {};
   class BulletSingle: default {};
   class BulletSniper: BulletSingle {};
};
class CfgWeapons
{
   class Default {};
   class MGun: Default {};
   class Riffle: MGun {};  ÂÂ
   class SniperRiffle : Riffle {};
   class M21 : SniperRiffle{};
  ÂÂ
   class M49: M21
   {
      model="\M49\m49telecope.p3d";
      displayName="M49_Observational";
      scopeWeapon=2;
      scopeMagazine=1;
      optics = true;
      opticsZoomMin = 20;
      opticsZoomMax = 20;
      distanceZoomMin = 20;
      distanceZoomMax = 20;
        ÂÂ
     ÂÂ
   };
};
And I get the same error! humm..... I textured the entire thing. that texture does not exist their. I'll check my whole computer for it....
Ok, thx for help again.
EDIT: you posted wile i was writing this ;D, I'll try that.
-
:wow:
-
I don't think it will work from the Binocular slot, it might be tied to the 'B' key for binoculars.
What about the other weapon slot, the one for LAWs and such?
The observer would carry his scope on his back wouldn't he?
EDIT.........You got it there then.........good
Planck
-
Ok, so their is no name for it. I just got a thing taht said "drop "pick "up ". Also I could not do anything with it (it was like he had nothing in his hands). It did not show up in the guys hands....
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
//true or lie
#define true 1
#define false 0
//visibility
#define private 0
#define protected 1
#define public 1
class CfgModels
{
class Default { };
class M49: Default
{
sections[]={""};
sectionsInherit="";
};
};
class CfgPatches
{
class M49
{
units[]={};
weapons[]={M49_Observation};
worlds[]={};
requiredVersion=1.85;
};
};
class CfgWeapons
{
class Default {};
class M49_Observation: Default
{
scopeWeapon=2;
scopeMagazine=1;
model = "\M49\m49telecope.p3d";
optics = true;
opticsZoomMin = 20;
opticsZoomMax = 20;
distanceZoomMin = 20;
distanceZoomMax = 20;
};
};
Thanks
EDIT: The LAW spot would be fine.
-
Emmmmmmmmmmm.........you might need to scale that down a bit.
Planck
-
What LOD's have you made for this in Oxygen......not being an expert on making weapons I am not too sure which LOD' s are necessary for a weapon.
Should be easy enough to find out though.
Planck
-
Err um, I eather forgot them or did not know witch ones was needed for the binoculars. So i'm going to put in the weapond one: zbran
and scale it.
-
OK........good luck with it, I have to go, real life is calling.
Planck
-
Ok, thanks again for the help.
If you get a chance check back in.
I put in the zbran LOD, and still nothing. I have a 1.000 LOD, a Memory LOD and under the memory LOD I have the zban LOD. I still can't see it in game with the person using it. But I can drop it and see it... I also do not see the picture of the m49 in the gear section (when looking at the map, in equipment). Got the name thing fixed. Here is the updated config file:
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
//true or lie
#define true 1
#define false 0
//visibility
#define private 0
#define protected 1
#define public 1
class CfgModels
{
class Default { };
class M49: Default
{
sections[]={""};
sectionsInherit="";
};
};
class CfgPatches
{
class M49
{
units[]={};
weapons[]={M49_Observation};
worlds[]={};
requiredVersion=1.85;
};
};
class CfgWeapons
{
class Default {};
class M49_Observation: Default
{
displayName="M49";
scopeWeapon=2;
scopeMagazine=1;
model = "\M49\m49telecope.p3d";
picture="\M49\w_m49.pac";
optics = true;
opticsZoomMin = 20;
opticsZoomMax = 20;
distanceZoomMin = 20;
distanceZoomMax = 20;
};
};
Also how do I make it go in the LAW spot?
-
I think I am reaching the limit of my knowledge on this now.
As I said before, I have never made a weapon addon, so I think you need someone who has, to help you further.
The way I understand it though, you need your model file as a proxy anyway.
You might also need custom animations for the holding and use of this addon.
Finally, I think proxies also require a cfgnonaivehicles section in the config.cpp.
I hope someone who has experience with making weapons can help you here, but I don't and think I have helped all I can for the moment.
I will keep an eye on this thread though. ;)
Planck
-
Thanks alot for your help. :)
See ya around.
I'm going to go thur the .cpp tutorial (again) and try to figure it all out.
-
Ok, after re-reading the tutorial (again). I have modifyed it to this:
// some basic defines
#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 M49
{
units[]={};
weapons[]={M49_Observation};
worlds[]={};
requiredVersion=1.85;
};
};
class CfgWeapons
{
class Default {};
class M49_Observation: Default
{
displayName="M49";
scopeWeapon=2;
scopeMagazine=1;
model = "\M49\m49telecope.p3d";
picture="\M49\w_m49.pac";
optics = true;
opticsZoomMin = 20;
opticsZoomMax = 20;
distanceZoomMin = 20;
distanceZoomMax = 20;
};
};
class CfgAmmo
{
class Default {};
{
};
};
lass CfgModels
{
class Default { };
class M49: Default
{
sections[]={""};
sectionsInherit="";
};
class CfgNonAIVehicles
{
class proxyweapon {};
class ProxyM49_Observation: proxyweapon {};
};
};
Class CfgAmmo
{
class default {};
{
};
};
lass CfgModels
{
class Default { };
class M49: Default
{
sections[]={""};
sectionsInherit="";
};
class CfgNonAIVehicles
{
class ProxyWeapon {};
class ProxyM49_Observation: ProxyWeapon {};
};
};
I'm not shure what I should do about the cfgAmmo class. I dont want any ammo to be used by it and leaving it bank give me a error message when I start up. Maby I should inheariate some other ammo from some other gun and not make any magazines so the spotting scope cant shoot (that's the guns job)? Also, can I keep the inhearated for the m49 from default? Will that work?
As for the binocular thing, did you know that the BIS comand refrence has a example for it?
-
I note that the config you posted above has cfgModels and cfgNonAiVehicles twice, you might want to fix that.
However, I did a little work on a copy, have a look and try it.
Hopefully it might help a bit till someone with weapon experience comes along.
// some basic defines
#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 M49
{
units[]={};
weapons[]={M49_Observation};
worlds[]={};
requiredVersion=1.85;
};
};
class CfgWeapons
{
class Default {};
class M49_Observation: Default
{
scopeWeapon=2;
scopeMagazine=1;
model="\M49\m49telecope_proxy.p3d";
modelOptics="";
valueWeapon = 5;
weaponType = WeaponSlotSecondary;
magazineType = WeaponNoSlot;
ammo=;
displayName="M49";
picture="\M49\w_m49.pac";
reloadTime=0.0;
canLock=LockNo;
optics = true;
forceOptics = true;
primary = false;
opticsZoomMin = 20;
opticsZoomMax = 20;
distanceZoomMin = 20;
distanceZoomMax =
magazines[] = {};
};
};
class CfgAmmo
{
class Default {};
};
class CfgModels
{
class Default { };
class M49: Default
{
sections[]={""};
sectionsInherit="";
};
};
class CfgNonAIVehicles
{
class ProxySecWeapon {};
class ProxyM49telescope_proxy: ProxySecWeapon {};
};
If you use this config, you need to rename your P3D file to:
m49telecope_proxy.p3d
Let me know if it helps any.
btw: Yes I knew about the Binocular section in the commented configs, haven't noticed anything in the command reference though.
Planck
-
I tried it and it did not show up, it did not appear in the menu (could not drop it like i use to be able to), it did not appear in the equipment section (the picture never did thow), and still no modle out side the guy. It was like it was just a regular civilan.... Could it be due to being a proxy modle? Why did you add the _proxy to the name?
Forgot to put the 20 here: distanceZoomMax =
I fixed it and tried it. Same thing.
Thx thow.
This is ofpec, where are the weapond experts? ???
-
Well this can take a long time......I can come up with things to try,but only you can try them out.
If you send me a copy of your addon PBO, I can see what I can come up with.
Failing that you will just have to wait till someone comes along.
Planck
-
Yea, i will send it to you. It's on it's way :)
Thanks again.
-
OK Teryan
I got your file, I will see what I can come up with, no promises but I will try.
Planck
-
I need to send this back to you now Teryan, unfortunately, I lost your email address.
Please confirm that the one in your profile is still current and I will use that.
If it is no longer valid, please give me a valid address to use.
Planck
-
Ok,
mountainguy30@hotmail.com
this is probly different from my profile
thx for help.