| CAPTAIN SIM FORUM | |
|
Weapon for FSX >> Weapon for FSX >> Multiple copies of the same weapon
https://www.captainsim.org/forum/csf.pl?num=1297193363 Message started by Ian P on Feb 8th, 2011 at 7:29pm |
|
|
Title: Multiple copies of the same weapon Post by Ian P on Feb 8th, 2011 at 7:29pm
Hi all.
As at least one person at CS is already aware, I've been asked to write a review of Weapon, so, typically, I start by trying to do something it doesn't seem to want to. ;) The problem is that I am trying to attach multiple versions of the same type of weapon to a single aircraft and, when it gets above two weapons, they all stop working. To be more precise, the weapon is the M60C (closest to a Browning .303 currently in the pack) and the aircraft is a Supermarine Spitfire with four guns per wing, hence total 8. I managed to change the gun positions so that they fired into the middle of the Spitfire model's already included gunsight easily enough and if I add two guns to one wing, or one gun each to both wings, they work fine with a fire pattern of 1+2. However if I add any more than that at all, say two to each wing, none of that particular group can be fired unless I drop the pattern back down to two weapons, be that 1+2, 1+4, 2+3 or any other combination of maximum two guns. Is this an intentional limit of the product at the moment, or am I messing up somewhere? I can post the xml file if necessary (it's a lot shorter than usual, as I took out everything other than the M60Cs to make life easier...) Thanks. Ian P. |
|
Title: Re: Number of weapons Post by YoYo on Feb 8th, 2011 at 7:54pm
Im not sure about this, but for me good idea to give possibility to put more than 2 cannons/guns. For WWII fighters it was obligatory. As I know SDK is possible, but maybe at "work" it looks different?
|
|
Title: Re: Number of weapons Post by Markoz on Feb 9th, 2011 at 1:41am
Hi YoYo
The line to add more M60C guns the line that deals with that is in BOLD: <Weapon> <!-- weapon sub-type section. unlimited number of --> <Gun>M60C</Gun> <!-- weapon sub-type name. must match GunInfo>Gun>Name --> <Shell>M60C Bullet</Shell> <!-- shell name. must match GunInfo>Shell>Name --> <Unlimited>0</Unlimited> <!-- unlimited ammo fire. 1-yes, 0-no --> <Station name="Nose" params="0,9,0,0,-0.039,0,200" /> <!-- Station position (x,y,z) meters, angle of incidence, ammo units quantity --> <Mode name="AUTO" shotrate="10" setshots="0" sequence="1" /> <!-- fire mode section. unlimited number of. name= dispayed on HUD in weapon info string. --> <Mode name="X3" shotrate="10" setshots="3" sequence="1" /> <Mode name="SINGL" shotrate="10" setshots="1" sequence="1" /> <DefaultMode>AUTO</DefaultMode> <!-- default fire mode. Any from the list above --> </Weapon> Just add a new line for each gun. Like this: <Weapon> <!-- weapon sub-type section. unlimited number of --> <Gun>M60C</Gun> <!-- weapon sub-type name. must match GunInfo>Gun>Name --> <Shell>M60C Bullet</Shell> <!-- shell name. must match GunInfo>Shell>Name --> <Unlimited>0</Unlimited> <!-- unlimited ammo fire. 1-yes, 0-no --> <Station name="Nose" params="0,9,0,0,-0.039,0,200" /> <Station name="Nose" params="0,9,0,0,-0.039,0,200" /> <!-- Station position (x,y,z) meters, angle of incidence, ammo units quantity --> <Mode name="AUTO" shotrate="10" setshots="0" sequence="1" /> <!-- fire mode section. unlimited number of. name= dispayed on HUD in weapon info string. --> <Mode name="X3" shotrate="10" setshots="3" sequence="1" /> <Mode name="SINGL" shotrate="10" setshots="1" sequence="1" /> <DefaultMode>AUTO</DefaultMode> <!-- default fire mode. Any from the list above --> </Weapon> Hope this helps. Mark |
|
Title: Re: Number of weapons Post by Ian P on Feb 9th, 2011 at 1:19pm
This is what I currently have:
<WeaponInfo> <!-- aircraft dependent weapon settings --> <Weapon> <Gun>M60C</Gun> <Shell>M60C Bullet</Shell> <Unlimited>0</Unlimited> <Station name="Left wing 1" params="-2.5,0,-0.5,0,0,0,300" /> <Station name="Left wing 2" params="-3.5,0,-0.5,0,0,0,300" /> <Station name="Right wing 1" params="2.5,0,-0.5,0,0,0,300" /> <Station name="Right wing 2" params="3.5,0,-0.5,0,0,0,300" /> <Mode name="AUTO" shotrate="5" setshots="0" sequence="1+2+3+4" /> <DefaultMode>AUTO</DefaultMode> </Weapon> </WeaponInfo> I've been playing with the positioning of the guns, so the offsets aren't right at the moment. I do have the correct figures, but left them out to test why it didn't work when I put them all in. The problem is the sequence section I have highlighted red. What I have shown there doesn't work - the guns will not fire. If I change it to 1+2, 2+3, 3+4, 1+4... any combination at all of two guns, it will work. Anything more than two guns and the entire weapon group will not fire. Hopefully that explains the problem a little better? Ian P. |
|
Title: Re: Number of weapons Post by Markoz on Feb 9th, 2011 at 2:57pm Ian P wrote on Feb 9th, 2011 at 1:19pm:
Hi Ian. Try this: <WeaponInfo> <!-- aircraft dependent weapon settings --> <Weapon> <Gun>M60C</Gun> <Shell>M60C Bullet</Shell> <Unlimited>0</Unlimited> <Station name="Left wing 1" params="-2.5,0,-0.5,0,0,0,300" /> <Station name="Left wing 2" params="-3.5,0,-0.5,0,0,0,300" /> <Station name="Right wing 1" params="2.5,0,-0.5,0,0,0,300" /> <Station name="Right wing 2" params="3.5,0,-0.5,0,0,0,300" /> <Mode name="AUTO" shotrate="5" setshots="0" sequence="1,2,3,4" /> <DefaultMode>AUTO</DefaultMode> </Weapon> </WeaponInfo> I think this might fix your sequence for firing. Mark |
|
Title: Re: Number of weapons Post by Captain Sim on Feb 9th, 2011 at 3:47pm Ian P wrote on Feb 8th, 2011 at 7:29pm:
The Weapon><Gun> name must be unique regardless if you install several copies of the same weapon: i.e. M60C, M60C2, M60C3 ..... M60C100 And must match GunInfo>Gun>Name |
|
Title: Re: Multiple copies of the same weapon Post by Ian P on Feb 9th, 2011 at 5:17pm
Hi folks,
Alex: That side of it is fine... A single or dual gun works fine, whether it is a cannon or a machine gun. it's just that only two can ever fire at once. Mark: I tried that and only one gun fired, presumably because that's code to fire weapon one individually, then two individually, then three.... It's what is listed for individual rockets or missiles in the standard XML file, which backs up what I found. The only default weapon which fires multiple mounts simultaneously was the gSH cannon, which used the "1+2" code - hence that being the one I'm using. I'll go back and try 1,2,3,4 again later, copying the code from one of the other weapons options, but I'm 99.9% sure I got the code right last time and it only ever fired the #1 machine gun. Cheers, Ian P. |
|
Title: Re: Multiple copies of the same weapon Post by Markoz on Feb 9th, 2011 at 11:21pm
Hi Ian.
I know where you are coming from. I'm still trying to get two M61 Vulcan's to fire at once out the side of the AC-130 'Spectre'. I haven't succeeded yet so I will be watching this Topic closely so I can find what need to be done to get it working. After that, I need to create the other two weapons it has. Keep at it. We WILL get there. ;) Mark |
|
Title: Re: Multiple copies of the same weapon Post by Captain Sim on Feb 14th, 2011 at 3:03pm
This xml provides 4 synchronous M60.
As you can see there are no problems in the weapon, it's all about correct modifications. |
|
Title: Re: Multiple copies of the same weapon Post by Markoz on Feb 15th, 2011 at 2:00pm
Thank you Alex.
After downloading that and view the changes between a single weapon and 4x, I was able to sort out the issue with the two M61 Vulcan miniguns. I have them working well. :) Now all I need to do is the other two weapons: AC-130H Spectre (Prior to circa 2000) 2× 20 mm M61 Vulcan cannon - done 1× 40 mm (1.58 in) L/60 Bofors cannon 1× 105 mm (4.13 in) M102 howitzer While I work on doing them properly, I might cheat and just use missiles until I get them done. For those of you interested. I have the Vulcan miniguns at the same angle as those on the CS AC130. I can leave them that way, or I can have them shooting straight. What would you prefer? I also created a Camera View at the window next to the Vulcans. files and instructions will come with it. I'm planing just one camera view between the Bofor and Howitzer. They sure will be an interesting to create the shells and sounds. Mark |
|
CAPTAIN SIM FORUM » Powered by YaBB 2.6.0! YaBB Forum Software © 2000-2026. All Rights Reserved. |