Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Unknown Target on May 15, 2007, 08:50:41 am
-
Hey there - this is more a request specifically for BTRL, but it can be used for any mod that uses ballistics. Is it possible to add a flag in the tables that indicates whether or not the gun fires randomized tracer rounds, and doesn't render the bullet effect for other shots? You could have a parameter such as $Render bolt: 5, so every 5th round is shown, while the others are still fired and are just not shown.
Possible?
-
Nice feature but completely useless for us as far as I can see.
I've never seen any sign in the show that vipers don't use 100% tracer rounds. Certainly every muzzle flash and every sound of the guns firing seems to correspond to an actual tracer. The gun fire rate and the number of bullets seen in the game is pretty much what you'd see in the show too. So unless you intend to deviate from what is seen in the show or halve the damage each bullet does while doubling the number of them fired I really don't see how this is going to work for us.
-
It's a graphical feature, and can be used by other mods.
-
I agree that it's a nice feature and I think it should be implemented if it's easy but BtRL doesn't need it.
If you want to take the argument up that we do need it on the internal I'll be more than happy to listen but quite frankly I don't think we do.
-
I'm still wondering why the title of the topic is "random tracer rounds", yet your request is for tracers that are not random.
-
I'm still wondering why the title of the topic is "random tracer rounds", yet your request is for tracers that are not random.
He never said that all the tracer rounds have to be the same color or type, though. :D
-
Hmm, the standard loadout for a real gun is 1:5, IIRC. I've never even heard of firing 100% tracers until now.
EDIT:
Tracers are usually loaded between one in four rounds to one in six rounds. Platoon leaders will sometimes load their magazines entirely with tracers to mark targets for their men to fire on.
Apparently, sometimes they use 100% tracer rounds to guide other gunners to the target. But, as it states, usually it's between 1:4 and 1:6. Anyways, for BtRL, this is all moot anyways, because you should probably stick with the show's reality. Although, I'm curious - does BtRL have the same optical illusion on the recieving end referenced in the wikipedia article?
For those on the receiving end of tracer ammunition, there is a well-known optical illusion whereby the tracer rounds appear to be travelling slowly, but as they get closer they speed up considerably
(Interesting article, BTW, good reading.)
-
Amount of tracers depend on the usage and type, rate of fire, weapon targetting etc. not to mention country...
Also one common usage (in infantry) is to load otherwise tracerless magazines except for the second last round. So after you happen to fire a tracer you known you still have 1 round left (already loaded to the breech chamber) and that it is time to get a new magazine.
-
Ya, they mentioned a similar method in the wiki.. use a normal tracer loadout, except make the last bit 100% tracer, which tells you you're almost empty. Apparently, the Soviet Air Force used this during WWII, and also apparently this method is common with weapons that don't lock the bolt back. Very interesting stuff, this.. :)
-
i think theyre using 100% armor piercing incendiary, or as i call it the gastank->bomb converter. im pretty sure tillium will blow up if you light it on fire. i think the us militry uses an api and he (self-detonating u-238) mix at a ratio of 5:1 for air to air ammo.
id like a system where you have a weapon to which you can link 1 or more alias weapons to it, in somewhat of a similar manor to the spawn flag for secondaries. you would specify an alternate weapon to fire, as well as the minimum and maximum rate or occurance. if you set one to 4 and the other to 6, it would fire the alternate shot every 4-6 rounds randomly. if only one number is given or both numbers are the same, then it will fire at a fixed rate. this has the added bonus of having different stats on the odd round. such as having an em round to damage shields.
-
i think theyre using 100% armor piercing incendiary, or as i call it the gastank->bomb converter. im pretty sure tillium will blow up if you light it on fire. i think the us militry uses an api and he (self-detonating u-238) mix at a ratio of 5:1 for air to air ammo.
U-238 (depleted uranium) is NOT HE ammo. And it does not detonate. It goes ignite stuff after the dust caused by the high velocity impact reaches air but it is not HE ammo by any definition. And it is mainly not carried by aircrafts (apart certain exceptions like A-10s, Cobras or certain Harrier variants). Aircraft cannons are loaded mainly with API, HEI or SAPHEI (which is sort of a cross of the two first ones) ammo.
And you can pretty easily script that kind of firing system...
-
Gameplay in consideration, a round you can't see is not all that useful, IMO. If the desired effect on a rapid fire gun is (to put it probably too simply) 5x the projectiles but only 1/5 of the total rounds are visible, why not just have the visible projectiles do 5x the damage? Especially when considering multiplayer and lag.
Now, when considering a NOT so rapid-fire gun, maybe this idea gets more interesting. :) I like WMC's idea of random different looking color/type projectiles... and that alternate weapon idea of Nuke's is quite intriguing too.
-
IMHO a more interesting and useful thing would be a new "firing/collision resolution" model for weapons with either very high ROF or high volume of fire (Star Destroyer barrage ect.).
Namely you fire "fields" of ammunition, and instead checking for each and every single bullet (which could number in the thousands), any ship entering such a field will be hit with a certain probability every frame and take a certain probability varied ammount of damage.
Hmm....now that I think about it, we could simply use really big projectile (appropiatly textured and/or modeled - hmm -I have a insane idea about detail boxed weapon models!- it could look goo).
What's needed is a flag that would randomize the hit/damage the projectile does.
-
Gameplay in consideration, a round you can't see is not all that useful, IMO. If the desired effect on a rapid fire gun is (to put it probably too simply) 5x the projectiles but only 1/5 of the total rounds are visible, why not just have the visible projectiles do 5x the damage? Especially when considering multiplayer and lag.
Now, when considering a NOT so rapid-fire gun, maybe this idea gets more interesting. I like WMC's idea of random different looking color/type projectiles... and that alternate weapon idea of Nuke's is quite intriguing too.
It's a visual/realism thing. I'd like it personally for some of my own projects as well, but others could probably make good use of it as well.
-
If you wanted to go for realism, you'd object to tracers in vacuum in the first place, no?
-
tracers theese days come from a glowing magnesium pellet on the back of the round, which is heated by firing the round. which should still work in a vacume.
-
Gunpowder works in vacuum too, BTW.
-
tracers theese days come from a glowing magnesium pellet on the back of the round, which is heated by firing the round. which should still work in a vacume.
From what I understand they burn magnesium. That definitely wouldn't work in a vacuum.
-
A recent patent U.S. Patent Application 20,040,099,173 (http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&p=1&u=/netahtml/PTO/search-bool.html&r=1&f=G&l=50&co1=AND&d=PG01&s1=20040099173&OS=20040099173&RS=20040099173) covers the use of an LED (http://en.wikipedia.org/wiki/LED) and capacitor (http://en.wikipedia.org/wiki/Capacitor), instead of a pyrotechnic compound, in an attempt to stop the tracer being seen from the front. As an additional benefit such tracer rounds would keep a constant mass during their flight and thus keep to a more predictable trajectory. However, this benefit may be offset by the fact that such bullets would probably have a very different weight than normal bullets. Furthermore, an LED and capacitor would probably be able to emit light considerably longer than conventional tracer bullets can; 7.62 x 51 mm or 7.62 x 54 mm tracers burn out at 800 meters and 5.56 x 45 mm or 5.45 x 39 mm tracers burn out at 300 meters or less.
...now we just have to find an excuse for them being visible from the front. :lol:
-
Maybe it's not quite realistic...but it'd still look cool. Of course, that depends on how difficult it is to implement. From my observations, sometimes the most random simple things are the hardest.
-
i wouldnt say that. the purpose of a tracer is to let the gunner see where his shots are going. this is so critical to aiming that pilots were willing to give up their position with tracer fire for it. that said even if you can burn magnesium in space, im sure they would go through some work to get those shots to glow in space. even if it meant gluing a super bright led to the back.
-
Oh I agree that you can have tracer rounds in space. There are plenty of reactions that don't require oxygen.
-
... How about having rocket-propelled rounds? That'd work! :lol:
EDIT: clicky list 4 you! Unguided SNEB rockets: (used on Harrier)
http://www.richard-cooke.com/harriers/previewpages/preview1.jpg
http://www.richard-cooke.com/harriers/previewpages/preview4.jpg
http://freespace.virgin.net/john.dell/Harrier/Harrpic5.gif
http://www.thunder-and-lightnings.co.uk/buccaneer/xt270firing.jpg
-
Anyway, any hope of this being implemented?
-
Dunno, how well can you code?
-
Anyway, any hope of this being implemented?
What are the table field(s) desired? I said I would do this if it would be used, so as long as that's the case, I should have the time to take care of it.
Besides some kind of $Tracer Frequency: field (Which would be set to 1 for all weapons by default), how should tracers behave? Should they do any less damage?
-
It's worth mentioning that Lightspeed and I had a long discussion about this for the TVWP's ballistic ammo weapons, with me agitating strongly for tracers. In the end Lightspeed convinced me to use laser graphics for the visual effects, reasoning that tracers would be the only shots you'd see anyway.
So, basically, the same as Backslash's 5x damage, 1/5x time idea.
-
how should tracers behave? Should they do any less damage?
Tracers can also serve to direct fire at a given target, because it is visible to other combatants. The disadvantage is that they betray the shooter's position: the tracer path leads back to its source. To make it more difficult for an enemy to do this, most modern tracers have a 'delay element' that results in the trace becoming visible some distance from the muzzle. Its lethality is similar to conventional ammunition. However, the mass loss and the burning aspects can make the consequences of the impact slightly different.
Dunno about space combat sims, but in Real LifeTM, there's your answer.
-
I hadn't heard about the magnesium pellet, that's pretty cool. I'll ask my brother what he's using.
It's old stuff now, but 30 years ago our rounds were tipped with a purplish or orangish paint, and the round glowed orange red which was pretty damn cool. I don't know what the ratio was for machine gunners, but for the M-16 on night fire exercises we loaded 1:4 or 1:5 IIRC. It for sure was not a random load because the army counts every damn thing. How else is anything left for the black market?
Although we wanted to (it's hard to see at night d'uh) we didn't load every round a tracer because as jr2 noted your position could be located. The main reason though was because tracers cost a lot more than regular rounds! :lol:
I haven't seen the show, but if every round glows, verisimilitude must prevail.
-
It should be extremely simple just to script (Lua) such behaviour for certain (or all) weapons.
-
It should be extremely simple just to script (Lua) such behaviour for certain (or all) weapons.
Erm, so... go ahead? I mean, if you know how, I imagine you could script it, and then post what you scripted here, and all of you coder geeks can fiddle with it until it's all nice and ready for us to use. :D
-
Anyway, any hope of this being implemented?
What are the table field(s) desired? I said I would do this if it would be used, so as long as that's the case, I should have the time to take care of it.
Besides some kind of $Tracer Frequency: field (Which would be set to 1 for all weapons by default), how should tracers behave? Should they do any less damage?
i would have done it in the same way as the spawn flag. as in "tracer weaponname, min frequency, max frequency" that way you could have multiple instances. but as i understand it flags are in short supply, so you could have.
$tracer: weapon ;;a weapon from the table to use as a tracer
+MinFrequency: 4 ;;minimum frequency of tracer
+MaxFrequency: 8 ;;maximum frequency of tracer
if you set both frequencys to the same number then it gives you a set rate of occurance. but as with this example it will fire a shot at random rate of between every 4 to 8 shots. id definately use it for my infinite supply of gatling guns, which are common to use mixed ammo.
-
Hmm... assuming new 'parent' option is already included... then something like shown below or then just altering only the 'tracer' shot. (add necessary randomizers if needed).. Though the version shown below is probably full of bugs...
But if there is going to be hardcoded version for it then i would probably use that.
numberWeapons = #mn.Weapons
missiontime = mn.getMissionTime()
if missiontime < 0.5 then
tracerweaponarray = {}
end
for i=1,numberWeapons do
objectWeapon = mn.Weapons[i]
if missiontime > 0.5 and objectWeapon.Class.Name == "tracer thinye" and objectWeapon.LifeLeft > 0 then
if tracerweaponarray[objectShooter] == nil then
tracerweaponarray[objectShooter] = 0
end
objectShooter = objectWeapon.Parent
objectWeapon.LifeLeft = 0
tracerweaponarray[objectShooter] = 1 + tracerweaponarray[objectShooter]
if tracerweaponarray[objectShooter] == 5 then
tracerweaponarray[objectShooter] = 0
mn.createWeapon(tb.WeaponClasses["Tracer"],objectWeapon.Orientation,objectWeapon.Position,objectShooter,-1)
--add other ammotypes here if needed
else
mn.createWeapon(tb.WeaponClasses["Non-Tracer"],objectWeapon.Orientation,objectWeapon.Position,objectShooter,-1)
end
end
end
Completely untested etc. etc. ad infinitum (may eat your computer and so on...)
-
Well, it'd be more appropriate to do it with something like:
#Conditional Hooks
$Version: 3.7
$On Game Init: [
--Setup variable g_Shooters[][], which is a multidimensional array of shooters and objects
addWeaponObject = function(object)
--Indexes array of shooters, then indexes array of objects for that shooter;
--Adds weapon to array if not found
end
getWeaponObjectIndex = function(object)
--Indexes the above array, and gets what the object's index is,
--ie how many weapons the ship has fired
end
cleanupWeaponObjects = function()
--Run once per frame to get rid of dead weapons in the array
end
]
$On HUD Draw: [
for i=1,#mn.Weapons do
addWeaponObject(mn.Weapons[i])
end
--Ideally, you would use a flag or something to mark each weapon,
--that still exists this frame, in the above pass.
cleanupWeaponObjects()
]
$Version: 3.7
$Weapon Class: My Tracer Weapon
$On Object Render: [
--Empty function
]
+Override: [
if getWeaponObjectIndex(hv.Object.Parent, hv.Object) % 5 == 0 then
return false --Render weapon
else
return true --Don't render weapon
end
]
This would allow you to deal with tracer weapons more or less transparently, so each weapon wouldn't need any extra table entries. I'm not sure if it'd actually be faster or slower than Wanderer's method.
Ideally, you'd want a $On Weapon Create or $On Object Create or $On Weapon Fire hook of some kind for this sort of thing, to get rid of the tedious and wasteful iteration of mission objects.
Switching rendering on and off is how I was planning on doing it, but now I see that there's actually a request to switch weapon types, so hmm.