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 isidro.daniel on Jul 16th, 2011 at 5:33pm
Hi,

I've been looking on this thread regarding installing Weapon on third party aircraft, just like almost you all, because when I purchased this add on found that it was not of universal use for all aircraft when started to read more carefully the specifications of the product after becoming frustrated because even after installing the weapon in other planes nothing happen!!! :o
So, the money being spent, there was only to choices. Or forget about the money spend and wait for some brilliant mind to create some solution for all aircraft, or pick up the sleeves and create my own solution.
Fortunately I had SDK installed and by analyzing the manual and XML code from the delivered working F-18 in 1 hour of testing and patience I was able to put my another company F16 firing some rounds!!  :D Ok not bad!! i was expecting a little bit more difficulty... But I Was not happy with some aspects of the outcome!
For example, the machine gun on F16 is located on port side of the not in the center like in the F18, so again with a little of patience I was able to put the origin of the bullets coming out from the correct place.
All this was done just by watching and comparing the codes from F16 and F18 (with weapon working).
Because I'm not a wizard in gaming programming (just barely passed the programming disciplines in my university after cracking my head study for them), just a Flight Simmer enthusiast, I need some assistance in the fallowing.
I noticed that in the provide code from Capitan Sim there are a lot of weapons, but only one is available while in game! Ok So if I want to change the type of weapon do I just erase the non desired type from the code? Or do I need to some thing else? I was looking but until now did not find any comment regarding this!

Because in type of info exchange the more knowledge is share the better, I post here the code of the modifications in the F16 changed to fire the machine gun from the correct place. If any one sees something wrong or out of place don't hesitate to reply! I also suggest that should be interesting to have a step by step (like tutorial) with the  general steps to add weapon to an airplane.

So here is my code change in panel file.

[Window Titles]
window00=main
Window01=Engine_state
Window02=Weapon Control Panel
Window03=HUD
Window04=HUD Glass
Window05=GPS


[Window00]
file=Panel_2D.bmp
size_mm=800, 600
position=5
BACKGROUND_COLOR=0,0,0
visible=1
ident=MAIN_PANEL

[Window01]
size_mm=900, 250
windowsize_ratio=0.600
position=4
BACKGROUND_COLOR=0,0,0
visible=0
ident=Engine_state

gauge00=Viper!Statem, 0, 0, 900, 250
gauge01=Viper!State1, 0, 0, 1, 1
gauge02=Viper!State2, 0, 0, 1, 1

[Window02]
Background_color=0,0,0
no_luminous=1
size_mm=1024, 170
position=7
visible=0
window_size=1.000, 0.170
ident=10901
zorder=2
gauge01=CSWeapon_panel!CSWeapon_panel, 0, 0, 1024, 170

[Window03]
Background_color=0,0,0
no_luminous=1
size_mm=400, 400
position=4
child_3d=0
visible=0
window_size=0.380, 0.600
ident=10902
zorder=1
gauge00=CSWeapon!hud2d, 0, 0, 400, 400

[Window04]
file=HUD_Glass.bmp
size_mm=1024, 768
no_luminous=1
position=7
visible=0
window_size=1.0, 1.0
ident=10903
zorder=0
alpha_blend=0.35

//--------------------------------------------------------
[Window05]
Background_color=0,0,0
size_mm=456,378
position=8
visible=0
ident=GPS_PANEL
window_size= 0.500
no_luminous=1

gauge00=fs9gps!gps_500,  0,0

[VIEWS]
VIEW_FORWARD_ZOOM=1.0
VIEW_FORWARD_DIR=0.0, 0.0, 0.0


And this is the change in the code for the Weapon (M60) to fire from the correct place

- <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.72,-0.5,0.35,0,0,0,200" />
- <!--  Station position (x,y,z) meters, angle of incidence y=-0.039, 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>


Maybe my question is stupid after already achieved this so far but any way if I can spend more time playing than programming it would be VERY VERY GOOD!! :D

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