Corsac

Missing registration on X-Plane vFlyteAir Arrow

Recommended Posts

Hi,

I'm using the vFlyteAir PA-28R Arrow III with X-Plane. The registration displayed in LittleNavmap is wrong, it's the default/generic one for the aircraft .acf model and not the one associated with the livery. The registration seems dynamically changed using LUA, so maybe that confuses LittleNavmap. Unfortunately that means I have a duplicate when flying online on IVAO. Is there something that can be done here?

Share this post


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

X-Plane has no registrations per livery. There is only the one in the acf. Some use the registration as the name for the livery folder but that is not common.

Alex

Share this post


Link to post
Share on other sites

Well it looks like (at least for vFlyteAir aircrafts) the registration is dynamically changed (with LUA) when a livery is loaded, with a code like:

    -- TailNumber --
    -- Set the Tail Number based in index of livery initially loaded for ATC
    -- This only works on initial load of aircraft
    if cl_LiveryIndex_last ~= cl_LiveryIndex then
        if cl_LiveryIndex == 0 then
            cl_TailNum  = "N000PA"
        end
        if cl_LiveryIndex == 1 then
            cl_TailNum  = "N1089Q"
        end
        if cl_LiveryIndex == 2 then
            cl_TailNum  = "N47455"
        end
        if cl_LiveryIndex == 3 then
            cl_TailNum  = "N1927H"
        end
        if cl_LiveryIndex == 4 then
            cl_TailNum  = "C-GQYI"
        end
        if cl_LiveryIndex == 5 then
            cl_TailNum  = "G-IRKB"
        end
        if cl_LiveryIndex == 6 then
            cl_TailNum  = "N9350K"
        end
        if cl_LiveryIndex == 7 then
            cl_TailNum  = "N6995C"
        end
        if cl_LiveryIndex == 8 then
            cl_TailNum  = "N44961"
        end
        if cl_LiveryIndex == 9 then
            cl_TailNum  = "N43988"
        end
        if cl_LiveryIndex == 10 then
            cl_TailNum  = "OH-PEA"
        end
        if cl_LiveryIndex == 11 then
            cl_TailNum  = "F-GEOQ"
        end
        if cl_LiveryIndex == 12 then
            cl_TailNum  = "D-EMRY"
        end
        if cl_LiveryIndex == 13 then
            cl_TailNum  = "F-GJCB"
        end
        if cl_LiveryIndex == 14 then
            cl_TailNum  = "G-BNSG"
        end
        if cl_LiveryIndex == 15 then
            cl_TailNum  = "G-OBAK"
        end
    end

So maybe there's some kind of race condition here, with LNM getting the registration from X-Plane *before* the livery is loaded and thus having the “generic” tail number.

Share this post


Link to post
Share on other sites

I read the reg from the "sim/aircraft/view/acf_tailnum" dataref. Is that the one they are changing in the Lua script?
The dataref is read permanently by Xpconnect. So LNM should catch all changes.

Looking closer at the code it seems that I overwrite this value with "acf/_tailnum" from the .acf file. :sad:

Have to check. Looks like something is wrong there.

Thanks for reporting

Alex

 

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