CAPTAIN SIM FORUM
Weapon for FSX >> Weapon for FSX >> USE WITH THIRD-PARTY AIRCRAFT - THE ONLY THREAD
https://www.captainsim.org/forum/csf.pl?num=1297264482

Message started by Captain Sim on Feb 9th, 2011 at 3:14pm

Title: Re: USE WITH THIRD-PARTY AIRCRAFT - THE ONLY THREAD
Post by Markoz on Jul 18th, 2011 at 3:24pm
The best way I found to get rid of tem was exactly that, remove all the code altogether.

For example:

Between <WeaponInfo> and </WeaponInfo> you find the weapons. These are preceded by <Weapon> and end with </Weapon>

Here is the M61 Vulcan:
       <Weapon>
           <Gun>M61 Vulcan</Gun>
           <Shell>Vulcan Bullet</Shell>
           <Unlimited>0</Unlimited>
           <Station name="Nose" params="0,9,0,0,-0.039,0,1200" />
           <Mode name="AUTO" shotrate="100" setshots="0" sequence="1" skipFrm="0" />
           <Mode name="X10" shotrate="100" setshots="100" sequence="1" skipFrm="0" />
           <DefaultMode>AUTO</DefaultMode>
       </Weapon>


To remove it I delete all that. But there is more that can be removed IF you want to. GunInfo! That is all the information on each "gun" between <GunInfo> and </GunInfo>. Each <Gun> </Gun> section refers to the info of the "gun" itself. Once again, here is the info on the M61 Vulcan:

       <Gun>
           <Type>MachineGun</Type>
           <Name>M61 Vulcan</Name>
           <Desc>M61 Vulcan six-barreled cannon</Desc>
           <HudString>GUN</HudString>
           <Pix />
           <ConeAngle>0.0015</ConeAngle>
           <TargetRange>1500</TargetRange>
           <Delay>0.0</Delay>
           <FxFire />
           <Sound name="..\..\..\Captain_Sim\Weapon\Sound\VulcanCannon.wav" loopBeg="0.5139" loopEnd="1.3059" finishLoop="0" gain="1.0" />
           <Shell>
               <!-- shell section (bullet, shell, rocket, missile, bomb). one per weapon sub-type -->
               <Name>Vulcan Bullet</Name>
               <Desc>20mm Vulcan Bullet</Desc>
               <HudString>M61</HudString>
               <Pix />
               <Container>CS_Weapon_M61Vulcan</Container>
               <FxWake />
               <Weight>0.1024</Weight>
               <TargetWeight>5000</TargetWeight>
               <Lifetime>3.0</Lifetime>
               <CtrLifetime>2.0</CtrLifetime>
               <Efficiency>0.026</Efficiency>
               <RadiusRatio>1.0</RadiusRatio>
               <DragCoeff>0.295</DragCoeff>
               <OpArea>0.0003141</OpArea>
               <GravCoeff>1.0</GravCoeff>
               <InitSpeed>1050</InitSpeed>
               <EngThrust>0</EngThrust>
               <ThrustDuration>0</ThrustDuration>
           </Shell>
       </Gun>

The lines that look like this: <!-- shell section (bullet, shell, rocket, missile, bomb). one per weapon sub-type --> , are comments (not read by Weapon). Although I haven't tried it, I expect that if I comment out the first line of each section of a particular weapon (<!-- <Gun>M61 Vulcan</Gun> -->), that weapon will no longer be available. I'm always worried that the lines that are not commented out, will be read causing an error. I just decided to remove everything. I ALWAYS make a backup of the CSWeapon.xml BEFORE I start making changes. I can't begin to count how many times I had to revert back to the original and start over because I messed it up completely.

That is all I have done to remove unwanted weapons for a particular aircraft. Like for tha AC-130 Spectre Gunship. I only have the M61 Vulcan as well as having created a 40mm Bofor and a 105mm Howitzer for it.

Hope this helps

Mark

NOTE: For those interested in my work on the Weapon Mod for the AC-130. I have encountered problems with it that causes Weapon to become unusable. That, along with my recent health problem, led me to put it on hold for a while. Hopefully I'll get back to it soon. I'm feeling better every day.

CAPTAIN SIM FORUM » Powered by YaBB 2.6.0!
YaBB Forum Software © 2000-2026. All Rights Reserved.