Page 1 of 1

Other plane cockpits in Allied Force

Posted: 2008-11-15 17:28:04
by Sherlock
Made a small breakthough this weekend on putting other cockpits in AF:

This has been bugging me for some time, especially every time I go fly a Mudhen or an Eagle or a Raptor, etc..... (you get the picture!)

So this is what I have found out so far. The F4Browse/LPBrowse doesn't have the capability to address a new field created by LP in the Falcon4.VCD file which resides in the objects directory under the terrdata folder. Here's a series of pictures to show what I mean:

This is the .VCD file opened up in notepad. This particular view is looking at one of the entries for the F-16C-40:
Image

This view is looking at one of the entries for the F-16C-50:
Image

And this view is looking at one of the entries for the F-16A-MLU:
Image

Notice the "ddd2ddd" entry and then the "dd@sF16C50" towards the end of the F-16C-50 record? It's that "dd@sF16C50" which is the new field information inserted into the VCD file which F4Browse/LPBrowse cannot read or write (because it doesn't have that functionality programmed into it). Yes, the old F4Browse/LPBrowse does have what's called a NCTR field to identify the cockpit type but evidently LP rewrote the exe to not read that portion of the .VCD anymore and instead use the new field they created (or at least that is my theory).

To test my theory I hexedited that portion of the VCD file record for the F/A-22A Raptor and put the text "dd@F22" into the F/A-22A record in the missing area. I then created a folder in the
\Lead Pursuit\Battlefield Operations\art\ckptart\Res_1024
folder and I called the folder "F22".

I then edited the "ckpittypes.dat" file residing under the \Lead Pursuit\Battlefield Operations\art\ckptart\Common folder to include the following line: "1024 768 Default F22" using the format provided in that file.

Here's what the .VCD file looked like after my hexedit:
Image

Note that I was doing this for a 1024x768 resolution screen and cockpit.

I then copied the F-16C-40 cockpit into the "F22" folder I had created.

I then built a TE using the F/A-22A Raptor. Now we all know that the F-16C-50/52 cockpit is the default cockpit. So my thought was that if this didn't work then I would see the 50/52 cockpit. But I got the Block 40 cockpit when I entered the 3D world! So it works and it works good!

Note that you cannot edit the .VCD file in notepad! You will screw up your .VCD file and your installation will not work!

Now if someone could just figure out the following files:
bcockpit.dat
bpadlock.dat

Hope this helps!

Re: Other plane cockpits in Allied Force

Posted: 2008-11-15 20:01:11
by Snake Man
Please post the information here.

Re: Other plane cockpits in Allied Force

Posted: 2008-11-15 20:33:10
by Sherlock
Does anyone know of a binary to ASCII text converter? Or a ASCII to binary converter? Want to try it on the bcockpit.dat and bpadlock.dat files.

Re: Other plane cockpits in Allied Force

Posted: 2008-11-19 21:42:18
by Luk
Great news!
I am so upset now, still dreaming about Fishbed flight in Balcans - without electronic...
I have got plenty of sites, after writing "binary to ASCII text converter". I can not to believe you dont have some good software already now....but if not:
http://www.gdargaud.net/Hack/BinToAscii.html
those looks good I think...?
http://www.ticalc.org/archives/files/fi ... 29910.html

java web for both conversions -online
http://www.theskull.com/javascript/ascii-binary.html
keep research please :idea: :idea: :idea: :D
Luk

Re: Other plane cockpits in Allied Force

Posted: 2008-11-26 00:22:36
by Echo300
Maybe I'm missing something obvious, but when I open FALCON4.VCD in notepad, it doesn't look like it does in your notepad - the entries aren't so orderly, instead they're all a big jumble. Sorry I can't show you what I mean with a screen, I'm away from my Falcon computer. So can someone please explain to me how to get the entries so orderly? Also, what did you use to edit the .vcd? Thank you and sorry for wasting your time with my probably very obvious questions.

Anyway, this development is great news. Thanks for your work, Sherlock. :)

EDIT: here's what I mean: Image

Re: Other plane cockpits in Allied Force

Posted: 2008-11-26 06:30:37
by Sherlock
As far as the "neatness" of the display in notepad did you have "wordwrap" turned on or off? Also, you can still use the "find" feature in notepad to find the F16C40 or F16C50 entries inside the VCD file.

I can't really see the detail in your picture so it is hard for me to say as to much difference between our vews. You can change the displayed font in notepad so sometimes it helps. Wordwrap sometimes helps too.

You will need to use what is called a "hex editor" to make the changes inside the VCD file. You can find them using google for free to download.

Re: Other plane cockpits in Allied Force

Posted: 2008-11-26 08:13:37
by Snake Man
Only weak women use notepad. For any serious text editing use EditPadPro, for Hex editing use perhaps UltraEdit, both of these tips can be found on the PMC Editing Wiki: Editing Tools.

Re: Other plane cockpits in Allied Force

Posted: 2008-11-26 15:26:12
by Echo300
Sherlock-Having wordwrap on or off made no difference. Thanks, anyway. Snake Man-Thanks for the advice.

Re: Other plane cockpits in Allied Force

Posted: 2008-11-26 16:05:01
by Sherlock
nevermind

Re: Other plane cockpits in Allied Force

Posted: 2008-12-04 17:06:47
by Echo300
I just threw this F-14D together really fast... but, using Sherlock's method, it only applies to F-14s - F-16s still have their F-16 cockpit. Still working on getting rid of that yellow hue. I also haven't really done anything as to moving MFDs around (I did remove the DED, as a demonstration.) Nor have I done much work on moving buttons around or changing the appearance and location of gauges.

http://img84.imageshack.us/img84/5681/img3344uh4.jpg

Yes, that is a picture of my monitor, not a screenshot (Long story).

Re: Other plane cockpits in Allied Force

Posted: 2008-12-04 18:53:11
by toonces
Wow, that's pretty freaking awesome for somebody with 3 posts :wink:

Great job guys!

Re: Other plane cockpits in Allied Force

Posted: 2008-12-04 21:38:09
by Sherlock
Echo300 wrote:I just threw this F-14D together really fast... but, using Sherlock's method, it only applies to F-14s - F-16s still have their F-16 cockpit. Still working on getting rid of that yellow hue. I also haven't really done anything as to moving MFDs around (I did remove the DED, as a demonstration.) Nor have I done much work on moving buttons around or changing the appearance and location of gauges.

http://img84.imageshack.us/img84/5681/img3344uh4.jpg

Yes, that is a picture of my monitor, not a screenshot (Long story).

Echo300,
What were the steps you used to achieve this? Especially as to the Bcockpit.dat and the Bpadlock.dat files? Please lay out the steps you used specifically so we can investigate (me!) along with you. Thanks!

Re: Other plane cockpits in Allied Force

Posted: 2008-12-05 13:26:01
by Echo300
Just checking in to say this: I'm going to be rather busy for the next week or so, but when that's over I'll be back here with a nice detailed tutorial. Hope nobody minds the wait.

Re: Other plane cockpits in Allied Force

Posted: 2008-12-05 16:17:50
by Snake Man
Looking forward to your tutorial :)

Re: Other plane cockpits in Allied Force

Posted: 2008-12-08 20:11:33
by Echo300
Oh hell. This is embarrassing. What I attempted to do was to use Seifer's cockpit editor and rename the .dat, being under the impression that AF had kept the same framework in the .dat file as the original Falcon. (I have no idea where I got that idea and it was a long shot, anyway.) Surprisingly, it at first seemed like it worked perfectly; I had said no DED, and there was no DED. Then, I realized that I had never actually moved my new .dat file into the folder to replace the old .dat file. Then, of course, I got to wondering how I could possibly have changed the location of the DED. Then I realized that it was actually still there underneath all that yellow. :oops: Of course when I tried doing the replacement that I had originally intended, it didn't work at all. So, yesterday, I decided to try it manually and open up the bcockpit.dat file with a hex editor. Of course, then I realized how different (at least on the surface) the old 10/12/16_cockpit.dat file is from AF's bcockpit.dat file. So, in other words, we're all back to square one, and I should check my work more carefully before I post. :( Sorry for the disappointment.

Re: Other plane cockpits in Allied Force

Posted: 2008-12-08 22:57:22
by Sherlock
Echo300 wrote:Oh hell. This is embarrassing. What I attempted to do was to use Seifer's cockpit editor and rename the .dat, being under the impression that AF had kept the same framework in the .dat file as the original Falcon. (I have no idea where I got that idea and it was a long shot, anyway.) Surprisingly, it at first seemed like it worked perfectly; I had said no DED, and there was no DED. Then, I realized that I had never actually moved my new .dat file into the folder to replace the old .dat file. Then, of course, I got to wondering how I could possibly have changed the location of the DED. Then I realized that it was actually still there underneath all that yellow. :oops: Of course when I tried doing the replacement that I had originally intended, it didn't work at all. So, yesterday, I decided to try it manually and open up the bcockpit.dat file with a hex editor. Of course, then I realized how different (at least on the surface) the old 10/12/16_cockpit.dat file is from AF's bcockpit.dat file. So, in other words, we're all back to square one, and I should check my work more carefully before I post. :( Sorry for the disappointment.
hehe...

No harm, no foul Echo300. Glad you discovered your error before we all got too far down the path. But if we could just break the format on those bcockpit.dat and bpadlock.dat files then we would have it! :mrgreen:

Re: Other plane cockpits in Allied Force

Posted: 2008-12-09 03:16:20
by toonces
This is going to sound incredibly naive, but I've always been told that the only stupid question is the one not asked...

I suppose there's no way that LP would share any info re: those cockpit files, huh?

Re: Other plane cockpits in Allied Force

Posted: 2008-12-09 14:09:28
by Sherlock
toonces wrote:This is going to sound incredibly naive, but I've always been told that the only stupid question is the one not asked...

I suppose there's no way that LP would share any info re: those cockpit files, huh?
@toonces,

I don't know that anyone has actually asked them specifically for how to "crack" the bcockpit.dat and the bpadlock.dat files (I know I have not) but I doubt they will be forthcoming with that information since they took active steps to encrypt them after, I think, patch 1.03.

Re: Other plane cockpits in Allied Force

Posted: 2008-12-09 14:46:51
by Snake Man
Echo300 wrote:Sorry for the disappointment.
No problems at all, its all part of the fun of editing :)

Re: Other plane cockpits in Allied Force

Posted: 2009-01-20 14:46:48
by Luke
hi

i'm trying to edit the bpcockpits.dat ...

how can i open and edit this file?

can i use EditpadPro ?

in hex editor i open the file and i convert it by using the windos.xct but i see
0000000000000A000000FFFFFFFF0D00
00000900000005240006040000020000
000000000009000000000000000A0000
00FFFFFFFF0E00000009000000052400
07040000020000000000000009000000
000000000A000000FFFFFFFF0F000000
09000000052400080400000200000000
00000009000000000000000A000000FF
FFFFFF10000000090000000524000904
00000200000000000000090000000000
00000A000000FFFFFFFF110000000900
00000524000A04000002000000000000
0009000000000000000A000000FFFFFF
FF12000000090000000524000B040000
02000000000000000900000000000000
0A000000FFFFFFFF1700000009000000
0524000C040000020000000000000009
000000000000000A000000FFFFFFFF16
000000090000000524000D0400000200
00000000000009000000000000000A00
0000FFFFFFFF15000000090000000524
000E0400000200000000


it's correct?

Re: Other plane cockpits in Allied Force

Posted: 2009-01-20 15:31:17
by Sherlock
The AF version was encrypted by Lead Pursuit and without the encryption "key" it cannot be decrypted back into a text file (where it could be edited in a text editor). That is the big problem for both encrypted files, bcockpit.dat and bpadlock.dat.

As to editing it in a hex editor, you can do that (reference my first post) but what are you trying to accomplish with your edit specifically?

Re: Other plane cockpits in Allied Force

Posted: 2009-01-20 23:19:51
by WaveyDave
If the cockpit.dat files are configured the same as the aircraft .dat files then the file isn't encrypted but is a binary file not a text file as in previous versions of Falcon.

I did actually start to decipher the aircraft .dat file. The way I went about this was to find an aircraft .dat file from a previous version of Falcon that preceded AF and compare that to the AF binary equivalent, looking for similarities. You can then start to build up an idea of what is going on.

I suggest doing something similar with the files you are trying to edit.

Regards
Dave

Re: Other plane cockpits in Allied Force

Posted: 2009-01-21 00:18:27
by Polak
I do not know if that may be of any help to brave and adventurous Hex Diggers but , each of binary files has the best hex per row width to view and edit. Here below is the list of such a widths for files found in X:\Program Files\Lead Pursuit\Battlefield Operations\Theaters\DesertStorm\objects:

Bytes per row to view the files and briefly what they contain at the 1st glance:
f4sndtbl.sfx 128 sound effects table
Falcon4.icd 20 ?
Falcon4.phd 28 ?
Falcon4.rcd 58 ?
Falcon4.rwd 22 ?
Falcon4.ssd 603 ?
Falcon4.vcd 176 names of planes are there
Falcon4.acd 52 ?
Falcon4.ct 81 ?
Falcon4.ddp 4 ?
Falcon4.fcd 60 names of terrain objects there
Falcon4.fed 32 ?
Falcon4.ocd 162 names of targets ?
Falcon4.pd 16 ?
Falcon4.swd 52 names of weapons
Falcon4.ucd 336 ?
Falcon4.wcd 120 names of weapons
Falcon4.wld 208 names of planes

Re: Other plane cockpits in Allied Force

Posted: 2009-01-21 01:47:00
by Echo300
WaveyDave wrote:If the cockpit.dat files are configured the same as the aircraft .dat files then the file isn't encrypted but is a binary file not a text file as in previous versions of Falcon.
I've talked to Aeyes about this. He says: "Re the F4:AF datfile, it is a normal datfile but works only in Binary format. For that it requires special tools and they are not made public by LP. Not much I can do about."

So, what you said is correct.

Re: Other plane cockpits in Allied Force

Posted: 2009-01-21 18:10:47
by Sherlock
Echo300 wrote:
WaveyDave wrote:If the cockpit.dat files are configured the same as the aircraft .dat files then the file isn't encrypted but is a binary file not a text file as in previous versions of Falcon.
I've talked to Aeyes about this. He says: "Re the F4:AF datfile, it is a normal datfile but works only in Binary format. For that it requires special tools and they are not made public by LP. Not much I can do about."

So, what you said is correct.
So we need a new utility (tool) to convert the file from binary back to text so we can edit / create a new one and then reconvert it back into the binary format that can be read by the FALCONAF.exe. Any brave programmers out there want to tackle this task? Please? :)

Re: Other plane cockpits in Allied Force

Posted: 2009-01-21 18:32:54
by 87th_striker
Is it worth it ? Since this is commercial software, and the customers are few, they would just change this with the next updates, and then your work will be in vain. They want to sell add-ons. They don't want you to make it yourself. Nothing wrong with that. It's just the way it is. (No pun intended in any exe direction)

Re: Other plane cockpits in Allied Force

Posted: 2009-01-21 19:32:06
by Echo300
I don't think there's any chance of add-ons to Allied Force. (More than a chance that there will be another title in the Battlefield Operations series.) From what Ed has said at Frugals, I doubt there will be any patches forthcoming, either. Besides, this stuff is fun!

Re: Other plane cockpits in Allied Force

Posted: 2010-01-18 23:00:18
by Sherlock
Note that a converter program has been created by Pegasus over at Viperpits. The converter will convert a AF binary dat cockpit file (bcockpit.dat and bpadlock.dat) to ASCII text so it can be edited. The converter will then convert back into binary format so the AF exe can read it.

See this thread: http://www.viperpits.org/smf/index.php? ... 2.msg78056

Re: Other plane cockpits in Allied Force

Posted: 2010-03-06 09:47:52
by Luk
Do we have some progress in it?
It looked, that file-codeing was the only problem for AF pit moders.

Is there any new cockpit/try (even in work stage)?

Thanks
Luk

Re: Other plane cockpits in Allied Force

Posted: 2010-03-06 21:31:06
by Sherlock
Luk wrote:Do we have some progress in it?
It looked, that file-codeing was the only problem for AF pit moders.

Is there any new cockpit/try (even in work stage)?

Thanks
Luk
Pegasus was on vacation and then had much work to accomplish for real life. He contacted me and told me when he gets caught up he will contact me and we can proceed on getting the bugs out of his bcockpit.dat / bpadlock.dat file converter program. Until then, I guess, we just continue to be patient.

Re: Other plane cockpits in Allied Force

Posted: 2010-03-07 14:58:04
by Luk
Ok, thanks for the info.
I did not know, there are some problems with new utility. But it is normal.

Luk

Re: Other plane cockpits in Allied Force

Posted: 2012-10-21 11:06:11
by XenonSurf
Hi Sherlock,

for a long time I've been trying to make any other cockpits work in AF, but had never the time to go very indepth (also because of missing tools). I have now all possible F4 related tools, from Seifert's editor, tacedit, F4Browse etc. etc. ...and of course a tons of possible cockpits just sitting on my HD waiting for usage, POSSIBLY IN F4AF :roll:

The vcd file you mention at the beginning of this post can easily be edited with UltraEdit or Hex Workshop, that's not the problem. After reading all this, the main question is:

What happens if you put some REAL cockpit files in the F22 folder after your edit of the vcd file ? Will the real thing - the F22 cockpit - show up in the 3d part of AF, as 2D or 3D cockpit ?
I will try it out, but I doubt this will work without further tweaks. I'm however going to try this route. The overall file architecture and codings must be very SIMILAR in FF and AF, unaware of some cheap encryptions, so a solution to make all sort of cockpits (at least non-clickable 3D cockpits) work in AF are possible for sure.

Thanks to comment on this one!

Cheers,
XenonS