The website and forum will be intermittently unavailable while we're making some security updates.
File uploads to the download hangar are also disabled until further notice.

XML codes for Drag chute and pilot

Discussion, tutorials,hints and tips relating to designing military ai aircraft.
Post Reply
User avatar
Fokket50
MAIW Developer
MAIW Developer
Posts: 212
Joined: 31 Aug 2006, 13:38
Version: FS9
Location: The Netherlands

XML codes for Drag chute and pilot

Post by Fokket50 »

Hi, I am working on a new AI model for FS9, and with Lod 1 almost complete I have started with the xml animations.

I have the moving pilots, canopy and ground equipment, but I can't produce a code for a drag chute that will deploy upon landing.
can someone help me with a code for this?

I also have the pilots appear with the beacon light. I would prefer to have them linked to the NAV lights, so they will be in the cockpit 15 minutes before departure, but when I change the Beacon for NAV lights in the code, it does not work, any ideas?
Here is the code for the pilot:

<part>
<name>AI_Pilot</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV,bool)
</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>

Many thanks in advance,
Menno
User avatar
MIKE JG
MAIW Developer
MAIW Developer
Posts: 10976
Joined: 12 Aug 2006, 02:25
Version: MSFS

Re: XML codes for Drag chute and pilot

Post by MIKE JG »

[GeneralEngineData]
engine_type = 0 //0=Piston, 1=Jet, 2=None, 3=Helo-Turbine, 4=Rocket, 5=Turboprop
Engine.0 = 6.4, 0.0, 0.0
fuel_flow_scalar= 0.88 //Fuel flow scalar
min_throttle_limit = 0.0 //Minimum percent throttle. Generally negative for turbine reverser
Look for this section in your model's Aircraft.cfg file. If your "engine_type = " line has your model tagged as a "0" for piston, the nav light code will not work and your only choice is to use the beacon light for the visibility trigger.

No one has ever figured out the reason behind the difference. If the engine type is a 1,3 or 5 that nav light code does work. Go figure.

Miljan is going to get you sorted out with the parachute coding.
-Mike G.

Recovering flight sim addict, constant lurker.

Check out my real life RV-8 build here: RV-8 Builder Log
User avatar
Fokket50
MAIW Developer
MAIW Developer
Posts: 212
Joined: 31 Aug 2006, 13:38
Version: FS9
Location: The Netherlands

Re: XML codes for Drag chute and pilot

Post by Fokket50 »

Thanks for this info.
The code I used for the pilot is working now.
It turned out to be a small typo I made, I never worked with XML before and noticed that you have to watch carefully what you are putting in the xml file.

Now only the Drag chute, I will wait for Miljan to help me with this. I tried some things, but it did not work.
Is there a source were you can see all the variables/parameters that you can use as XML codes?
Menno

"When everything seems to be going against you, remember that the airplane takes off against the wind, not with it." -Henry Ford
User avatar
miljan
MAIW Developer
MAIW Developer
Posts: 2144
Joined: 31 Jul 2009, 21:34
Version: P3D
Location: Between continents

Re: XML codes for Drag chute and pilot

Post by miljan »

Did you try one I sent you in PM?
Codes we are producing by ourselves and most of them are not for wide use unfortunately as there are limitations from contributors.Mor most of the codes you will use variables like altitude,speed,engine rpm,NAV lights or strobe lights.




Miljan
VIVA LA VIDA
Image
User avatar
Weescotty
MAIW Developer
MAIW Developer
Posts: 2770
Joined: 11 Aug 2006, 22:15
Version: FS9
Location: Sydney

Re: XML codes for Drag chute and pilot

Post by Weescotty »

Here is what I used for the F-117A.....


<part>
<name>YOUR PART NAME</name>
<visible_in_range>
<parameter>
<code>(A:TURB ENG1 REVERSE NOZZLE PERCENT,percent) (A:CENTER WHEEL RPM,grads) * </code>
</parameter>
<minvalue>1000</minvalue>
</visible_in_range>
</part>

Change the 1000 to suit.
Lower it is = the longer the chute stays visible.
User avatar
Fokket50
MAIW Developer
MAIW Developer
Posts: 212
Joined: 31 Aug 2006, 13:38
Version: FS9
Location: The Netherlands

Re: XML codes for Drag chute and pilot

Post by Fokket50 »

Thank you all for your help,
Miljan send me the same code, but with a lower number, and it works great.

Menno
User avatar
miljan
MAIW Developer
MAIW Developer
Posts: 2144
Joined: 31 Jul 2009, 21:34
Version: P3D
Location: Between continents

Re: XML codes for Drag chute and pilot

Post by miljan »

That number you can change as you like.Try different settings to see the difference so that you know in the future what that one is controlling :D
VIVA LA VIDA
Image
User avatar
Weescotty
MAIW Developer
MAIW Developer
Posts: 2770
Joined: 11 Aug 2006, 22:15
Version: FS9
Location: Sydney

Re: XML codes for Drag chute and pilot

Post by Weescotty »

You can go one step further, this is exactly how I did the F-117A chute .....

You obviously already have all the parts linked to a hierachical poly that you use the XML on to hide/show the chute.....

Rename this -
tick18.chute_anim
copy and paste the poly
rename the 'new' poly to the name you use in the XML to hide/show the chute
link the tick18.chute_anim poly to it
Animate the tick18.chute_anim poly to make the chute wiggle (1st and last keyframe must be the same)
recompile

What happens now it the chute appears and wiggles as it decellerates down the runway.
Post Reply