Jump to content

TAW terrain format


Recommended Posts

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

No, there is no randomization process for bridge1.ssd. There are 2 separate entries in norway.dat, but one of them is never used.

My last hope was that we are using the wrong norway.ev file as there is a very similar norway.datx file in the same folder....but a comparison shows these files to be identical.

Link to comment
Share on other sites

Fine with me to delay the issue. We could quite easily 'fix' it by editing norway.ev or taking norway.trg into account, but probably it's probably better to see if it fixes itself as we uncover more.

It feels like we're getting to the point where it ís more efficient to change the TFX2 and TFX3 files to work with TFXplorer rather than the other way round.


Now I can confirm that those bridges are correct in-game.

Link to comment
Share on other sites

It feels like we're getting to the point where it ís more efficient to change the TFX2 and TFX3 files to work with TFXplorer rather than the other way round.
No. We have no / very little gameplay and physics at the moment, and we cannot foresee the effect of changes on those. Just keep on researching, we will find the the cause by accident whilst evaluating supershape speech opcodes eventually :)

Speaking of little or no gameplay: I should really really get my ass up and implement more of the opcodes you find, and bytecode, too. There is so much progress waiting to be made just because I'm having a hard time keeping up with coding … with the airport graph information you found, we could have an air traffic simulation up and running by now …

Link to comment
Share on other sites

I was looking at airbase.dat some weeks ago. I only got as far as parsing the file and placing the data in a structure to make it easier to deal.

Even that raised some questions

1. The airbase names don't quite match those given in each airbases's SSD file.

2. airbase.dat doesn't seem to define whether the parking spots are military or civilian. If you replace the Learjets in the Luxor takeoff mission with F14s, they will appear near the F22 and not where the Learjets were. So, how is this handled?

Anyway, this goes back on the list of things to do....

Link to comment
Share on other sites

The only place I've seen those exact airbase names is in the executable:

DGROUP:006648F0										 ; sub_408BB0+EFr

DGROUP:006648F0										 ; "ADEN_AIRBASE"

DGROUP:006648F4				 dd offset aAsyut_airbase ; "ASYUT_AIRBASE"

DGROUP:006648F8				 dd offset aAt_taif_airbas ; "AT_TAIF_AIRBASE"

DGROUP:006648FC				 dd offset aAdulaziz_airba ; "ADULAZIZ_AIRBASE"

DGROUP:00664900				 dd offset aDispersal    ; "DISPERSAL"

DGROUP:00664904				 dd offset aBarim_airbase ; "BARIM_AIRBASE"

DGROUP:00664908				 dd offset aDjibouti_airba ; "DJIBOUTI_AIRBASE"

DGROUP:0066490C				 dd offset aGeneric_1    ; "GENERIC_1"

DGROUP:00664910				 dd offset aGeneric_2    ; "GENERIC_2"

DGROUP:00664914				 dd offset aJeddold_airbas ; "JEDDOLD_AIRBASE"

DGROUP:00664918				 dd offset aKhamis_airbase ; "KHAMIS_AIRBASE"

DGROUP:0066491C				 dd offset aKhartoum_airba ; "KHARTOUM_AIRBASE"

DGROUP:00664920				 dd offset aLuxor_airbase ; "LUXOR_AIRBASE"

DGROUP:00664924				 dd offset aRiyadh_airbase ; "RIYADH_AIRBASE"

DGROUP:00664928				 dd offset aRiyadh_mil_air ; "RIYADH_MIL_AIRBASE"

DGROUP:0066492C				 dd offset unk_62C124

DGROUP:00664930				 dd offset aNone_3	   ; "NONE"

Link to comment
Share on other sites

OK, thanks.

A pity that this sort of thing is buried in the .exe. :(

It may be that the AIRBASE_NAME parameter in the SSD is never used.

I could try to replace the ASCII characters in the SSD file with zeroes to be sure, but I don't have time...so that's something for later and a new thread.

Link to comment
Share on other sites

Yay, those are all the airbases with their 'local' names, but each one will be an instance of one of the 15 types in DKD's list.

I was hoping that from the AI's point of view, that all the necessary information about an airbase could be gleaned from the SSD (for position in the world) and airbase.dat (for position on the base) to allow AI control of traffic.

My view is that enough info could be got from those files, but TAW has hard coded some of this information into the .exe, making adding a new airbase type awkward to say the least.

Link to comment
Share on other sites

Yep, "...awkward to say the least". I once thought the paddyair airbase.dat would be easy to do, not so.

I like the research behind K's list. The "UNKNOWN" Asaitia is a misnomer and should be Asiata which is a region located in north east Ethiopia. Thus far I could only locate Tendaho Airfield (ICAO code = HATO) and the satellite map is not much help <_<

Link to comment
Share on other sites

I don't know either, although I suspect it's not really random as I'd expect the terrain to look the same each time.

Why not try something? eg multipy the tile coordinates and modulo the result by the randomization number. Then use the result as the index of the variation. That would look quite random...

Link to comment
Share on other sites

Looking again at rendering TFX2 rendering order, and notice some values in the shape header that I don't think we've used.

I've had a look at a total of two tiles, airfld_1.ssd and early1.ssd....and only some of their shapes, but the highlighted big-endian numbers, in these cases at least, may be helpful. ie render in an order starting with the most positive...


fc001f40000000007fff00000000000007d00000000200030003 :terrain

fdd403e81f40000000007fff0000000003e80000000000020003 :airport concrete base

fc181770000000007fff00000000000000fa0000000200030003 :runway

ff830fa0000000007fff000000000000fe0c0000000200030003 :control tower


fc001f40000000007fff00000000000003e80000000200030003 :terrain base

fede3e80000000007fff00000000000000000000000200030003 :lights

ffe501f4000000007fff000000000000fe0c0000000200030003 :comms building

Has anybody else any idea what these numbers otherwise do? These numbers all occur in the same place in the shape header, although it may not look like that with the site formatting..

Link to comment
Share on other sites

Join the conversation

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

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.


  • Create New...