Visit Captain Sim web site  
  Welcome, Guest. Please Login or Register

 

Page Index Toggle Pages: 1 Send TopicPrint
Multiple copies of the same weapon (Read 6385 times)
Ian P
Full Member
*
Offline



Posts: 7
Joined: Feb 19th, 2008
Multiple copies of the same weapon
Feb 8th, 2011 at 7:29pm
Print Post  
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. Wink

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.
  
Back to top
 
IP Logged
 
YoYo
Full Member
*
Offline



Posts: 26
Location: EPWA
Joined: Feb 6th, 2011
Gender: Male
Re: Number of weapons
Reply #1 - Feb 8th, 2011 at 7:54pm
Print Post  
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?
  

webmaster of YoYosims
Back to top
WWW  
IP Logged
 
Markoz
CS Team
*
Offline



Posts: 12454
Location: Victoria, Australia
Joined: Apr 24th, 2009
Gender: Male
Re: Number of weapons
Reply #2 - Feb 9th, 2011 at 1:41am
Print Post  
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
  

Mark Fletcher



PC: i7 10700K @3.8/5.1GHz | 64GB DDR4 3200 | 12GB RTX 4070 Super | 32" LCD Monitor | 1TB SSD + 2TB SSD + 2TB HDD | Win 11 Pro
Back to top
 
IP Logged
 
Ian P
Full Member
*
Offline



Posts: 7
Joined: Feb 19th, 2008
Re: Number of weapons
Reply #3 - Feb 9th, 2011 at 1:19pm
Print Post  
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.
  
Back to top
 
IP Logged
 
Markoz
CS Team
*
Offline



Posts: 12454
Location: Victoria, Australia
Joined: Apr 24th, 2009
Gender: Male
Re: Number of weapons
Reply #4 - Feb 9th, 2011 at 2:57pm
Print Post  
Ian P wrote 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.

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
  

Mark Fletcher



PC: i7 10700K @3.8/5.1GHz | 64GB DDR4 3200 | 12GB RTX 4070 Super | 32" LCD Monitor | 1TB SSD + 2TB SSD + 2TB HDD | Win 11 Pro
Back to top
 
IP Logged
 
Captain Sim
CS Team
*
Offline



Posts: 4357
Joined: Nov 7th, 2005
Re: Number of weapons
Reply #5 - Feb 9th, 2011 at 3:47pm
Print Post  
Ian P wrote on Feb 8th, 2011 at 7:29pm:
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.


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
  
Back to top
IP Logged
 
Ian P
Full Member
*
Offline



Posts: 7
Joined: Feb 19th, 2008
Re: Multiple copies of the same weapon
Reply #6 - Feb 9th, 2011 at 5:17pm
Print Post  
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.
  
Back to top
 
IP Logged
 
Markoz
CS Team
*
Offline



Posts: 12454
Location: Victoria, Australia
Joined: Apr 24th, 2009
Gender: Male
Re: Multiple copies of the same weapon
Reply #7 - Feb 9th, 2011 at 11:21pm
Print Post  
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. Wink

Mark
  

Mark Fletcher



PC: i7 10700K @3.8/5.1GHz | 64GB DDR4 3200 | 12GB RTX 4070 Super | 32" LCD Monitor | 1TB SSD + 2TB SSD + 2TB HDD | Win 11 Pro
Back to top
 
IP Logged
 
Captain Sim
CS Team
*
Offline



Posts: 4357
Joined: Nov 7th, 2005
Re: Multiple copies of the same weapon
Reply #8 - Feb 14th, 2011 at 3:03pm
Print Post  
This xml provides 4 synchronous M60.
As you can see there are no problems in the weapon, it's all about correct modifications.
  
Back to top
IP Logged
 
Markoz
CS Team
*
Offline



Posts: 12454
Location: Victoria, Australia
Joined: Apr 24th, 2009
Gender: Male
Re: Multiple copies of the same weapon
Reply #9 - Feb 15th, 2011 at 2:00pm
Print Post  
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. Smiley

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
  

Mark Fletcher



PC: i7 10700K @3.8/5.1GHz | 64GB DDR4 3200 | 12GB RTX 4070 Super | 32" LCD Monitor | 1TB SSD + 2TB SSD + 2TB HDD | Win 11 Pro
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
 
  « Board Index ‹ Board  ^Top