Page 1 of 1

A-10

Posted: Wed Jul 21, 2010 9:12 pm
by xDoomeDMarinEx
Hey. I've wanted to what the A-10 machine gun is called? Any help is welcome. :D

Re: A-10

Posted: Wed Jul 21, 2010 9:35 pm
by Apache Thunder
The gun template is found in the weapons.con file in the A10 folder. (not the A10_B/A10_C folders)

"A10Guns" is the name of the template.

Re: A-10

Posted: Wed Jul 21, 2010 9:43 pm
by xDoomeDMarinEx
So if i were to change the A10Gun to fire, lets say "Stingermissile" would I use it in the Objecttemplates?

Re: A-10

Posted: Wed Jul 21, 2010 9:54 pm
by Apache Thunder
Well yes. But that gun has a high fire rate. Having it shoot stingers without modifications to it's round of fire could result in lots-o-lag. :P

Re: A-10

Posted: Wed Jul 21, 2010 10:06 pm
by xDoomeDMarinEx
So how would it look like in code? I mean, I know how (for bomb rack) but not the gun? Also, where is the weapons.rfa located? I can't seem to find it.

Example: (Bomb Rack)

ObjectTemplate.Active A10_CBU87
ObjectTemplate.projectileTemplate M1A1
ObjectTemplate.projectilePosition 0/-10/0

M1A1 FTW :twisted:

Re: A-10

Posted: Thu Jul 22, 2010 12:01 pm
by Jeronimo
1. It's all in objects.rfa. Unpack the DCF one: \Bf1942\Mods\DC_Final\Archives\objects.rfa
2. Go to the A10 folder. The path is "\objects\vehicles\air\A10"
3. Weapons.con is in there - open it. You'll find the lines

Code: Select all

ObjectTemplate.create FireArms A10Guns
...
ObjectTemplate.projectileTemplate AvengerProjectile
4. So the name is A10Guns, as Apache already said. In the map you want to change it, add the following code (usually put into ObjectSpawnTemplates.con)

Code: Select all

ObjectTemplate.Active A10Guns
ObjectTemplate.projectileTemplate %otherProjectile%
ObjectTemplate.roundOfFire 20   ----->  This is the given value, you may want to lower it
5. In your unpacked objects.rfa, find the projectile you want to set for %otherProjectile%, for example in \objects\vehicles\land\M1A1\weapons.con. (In this case you'll have to go to the objects.rfa of DesertCombat, not DCF). Put this in place of %otherProjectile%. Repack your map.rfa.

Basically, just browse the objects.rfa to find out the names of weapons, projectiles, PlayerControlObjects etc. The directory structure and the file names are very intuitive, so you shouldn't have trouble finding exactly what you need concerning vehicles and their weapons. Always remember to also have a look in the other objects.rfa's that a mod is based on, like for DC Final this is DC_Final => DesertCombat => BF1942, which means there are 3 objects.rfa's your code could be in (A10 and M1A1 come with DC and are partially patched in DCF).

Re: A-10

Posted: Fri Jul 23, 2010 9:23 pm
by xDoomeDMarinEx
Alright got it working! Many thanks to the both of you! :D