Sign in to follow this  
Guest norbrook

Cessna 182s Static API

Recommended Posts

I'm trying to call the Cessna 182S library object in this API so I can place it using Airport. However when I place the following API, all I get is a large red box. Any ideas?AdrianArea( 4 %1 %2 22 )IfVarRange( : 346 %12 5 )PerspectiveCall( :L1 )ShadowCall( :L1 )Jump( : ):L1mif( %11 )RefPoint( 2 :E1 %4 %1 %2 E= %11 v1= %10 %13 %14 )melseRefPoint( 7 :E1 %4 %1 %2 v1= %10 %13 %14 )mifendRotatedCall ( :R1 0 0 %5 )Return:R1CallLibObj( 0 90b2bbe8 11d2f24a 1000849c 2ae60c5a ) :E1ReturnEndA

Share this post


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

>I'm trying to call the Cessna 182S library object in this API>so I can place it using Airport. However when I place the>following API, all I get is a large red box. Any ideas?>>Adrian>>Area( 4 %1 %2 22 )>>IfVarRange( : 346 %12 5 )>>PerspectiveCall( :L1 )>ShadowCall( :L1 )>Jump( : )>>:L1>mif( %11 )>RefPoint( 2 :E1 %4 %1 %2 E= %11 v1= %10 %13 %14 )>melse>RefPoint( 7 :E1 %4 %1 %2 v1= %10 %13 %14 )>mifend>>RotatedCall ( :R1 0 0 %5 )>Return>>:R1>CallLibObj( 0 90b2bbe8 11d2f24a 1000849c 2ae60c5a )> >:E1>Return>>EndATry this code. It includes your library address.mif (0)Area( 5 %1 %2 1 )RotatedCall( :symbol 0 0 %5 )Jump( :endsymbl ):symbolRefPoint( 7 : 0.5 %1 %2 )Points( 00 0 -700 0 020 0 020 0 -7010 0 -35)Poly( a 0 1 2 3 )Poly( a 0 4 3 )Return:endsymblEndAmifendArea( 5 %1 %2 22 )IfVarRange( : 0346 %12 5 )perspectivecall( :OBJ )shadowcall( :OBJ )jump( : ):OBJmif( %11 )refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 V2= 1000 )melserefpoint( 7 :END %4 %1 %2 v1= %10 V2= 1000 )mifendrotatedcall( :ROT 0 0 %5 )return:ROTcallLibobj( 0 90b2bbe8 11d2f24a 1000849c 2ae60c5a ):ENDreturnEndAShez

Share this post


Link to post
Share on other sites

hmm,thanks for the reply Shez, same results though. I have a feeling that the id is wrong.I got the GUID from ScengenX which lists it as ASO_cessna182s 90b2bbe811d2f24a1000849c2ae60c5a-n

Share this post


Link to post
Share on other sites

Hi,try also these GUIDs:

GUID									name===================================	 =============================90B2BBE7 11D2F24A 1000849C 2AE60C5A	ASO_cessna182rg90B2BBE8 11D2F24A 1000849C 2AE60C5A	ASO_cessna182s00C2CDA9 A9E100AA 596711D0 B1A18300	Dynamic Scenery Cessna00C2CDA9 A9E100AA 596711D0 B1A18307	Dynamic Scenery Fuel Truck47BC6DF1 11D2F98A 1000849C 2AE60C5A	prop_cessna182s_100d

Maybe one of these will work. And please, check scale, I think it should be 1.00, try also 10.00 if nothing appears with scale 1.00.And dont forget to call object withCallLibObj( 0 GUID )Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hi Goran,Thanks for your response. Unfortunately non of those GUIDs do the trick.90B2BBE7 11D2F24A 1000849C 2AE60C5A ASO_cessna182rg(Large red box)90B2BBE8 11D2F24A 1000849C 2AE60C5A ASO_cessna182s(Large red box)00C2CDA9 A9E100AA 596711D0 B1A18300 Dynamic Scenery Cessna(Only the shadow of the aircraft displays)Very bizzare.

Share this post


Link to post
Share on other sites

Hi Adrian.It gets worse. I tried those objects with the FS2002 BGLPlacer, and I get the same result... even in CFS2!You cannot display the dynamic objects by a simple api. But just what are those ASO objects?BGLAnalyze will not completely disassemble them, so I tried SCDIS. That works. And the ASO objects appear to be... big red cubes. :-eek =====================================================ObjID( 90B2BBE8 11D2F24A 1000849C 2AE60C5A )LibObj( PWR 0 SIZE 174 SCALE 0.500000 TYPE 0x1000 PROP 0 NAME "ASO_cessna182s" ) Points( 0 -100 -100 100 -100 -100 -100 -100 100 100 -100 100 -100 100 -100 100 100 -100 -100 100 100 100 100 100 -100 ) I_93( 0 ) RGBSColor( EF 106 0 0 ) Poly( m 0 32767 0 100.000000 2 3 7 6 ) Poly( m 0 -32767 0 100.000000 4 5 1 0 ) Poly( m 0 0 32767 100.000000 4 0 2 6 ) Poly( m 32767 0 0 100.000000 5 4 6 7 ) Poly( m 0 0 -32767 100.000000 1 5 7 3 ) Poly( m -32767 0 0 100.000000 0 1 3 2 ) I_93( 0 ) RGBSColor( E0 0 0 0 ) Return IfVRes( :L00001FD0 174 8 ) IfVRes( :L000020A0 174 40 ) Jump32( :L00002170 ):L00001FD0 Points( 0 -100 -100 100 -100 -100 -100 -100 100 100 -100 100 -100 100 -100 100 100 -100 -100 100 100 100 100 100 -100 ) I_93( 0 ) RGBSColor( EF 106 0 0 ) Poly( m 0 32767 0 100.000000 2 3 7 6 ) Poly( m 0 -32767 0 100.000000 4 5 1 0 ) Poly( m 0 0 32767 100.000000 4 0 2 6 ) Poly( m 32767 0 0 100.000000 5 4 6 7 ) Poly( m 0 0 -32767 100.000000 1 5 7 3 ) Poly( m -32767 0 0 100.000000 0 1 3 2 ) I_93( 0 ) RGBSColor( E0 0 0 0 ) Return:L000020A0 Points( 0 -100 -100 100 -100 -100 -100 -100 100 100 -100 100 -100 100 -100 100 100 -100 -100 100 100 100 100 100 -100 ) I_93( 0 ) RGBSColor( EF 106 0 0 ) Poly( m 0 32767 0 100.000000 2 3 7 6 ) Poly( m 0 -32767 0 100.000000 4 5 1 0 ) Poly( m 0 0 32767 100.000000 4 0 2 6 ) Poly( m 32767 0 0 100.000000 5 4 6 7 ) Poly( m 0 0 -32767 100.000000 1 5 7 3 ) Poly( m -32767 0 0 100.000000 0 1 3 2 ) I_93( 0 ) RGBSColor( E0 0 0 0 ) Return:L00002170 Points( 0 -100 -100 100 -100 -100 -100 -100 100 100 -100 100 -100 100 -100 100 100 -100 -100 100 100 100 100 100 -100 ) I_93( 0 ) RGBSColor( EF 106 0 0 ) Poly( m 0 32767 0 100.000000 2 3 7 6 ) Poly( m 0 -32767 0 100.000000 4 5 1 0 ) Poly( m 0 0 32767 100.000000 4 0 2 6 ) Poly( m 32767 0 0 100.000000 5 4 6 7 ) Poly( m 0 0 -32767 100.000000 1 5 7 3 )EndObj=======================================Dick

Share this post


Link to post
Share on other sites

Hi All..I've also tried and got the same results as you all have -- red boxes galore.There is a way to place them as static objects, though. Just use the routine of Airport For Windows and the FS2002 versions of those objects display fine.The one thing that might be undesirable though -- if you only want a static Cessna is that the Cessna's prop is always spinning. This is OK though if you wish to turn them into truly taxiing/flying Cessnas using SCASM Section 15 coding, which I think is the reason AFW made them available.I noticed in the dc'd code that there were no bitmap calls; only drawing/painting coding. Maybe this is one of MS's 'ROFLMAO at scenery hackers' baited' situations :-)??J.R

Share this post


Link to post
Share on other sites

This is interesting, it seems the objects listed in the SDK (and thus also in SceneGenX) as being aircraft, were never finished and they library objects contain only some red cubes.I assume the dynamic scenery you are talking about does not use the same GUID?

Share this post


Link to post
Share on other sites

Hello everybody,yes, that's interesting and strange . if we decompile the dynlib.bgl, we got :; ----------------------------------------; Library Object #1, Offset 0x00B8, size 64976 (= 0x8FBE4); ----------------------------------------ObjID( 00C2CDA9 A9E100AA 596711D0 B1A18300 )LibObj( PWR 100 SIZE 0 SCALE 1024.000 TYPE 2 NAME "Dynamic Scenery Cessna" ) ShadowPosInd( 0000 ) SuperScale( :L00010C 2048 11200 6 ) ShadowCallVI( :L000130 0018 ):L00010C RefPoint( ofs :L00012E 0 0 0000 ) SuperScale( :L00012E 2048 11200 6 ) PBHCall( :L000130 0018 ) SetVar( 002C 6 ):L00012E Return:L000130etc...the guid is correct for the Cessna and I wonder why the shadow works and the model doesn't ?I have tried to place the code in a static library format (I suppose it begins after :L000130), but nothing appears (worse : the shadow disappears..)??note: the code calls texture 182top, 182side1 and 2.r8 in main textureyou can also place a Cessna as static with FSDyn (propeller off)best regards, pascalhttp://perso.wanadoo.fr/p.dumat

Share this post


Link to post
Share on other sites

Hi all.If you want any version of aircraft in the sim to be used as a static aircraft in FS9, couldn't you make a traffic BGL to park the plane?If you want static aircraft with very low poly counts, you could make them in Gmax. Take top, front and side screenshots to use as templates in Gmax. The length and width data can be found for the aircraft in the sim. The textures could be the same as the textures for the sim's aircraft. It doesn't seem like it should be so hard to make a low poly model, and maybe a nice project for someone, with the Gmax skills, to make an FS9 Library of some planes as scenery.Meanwhile, there are some freebee Gmax models available:http://www.freeflightdesign.com/gmax.htmlDick

Share this post


Link to post
Share on other sites

Arno..I think SGX included that file containing the ASO planes simply because it was part of the BGLComp SDK. My assumption is that they are actually circa FS2002 objects but possibly usable in FS9 if we knew how to code them.No, the same GUID's are not used in AFW for dyn planes. Rather, AFW seems to just implement a Section 15 "link" to the various available dyn objects ie: 0FE0B for Cessna and 0FE11 for the Heli. It might be that these "links" might only be useful to SCASM?Dick..Yes, Ole Egholm's low poly count gmax planes look pretty good and appear to retain good frame rate budgeting. 'Looks like he made ie their wings out of maybe a 4 sided tubes instead of 'planks' as MS did in some of their Oshkosh static fleets -- at least they have an airfoil instead of plank or rectangular sectioned slab look about them. They are probably the most frame rate friendly but look pretty 'gross' up close :-).Pascal..I stand corrected.. the code does 'appear' to call the 182 bitmaps -- but they don't seem to appear when recompiled; only boxes. I wonder if those boxes have anything to do with 'crash' or other dyn scenery definitions?J.R

Share this post


Link to post
Share on other sites

>I think SGX included that file containing the ASO planes>simply because it was part of the BGLComp SDK. My assumption>is that they are actually circa FS2002 objects but possibly>usable in FS9 if we knew how to code them.I think you are right here, the listing in the SDK has some errors unfortunately. If it were Fs2002 objects we should be able to call them correctly with the macro given at the start of this topic. So I think it is more that these GUIDs are no longer used, but that they forgot to update the docs.>No, the same GUID's are not used in AFW for dyn planes. >Rather, AFW seems to just implement a Section 15 "link" to the>various available dyn objects ie: 0FE0B for Cessna and 0FE11>for the Heli. It might be that these "links" might only be>useful to SCASM?OK, that is what I thought. The section 15 dynamics work completely different and have their own library. So I think it is not possible to link that with section 10 easily.

Share this post


Link to post
Share on other sites

Hi Adrian!Interesting results You (and others) have got. Now my suggestion would be (like Rhumba said) to produce a dynamic scenery with non-movable aircraft. It is easy, why not?

Header( 1  N46:19:00.00 N46:10:00.00 E014:46:00.00 E014:10:00.00 ) LatRange(  N46:10:01.00 N46:18:59.00 ) Set( Area15mx 32 ) Set( FSVers 0x800 ) Area15( N46:15:44.00 N46:11:44.00 E014:46:00.00 E014:20:00.00 ) LatRef( N46:13:44.24 ) ; CallDLibObj( label   type min_density	OBJ_GUIDs CallDLibObj( :CessnaSt1 4 2 00C2CDA9 A9E100AA 596711D0 B1A18300 ) Exit; ;=========================== :CessnaSt1SetPos( N46:13:49.4424 E014:27:24.7684 385 ) Heading( 216 ) PitchTo( 0.00 180 ) BankTo( 0.00 180 ) ACS ( 1 ) Sleep Return

Try this! With coordinates as above the Cessna will be placed on apron on LJLJ airport (okay, mybe in the building since MS LJLJ airport is more or less wrong) but the Cessna will sit there and wait.If You need to put more objects, copy CallDLibObj() lines with different labels and then Copy-paste :CessnaSt1 routines with appropriate labels.It is not FS2004 solution but since dynamic scenery works and no one said it will not in the future (and I hope it will be expanded to easier produce LEPA/EDDW ground movement!!), it might solve Your problem nicely.Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Thanks for that Gorchi, I'll try that code tomorrow. Also thanks to all who contributed their insight on this thread, I've learn't quite a bit.Adrian

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