Mr. Bildo
2nd Oct 06, 9:04 AM
One of things I wanted to change was the weapons range, accuracy and velocity to a more "historical" figure, because the retail just didn't feel right to me.
Here are some things I discovered that may or may not already be common knowledge:
You can make any weapon have the ability to "fire at ground" simply by setting the value in \attrib\weapon\...\behaviour[attack_ground] to "True". However, in order for the icon to show up in-game all weapons in a squad must have the ability. For example, if you set the value to "True" for the M1 Garand, but not the M1 Carbine, the icon will not show up for the default allied rifleman squad.
[fx_tracer_speed] appears to be measured in feet per second (fps). I determined this by setting the value to "1". Using a single soldier I fired at the ground and using a timer measured how long it took before the bullet hit the ground. Using an eyeball estimate using the size of the soldier's foot as a reference it looked to me that it took 10 seconds to reach about 10 feet. Note: this does not have any affect on actual bullet speed. Just how it "looks".
For "single_fire" weapons, the easiest way to control the rate of fire is to adjust the values in \attrib\weapon\...\single_fire\cooldown[duration] and ...\single_fire\aim\fire_aim_time. For \cooldown[duration], the values are measued in seconds. Setting the value to 1 for example will cause a soldier to look around, adjust their helmet, etc. for one second between each shot. However, this is modified by the values in \cooldown[duration_multiplier]. For the values in \weapon\aim it works the same way. \aim[fire_aim_time_multiplier] * \aim\[fire_aim_time]. Thus, the rate of fire appears to be (cooldown[duration_multiplier] * cooldown[duration]) + (aim[fire_aim_time_multiplier] * aim[fire_aim_time]).
I'm not sure how weapon\aim[post_firing_aim_time] relates to the above. Changing the values had no noticeable effect.
I firmly believe there is a bug relating to \attrib\weapon\...\reload[frequency]. I believe in some (maybe all) cases, the actual number of bullets fired is 1 more than the value in [frequency]. When I was testing the M1 Carbine, which has a 10 round clip, in every test the soldier would fire off 11 rounds and then reload. It appeared to be the same thing with the M1 Garand, one more bullet.
Any weapon can have a projectile assigned to it. I was able to assign a flak shell to a M1 Carbine. Projectiles do not specify damage, that is always handled by the weapon. On the surface, the projectile seems purely visual. The difference however, is that a projectile can have it's velocity, acceleration, etc. edited. It should be possible to have a bullet type projectile that simulates an actual bullet as opposed to how the bullets are working currently. Furthermore, projectiles can create deformation. I don't know if it's possible currently, but theoretically you could have a machine gun that when fired continually against a deformable surface would create little holes. I don't even think you need to have the projectile be visible (but I don't know that for sure).
I will add more to this thread as I continue. My apologies if any of the above is redundant, I'm not trying to steal anyone's thunder. :)
Edit (10-2-06 12:30): added stuff about "aim".
Edit (10-2-06 2:00): removed incorrect info about
tracers (thanks Provac for the feedback)
Edit (10-2-06 5:30) added stuff about projectiles
--Mr. Bildo
Here are some things I discovered that may or may not already be common knowledge:
You can make any weapon have the ability to "fire at ground" simply by setting the value in \attrib\weapon\...\behaviour[attack_ground] to "True". However, in order for the icon to show up in-game all weapons in a squad must have the ability. For example, if you set the value to "True" for the M1 Garand, but not the M1 Carbine, the icon will not show up for the default allied rifleman squad.
[fx_tracer_speed] appears to be measured in feet per second (fps). I determined this by setting the value to "1". Using a single soldier I fired at the ground and using a timer measured how long it took before the bullet hit the ground. Using an eyeball estimate using the size of the soldier's foot as a reference it looked to me that it took 10 seconds to reach about 10 feet. Note: this does not have any affect on actual bullet speed. Just how it "looks".
For "single_fire" weapons, the easiest way to control the rate of fire is to adjust the values in \attrib\weapon\...\single_fire\cooldown[duration] and ...\single_fire\aim\fire_aim_time. For \cooldown[duration], the values are measued in seconds. Setting the value to 1 for example will cause a soldier to look around, adjust their helmet, etc. for one second between each shot. However, this is modified by the values in \cooldown[duration_multiplier]. For the values in \weapon\aim it works the same way. \aim[fire_aim_time_multiplier] * \aim\[fire_aim_time]. Thus, the rate of fire appears to be (cooldown[duration_multiplier] * cooldown[duration]) + (aim[fire_aim_time_multiplier] * aim[fire_aim_time]).
I'm not sure how weapon\aim[post_firing_aim_time] relates to the above. Changing the values had no noticeable effect.
I firmly believe there is a bug relating to \attrib\weapon\...\reload[frequency]. I believe in some (maybe all) cases, the actual number of bullets fired is 1 more than the value in [frequency]. When I was testing the M1 Carbine, which has a 10 round clip, in every test the soldier would fire off 11 rounds and then reload. It appeared to be the same thing with the M1 Garand, one more bullet.
Any weapon can have a projectile assigned to it. I was able to assign a flak shell to a M1 Carbine. Projectiles do not specify damage, that is always handled by the weapon. On the surface, the projectile seems purely visual. The difference however, is that a projectile can have it's velocity, acceleration, etc. edited. It should be possible to have a bullet type projectile that simulates an actual bullet as opposed to how the bullets are working currently. Furthermore, projectiles can create deformation. I don't know if it's possible currently, but theoretically you could have a machine gun that when fired continually against a deformable surface would create little holes. I don't even think you need to have the projectile be visible (but I don't know that for sure).
I will add more to this thread as I continue. My apologies if any of the above is redundant, I'm not trying to steal anyone's thunder. :)
Edit (10-2-06 12:30): added stuff about "aim".
Edit (10-2-06 2:00): removed incorrect info about
tracers (thanks Provac for the feedback)
Edit (10-2-06 5:30) added stuff about projectiles
--Mr. Bildo