Jump to content


- - - - -

Compatibility of API macros


  • Please log in to reply
11 replies to this topic

#1 gsnde

gsnde

    Student Pilot

  • Members
  • PipPip
  • 42 posts
  • Location:South-West Germany

Posted 15 March 2006 - 10:06 AM

Dear all,

Please help me with something confusing me. This is about the old / new technics of objects / object placement for sceneries. The airport I am working on is made with a bunch of programs (AFCAD, Sbuilder, Rwy12, EZ-Scenery).

A very big part consists of API macros placed with FSSC.

Most of the macros are done by Andrej Urosevic and are really beautifull. I have never seen comparable things in neither Rwy12 or any other library. You might just want to search for his name in avsim in case you don't know him, I think you will appreciate his style. (Sarge, If you are ready to release your object libraries he finally has some competition :D )

So now my fear is that I will loose the ability to use those macros in the next version of FS. But even if this is not true, I would still like to reduce the number of programs I need to maintain my airport and prepare those macros for the future.

Is that possible ? In an older post Sarge said:

Quote

1. Create the macro (object) and export as both an API and SCA file.

2. Edit the API file (Notepad) to add a GUID to the macro's identity.

3. Create an XML LibObj file (or add to an existing LibObj file) listing the API containing the GUID and the SCA that contains the "build" data for the GUID. Compile to BGL using SCASM.

4. Create an XML call-out that gets the object from the LibObj file and actually draws the object. In the call-out XML, specify lat/lon/alt/heading of the object. If placing more than one copy of the object, continue calling out the object and changing lat/lon/alt/heading until all desired copies have been identified. Compile to BGL using SCASM.

5. Move the call-out XML into the airport's Scenery folder; place any necessary textures for the object in the airport's Texture folder.


Is that the way to go? Combine all macros you use in an object library? Would this make them compatible with future versions of FS or is it the object definition itself which is the culprit? And if so, is there a way to convert those macros to make them current?

For many of the macros both *.API and *.SCM files are delivered, some come with *.API only. If this is the route I should take, can someone please spend some more explaining words on how it must be done or point me to a tutorial covering this topic?  

Thank you very much.
Cheers,
Martin

#2 IBtheSarge

IBtheSarge

    First Class Member

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 10,718 posts
  • Location:Central Florida

Posted 15 March 2006 - 05:14 PM

API's (and their step-children, SCA's and SCM's) are SCASM-based files.  There are early indications (nothing written in stone yet) that FS X will not support SCASM.  Everything will have to adhere to the _SDK conventions (makeMDL, bglcomp, etc.) which are XML based.

AFCAD is XML-based as it uses the bglcomp convention for compiling the raw AFCAD data you create into a usable BGL.  Vladimir Slovoda's CreatSign is XML based (for placing runway/taxiway signs).  EZ-Scenery and Rwy 12 Object Placer are XML based as is Luis Sa's SBuilder.

As for the way to go, if you are going to continue with API's, then LibraryObject files is the way to go (if you have access to both the .api and .sca versions of the object; if you make your own objects in FSDS2, you have access since FSDS2 can export in both versions).  With LibOjb files of your objects, you can write SCASM based XML call-outs that will reduce the number of polygons FS9 loads for multiple instances of objects, giving you a more framerate friendly scenery.

If you haven't started down this path yet, I'd strongly advise going ahead to the scenery MDL version of objects (like EZ-Scenery and Rwy 12 uses) and build your LibObj files with those.  There's no SCASM compiling involved, as the LibObj file is compiled with bglcomp as are the XML call-out files.  The MDL versions of objects are compiled with the makeMDL convention.  Flight Sim will always be compatible with its own _SDK's, so switching to makeMDL and bglcomp styles of doing things will assure that your designs are FS compatible.  Both GMAX and the new FSDS3 use the _SDK conventions.

#3 gsnde

gsnde

    Student Pilot

  • Members
  • PipPip
  • 42 posts
  • Location:South-West Germany

Posted 16 March 2006 - 03:43 AM

Sarge,

please let me come back for some more clarification.

Quote

if you have access to both the .api and .sca versions of the object; if you make your own objects in FSDS2, you have access since FSDS2 can export in both versions

Yes, most of the APIs I use have been provided with the sca files. But I don't have FSDS2. So I would need a friendly hand converting the macros for me. I don't know what I am asking here for; is it just "load the code and export" or is there more work involved ?

Quote

If you haven't started down this path yet, I'd strongly advise going ahead to the scenery MDL version of objects (like EZ-Scenery and Rwy 12 uses) and build your LibObj files with those. There's no SCASM compiling involved, as the LibObj file is compiled with bglcomp as are the XML call-out files. The MDL versions of objects are compiled with the makeMDL convention. Flight Sim will always be compatible with its own _SDK's, so switching to makeMDL and bglcomp styles of doing things will assure that your designs are FS compatible. Both GMAX and the new FSDS3 use the _SDK conventions.

I understand you generally suggest to use things coming with Rwy12 or EZ-Scenery. Yes, I would like to, but as I said most of the real eye candy on my airport is coming from the API macros.

Or am I just too blind to see that you are showing me another way I can go to use the old APIs?

Thank you for your help,
Martin

#4 IBtheSarge

IBtheSarge

    First Class Member

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 10,718 posts
  • Location:Central Florida

Posted 16 March 2006 - 07:31 AM

gsnde, on Mar 16 2006, 04:43 AM, said:

Yes, most of the APIs I use have been provided with the sca files. But I don't have FSDS2.
Good; then you can make a LibObj file for those objects.  (You don't need FSDS2 unless you are going to start creating your own objects.)  You only need SCASM, WordPad, and the API/SCA files of the objects you are going to use.  Look in the Tutorials part of the FS2004 forums -- you should find my tutorials on placing APIs and how to make a LibObj file using the API/SCA files.  If you can't find it, let me know and I'll see what I can do to find something for you.  (Still in the process of rebuilding the FS9 system, so I can't get to the files directly.)

gsnde, on Mar 16 2006, 04:43 AM, said:

I understand you generally suggest to use things coming with Rwy12 or EZ-Scenery. Yes, I would like to, but as I said most of the real eye candy on my airport is coming from the API macros.
Until FS X arrives -- and possibly even after that, no one knows for sure -- it's okay to stay with the APIs.  If, as suspected, FS X will not recognize SCASM-based objects and files, you'll probably see some of the better object designers releasing MDL vesions of their objects.

#5 gsnde

gsnde

    Student Pilot

  • Members
  • PipPip
  • 42 posts
  • Location:South-West Germany

Posted 17 March 2006 - 02:52 AM

Sarge,

Thank you. I have found the tutorial and it looks so complete and understandable that I am sure I will master the process without problems.

Sorry for you that you have to rebuild your system. But if you are about to start from scratch please let me advise you something from my field of expertise. Go to http://www.acronis.com and check out TrueImage.

You can make fast and absolute reliable images of your system. Some features are: you can do so from within windows, you can add differential snapshots, you can retrieve single files from a snapshot. There are comparable programs, but I rate this one the leader of the pack.

Setup your OS with all SPs and hotfixes and make a snapshot which you will keep until your current OS is obsolete. From here on you can rebuild your complete virgin OS (minus more current hotfixes) in a matter of minutes.

Install all the software you need. Either make a second complete image (OS and programs) or make a differential snapshot to your first one.

If you install FS on a dedicated partition, you can handle it the same way. So have an image of a foolproofed FS installation with all your needed enhancements and planes without the leftovers from experiments and test that you can rebuild in minutes.

If all this is no news to you, sorry for going into such details.

Cheers,
Martin

#6 IBtheSarge

IBtheSarge

    First Class Member

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 10,718 posts
  • Location:Central Florida

Posted 20 March 2006 - 11:09 AM

gsnde, on Mar 17 2006, 03:52 AM, said:

Sorry for you that you have to rebuild your system. But if you are about to start from scratch please let me advise you something from my field of expertise. Go to http://www.acronis.com and check out TrueImage.
Thanks, but it wouldn't have helped.  All three drives went TANGO UNIFORM, and the problem evidently started prior to the last back-up to CD -- the CD was completely garbaged during the last back-up and completely unreadable.  Now have four SATA drives -- one for the OS, one for FS9/FS9 design, and two in RAID array to mirror the other two drives.  Likelihood of all four SATAs going out at the same time is virtually non-existant.  Just for insurance, though, I also have installed a DVD/CD combo drive and am making sure that all of the design stuff (software and other files) are backed up onto a DVD-R/W.  Also have loaded background diagnostic tools that monitor each drive, the CPU, memory sticks, and sound an alarm if any of them drop below a certain level compared to the benchmarks.

Don't know if you've seen it on SceneryDesign.org, but I piggy-backed onto Arno's reply to you.  Whether or not your API sceneries will carry forward into FS X is going to be completely dependent on whether FS X continues SCASM support.  If it continues to recognize SCASM-based objects and BGLs compiled with SCASM, they'll still work.  If not, you'll have to redesign for FS X using MDL objects and bglcomp generated BGLs.

#7 gsnde

gsnde

    Student Pilot

  • Members
  • PipPip
  • 42 posts
  • Location:South-West Germany

Posted 21 March 2006 - 09:15 AM

Sarge,

A RAID is a very good counter measure against hardware failure - I have the same harddisk setup like you now. It can not protect against other kinds of destruction: software running amoc, viruses which sneak through your defense layers, yourself in the once-in-a-lifetime moment doing exactly the wrong thing and confirming it with yes.

So I feel good doing backups with that image software which is so easy to manage and so quick to run.

OK, since you are back with a running system: can you please send me (or point me to) your tutorial how to build an Object Library for API macros? This one I cannot find and I would love to start with the work.

Cheers,
Martin

#8 IBtheSarge

IBtheSarge

    First Class Member

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 10,718 posts
  • Location:Central Florida

Posted 21 March 2006 - 10:42 AM

gsnde, on Mar 21 2006, 10:15 AM, said:

OK, since you are back with a running system: can you please send me (or point me to) your tutorial how to build an Object Library for API macros? This one I cannot find and I would love to start with the work.
You asked that question at PRECISELY the right moment.  :D  I've got to take a break from all the surfing and downloading I've been doing (FS9 is no where CLOSE to being what it was, but Rome wasn't built in a day, eh?).  I'll work on it today and (hopefully) have something for you tonight (Tuesday eveing, US east coast time).  This is for objects YOU have created and exported in both API and SCA format.

Do you already have Manfred Moldenhauer's SCASM?  If not, go ahead and get it HERE (current version is 2.96).  In preparation for creating the LibraryObject file, make sure SCASM and all of the API and SCA files are in one directory.  The only other "tool" you'll need is WordPad to create the actual library file.

Edited by sarge, 21 March 2006 - 10:49 AM.


#9 gsnde

gsnde

    Student Pilot

  • Members
  • PipPip
  • 42 posts
  • Location:South-West Germany

Posted 22 March 2006 - 02:13 AM

Sarge,

Scasm, editor and me are ready for the task  :D

Looking forward, and thank you,
Martin

#10 IBtheSarge

IBtheSarge

    First Class Member

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 10,718 posts
  • Location:Central Florida

Posted 23 March 2006 - 11:45 PM

gsnde, on Mar 22 2006, 03:13 AM, said:

Sarge,
Scasm, editor and me are ready for the task  :D
Looking forward, and thank you,
Martin
Hang in there .... had to go get some missing pieces of software; tutorial almost finished.

#11 gsnde

gsnde

    Student Pilot

  • Members
  • PipPip
  • 42 posts
  • Location:South-West Germany

Posted 24 March 2006 - 03:13 AM

I do, and do a lot of reading meanwhile. Slowly things (seem) to fall into place.... Thanks

#12 gsnde

gsnde

    Student Pilot

  • Members
  • PipPip
  • 42 posts
  • Location:South-West Germany

Posted 25 March 2006 - 04:52 AM

Now I have it. All APIs I use more than once put into an Object Library, and it is perfectly working. I am happy  :D (although I had hoped to see at leat a bit improvement in FPS, but there is nil).

Thank you, Sarge, for the tips along the way.

Cheers,
Martin