OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Aldo15 on 19 Feb 2011, 02:54:29
-
Hi folks!
I would like to know if Are there weapons or addons in OFP with this animation?
(http://img808.imageshack.us/img808/9853/81087842.jpg)
-
Mmm, i don´t know, if you couldn´t find anythng here, look in www.ofpgamepark.com
-
With animation of handling the magazine? No.
There is a possibility of using modelSpecial in a config. By this method the weapon can be displayed in two states:
modelSpecial = the loaded version (but OFP doesn't cast shadows of these rifles or RPGs)
model = without magazine
While the weapon is empty the 'model' version is displayed. Once reloaded it switches to 'modelSpecial'.
You can see this system in action with JAM RPG-2s: unloaded (model) and loaded, ready to fire (modelSpecial) or even, more impressively, with handguns such as in Laser's US Weapons pack. Here, the zasleh selection of the 'modelSpecial' is used to make the gun appear to open its chamber and the 'model' version looks empty with its slide back.
-
Ummm, I understand, but I am not good making addons. I think it would be nice if you send me a good tutorial about how to make this anim...
Do You know if anyone has done a weapon with this anim?
-
I know of no anim that holds a weapon in one hand and a magazine in the other.
Download the "Do it yourself M4 pack" from the Addons page of Inquisitor's site (http://ofp.gamepark.cz/_hosted/inquisitor/) and you can assemble an M4 in many configurations.
-
Thank you Walter!!
I'll try to download...
-
If there was a command which returnes if a unit is reloading (is there something like unit isReloading?) it would work:
BUT, you'd have to make that modelSpecial thing - so that the magazine in the gun is not shown when reloading - build a custom soldier model - with a magazine on his hand (which is hidden with hiddenselections[] in the config.cpp) - and make some kind of init script for the unit, which switches the soldier-models objecttexture from invisible to visible (this setObjectTexture ...) and back again after the reload-animation.
I hope this wasn't too confusing.
-
not necessary that He have the magazine in the hand, only that the magazine is remove of the rifle, but Would be very hard do it... well, in my case, because I don't know make addons... lol,
Do you know to make addons?
I hope you understand me, because I don't speak English fuently.
Regards,
Aldo
-
@Lenyoga
The ammo (http://www.ofpec.com/COMREF/index.php?action=details&id=20&game=All) command could be used to check when the clip is empty (to show the texture) and again once it's reloaded (to hide the texture).
-
A question:
Do I need two files P3d so I can to make that? For example:
A model with the magazine, and the other model without magazine, as Laser made with his RPG addon.
-
That is correct. Then the config might (in part) look like:
class CfgPatches
{
class Aldo_New_Weapon {
weapons[] = {"Aldo_New_M4Base","Aldo_New_M4","AldoNewM4Mag"};
requiredVersion = 1.75;
};
};
class CfgModels
{
class default {};
class Weapon: default {};
class Aldo_M4_Loaded: Weapon {};
class Aldo_M4_Empty: Weapon {};
};
class CfgWeapons
{
class Default {};
class MGun: Default {};
class Riffle: MGun {};
class Aldo_New_M4Base: Riffle {
scopeWeapon=0;
scopeMagazine=0;
model="\Aldo_Weapon\Aldo_M4_Empty.p3d";
modelSpecial="\Aldo_Weapon\Aldo_M4_Loaded.p3d";
displayName="Aldo M4";
displayNameMagazine="Aldo M4 Mag.";
shortNameMagazine="M4 Mag";
magazines[]={"Aldo_New_M4Mag"};
};
class Aldo_New_M4: Aldo_New_M4Base {
scopeWeapon=2;
scopeMagazine=0;
picture="\Aldo_Weapon\M4_pic.paa";
};
class Aldo_New_M4Mag: Aldo_New_M4Base {
scopeWeapon=0;
scopeMagazine=2;
picture="\Aldo_Weapon\M4Mag_pic.paa";
};
};
-
Well, Now my question is:
How do I do the P3d Model?, If I don't know to make addons, also the damn textures don't load.
Regards,
Aldo
-
Have you downloaded the M4 pack from http://ofp.gamepark.cz/_hosted/inquisitor/?
If you have O2light, you can just put together a M4 model and save one p3d without the magazine in you addon folder and one with magazine.
You need a texture path swap utility to change the paths of the textures from 'INQ_CONST' (i think..) to you addon folder-path. The dowload for the texture path swap utility is here: http://www.ofpec.com/ed_depot/index.php?action=details&id=166&game=ArmA
-
Yes, Ive downloaded this pack from Inquisitor page!
...about the dowload.php. I'd like to know, How to use it?
This is very tricky! I'm not very good at creating addons, better I keep doing missions...
Regards,
Aldo
EDIT:
after several hours trying to make this addon, this is all I did (see image)
these are some things that I need to learn:
-add textures
-add sounds ( loading and firing)
-add image to gear
-add telescopic sight to weapon
-How to change the model .p3d when the weapon is reload?
-A good tutrial to make weapons as RPG's
-
EDIT: I've downloaded the txtpathswap utility and had the same problem with this download.php.. working on it.
EDIT2: I've found a working link: http://ofp.gamepark.cz/index.php?sekce=utilities
The model looks good, already - here are some useful things for the config file: (Sorry, the code looks weird - I just copied it together from my addons...)
class CfgModels
{
class default{sections[] = {};sectionsInherit="";};
class Weapon: default{sections[] = {"zasleh"};};
class NameOfWeaponP3dWithMagazine: Weapon{}; //This is needed for the muzzle flash when firing
};
class CfgWeapons
{
class Default {};
class MGun: Default {};
class Riffle: MGun {};
class M16: Riffle {};
class NameOfWeapon_base: M16
{
picture="\NameOfYourAddon\NameOfGunPic.paa"; //This is needed for custom pictures
model="\NameOfYourAddon\NameOfWeaponP3dWithMagazine.p3d";
modelSpecial="\NameOfYourAddon\NameOfWeaponP3dWithoutMagazine.p3d";
displayName="M4 or something"; //Names displayed in the game UI
displayNameMagazine="M4 Magazine";
shortNameMagazine="M4 mag.";
sound[]={"\NameOfYourAddon\GunfireSound.wav",1.000000,1}; //Here are the custom sounds
reloadmagazinesound[]={"\NameOfYourAddon\reloadSound.wav",1.000000,1};
drySound[]={"weapons\M16dry",0.010000,1};
optics = true; //these are used for the custom optics
opticsZoomMin=0.40;
opticsZoomMax=0.40;
modelOptics="\NameOfYourAddon\NameOfopticstex.paa";
magazines[]={"NameOfWeapon_mag"};
modes[]={"Auto","Burst"};
class Auto
{
ammo="BulletSingle";
multiplier=1;
burst=1;
displayName="M4 auto";
dispersion=0.0002;
sound[]={"\NameOfYourAddon\GunfireSound.wav",1.000000,1};
soundContinuous=0;
reloadTime=0.10000;
};
class Burst
{
ammo="BulletBurst";
multiplier=1;
burst=3;
displayName="M4 burst";
sound[]={"\NameOfYourAddon\GunfireSound.wav",1.000000,1};
reloadTime=0.10000;
};
};
class NameOfWeapon_Mag: NameOfWeapon_Base
{
scopeMagazine=2
picture="\NameOfYourAddon\NameOfMagPic.paa";
displayNameMagazine="m4 Magazine";
shortNameMagazine="m4 mag.";
};
class NameOfWeapon: NameOfWeapon_base
{
scopeWeapon=2
valueWeapon = 2;
valueMagazine = 2;
muzzles[] = {"M4Muzzle", "M203Muzzle"}; //M203Muzzle is the grenadelauncher
class M4Muzzle: NameOfWeapon_Base
{
magazines[] = {"NameOfWeapon_Mag"};
};
class M203Muzzle : GrenadeLauncher
{
displayName=$STR_DN_M203;
sound[]={weapons\M16GrenadeLaunch, db-70,1};
magazines[] = {GrenadeLauncher, Flare, FlareGreen, FlareRed,
FlareYellow};
};
};
And the textures - the default paths in Inquisitors model is /INQ_CONST/name.jpg
You need to change it to /NameOfyourAddon/name.jpg (\, not / - sorry) if this doesn't work, you might have to convert the jpg into paa - with texview - also downloadable in the tool section.
-
I'll Try to do it, then I write again...
about custom optics, Do I need some image?
Regards,
Aldo
-
Custom optics also need a model with a texture; I'll try to find a tutorial or a example somewhere...
EDIT: You need to put 'modelOptics = "pathofmodelforoptics.p3d"' into your config.cpp and you also need a p3d with a texture. I do not really remember how the p3d looks, but I think it was a 1x1m square.
EDIT2: I finally, after going through all my old archives, found a optics.p3d - it's not 1x1, it's much smaller - and I used a 512x512 texture (so 128x128, 256x256, etc will work on it). Originally I made it for a TIE fighter, but it'll work with a weapon, too - I don't know how to upload it here, so I'll email you.
-
How I can to add this weapon to west unit?
-
Just put this into your cpp:
class CfgVehicles
{
class All {};
class AllVehicles: All {};
class Land: AllVehicles {};
class man: Land {};
class Soldier: man {};
class SoldierWB: Soldier {};
class Aldo_SoldierWB_GunName: SoldierWB
{
displayname="Soldier (GunName)";
vehicleclass="Men"; //or a custom class
Weapons[]={"NameOfGun"};
magazines[]={"throw","NameOfGun_Mag","NameOfGun_Mag","NameOfGun_Mag","NameOfGun_Mag","NameOfGun_Mag",};
};
};
-
Ive written that, but I don't find the unit... :dunno:
-
Interesting. Was there any error message? It should be under West-Men somewhere. Maybe its the "," at the ender after the last magazine - I made some typing error.
-
Ive found the unit.... :D
Well, I'll write some problems:
1. Menu --------> No entry 'config.bin/CfgWeapons/M4A1/Auto.ffCount'.
2. The weapon has not textures....
3. The weapon get without the magazine....
4. to shoot ------> No entry 'config.bin/CfgRecoils.'.
5. M4 burst has not sound !!!
6. the sight has textures :good:
7. M4 single has sound
8 to reload the weapon appears Magazine (has sound)
I'll upload the file, please review
Regards,
Aldo
-
2. No Textures
You need a texture path swap utility to change the paths of the textures from 'INQ_CONST' (i think..) to you addon folder-path. The dowload for the texture path swap utility is here:
Utility is attached to this post, temporarily. (Texture Path Swap (http://ofp.gamepark.cz/index.php?showthis=8593) at OFP.info). The addon path you are using is currently M4.
1. & 4. Auto.ffcount & CfgRecoils
You need some extra info in your config. I suggest you base it on the BIS M4 (quoted below)
3. & 8. Without magazine / reload appears magazine
Your model & modelSpecial are the wrong way round:
model = sin magazine (m4sm)
modelSpecial = con magazine (m4cm)
You should probably also include M4sm in the CfgModels section.
5. No burst sound
Because there is no such sound as "m4.disp.wav".
Are you sure those are the firing modes you want to have: single and three-round burst?
class M4:Riffle
{
scopeWeapon=2;
scopeMagazine=2;
model="XM-177E2_proxy";
modelOptics="optika_m16";
optics=1;
opticsZoomMin=0.35;
opticsZoomMax=0.35;
valueWeapon=2;
valueMagazine=2;
displayName="$STR_DN_M4";
displayNameMagazine="$STR_MN_M4";
shortNameMagazine="$STR_SN_M4";
drySound[]={"weapons\M16Dry",0.0031623,1};
magazines[]={"M4","Mortar"};
modes[]={"Single","FullAuto"};
class Single
{
ammo="BulletSingleW";
multiplier=1;
burst=1;
displayName="$STR_DN_M4";
dispersion=0.002;
sound[]={"Weapons\M16Single",1.0,1};
soundContinuous=0;
reloadTime=0.07;
ffCount=1;
recoil="riffleSingle";
autoFire=0;
aiRateOfFire=5.0;
aiRateOfFireDistance=500;
useAction=0;
useActionTitle="";
};
class FullAuto
{
ammo="BulletFullAutoW";
multiplier=1;
burst=1;
displayName="$STR_DN_M4_AUTO";
dispersion=0.004;
sound[]={"Weapons\M16Single",1.0,1};
soundContinuous=0;
reloadTime=0.1;
ffCount=30;
recoil="riffleBurst3";
autoFire=1;
aiRateOfFire=5.0;
aiRateOfFireDistance=500;
useAction=0;
useActionTitle="";
};
};
-
Okay, I went through the cpp and edited it a bit (Ironically, most of the errors were those I made above...). I also added you ALD15_ tag and changed the texture paths.
All thats missing is a burst fire sound and a muzzle flash.
I'll look for a cpp tutorial - I know I had one some time ago, but I can't find it.
And if you don't know something in english - just try in spanish, I speak a little bit.
EDIT: I found a old zip file with commented config files on my old hard drive! Very useful!
EDIT2: Walter showed me a link: http://www.ofpec.com/forum/index.php?topic=35538.msg244000#msg244000
-
Thanks you very much!!!
@Lenyoga
How did you add the textures?
@Walter_E_Kurtz
I have problems downloading TxtPathSwap.rar
I'd like to Know if Is there another program to make addons different to O2? or tell me How I can to add textures to addons...?
The M4 weapon is wonderfull! It would have been better if the magazine is removed when I reload it, because is removed when there aren't bullets... Do you understand me?
-
I just found out I cannot upload exe's... But Walters .rar should work (it gave me an error message first, but the exe worked)
You need the program to change the texture paths to you addon folder (that's what I did)
And I think it's not possible to change the gun model while reloading a partially full magazine... except you make a special soldier p3d with a special gun p3d with a special reloading animation... But this unit wouldn't be able to use other guns correctly and other units wouldn't be able to use this gun correctly - would be a purely cinematic effect.
-
I understand perfectly!
I'll try to make more weapons with these animations, but I'll try to take others weapons as template.
for example : Laser's US weapons, because if I try to make weapons from scratch, I wouldn't be able to make them, because my O2 doesn't load the textures!
Do you speak spanish? Is it okay if I write in Spanish?
Regards,
Aldo
-
Yeah, okay, pero probar a usar espanol facil, yo hablo solo un poco.
Yo penso que existan modelos ... ahem... sample models for todos tipos de armas. Voy a look them up.
EDIT: Found it: ftp://downloads.bistudio.com/Tools/BIModels.zip
-
Well, I'm having trouble understanding you, pero no ¡hay problema chico! :D
Also the link is damaged!
-
Oops, soy demasiado estupido to upload a working link; http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=61;t=67070 that's a link to the forum where I found it, the download there worked for me.
EDIT: Okay, forget the link - it's for ARMA, the BIS link is broken...
EDIT2: You can always count on the Russians! Working link: http://www.flashpoint.ru/data/files/utilities/
-
First... Why Do you say that you're a estupido! I think You're :no: estupido...
Well, I have another problem:
Ive tried to open some models p3d and I get this: Unable to load file.
load error. Why?
those files that Ive tried to open are called "LSR_uswp". These are the
Laser's US weapons.
Is there other program to edit this models?
Regards,
Aldo
-
There are two different types of .p3d: MLOD and ODOL. MLOD are uncompressed files (you can open them) and ODOL are compressed (used by BIS, also on islands - some editors compress them too)
There is a program called ODOL explorer, which can decode them.
-but the decoded files may contain errors...
Walter showed me a link: http://www.ofpec.com/forum/index.php?topic=35538.msg244014#msg244014
-
wow! worked! :good: Now the O2 can to open the models p3d...
Thanks Yuo so much!
If the textures don't load... What Do I do?...
Regards,
Aldo
-
In O2 the textures only load if you have o2_viewer installed. You also need to place your addon folder in o2_viewer\...
If the textures don't show in the game, just use the texture swap utility (and they have to be paa, pac or jpg does work too I think. They also have to be in a certain format, like 256x128 or 512x512 or 128x128)
The viewer is right here of ofpec: http://www.ofpec.com/addons_depot/index.php?action=details&id=73
-
Wow thanks you so much...Now the textures are loaded, just I had to put the addon folder in O2_view :clap:
-
Hi again,
Well, I have another question about the weapons. Ive made a weapon, isn't nice. the only thing I want to know is How Can I run the weapon smallest?
When I open the mission editor, and I choose that weapon, that weapon is bigger than unit.
Ive removed the weapon of my addons folder, because I didn't knew how to make it smallest than unit.
-
BrsSeb's Tutorials - lesson 3 k
- Select All
- Points -> Transform 3D -> Scale (enter a number smaller than 1.0 for each of x, y & z - also make sure "Apply to all LODs" is ticked)