OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Plane on 14 Aug 2005, 17:49:12

Title: RangeProbab
Post by: Plane on 14 Aug 2005, 17:49:12
I've searched the posts but none can solve my question
 :(
In the config file "CfgAmmo" section, when you define a bullet, missile, bomb, etc. We always see the following parameters:
Code: [Select]
minRange
minRangeProbab
midRange   
midRangeProbab
maxRange
maxRangeProbab
And we often copy from others but anyone know what exactly is "RangeProbab" and how it affect the trajectory of the ammo? ???
Need your help! ;D
Title: Re:RangeProbab
Post by: Planck on 14 Aug 2005, 23:27:20
I do believe those values relate to AI.

Max, Mid and Min range they will fire at a target.

The Probability values are probably......heheheh.....how likely they are to shoot at those ranges.

Maybe.   ;D ;D


Planck
Title: Re:RangeProbab
Post by: remcen on 15 Aug 2005, 00:44:53
this is probably.... errrr no - definitely right ;D
and i'm speaking from my experience with an experimental crossbow addon.
Title: Re:RangeProbab
Post by: Plane on 15 Aug 2005, 11:49:04
Oh,thanks guys! ;D

But how to define the trajectory of a bullet?
Title: Re:RangeProbab
Post by: remcen on 15 Aug 2005, 15:10:53
from the commented configs:
Code: [Select]
maxSpeed= 0;
initTime=0;
thrustTime=1.5;  //alter the thrust, thrusttime and maxspeed for changing the arc
thrust=210;

      /*
      default thurst calculation was: maxSpeed*0.7;
      due to bug it was increased to maxSpeed*0.7*thurstTime
      normal missile speed is about 200 m/s
      */

maxspeed measuring unit is meters/second, time values must be in seconds, about thrust i'm not sure. should be in newton actually, but i really don't know exactly-
Title: Re:RangeProbab
Post by: Plane on 16 Aug 2005, 03:59:50
Oh,so the "initspeed" in cfgweapon section is the initial speed?
And if I define a bomb the thrust will be zero? And the bomb should be defined to "shotmissile" or "shotrocket"?
Title: Re:RangeProbab
Post by: remcen on 16 Aug 2005, 15:03:00
ah i see, it's about a bomb, i was thinking of bullets which all inherit the trajectory values trom the default class quoted above.

ok,... all vehicle-mounted explosive stuff have the 'shotmissile'-simulation. i just browsed the RES-config and i would say, use the config of the laserguided bomb for a start.
just change laserlock and manualcontrol from '1' to '0', also set maxcontrolrange to 0, maybe make it a little less powerfull, and see how it works. oh yeah... also change the model of course ;)

here's the config, my suggestion as remarks:
Code: [Select]
class LaserGuidedBomb:Default  //-> change classname
      {
      hit=5000; //-> to 3000 maybe
      indirectHit=3500; //-> ~2000
      indirectHitRange=15;
      minRange=50;
      minRangeProbab=0.5;
      midRange=300;
      midRangeProbab=0.95;
      maxRange=2500;
      maxRangeProbab=0.5;
      soundHit[]={"\LaserGuided\expl2",100.0000076,1};
      cost=20000;  //-> to 5000; this is how likely AI will fire the weapon, the cheaper the more AI will 'waste' of these
      model="Snake";  //change to your model
      proxyShape="Snake"; //same here
      irLock=0;
      laserLock=1;  //-> to =0
      maxControlRange=100000; //-> to 0, cos i suppose you want a free falling bomb which cannot be controlled
      maneuvrability=16.0;  //-> 0
      sideAirFriction=0.1;
      simulation="shotMissile";
      maxSpeed=100;
      initTime=0;
      thrustTime=0;
      thrust=0;
      };
Title: Re:RangeProbab
Post by: Plane on 17 Aug 2005, 06:21:27
Thanks,guys! :cheers:I see
Title: Re:RangeProbab
Post by: Plane on 31 Aug 2005, 09:07:53
Well, I tested the config and found something that may not correct in your config.
I wanted to make a freefall bomb,the config below looks working realistic:
Code: [Select]
class Bomb500kg:Default
      {
      hit=1700; //250kg->1000   500kg->1700 etc. just increase the hit value as the exact bomb weight change.
      indirectHit=1200;
      indirectHitRange=15;
      minRange=50;
      minRangeProbab=0.5;
      midRange=300;
      midRangeProbab=0.95;
      maxRange=2500;
      maxRangeProbab=0.5;
      soundHit[]={"\LaserGuided\expl2",100.0000076,1};
      cost=150;  //if more expensive than 300,AI seems to like using rockets or cannons but not fire this bomb
      model="Snake";  //if the bomb has a tail spin open effect,change to your spin opened model
      proxyShape="Snake"; //change to your model payloaded on plane
      irLock=0;
      laserLock=1;  //-> to =0
      maxControlRange=100000; //this mustn't be zero,or the proxy model will not appear on your plane
      maneuvrability=0;//for a freefall bomb,it can not control,so define it to "0"
      sideAirFriction=0.1;
      simulation="shotRocket";//not very sure about this,for freefall I set it to "shotRocket"
      maxSpeed=100;
      initTime=0;
      thrustTime=0;
      thrust=0;
      };

For a guided bomb,I haven't test anything about it. May change the following values:
Code: [Select]
irLock=1;//it might be radar lock
laserLock=1; //Laser lock. If it is guided by laser,set it true
maneuvrability=10;//The higher,the large fire angle and better lock it will be
simulation="shotMissile";

This is all I know,my question is:
1.Can I set the "thrust" to a minus value,so it will be a high drag freefall bomb
2.Is the "maxControlRange" bomb to target range that bomb can adjust its direction
Title: Re:RangeProbab
Post by: remcen on 31 Aug 2005, 17:31:18
1. no idea actually. go ahead and try it ;)  i imagine that it's possible.
2. as far as i know that is the maximal distance from the shooter in meters within the 'smart' missile maneuvres towards its target. after that distance it will simply fly straight on.
Title: Re:RangeProbab
Post by: Plane on 02 Sep 2005, 11:52:16
 :thumbsup:Great, the minus thrust works! And after firing, the bomb go backward much faster!
 :noo:But the only problem is that the tailsmoke still exists, how to reduce it?
I had a topic about the smokeamount,http://www.ofpec.com/yabbse/index.php?board=13;action=display;threadid=24990 (http://www.ofpec.com/yabbse/index.php?board=13;action=display;threadid=24990)but nobody found a direct way to set it.