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 support needed

Discussion, tutorials,hints and tips relating to designing military ai aircraft.
andras1021
Second Lieutenant
Second Lieutenant
Posts: 16
Joined: 18 Aug 2016, 06:15
Version: FS9

xml support needed

Post by andras1021 »

Hi there,

several years ago, I made some ai models including xml animations. Then my system crashed and from there everything went south. Some months ago, I needed to reactivate the computer and it worked. Then by chance I found my old FSDS and several GA models I had not finished.

Now, I thought about finishing them. However, I do not remember how to do the xml coding any more. Can somebody help?

I have the codes I need. I just do not remember how to get the code into the models. This means which file do I have to export, where do I write the code. How is this then recompiled into the model?

Ok now the very sad truth. This is for FS2004, not FSX because my system was never able to run FSX smoothly.

Many thanks

Andras
DC1973
Second Lieutenant
Second Lieutenant
Posts: 65
Joined: 17 Feb 2016, 11:11
Version: P3D
Contact:

Re: xml support needed

Post by DC1973 »

Hi Andras,

I don't know for sure, but I think that FS2004 had a model.def file just like FSX, and the XML codes were added in there. You would name the parts appropriately in FSDS, and make sure that the FSDS partdataref file was also updated so that you could select them as animation names within the program. From there, you'd just compile as a model and the airplane should have the animations all coded in. I suspect some of the FS9 modellers here would be able to offer a more comprehensive answer though.
DC Designs
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: xml support needed

Post by Firebird »

For FS9, the definition file is called MakeMDL.parts.xml and one is installed when you install the Makemdl SDK.

What you do is just add your own definitions to that file. Some create copies of the original file for every different model and some just use the one file to build up a collection of animation definitions. Completely ip to you.

My advice would be to keep a clean copy and build up the one file to ensure that you don't lose anything.

It gets added into the mdl when you compile using the makemdl executable.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
andras1021
Second Lieutenant
Second Lieutenant
Posts: 16
Joined: 18 Aug 2016, 06:15
Version: FS9

Re: xml support needed

Post by andras1021 »

Thanks, just to follow up here:

has anybody ever tried to code an engine start up of a twin plane with one engine starting before the other. I need to say that it bothers me that they props always start spining at the same time.

Andras
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: xml support needed

Post by John Young »

A tip that you might find useful Andras: avoid adding your custom definitions to your MakeMDL.parts.xml file in one go. If you find something doesn't work, you won't know which block is causing it. Add them in a block at a time as you need it and always at the top. If the compile fails because of the code, it will always be the block at the top, if you know everything below it is fine.

I've not tried to set up a staggered prop start, but it might be possible, although complicated. I have a block of code called "anim_spin". It sets a disk spinning at whatever RPM you want, although there is a limit before the sim frame rate causes the spin to appear to reverse - a bit like waggon wheels in a western movie appearing to spin in reverse. I use the technique for helicopter rotors now rather than prop_0, still, slow and blurred etc.

The additional step needed would be to time the start of each spin separately. I have a block of animation timer code that might work if you create two blocks with different start values (timed from Nav light on). That code would need to be expressed as a visibility block and either added to the anim_spin code or set up separately with the anim_spin part linked to it.

The final component would be some timer/visibility code to hide the still props at the start of each spin. The same viz timer code could be used for that I would think, but reversed for "off".

However, what bothers me more is that the props on AI aircraft spin up instantly. I don't think there's any thing we can do about that because it's controlled by the AI engine. Because we have to live with that, I've never been fussed with trying to set up staggered engine starts.

If you want to try, I can PM you the code I have.

John
andras1021
Second Lieutenant
Second Lieutenant
Posts: 16
Joined: 18 Aug 2016, 06:15
Version: FS9

Re: xml support needed

Post by andras1021 »

John, I have never tried an animation which is time dependent. I agree with your conclusion that a timed animation dependent on the use of the beacon or nav lights could do the trick and would also apply to any prop start. If you don t use the standard prop animation you could as well use the animation for any prop start. To avoid the issue with the reversing animation you exchange your own animation with the standard prop animation at any event such as strobe lights on, no?

Just another question. I believe to remember ai planes which had a flexible nose gear suspension. That´s another animation I have never tried. Does anyone have the code and is ready to share?

Thanks

Andras
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: xml support needed

Post by John Young »

Sorry Andras, you've lost me on the first bit. You won't want to time from the beacon light, just the Nav, which comes on about 15 minutes before departure. To avoid the appearance of a reverse animation, just keep the revs below that threshold.

On the second bit - do you mean gear compression? If so you don't need xml code for that, it's set up in the contact points in the aircraft.cfg file. I can PM you a tutorial if you want to try.

John
andras1021
Second Lieutenant
Second Lieutenant
Posts: 16
Joined: 18 Aug 2016, 06:15
Version: FS9

Re: xml support needed

Post by andras1021 »

Are you saying that gear compression is a stock animation that works for ai as well? oh my.. I had no idea.

Regarding the lights, I really have to go back to the flightsim and check. Maybe it´s too long ago. I thought the nav lights come on just before the engine starts turning, or is this only in VFR?
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: xml support needed

Post by John Young »

Gear compression (UI and AI) works by creating the main leg and the leg below it (Oleo) of a slightly smaller diameter that telescopes into the main leg. You set up the animation for the compression of the lower leg at KF:130 with full extention at KF:100. You then calculate values 8, 9 and 10 in the [Contact Points] section of the aircraft.cfg file from this movement. You can do it for the nose gear and the main gear. All the legs use stock part names in FS9: c_gear, l_gear, r_gear, or animation tags of the same name in FSX and P3D.

You can also add nose wheel steering with custom xml animation.

Nav lights come on about 15 minutes before engine start. Beacon lights come on at engine start. That's why the timer code works with the Nav light because the Beacon is too late.

The thing that fooled me with FSX for many years is that the Nav lights only illuminate at engine start, but they do actually function in the AI engine about 15 minutes before hand. So timer code can be used in FSX after all. However, unlike FS9, you have to start the sim 15 minutes before departure. If you start it within 15 minutes the timer is not triggered and the animation only happens at engine start, which is generally too late.
andras1021
Second Lieutenant
Second Lieutenant
Posts: 16
Joined: 18 Aug 2016, 06:15
Version: FS9

Re: xml support needed

Post by andras1021 »

ok, thanks. This is great information and I had no idea about this. Now, I just encountered one more problem that is much more basic. I split the fuselage of a model in half to get a better grip on the modeling. Now, I do not remember any more the key combination for merging two or more selected points in point mode and i do not find it in the fsds help. Help would be greatly appreciated.

Thanks

Andras
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: xml support needed

Post by John Young »

In Gmax you select each pair of points in turn and click "collapse". Is FSDS similar?

John
andras1021
Second Lieutenant
Second Lieutenant
Posts: 16
Joined: 18 Aug 2016, 06:15
Version: FS9

Re: xml support needed

Post by andras1021 »

I believe it was ctrl + something, only I do not remember the key anymore.
User avatar
Weescotty
MAIW Developer
MAIW Developer
Posts: 2770
Joined: 11 Aug 2006, 22:15
Version: FS9
Location: Sydney

Re: xml support needed

Post by Weescotty »

Be careful splitting parts in FSDS, if you rename one part some of the points 'move' slightly and when you rejoin they wont all snap to scale.

One thing that was discoverd on another forum is thats FSDS doesn't export at 0.001 (usual snap to scale setting), but at .0009765

You can set this permanently in FSFS as follows...

Go to your install directory...
Find - default.cfg
Edit with notepad
Change the Scale value to
Scale:.0009765

NOTE - No leading 0
andras1021
Second Lieutenant
Second Lieutenant
Posts: 16
Joined: 18 Aug 2016, 06:15
Version: FS9

Re: xml support needed

Post by andras1021 »

aaah, ok this rings a bell. Thanks
andras1021
Second Lieutenant
Second Lieutenant
Posts: 16
Joined: 18 Aug 2016, 06:15
Version: FS9

Re: xml support needed

Post by andras1021 »

Good morning again,

While I am working myself through my old prototypes I noticed a nice little Buecker Jungmann in my hangar. It´s a biplane from the 1930s that was widely used by Germany but also by the Swiss, the Spanish etc. Replicas are still being built. I know it´s not exactly an F35 but these planes were flying with several air forces around the world into the 1970s. So it could do nicely with the MAIW Ginas, Mirage III and Vs etc.

I believe there were two reasons why I stopped working on it. One was becasue I was not able to make an elevator animation that would keep the elevators up while taxiing. I think, I might be able to do this now. The other reason was, because I was not able to have it taxi in slaloms. Now this one, I could still not do.

Has anybody ever tried to have such a slalom animation for a taildragger? I would imagine that one could attach it to the speed and have it slalom lets say between 5 and 15 knots and go straight above and below the repsective speeds. Could this work?

Thanks

Andras
User avatar
Weescotty
MAIW Developer
MAIW Developer
Posts: 2770
Joined: 11 Aug 2006, 22:15
Version: FS9
Location: Sydney

Re: xml support needed

Post by Weescotty »

While possible in XML the animation itself would most likely not be possibe -

) Each slalom would have to also move the aircraft forward, not just turn. If it didn't the aircraft would turn then 'skid' at the normal taxi angle.
2) The wheels would turn at the same speed, so they would look weird also.

The only way a can think of doing it would be on the taxi way itself at the airport.
Make an overlay just for tail draggers with a zig zag taxi pattern and assign tail draggers to it in the flightplans.
andras1021
Second Lieutenant
Second Lieutenant
Posts: 16
Joined: 18 Aug 2016, 06:15
Version: FS9

Re: xml support needed

Post by andras1021 »

Thx,

so, I stay with the elevators up when taxiing.



Andras
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: xml support needed

Post by Firebird »

As long as the elevators correct themselves on takeoff and in flight it is not a problem.
If you think about it, with a tail-wheeled aircraft one of the biggest things you have to worry about on the ground is the tail lifting off. So if the elevators are are up it just means that the pilot is forcing the tail down.

If the elevator is neutral or up that would be fine in real life. I am sure you can find shorts of taxying aircraft of this type that do this, especially if there is a bit of a wind.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
andras1021
Second Lieutenant
Second Lieutenant
Posts: 16
Joined: 18 Aug 2016, 06:15
Version: FS9

Re: xml support needed

Post by andras1021 »

Just coming back to what Weescotty wrote before. Could not I use a tick18 animation to have the plane slalom? Then is there a way to connect such a tick 18 animation with another value like speed. Hence, do the tick18 between 5 and 15 knots or something like it?

Re Firebird: I was flying Bueckers for 10 years. We used elevator up the moment we got into the plane kept it there until lined up for take off. On landing elevator went up again the moment the tail touched ground and stayed there until opening the belts.


Andras
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: xml support needed

Post by John Young »

To have the elevators up for taxi, create a small cube between the elevators, hidden in the fuselage. Animate this KF:0 to KF:100 with the deflection you want.

Link the elevators to the cube.

Use the same xml code for the cube that you use for a canopy opening/closing, except, make the trigger a strobe off. Once the aircraft reaches the hold line, the elevators should revert to horizontal and stay that way until the strobe goes off when leaving the runway after landing.

I'm assuming strobe works with a piston engine, but I'm not sure. If not use a speed bracket + aircraft on ground.

John
Post Reply