Jump to content

Request For Help, P-51D Cockpit Photo as Custom Cockpit


Captain Orso

Recommended Posts

In the P-51D forum someone at sometime posted that there is a dashboard photo graphic that can modded by replacing the DDS file. This however does not pass the IC control.

 

Dashboard Photo Exa.jpg

 

Then someone presented that the photo mod can be put into the Liveries folder as a Custom Cockpit, which passes IC.

 

EG:

'..\Saved Games\DCS.openbeta\Liveries\Cockpit_P-51D-25-NA\default\mustang_photo.dds'

'..\Saved Games\DCS.openbeta\Liveries\Cockpit_P-51D-25-NA\default\description.lua'

 

description.lua:

livery = {
    {"pilot_p51_kneeboard",0,"mfd3",true};
    {"p51d-mirror", 0 ,"mirrors",true};--mirrors texture replacement with runtime rendered one
    {"p51d-cpt_photo", 0, "mustang_photo", false};
}
name = "default"

 

The same for Cockpit_P-51D-30-NA and this works as a static change.

 

I want to have a selection of photos that I can change through for example Options -> Special -> P-51D -> Customized Cockpit (25-NA).

 

So, before I continue, because I have tried everything I can think of without success, I tried the same things with the TF-51D, and low and behold, it works perfectly.

 

EG:

'..\Saved Games\DCS.openbeta\Liveries\Cockpit_TF-51D\Photo - From Factory To Front Line\mustang_photo.dds'

'..\Saved Games\DCS.openbeta\Liveries\Cockpit_TF-51D\Photo - From Factory To Front Line\description.lua'

 

description.lua:

livery = {
    {"pilot_p51_kneeboard",0,"mfd3",true};
    {"tf51d-mirror", 0 ,"mirrors",true};--mirrors texture replacement with runtime rendered one
    {"tf51d-cpt_photo", 0, "mustang_photo", false};
}
name = "Photo - From Factory To Front Line"

 

AND

 

'..\Saved Games\DCS.openbeta\Liveries\Cockpit_TF-51D\Photo - Mustang Sally\mustang_photo.dds'

'..\Saved Games\DCS.openbeta\Liveries\Cockpit_TF-51D\Photo - Mustang Sally\description.lua'

 

description.lua:

livery = {
    {"pilot_p51_kneeboard",0,"mfd3",true};
    {"tf51d-mirror", 0 ,"mirrors",true};--mirrors texture replacement with runtime rendered one
    {"tf51d-cpt_photo", 0, "mustang_photo", false};
}
name = "Photo - Mustang Sally"

 

AND THIS WORKS for the TF-51D!!

 

BUT...

 

Doing the same thing with the P-51D's by replacing the 'default' folder in the above example (the folder name only has the effect of determining the sort order) with 'Photo - From Factory To Front Line' and 'Photo - Mustang Sally' doesn't work.

 

EG:

'..\Saved Games\DCS.openbeta\Liveries\Cockpit_P-51D-25-NA\Photo - From Factory To Front Line\mustang_photo.dds'

'..\Saved Games\DCS.openbeta\Liveries\Cockpit_P-51D-25-NA\Photo - From Factory To Front Line\description.lua'

'..\Saved Games\DCS.openbeta\Liveries\Cockpit_P-51D-30-NA\Photo - Mustang Sally\mustang_photo.dds'

'..\Saved Games\DCS.openbeta\Liveries\Cockpit_P-51D-30-NA\Photo - Mustang Sally\description.lua'

 

In Options -> Special -> P-51D -> Customized Cockpit (25-NA) and Options -> Special -> P-51D -> Customized Cockpit (30-NA) the entries are listed and selectable, but the photos never appear.

 

The only way i can get a photo to appear is by using 'Liveries\Cockpit_P-51D-25-NA\default' as the folder name, and it can be present to activate the photo or deleted to have the default blank dashboard, but the normal DCS mechanisms -- as demonstrated with the TF-51D -- are not working.

 

Does anyone have an idea of why this isn't working, or what to do to make it work?

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

I think there is a bug in the codebase which I suspect happened when the 2nd variant was introduced. the P-51 custom cockpit is looking for the option "CPLocalList" to identify which livery to use - which no longer exists as there are now 2 custom cockpit options ("CPLocalList_P51D25NA" and "CPLocalList_P51D30NA"), so it will always use the default because the option name it is looking for doesn't exist.

 

I was able to get the behavior you want (choose different cockpit liveries) by modifying the options code to create a "CPLocalList" entry for the P-51; but this is not the ideal solution (I only did it to validate my theory that the code was looking for the wrong option name). You can report the bug and hope for a quick fix while changing the texture in a plane livery (not cockpit livery) as you wait for a proper fix (I think that will work - haven't tested it yet)

Link to comment
Share on other sites

Many thanks for your answer, prccowboy.

 

I think I understand what you are saying, but I haven't the slightest idea of the CPLocalList, how it works, is generated, or what I can do with it, but I guess from what you have said, it is sufficient for posting it as a bug.

 

I'm not sure how I might add the photo to a plane livery, but I have about 80 custom P-51D liveries, so I think I'll leave that idea alone. Having to copy or rename the folder in Liveries\ to change the photo is a PITA, but I guess I'll live with it for a while longer; especially because I kind of don't thing ED fixing this will have much of any priority at all.

 

Many thanks again anyway.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

1 hour ago, Captain Orso said:

I haven't the slightest idea of the CPLocalList,

 

sorry, I didn't explain it much because this was the livery section and the reason your custom cockpit not loading is a code issue; but the simple answer is that there is an options lua file created in your saved games directory every time you start DCS that stores all the user set option settings. Currently, in the P-51 section it is saving your choice for 2 P-51 cockpit liveries (the -25 and -30) using the option names I listed above.

 

However, in-game when it loads the liveries it is looking for information stored as a different generic option name (CPLocalList), which doesn't exist anymore in the current options file. That is why it always loads the "default" cockpit livery

 

My guess is that this simple bug was introduced when they added a 2nd P-51 variant. They probably expanded the number of options but forgot to tie the in-game cockpit liveries to the new option names. like I said above, I tested this by modifying the code that writes the saved options settings and it does indeed fix the problem but I don't like suggesting people modify their core installation.


Edited by prccowboy
Link to comment
Share on other sites

Hi prccowboy, thanks for explaining that.

 

I posted here, because Customized Cockpits belong to liveries. In fact the default.lua file literally says "livery = {", sooo... 😉. Besides it's the only subforum that really talks about actual customized cockpits.

 

I think your explanation should help greatly to report this big. Many thanks again for your help 👍

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

5 hours ago, Captain Orso said:

I posted here, because

 

Captain Orso, you're all good. You posted your question correctly and detailed your issue. I didn't mean to suggest otherwise. I just meant that I didn't go into a detailed response about the source of the problem in the code because most people only care that "it's broken and should be fixed" and so only provided only enough info to help ED or someone who wanted to modify code to fix the problem know where to look. I blame my muddled response on lack of sleep and coffee  

 

If you need help in reporting the bug or want me to do it or even want more info about a code workaround, just PM me

Link to comment
Share on other sites

Not to worry. I had absolutely no idea what the issue was at all. I only came up with the idea to try to discover the issue again after having gotten my hands on a cockpit customization for the A-10C II that is fairly simple, so I thought I'd use that as the basis for getting my default.lua in order and the folder names and structure.

 

But until I tried it on the TF-51D and saw that it works on that, I thought I still had a problem with my default.lua file. I still have no idea why the kneeboard and mirror entries are required,  because I'm not doing anything with those anyway, but without them it doesn't work so that's just the way it is. LUA is still a mystery to me and DCS a foggy mystery.

 

Thanks for your offer. I've already posted the issue in the P-51D Bugs subforum

I guess it's kind of a bad time to have posted a new bug, what with 2.7 having just come out and the bugs it's brought with it. Already there are a number of them just in the P-51D alone that weren't an issue at all before.

 

I'm just glad to have found out where the issue lies and that it's not because of my default.lua file, because it's already been bugging me for years.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

  • Recently Browsing   0 members

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