Home   Help Search Login Register  

Author Topic: Several questions from a new O2 weapons programmer  (Read 1847 times)

0 Members and 1 Guest are viewing this topic.

PDOGG

  • Guest
Several questions from a new O2 weapons programmer
« on: 15 Apr 2004, 05:54:37 »
OK I need to make a few USP Tactical pictures into texture files(dunno which kind .paa or .pac). I have the pictures but I dunno EXACTLY how to work Texview or what to do with it exactly. Also I want to make this USP Tactical JAM compatible but I'm not sure how(I'll have a silenced and non-silenced version, they'll use the JAM2, Mk23, 12rd, .45 mags). Oh and ONE more thing, how do I finalize the pistol(with the weapon points on how the pistol is carried by the soldier), I want it to look like he's holding it right of course, I know how to do it for a rifle, but not a pistol. Thanks to anyone who can help me out...I'm such a hopeless case :'(


EDIT: Oh crap forgot one more thing. I want the standard OfP:R CZ75 first person sight, how do I do that? I know this is alot of stuff to ask but I appreciate any help I can get
« Last Edit: 15 Apr 2004, 05:56:49 by PDOGG »

Rastavovich

  • Guest
Re:Several questions from a new O2 weapons programmer
« Reply #1 on: 15 Apr 2004, 12:05:20 »
Ok, I'll try to answer the qs as far as I can. Some of the issues mention are config.cpp wise, some are not. I will first answer the config questions.

1.How to make my weapon using Jam magazines:

You need in your weapondefinition (in cfgweapons) the entry:
Code: [Select]
magazines[]= {JamMagIwant,2ndJamMagIwant,Evena3rdJamMag};of course with the proper names.
For MP reasons you need to define a dependency in CfgPathes under RequiredAddons[]={x}; aswell, with one of the JamMagazines instead of x.

2.How to use the CZ75 optics.
Write in your weapondefinition in CfgWeapons:
Code: [Select]
modeloptics="\O\Guns\optika_CZ75";
3. How to use Texview
TexView can only handle .tga textures and convert them into .pac and .paa.
To create such .tgas (Targas) you need a good picture editor like Photoshop or GIMP (which is for free, so you might prefere that).

TexView is only used to convert textures in the game engine optimized formats paa pac (and back).

4. How do you finalize the weapon....
Can't help there really, except it is a config issue.

PDOGG

  • Guest
Re:Several questions from a new O2 weapons programmer
« Reply #2 on: 18 Apr 2004, 00:23:29 »
Thanks man that helps alot! But one thing, how do I turn a jpg. into a TGA in GIMP? I just downloaded it and I can't figure the darn thing out. Oh and does anyone else know how to finalize a handgun?

Rastavovich

  • Guest
Re:Several questions from a new O2 weapons programmer
« Reply #3 on: 18 Apr 2004, 01:43:09 »
"Save As.." and then you can simply write the name you want and end it with .tga.

Attention you need to save with the "Source down left" unchecked, dunno how it is called exactly, I have the german version(the RL compression should stay checked).

PDOGG

  • Guest
Re:Several questions from a new O2 weapons programmer
« Reply #4 on: 18 Apr 2004, 07:45:15 »
AARRGGHH!!! GOD#%&%%$DAMN THE GIMP it's all the little ##### is. It won't let me save man. It WONT ikm so frustrated..........somebody say a prayer for my computer so that I don't murder it tonight! I wish I could tell you more so you'd know how to help me but I don't know wtf is going on it simply wont save it. DAMNIT


Oh nd where is that "Source Down Left" thing you were talking about?
« Last Edit: 18 Apr 2004, 07:49:18 by PDOGG »

Rastavovich

  • Guest
Re:Several questions from a new O2 weapons programmer
« Reply #5 on: 18 Apr 2004, 10:43:43 »
Right click directly into the picture window/save as../
Then write as saving name nameyouwant.tga.
Then opens a small window with 2 options, which are checked both on init: "RL compression" and the other one which I don't know exactly how it is called in english. Simply uncheck that "I dont know how it is called" option and it should save the pic to .tga

PDOGG

  • Guest
Re:Several questions from a new O2 weapons programmer
« Reply #6 on: 18 Apr 2004, 19:44:55 »
Ok It won't even save it so that the window with 2 options opens up.

Then write as saving name nameyouwant.tga.
Then opens a small window with 2 options, which are checked both on init: "RL compression" and the other one which I don't know exactly how it is called in english. Simply uncheck that "I dont know how it is called" option and it should save the pic to .tga



The original jpg. name is usptactical.jpg if that helps at all

PDOGG

  • Guest
Re:Several questions from a new O2 weapons programmer
« Reply #7 on: 19 Apr 2004, 02:34:36 »
OK yay It's converted to a .tga format now but how do I use Texview exactly? Whenever I open the image and try to save it as usptactical.paa it freezes my darn computer! I've almost got this figured out please help me finish converting this file.

Rastavovich

  • Guest
Re:Several questions from a new O2 weapons programmer
« Reply #8 on: 19 Apr 2004, 22:38:11 »
what dimension is your texture.

Maybe you have a setting unlike the OFP supported "2^x * 2^y" (ie 8x8, 16x128).
That might freeze Texview.. I don't know.
« Last Edit: 19 Apr 2004, 22:39:46 by Rastavovich »

DBR_ONIX

  • Guest
Re:Several questions from a new O2 weapons programmer
« Reply #9 on: 28 Apr 2004, 17:24:12 »
Right, you need a file, say 256x256 pixels, or 128x128
Thats the size I normaly use
You can save it as a GIF file

Now save it to your project directory (Like Z:\name), and open O2
Press A to get into texture mode, and right click > load texture
Find the texure, and drag it out

It should load fine :)
But TGA is the same, but bigger file/better quality

- Ben

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:Several questions from a new O2 weapons programmer
« Reply #10 on: 29 Apr 2004, 10:41:32 »
Some more pointers on the config.cpp issues

Naming your addon: use an OFPEC tag
I cannot stress this enough. Register "PDOG" or "PDOGG" as your OFPEC tag and name your addon accordingly. This way, it wont collide with someone elses USP.

Suggestions for the addon name: PDOG_USPTactical or PDOGG_USPTactical

JAM compatibility
You do it just like Rasta described above. More to the point, the non-silenced version of your usp would have this as its magazines definition:
Code: [Select]
magazines[]={JAM_Mk23mag};whereas the silenced one would use
Code: [Select]
magazines[]={JAM_Mk23SDmag};One can imagine an USP variant that can take both kinds of ammunition, and it would have
Code: [Select]
magazines[]={JAM_Mk23mag, JAM_Mk23SDmag};
Declaring the addon dependencies
This is not an option - its a neccessity. Period. It is VERY important, and not only for MP play. Declaring the dependencies correctly will allow your USP addon to be used in mod folders and on dedicated servers without any problems. Failing to declare the dependencies will cause problems, even in SP. There really are no ifs and buts about it. Here's how the CfgPatches part of your addon might look:
Code: [Select]
class CfgPatches
{
         class PDOG_USPTactical
         {
                  units[]={};
                  weapons[]={PDOG_USP, PDOG_USPSD};
                  requiredVersion=1.85;
                  requiredAddons[]={BIS_Resistance, JAM_Magazines};
         };
};
Two important things here: one is that the ability to declare addon dependencies came with OFP 1.85 (well, technically it was 1.82 but that was never released to us customers). The second is the list of actual addons your USP addon depend on.  Note that what one declares there is not the name of the magazines from JAM2, but the encompassing addon class name. Hence,  JAM_Magazines. The second one must be there for two reasons. One is that you will be using the CZ75 optics and that comes from Res/Addons/O.pbo. O.pbo is the addon that defines BIS_Resistance in it.

Secondly, it has to be there because JAM_Magazines depend on it. You see, one has to declare the whole dependency chain for one's addon, so even if you didn't use anything from O.pbo, you'd still need to have it there. This is because JAM_Magazines does use things from O.pbo/BIS_Resistance.

If you decide to add a couple of USP-sporting soldiers (a good idea), the units[] part will have to have these guys listed too, of course.

Good luck with your USP addon!

« Last Edit: 29 Apr 2004, 10:44:04 by Killswitch »

DBR_ONIX

  • Guest
Re:Several questions from a new O2 weapons programmer
« Reply #11 on: 29 Apr 2004, 16:58:03 »
Useful stuff :)
You got more info on the units [] bit?
Coz thats one thing I fell is missing in most of my addons (Like having to do this addwepon etc)

Cheers :)
- Ben