Sign in to follow this  
TheFiddler

Object Library issues

Recommended Posts

Greetings! Please note this is a question concerning FS2002; I'm a bit slow :-) I am trying to put together an Object Library, and am running into an issue I don't understand: Although my ObjId, and LibObj, and EndObj statements are all in order, I keep getting hit by that "Scenery Object Not Found" error message. For testing purposes, my library currently contains only two very simple objects (a cube, and a pyramid, made with NOVA).Indeed, I got this to work as intended: I can use both objects from this library via calls from scenery macros (CallLibObj) all right. So, the basics are OK.However, when I add a third object to the library, even the [em]first[/em] two ones are no longer found, although they worked before. (And I am not even attempting to [em]use[/em] #3: I just [em]added[/em] it to the library but do not call it anywhere.)Now, obviously, the syntax for the LibObj...EndObj wrapper (as well as the CallLibObj in the macros using the lib) is always the same; so if it worked for the first two objects, it should be correct for the third one, too. And of course I have very carefully triple- and quadruple-checked the ObjId numbers.Object #3 is a very old (FS5 or FS98?) plane, converted to a BGL with MDL2BGL; the resulting BGL file was then disassembled with BGLanalyze, and from there I copy-pasted the relevant parts of the SCASM code into the library).I suppose (but don't know enough to be sure) it is possible that this third (complex) object contains some code which is not permitted in library objects. So I wouldn't be too surprised if it didn't [em]work itself[/em] when called by another macro (remember, however, that so far I haven't even tried to use it).But how can it prevent the recognition even of the [em]first two[/em] simple library objects, resulting in "Scenery Object Not Found" for them, although they did work before I added object #3 to the library? (And they do work again, if I take #3 out again.)Can this really be caused by inappropriate (for library objects) code in object #3?Or is there a perhaps a size limit for library entries? (Object #3 is pretty longish, more than 3500 lines)In any case, what I am ultimately after is to make "dynamic scenery" (not in the MS sense, though) using [a href=http://aspector.com/~brf/BusyObjects]BusyObjects[/a] animations. I have already succeeded to do this for some simple geometric shapes, but of course want to use real plane and vehicle models. Making my own with gmax is too much for me, so I wanted to use something simple I could get at via MDL2BGL. Perhaps not a good idea? But how to get one's hands on some (simple) planes/vehicles [em]in SCASM/API format[/em], to put them into an Object Library?(I am also aware that the complete model code could be put directly into the BusyObjects animation; it doesn't have just to be an object library call. But that is not a very "clean" approach.)Thanks for any ideas on this.Cheers,Martin

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Martin,Can you maybe post the source, that should tell what is wrong. Below I posted a piece of one of the libraries I made (it contains more then 20 objects in total).[tt]ObjId( 00000000 11111979 14122000 06012003 )LibObj( PWR 0 SCALE 0.5 )Include( molen1.sca )ReturnEndObjObjId( 00000001 11111979 14122000 06012003 )LibObj( PWR 0 SCALE 0.5 )Include( molen2.sca )ReturnEndObjObjId( 00000002 11111979 14122000 06012003 )LibObj( PWR 0 SCALE 0.5 )Include( molen2w.sca )ReturnEndObjObjId( 00000003 11111979 14122000 06012003 )LibObj( PWR 0 SCALE 0.5 )Include( molen3.sca )ReturnEndObj[/tt]

Share this post


Link to post
Share on other sites

Hello Arno,many thanks for the reply! (And as always, I'm impressed how easy it is to get advice directly from the gurus via the Net.)>LibObj( PWR 0 SCALE 0.5 )>Include( molen1.sca )>Return>EndObjAh, yes, good idea, thanks! Somehow I had so far ignored* the Include() statement, and of course it makes the organization of the files much more efficient.*SCASM is a "passive" language for me, I understand more or less what I see, but can't write it myselfSo I replaced the full object code in my library with Include() statements, and lo and behold: problem solved!Although I don't quite understand why this is: with Includes now everything works fine; if I instead have the complete code for object #3 directly in the object library, even the objects #1 and #2 are no longer found.Maybe the code of #3 is just too long for the object library file (as I said, more than 3500 lines), and the interpreter chokes on that?(Then again, why doesn't it with the Include -- it still has to process those same 3500 lines?)Anyhow, using Includes is much better practice anyway for managing objects, so I'm happy!As an OT gag, the object #3 I happen to use actually comes from your corner of the world: It is a Fokker VIIa made by the Flight Simulator Group of the Friends of the Aviodome, with a banner announcing the Dutch Flight Simulation day on October 4th, 1998... :-) (Note I am just experimenting privately, I'll not use it for anything public!)The next small (or rather, BIG) problem now is the scale; I am using LibObj( PWR 0 SIZE 1 SCALE 0.001 TYPE 0 NAME "theFVII" ) and scale .01 in Airport 2.6, and still get the result pictured below.But who knows: misschien bouwen ze echt zo reuzenvliegtuigs in Holland?:-)Thanks again for the help!Cheers,Martin

72062.jpg" alt="reuzevliegtuig"Nederlands Reuzenvliegtuig(Note that she is actually [em]sitting on the ground![/em];-)

Share this post


Link to post
Share on other sites

Hi Martin,Maybe you forgot the add the extra Return command at the end when you pasted the code in there? That could result in the errors.For the scale of the plane, I assume you converted it to a static with a program like MDL2BGL? I think that code doesn't use a normal RefPoint but a SetScale command. Have you tried to use such a command in your calling API?

Share this post


Link to post
Share on other sites

Hello Arno,sorry for the delay -- I got side-tracked, and forgot to acknowledge your advice. It did help, thanks! Yes, I was using an mdl2bgl-generated macro, and after I understood what SetScaleX does, I was able to hard-code the correct scale into the library object definition.Now the plane works fine as a static object, and I am trying to figure out how to put it on a BusyObjects trajectory... But that's another thread (threat? :-))Thanks again!Cheers,Martin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this