Home   Help Search Login Register  

Author Topic: disable muzzle smoke - how?  (Read 2530 times)

0 Members and 1 Guest are viewing this topic.

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
disable muzzle smoke - how?
« on: 11 Sep 2005, 21:44:17 »
yep, the topic says it all: how can i disable the muzzle smoke of a hand weapon (meaning not a vehicle-mounted weapon)?
the reason: i have a crossbow addon but it looks totally weird that it emits powder smoke when fired.
any experience with class cfgmgcloudlets for hand weapons anyone?
we're looking for members: IM:UC MOD

At.St_Walker

  • Guest
Re:disable muzzle smoke - how?
« Reply #1 on: 12 Sep 2005, 14:33:25 »
// Cfg Patches
{ [...] };

// Cfg Models
{ [...] };

// Cfg Ammo & Weapons
{ [...] };

// "Cfg" Clouds
class WeaponCloudsNameofNewclass // unique name for new class that you will use in the Cfg Vehicles section
{
access=3;
cloudletDuration=90.300000;
cloudletAnimPeriod=1.000000;
cloudletSize=5.000000;
cloudletAlpha=0.000000;
cloudletGrowUp=30.01;
cloudletFadeIn=0.510000;
cloudletFadeOut=90;
cloudletAccY=0.050000;
cloudletMinYSpeed=0.100000;
cloudletMaxYSpeed=0.100000;
cloudletShape="cl_basic";
cloudletColor[]={1,1,1,0};
interval=0.050000;
size=0;
sourceSize=0.500000;
timeToLive=0;
initT=0;
deltaT=60;
class Table
{
class T0
{
maxT=0;
color[]={1.0,1.0,1.0,0};
};
class T1
{
maxT=1800;
color[]={0.6,0.6,0.6,0};
};
class T2
{
maxT=3500;
color[]={0.55,0.54,0.52,0};
};
};
};

// Cfg Vehicles
class CfgVehicles
{
class All{};
class Man: Land {};
class Land: AllVehicles {};
class Man: Land {};
class Soldier: Man {};
class SoldierWB: Soldier {};
class ClasseNEWsoldier : SoldierWB
{
displayName="MY SOLDIER";
model="\Folder\*.p3d";
weapons[]={"M16"};
magazines[]={"M16","M16","M16","M16"};

class GunFire: WeaponCloudsNameofNewclass {};
class GunClouds: WeaponCloudsNameofNewclass {};
class MGunFire: WeaponCloudsNameofNewclass {};
class MGunClouds: WeaponCloudsNameofNewclass {};
};
};

At  :)
« Last Edit: 12 Sep 2005, 21:07:49 by AtStWalker »

Kyle Sarnik

  • Guest
Re:disable muzzle smoke - how?
« Reply #2 on: 12 Sep 2005, 21:15:09 »
This problem has come up before, unfortunately, there is no way completely get rid of the smoke. These Cfg Clouds can only be assigned to a vehicle, or, in this case, the soldier himself, and not to a weapon. Also, you might want to remember that in OFP, weapons do not function as objects, they do have unique properties, but they are limited. They can't exist without a holder, they really aren't objects, but rather an extension of a vehicle or soldier. This is a part of the game engine that really makes a lot of things not possible in OFP. Anyways, back on topic, so the result of using the Cfg Clouds will be that only the new unit that you make will be able to use the weapon without smoke coming out, and it also means that if that unit uses any other weapon, there will be no smoke. Like I said, they way OFP treats weapons is very limiting...  :-\

CameronMcDonald

  • Guest
Re:disable muzzle smoke - how?
« Reply #3 on: 13 Sep 2005, 00:13:22 »
Seeing as this thread is something I was looking for...
can anyone throw me a bone on how to disable tracers (not the rifle tracers in the difficulty screen, just an addon)? The damn things just won't go away no matter how much tweaking I give the config.

Also, I'm having trouble making a unit use a weapon in burst mode. Does this have to do with a) range, b) recoil, c) dispersion or d) some combination of these? Many thanks, C"G"McD.
« Last Edit: 13 Sep 2005, 00:14:29 by CameronMcDonald »

Kyle Sarnik

  • Guest
Re:disable muzzle smoke - how?
« Reply #4 on: 13 Sep 2005, 03:43:28 »
Hehe, try this in the CfgAmmo section:

Code: [Select]
tracerColor[]={0,0,0,0.000000};
tracerColorR[]={0,0,0,0.000000};

minRange=1;minRangeProbab=0.90;
midRange=100;midRangeProbab=0.50;
maxRange=450;maxRangeProbab=0.05;

Now for the min, mid, and max range numbers, this means that an AI unit will most likely fire this bullet at a min range of 1, mid of 100, and max of 450, the probab represents a percentage of the AI's accuracy at that range, and if the AI has a different weapon or burst mode that has better odds at the distance of the target he is engaging, he will use it. For example, lets make some ammo types:

Code: [Select]
class CfgAmmo
{
   class Default {};
   class BulletSingle: Default {};
                class NewBulletSingle: BulletSingle {};
                {
                                minRange=1;minRangeProbab=0.50;
                                midRange=100;midRangeProbab=0.90;
                                maxRange=450;maxRangeProbab=0.20;
                };
                class NewBulletAuto: BulletSingle
                {
                                minRange=1;minRangeProbab=0.90;
                                midRange=100;midRangeProbab=0.60;
                                maxRange=450;maxRangeProbab=0.05;
                };

Ok, now, based on this, if an AI unit engages a target at, oh say, 100m, he will automatically (with his super fast AI brain) check all of his weapons' bullets. He looks at NewBulletSingle and sees that at a range of 100, he has a 90% chance of hitting the guy, and with NewBulletAuto, hes got only a 60% chance. Now this means he will use the single fire mode because it uses that bullet (the one with the 90% chance). If he moved closer to about 20m, then the NewBulletAuto would have a higher probab at 20m than the NewBulletSingle would, so the AI would switch to full auto because that mode fires the NewBulletAuto bullet. Ok, you get it now?
« Last Edit: 13 Sep 2005, 03:51:15 by Kyle Sarnik »

At.St_Walker

  • Guest
Re:disable muzzle smoke - how?
« Reply #5 on: 13 Sep 2005, 03:43:46 »
can anyone throw me a bone on how to disable tracers (not the rifle tracers in the difficulty screen, just an addon)?


Just adding these rows on your cfg ammo


tracerColor[]={0.0,0.0,0.0,0.0};
tracerColorR[]={0.0,0.0,0.0,0.0};


an example:

Quote
class MP40_FsJAmmo :BulletSingle
{
hit=7.6;
indirectHit=4;
indirectHitRange=0.100000;

tracerColor[]={0.0,0.0,0.0,0.0};
tracerColorR[]={0.0,0.0,0.0,0.0};

soundFly[]={"objects\bulletnoise",0.251189,0.700000};
minRange=10;
minRangeProbab=0.100000;
midRange=200;
midRangeProbab=0.380000;
maxRange=500;
maxRangeProbab=0.040000;
initSpeed=380;
};

At :)

Edit: Damn a silver medal, u has defeated me this time Kyle ^^
Quote
Re:disable muzzle smoke - how?
« Reply #4 on: Today at 03:43:28am »
Re:disable muzzle smoke - how?
« Reply #5 on: Today at 03:43:46am »
« Last Edit: 13 Sep 2005, 03:46:24 by AtStWalker »

Kyle Sarnik

  • Guest
Re:disable muzzle smoke - how?
« Reply #6 on: 13 Sep 2005, 03:52:45 »
Hehe, now now, its not a competition, we must teach the young ones by example ::) .

CameronMcDonald

  • Guest
Re:disable muzzle smoke - how?
« Reply #7 on: 13 Sep 2005, 08:33:12 »
Me young, never! I've been with this place since le beginning, and then some! Well, behind the scenes. I released a mission once, it got an 8, but then I got Resistance and I'm stuck making awesome campaigns with too many modified addons for anyone to download (I once made a zip of it, weighed in at 2 gigs). Thanks for the advice, will try it.

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:disable muzzle smoke - how?
« Reply #8 on: 13 Sep 2005, 12:18:48 »
cheers mates for your input. i think i'll make that one said unit without muzzle smoke at all.

as for AI using different bullets: AFAIK it has also to do with the cost=xyz; value in the cfgammo part. must be the likelyhood of AI wasting these bullets.
if you look at the RES config file you see the difference: bulletsingle: cost=0.7; bulletburst: cost=2.0999; and finally for bulletauto: cost=2.5; that is the only value in which bulletauto differs from bulletburst.  how often do you see an AI unit with an AK using fullauo mode??? you see!
so if you make an ammo type extremely expensive you can be sure that AI almost never uses it; give it costs of 0 and AI will waste it like a stoned machine gunner in nam - well... almost ;)
we're looking for members: IM:UC MOD

Kyle Sarnik

  • Guest
Re:disable muzzle smoke - how?
« Reply #9 on: 13 Sep 2005, 21:35:42 »
cheers mates for your input. i think i'll make that one said unit without muzzle smoke at all.

as for AI using different bullets: AFAIK it has also to do with the cost=xyz; value in the cfgammo part. must be the likelyhood of AI wasting these bullets.
if you look at the RES config file you see the difference: bulletsingle: cost=0.7; bulletburst: cost=2.0999; and finally for bulletauto: cost=2.5; that is the only value in which bulletauto differs from bulletburst.  how often do you see an AI unit with an AK using fullauo mode??? you see!
so if you make an ammo type extremely expensive you can be sure that AI almost never uses it; give it costs of 0 and AI will waste it like a stoned machine gunner in nam - well... almost ;)

I hope you realize you aren't proving any points there, see when you said that AI never fire their AK's in auto you solved that little riddle. AI won't fire with the AK's in full auto because the burst mode is dominant over the full auto mode because it comes first in the config. Therefore, the unit also reads (with his super-fast AI brain) that mode first, and compares it to the full auto one, and since they are the same, they go with burst. You see, the BIS guys are pretty sly, they have very interesting ways of doing things, and with this, they prevent the AI from ever using full auto, but still giving the player the option to use it. Cost really doesn't matter for anything, and if it does, then its something thats too small to notice, but it has nothing to do with selecting different fire modes. Now, just be sure that next time you try to make an argument, don't contradict yourself  ;)

And cameron, age has nothing to do with it, by younger I mean less involved in editing  ;)

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:disable muzzle smoke - how?
« Reply #10 on: 14 Sep 2005, 01:59:50 »
ok, your point is that AI does use the burst mode because it comes first in the config. why? prove me that it doesn't calculate the costs compared to auto mode. for a test one could make costs for auto mode lower than for burst mode. if you're right that wouldn't influence AI's choice, right? (if you've already tested that, then i apologize for my ignorance :-[ ;D )

btw. just found this in the commented config, comment on costs for auto mode:
Quote
// for AI full auto is the same as burst, only more expensive
that (only) indicates that i might be right maybe. i just checked the official forum and ppl they don't seem to be sure about costs either. costs for vehicles are to mark the big fishes for AI  to shot at first, but i haven't found anything clear about costs of ammo.

btw as i said i was not really sure about costs. that's why i wrote "AFAIK", not for sure or something... i just wanted to point to McDonald that maybe something's wrong with his burst mode costs - if they (also) have to do with AI wasting the more  bullets the cheaper they are. maybe his burst mode costs are just too high for AI.  
we're looking for members: IM:UC MOD

Kyle Sarnik

  • Guest
Re:disable muzzle smoke - how?
« Reply #11 on: 14 Sep 2005, 04:51:28 »
ok, your point is that AI does use the burst mode because it comes first in the config. why? prove me that it doesn't calculate the costs compared to auto mode. for a test one could make costs for auto mode lower than for burst mode. if you're right that wouldn't influence AI's choice, right? (if you've already tested that, then i apologize for my ignorance :-[ ;D )

btw. just found this in the commented config, comment on costs for auto mode: that (only) indicates that i might be right maybe. i just checked the official forum and ppl they don't seem to be sure about costs either. costs for vehicles are to mark the big fishes for AI  to shot at first, but i haven't found anything clear about costs of ammo.

btw as i said i was not really sure about costs. that's why i wrote "AFAIK", not for sure or something... i just wanted to point to McDonald that maybe something's wrong with his burst mode costs - if they (also) have to do with AI wasting the more  bullets the cheaper they are. maybe his burst mode costs are just too high for AI.  

I know cost has nothing to do with it because I have coded many, many weapons before. And, what I believe, is that BIS added cost, but never got around to actually using it for anything, like alot of other stuff BIS left unfinished thats in the game.

CameronMcDonald

  • Guest
Re:disable muzzle smoke - how?
« Reply #12 on: 14 Sep 2005, 11:47:31 »
I stand corrected, thankyou Kyle! And remcen! Units are firing nicely in burst mode now, under 100m as SOP!
« Last Edit: 14 Sep 2005, 11:48:57 by CameronMcDonald »