Jump to content

Recommended Posts

Posted (edited)

Hi All,

Ive found a quick-and-dirty way to use a built-in X-Plane ACF instead of the "OBJ 700" CSL

If you remove everything in the "plugins/Xsquawkbox/CSL" folder, X-Plane will default to using your "Aircraft and Situations" aircraft loaded in Slot #2.

Basically, I was tired of seeing ye olde "bright-lights and no night textures" Object 700 CSL Items, so I was "tinkering" around with forcing XSB to load OBJ850 or .ACF files instead via the config files. (You know me, always tinkering with the internals of X-Plane =)

 

Turns out XSB doesn't support loading the newer 850 objects nor the ACF objects at all (or I'm unaware of how to make it do this!) - but in my adventures it had an unintended side-effect of not loading in any CSLs at all. I found to my amazement that when XSB has nothing to load, X-Plane instead renders the first "AI" aircraft in place of any aircraft in the local surroundings when I went online.

The upshot is that I now have a fully rendered "other aircraft", complete with correct positions of flaps, speedbrakes, landing gear, etc, and uses the modern lighting system (so objects react to HDR and reflect, as well as cast normal lights and strobes). I used the "XPFW" AI-Aircraft library for my "AI" slot #2 - which are optimized aircraft specific for AI or object rendering (you cant fly them, but they are fully detailed on the exterior).

The downside is that every other aircraft is always the same. However, I find this to be acceptable when flying online. (See pic: The Jetstar A320 next to me is the rendered in-game ACF)

 

- CK.

 

post-5973-0-72745400-1388449459_thumb.jp

Edited by chris k
  • Upvote 3
Posted (edited)
You're not saying that all the aircraft are going to be the same are you?

 

Yes, that is precisely what I mean by "The downside is that every other aircraft is always the same"

 

It does not matter how many Aircraft slots you load up with differing aircraft in slots 3-20, hence the sentence "X-Plane will default to using your 'Aircraft and Situations' aircraft loaded in Slot #2."

 

Sorry If my original post was unclear. I tried to state things unambiguously as possible.

 

- CK.

Edited by chris k
Posted (edited)

Here is what I get (picture)

 

I have not tested against X-Plane 9 or 8

 

This is XSB-64 under XP10 on my own installation.

 

Use at your own risk. i.e. I am in no way doing any kind of "technical support" for this. (it's something I did for my own reasons, which I thought i'd mention to the community). If you are getting weird effects, i.e. if it doesn't work out for you, I leave it as an exercise to you to re-install your CSLs.

 

Why you are getting an upside down aircraft is beyond me... You're on your own from here..!

Edited by chris k
  • Upvote 2
Posted

Back in the old days of v7 / v8 XSB was fully capable of using -every- AI slot that you had activated...... it attempted a best match for airframe size/type.

 

Additionally, making XSB use the AI slots is the only way to get the default TCAS instruments to display traffic when online.

 

(XSB makes no attempt to share position data for its traffic via datarefs so this is the ONLY way to get TCAS working afaik.)

 

 

...I would be surprised if these rules have changed significantly.

Posted (edited)

Alright.... Getting closer - I figure out how to load X-Plane 10.25 ACFs into the config (as well as OBJ700s). I looked up the developer documentation on this, and found the correct directives to use:

AIRCRAFT <minimum version> <maximum version> <acf file>AIRCRAFT 670 700 __XPFW_PROPS/Turboprops/BE20/Kingair.acf

so my xsb_aircraft.txt is now:

EXPORT_NAME __TestCSLAIRCRAFT 0 99999 __TestCSL/B737-800/B738.acfHASGEAR YESICAO B738AIRCRAFT 0 99999 __TestCSL/A320-200Lufthansa/A320.acfHASGEAR YESICAO A320OBJECT __TestCSL/B737-700/B737_WestJet.objHASGEAR YESAIRLINE B737 WJA

I was using a version of "AIRCRAFT 0 9999 __TestCSL/myaircraft.acf" and it still wasn't loading. I changed the MAX_VERSION to "99999" on the string and it loaded, which leads me to a sneaky suspicion that the internal X-Plane $VERSION is actually "10025" and not "1025" as I originally thought it would be. The last version of X-Plane 9 is apparently "970" for example.  (If someone can figure out how to dump the dataref to see what the actual "version" value that XP10 is using, this is my suspicion if it can be confirmed - i.e. the version-restriction values above need to be >10025)

Upshot, yes, it loaded the prescribed ACFs and is listed in the ".debug csl" list inside XSB:

Dumping one cycle map of planes. [1] - B738.acf - XP:XP10:Resources:plugins:XSquawkBox:Resources:CSL:TestCSL:B737-800:B738.acf [2] - A320.acf - XP:XP10:Resources:plugins:XSquawkBox:Resources:CSL:TestCSL:A320-200Lufthansa:A320.acf

My next snag: The ACFs are not rendering "in-game". (Still tinkering around w/AI setup, number of slots, .debug XXXX commands etc..); but when I disable the aircraft load and instead just let XSB have no aircraft, and instead use the "previously saved" default aircraft, it shows in-game (i.e. when I go back to my previous "dont load anything", bmy ACF indeed works, as this gets saved inside X-Plane's information/settings file upon reload).

 

Basically, my goal is to do what Toby is wanting above; whereas I have 20 "slots" loaded up with ACFs, and XSB chooses an appropriate ACF model for everything I see out my window. (high-detailed aircraft).

 

Ben, Dunno if you have any insights here or have delved into XSB before - If not no worries - I'll continue my "plodding along in the dim light" till I make it work. :)

 

The Result *should* be a list of 20 of Morten's "XPFW-AI" Airplanes loaded into AI Slots 1-19 (which in the XP UI is planes 2-20) which could be a good "canvas" of aircraft for online play. I will also play with "overloading" the list, i.e. 25 planes, and see if there's any type of dynamic switching of ACF slots if a 'higher priority' plane needs to be rendered from one thats currently unused in a slot. (this would be ideal).

 

Back to tinkering....

 

- CK

Edited by chris k
  • Upvote 1
Posted

int gizmo_builtin_xp_getVersion(lua_State *L){

 

int iXPVersion=0;

int iSDKVersion=0;

XPLMHostApplicationID xphidFoo;

XPLMGetVersions( &iXPVersion, &iSDKVersion, &xphidFoo );

 

lua_pushnumber( L, (float)iXPVersion/1000.f );

 

return 1;

 

}

 

Returns 10.25 to scripts.

Posted (edited)

Alrighty. Looking good on multiple loads - version is indeed "10250" so I know my bounds (Thanks Ben) - I can load multiple ACFs and OBJs now, but just cant get the actual ACF to render in-game. i.e.:

 

OBJ - Renders fine - this is the B732 ICAO model as an OBJ700 from the xsb_aircraft.txt (Westjet 73x)

 

737_170.jpeg

 

ACF - this is the B738 ICAO model as a 1025 ACF from the same xsb_aircraft.txt (Should be an American B738)

 

737_169.jpeg

 

If I disable all CSLs, then the "default" that is loaded (as per post #1 in this thread) - this is the exact same above B738 ACF model that wasnt showing (same /path/filemame.acf) - so I know the "ACF" Is actually 'renderable' (if thats a word!) by X-Plane. - i.e. the "American B738" shows up correctly if I don't specify any CSL xsb_aircraft.txt

 

737_167.jpg

 

So close, yet so far.... I feel I'm on the tip of having this all working - Might need Wade to "wade in" here on the vatsim forums - perhaps rendering the 'ACF' when you try to 'tell it to render an ACF" is somehow broken in XSB? (and if you don't let it interfere, then it works fine..) =)

 

- CK.

Edited by chris k
  • Upvote 3
  • 4 weeks later...
  • 4 weeks later...
  • 2 years later...
Posted
On 1/1/2014 at 7:27 PM, chris k said:

Alrighty. Looking good on multiple loads - version is indeed "10250" so I know my bounds (Thanks Ben) - I can load multiple ACFs and OBJs now, but just cant get the actual ACF to render in-game. i.e.:

 

OBJ - Renders fine - this is the B732 ICAO model as an OBJ700 from the xsb_aircraft.txt (Westjet 73x)

 

737_170.jpeg

 

ACF - this is the B738 ICAO model as a 1025 ACF from the same xsb_aircraft.txt (Should be an American B738)

 

737_169.jpeg

 

If I disable all CSLs, then the "default" that is loaded (as per post #1 in this thread) - this is the exact same above B738 ACF model that wasnt showing (same /path/filemame.acf) - so I know the "ACF" Is actually 'renderable' (if thats a word!) by X-Plane. - i.e. the "American B738" shows up correctly if I don't specify any CSL xsb_aircraft.txt

 

737_167.jpg

 

So close, yet so far.... I feel I'm on the tip of having this all working - Might need Wade to "wade in" here on the vatsim forums - perhaps rendering the 'ACF' when you try to 'tell it to render an ACF" is somehow broken in XSB? (and if you don't let it interfere, then it works fine..) =)

 

- CK.

Did you ever find a solution for this? What do you currently do? Thanks Chris.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...