Why use the .dat file…?

Original URL: http://simhq.net/forum/ubbthreads.php/ubb/printthread/Board/24/main/65242/type/thread.html

Archived from a private copy.

avatar
reaper20

What I mean is: what is the advantage of this method of handling the game data? Is this simply the end result of the game engine, or is it a security measure?

I don’t know squat about programming, but I do like to tweak my games. I spend more time playing about with textures, fm’s, mods and whatnot in my games than playing them.

In the absence of any other sort of editor, the abilty to go in and tweak stuff would have been nice. Will we ever be able to open the .dat file in such a way?

Am I chasing butterflies without a net?

avatar
Steve Hunt

Hi,

We first started using .dat files ’cos of disk space problems. Each file on your hard drive takes up a number of certain sized chuncks (called clusters) – so on a drive with 8k cluster size, each file size is in multiple of 8k’s. So a 10 byte file will still take up 8k of space. (These cluster sizes can go as high as 32k on big drives!)

Now with flight sim data you have a lot of small data files – if you have say 100 1k files and you have 32k cluster size then you’ve got 100k of data taking up 3.2Mb of disc space!

A .dat file gets round this prob (it’s just one file as far as a ths OS and HD is concerned)

Typhoon has 3000+ data files in it, so without a .dat file the install would probably double if not tripple in size!

A good test is to right click on say you windows dir and click on properties. You get two sizes, one is the total data (small one) and the other bytes used is the amount of space the data is using on your HD. On mine it’s 282mb vs 310mb (a loss of 28mb of space).

Pheeww … hope that helps!

avatar
Uroboros

Steve the .dat file in Typhoon is like 5 times the size fo the one in TAW. Am I correct in assuming it’s mostly due to the graphic; or is there a secret game in there you’re not telling us about?

avatar
Manteau
Uroboros

Steve the .dat file in Typhoon is like 5 times the size fo the one in TAW. Am I correct in assuming it’s mostly due to the graphic; or is there a secret game in there you’re not telling us about?

There seems to be an awful lot of other stuff in the Typhoon .dat file in relation to the TAW one.

It seems there is a lot of documentation in there with it – almost a whole CVS tree …

On the other hand, the reason for it being bigger, is probably due to the fact that Typhoon supports mipmapping, so you’d need different sizes for textures (unless you did it yourself in memory when loading the textures), the models are much more details, and the sounds are probably much more detailed.

avatar
Hitman IF

How big was Wargasm’s .dat. That also has the same 3Dream Engine so maybe that could give a hint on your idea Manteau

avatar
Manteau
Hitman IF

How big was Wargasm’s .dat. That also has the same 3Dream Engine so maybe that could give a hint on your idea Manteau

I think around 190 MB.

So it could be because of the 3Dream engine …

avatar
reaper20

Steve,

Thanks for the reply. Your explanation makes sense, however you did manage to avoid the last question: will we ever be able to open the dat file in a constuctive manner?

I think Typhoon has great potential that will only be realized if we gamers are able to go in, tweak things and share the results of our efforts.

Flight sims are notoriously poor selling games and I think the direction Typhoon has taken is smart marketing as hard core simmers are a very small market. However, a very small community of fans, given the tools to work with, is able to cause the larger masses to keep old games on thier hard drives a lot longer (and hopefully keep those games selling a lot longer).
How long it takes for a game, any game, to become obsolete seems to have far less to do with the game you took out of the box, but more to do with how much it will change in the future. I have personally purchased a number of older games based soley on the fan-base and quantity of mods and tweaks available. It’s hard to complain about some aspect of a game if it’s easy to change.

Getting back to my question, if we are unable to actually open the dat file (to make new skins, terrains etc.), will a future editor allow us to tweak things, i.e. like USAF’s DME?

avatar
Steve Hunt

We’re gonna open up the campaign side so you can remove the scripted story events and setup your own open ended campaign.

Changing skins and terrain would be a massive job, I doubt that’ll happen.

avatar
Manteau
Steve Hunt

We’re gonna open up the campaign side so you can remove the scripted story events and setup your own open ended campaign.

Changing skins and terrain would be a massive job, I doubt that’ll happen.

Perhaps you could drop a few hints as to how it’s constructed. E.g., perhaps whether it’s just a default binary file with the files mapped to filenames somehow, or whether it’s a compound file (which would be very nice) and then let us see if we could work it out from there.

Then we make the utilities that extract/change the skins/data, etc, and at the same time it is made very clear that a) you cannot guarentee (sp?) how the game will function after these changes, and b) they are completely unsupported.

That way you help the community, and much more interest is put into the game and you don’t have to spend loads of time doing anything.

I mean (I think I’m getting carried away here, but I’ll carry on regardless) you must have to compile to .dat from something, e.g. a directory of the files, so it can’t be THAT hard to do. Granted it won’t be user friendly, but we could always make a front end.

avatar
Steve Hunt

The .dat file is just one big sting of files. They aren’t compressed or encoded. (That’s why any english is still readable)

Problem is moding it – you can’t make more room for exta info without the origianl lose data and the build tool.

The simplest way round this is to forget the dat file and have some lose data outside that the game looks for (e.g. look in \MDL for a mission file first – if there isn’t one then look in the dat file – that’s what we did for TAW). This is how the open campaign will work.

avatar
Manteau

Thanks for the info Steve.

I apprieciate what you said about we wouldn’t be able to mod the file very easily in terms of changing textures, models etc. due to not having the original file to compile into the .dat, and the utility only being designed to compile to the .dat and not extract the files from it.

Are you saying that those files you sent us are in the .dat or are available in a directory somewhere?

If it’s in the .dat, then it would be possible to mod, but not completely, due to only being able to change one byte for another.

avatar
Steve Hunt

The files I sent are in the .dat – you should be able to find them with your Jedi Hex Editor …

I’m one step ahead of you though – the game checks that certain sensitive files haven’t been changed before it runs. So you could mod them but the game wouln’t run (this is also why you can’t change your saved game)

I will get rid of this though when I open you the campaign …

avatar
Manteau

LOL

Thanks.

Those files it checks for wouldn’t be the weapons parameters (sp?) files as well would it?

avatar
Steve Hunt

Nope …

avatar
Manteau

Just one last question Steve (then I’ll shut up):

Are the TAW .dat and the Typhoon .dat files constructed in the same way. I ask this because it would be easier to play around with the smaller TAW version than the huge Typhoon one. Or do they use different formats …

avatar
Steve Hunt

Ermm … think they’re the same …

Long time ago …

avatar
reaper20

Steve,

Thanks for all the great information and help you’re giving to the mod folks like Manteau!

I appreciate the presence of you and Marco on this board, not only for your help, but also because I get a more secure feeling about a games longevity when I see the designers taking a personal interest after release.

Opening up the campaign will give us all immediate gratification. Helping the mod makers will keep us coming back for a long time!

With rare exception I have never bought a sim I did’nt think was worth the $40 – $50 I paid. When compared to other forms of entertainment, that seems quite cheap in fact. I figure if I get 10 hours of fun, we’re even. Everything after that is goodness. I’m well into goodness with Typhoon now and I’m looking forward to alot more.

I look at Typhoon like a supermodel – a little more meat on the bones and we’ll have a dream date!

Thanks to everyone who is working to make Typhoon a great sim, and a great entertainment value!

avatar
anonymous

I agree with Reaper. Typhoon is a great game with the potential of living a long, long life if it is easily modified and extended.

I smell a classic!

Later.