Home   Help Search Login Register  

Author Topic: Bullet Damage  (Read 2512 times)

0 Members and 1 Guest are viewing this topic.

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Bullet Damage
« on: 27 Aug 2008, 21:39:15 »
Hi OFPEC!

I thought i'll work on something simple. Modeling is something I'm seriously bad at so what i've decided to do is make an airsoft weapon, using the BI weapon models. I've removed the casing ejection from the side of the gun and the muzzle flash in the P3D and now have a config working (just need to fix the recoils but still works).

Now the problem is with an airsoft gun is that it kills. Yeh, hardly something you can play airsoft with. So, where in the config would I change the value for the damage? Ammo, Magazine or Weapon cfg?

Also, under the fire mode class it has this:
Code: [Select]
minRange=2;minRangeProbab=0.10;
midRange=150;midRangeProbab=0.7;
maxRange=400;maxRangeProbab=0.05;

What do they mean, and what are the values measured in?

Also, there's a few extra value's that appear new to me (a few is a bit of an understatement, there is actually quite a lot I've not seen before), and not sure what they mean. In some of the sample configs that were provided with the BIS Sample Models there is some comments, but only about obvious value's, or ones I already know. Is there any resources out there with what some of these values mean and do?

Thanks for your help guys, much appreciated :)
« Last Edit: 27 Aug 2008, 23:43:26 by JasonO »

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: Bullet Damage
« Reply #1 on: 28 Aug 2008, 00:47:05 »
The first number is in meters and I believe that the second number is either how often the ai will use that firemode at that range, or how accurate they are at that range while interpolating values inbetween.

of non-lethality, look in the hit and indirecthit values under the ammo, however headshots might kill, so you could try Wolfrung's body armour.

Hope that helps!

Luke
Pesky Human!!
Wort Wort Wort.

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Bullet Damage
« Reply #2 on: 28 Aug 2008, 06:19:29 »
Hi,

Great reply Luke.

I've not had time to test the values of the range varaibles, however I have put the hit and indirect hits to 0 and can put 100 bullets into the guys head without him dying or even taking any damage (checked with getdammage). Seems like it done the trick!

Now just to make the bullets align up with the ironsights again.  :scratch:

Since I don't want any recoil I thought I would just make all the recoil values in the cfgRecoils to 0. However, since doing that the ironsights are way below the actual place of where the round hits. There's something in the cfgRecoils example file, i'm not sure if its explaining what the values mean as it's not very clear.

Code: [Select]
// Impuls = 3 entries groupend: time, back offset (meter), rotation speed upwards (radiant)
// a nihilator impuls [Time,0,0] is needed to finish the recoil
// {Impuls1,..,Nihilator}
pistolBase[] = {0,0,0, 0.08,0.003,0.02, 0.05,-0.003,-0.033, 0.05,0,0};

In my config I have

Code: [Select]
class cfgRecoils
{
// Impuls = 3 entries groupend: time, back offset (meter), rotation speed upwards (radiant)
// a nihilator impuls [Time,0,0] is needed to finish the recoil
// {Impuls1,..,Nihilator}
GOL_Airsoft_Recoil[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
};

Is there any more information than what's in the config as comments?

Thanks,
Jason
« Last Edit: 28 Aug 2008, 06:37:23 by JasonO »

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: Bullet Damage
« Reply #3 on: 29 Aug 2008, 00:56:21 »
I am guessing that it is the [time of the recoil, amount of recoil on x, amount of recoil on z], but am not sure.  :dunno:

Luke
Pesky Human!!
Wort Wort Wort.

Offline Pathy

  • Former Staff
  • ****
  • I'm not a F***in llama!
    • Volcbat.
Re: Bullet Damage
« Reply #4 on: 29 Aug 2008, 02:02:24 »
Right, i'll warn this is a best guess but i'd bet its a close guess. The way it seems to work, is, 12 values.

Code: [Select]
={a,b,c,d,e,f,g,h,i,j,k,l}
This seems to be broken down into 4 sections. (I'd colour code it but I cant make the forums work!  :-[)

1: a,b,c - this section represents starting position.
2: d,e,f - this represents initial effect (ie, the actual kick).
3: g,h,i  - this represents 'correction' or reversal of the effect.
4: j,k,l  - this represents the end of the recoil animation - as it says, an 'anihilator impulse' of [time,0,0] is needed to end it, i guess this just tells the engine what is going on and bring the recoil full circle.

Within each of these, the first letter represents time, the second represents recoil along the horizontal, and the third represents recoil along the vertical.


To put this into an actual example, i'll take the pistol recoil you posted.

Code: [Select]
{0,0,0, 0.08,0.003,0.02, 0.05,-0.003,-0.033, 0.05,0,0}
1: (the start) {0,0,0,

Time: 0
X: 0,
Y: 0

- starts in a neutral/stationary position.


2: 0.08,0.003,0.02

Time: 0.08
X: 0.003
Y: 0.02

-Over 0.08 seconds, moves 0.003 backwards and 0.02 upwards


3: 0.05,-0.003,-0.033,

Time: 0.05
X: -0.003
Y: -0.033

-Over 0.05 seconds, moves 0.003 in the opposite direction and 0.033 downwards


4: (the finishing code) 0.05,0,0}

Time: 0.05
X: 0
Y: 0

-Over 0.05 seconds, returns to neutral/stationary




I can't see anything wrong with lots of 0's, apart from that maybe you ought to put some time values back in, but I still can't explain why the ironsights no longer work. However, did you fiddle with any other values? Ie, the initspeed of the rounds it fires?

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Bullet Damage
« Reply #5 on: 29 Aug 2008, 04:13:13 »
I can't see anything wrong with lots of 0's, apart from that maybe you ought to put some time values back in, but I still can't explain why the ironsights no longer work. However, did you fiddle with any other values? Ie, the initspeed of the rounds it fires?

Yeh I did actually. I know the value of the M4 was quite high, and since this is an airsoft round I thought the initspeed would be lower. That is assuming it is the speed it leaves the weapon.

I can't remember the M4 Value (not on my PC at the mo, so i'll try everything else suggested tommorow) but I know it was something like 15% of what it orginally was. I'll try changing just that value and then re-pbo'ing and see if the round moves at all.

Really appreciating the help guys, learing a lot already :good:

Offline Pathy

  • Former Staff
  • ****
  • I'm not a F***in llama!
    • Volcbat.
Re: Bullet Damage
« Reply #6 on: 29 Aug 2008, 11:09:29 »
Ahh right, well if you've decreased the velocity of the round, it'll drop alot quicker, hence the sights won't be zero'd for it. Either restore the init speed of the round, or edit the optics model and move the ironsights. Initspeed doesn't affect the damage a round does, afaik (thats defined by Hit and IndirectHit), just the distance the round can travel.
« Last Edit: 29 Aug 2008, 21:56:34 by Pathy »

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Bullet Damage
« Reply #7 on: 30 Aug 2008, 02:56:51 »
Hi,

Been away unexpectidly so not sure when I can next try these. Soon though, don't worry.

What I'm not sure about is that the bullet arcs high (the tracer can be seen going above the ironsights position) and the debris and dirt it kicks up when hitting the ground can be seen above the ironsights. I would think decreased speed would mean the bullet drop would be sooner and therefore the bullet would land lower than usuall? It appears that something is making it arc up then it drops further than usuall.