Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#4221744 - 01/26/16 02:41 PM Airfield.dat  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
This is some info out of Alatriste's Notes re- the "Airfield.dat" file:

DATA REGISTERS :

ADDRESS(H) ADDRESS(D) BYTES TYPE MEANING
========== ========== ===== ==== =======
000 000 4 long Orientation (see Table 1)

004 004 2 short Airfield type for active career year (used in career.sve) [Moggy]

006 006 2 short Aircraft type for active career year (idem) [Moggy]

008 008 8 unk EAW grid ref of actual airbase object (idem) [Moggy]

010 016 4 unk Numeric data – undeciphered (idem) [Moggy]

014 020 2 short 3dz model for 1940 (see Table 2)

016 022 2 short 3dz model for 1943

018 024 2 short 3dz model for 1944

01A 026 2 short 3dz model for 1945

01C 028 2 short Side & aircraft type for 1940 (see Table 3)

01E 030 2 short Side & aircraft type for 1943

020 032 2 short Side & aircraft type for 1944

022 034 2 short Side & aircraft type for 1945

024 036 4 long Target Code linking these data with targets, tardata and griddata.

028 040 2 short ALG data (subject to test, see Table 4)

02A 042 2 short Country (see Table 5)

Table 5 – Countries

Value Country
===== =======
0 Great Britain
1 Germany
2 France
3 Belgium
4 Holland

Note: ‘6’ was apparently reserved for Czekoslovakia, but not used.


Ray's new ETO set has Trieste as a base and target. He asked me to make a frontline so that a base reasonably close to Trieste could be in allied territory allowing Trieste to come under allied attack, or be used as a base for an axis attack on an allied base.

I did,using a special frontline in 1945 but the base was not available to allied aircraft.
Checking out the "Airfield.dat" file I edited the data for one of those bases, but still no success. My thoughts turned to the last two bytes of data, covered in table 5 above. Setting "Lechfeld" to 0 0 made it available to allied planes. Switching the year, and therefore the frontline put Lechfeld in Axis territory. According to Alatriste the 0 0 values make it Great Britain, but it was now available to to Axis planes.
This prompted me to make all the airfields 0 0. It seems that this sets the nationality based on the frontline, and is not a country code at all.

Screenies:
Lechfeld to be selected as an allied base in 1945 replacing Neuberg



As an axis base in 1943:





wink

Last edited by MrJelly; 01/26/16 03:02 PM.

Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
Inline advert (2nd and 3rd post)

#4221746 - 01/26/16 02:51 PM Re: Airfield.dat [Re: MrJelly]  
Joined: Feb 2006
Posts: 4,859
Rotton50 Offline
3DZ / campaign designer
Rotton50  Offline
3DZ / campaign designer
Senior Member

Joined: Feb 2006
Posts: 4,859
Cape Charles, Virginia, USA
Funny this didn't come up with SPAW.

I have a place where there are airfields literally a couple of miles apart, north and south, that are held by opposing forces. When the front line moves further north the airfield on the north side switches sides without any difficulty.

Maybe I just got lucky.


Heck, even paranoids have enemies.
#4221756 - 01/26/16 03:05 PM Re: Airfield.dat [Re: Rotton50]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
I do not think we have paid much attention to those last two bytes wink


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4221762 - 01/26/16 03:13 PM Re: Airfield.dat [Re: MrJelly]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
Something you might notice on the parameter screens. At some point in the 1.28 development the use mission year text in "Dnames.str" was discontinued in favour of a system where numeric data was read from other files.
I made two exes today that went back to the use of text in "Dnames.str" and used an edited "Dnames.str" file smile


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4222342 - 01/28/16 12:33 AM Re: Airfield.dat [Re: MrJelly]  
Joined: Dec 2015
Posts: 602
FsFOOT Offline
Member
FsFOOT  Offline
Member

Joined: Dec 2015
Posts: 602
Very interesting.

The (old) use of those bytes has been known since back in the day, for coding sides as you note.

Still I'm not totally conviced this will work on the old exe series and was not changed by additions to the game such as the "capitol sides" data file, etc you came up with later.
Maybe a few experiments might be in order?


*I'm an old EAWer - a lurker now for many years, but I still modify / play / program the game offline.


✅ Roy's EAW Addons â“EAW HS ⛽ EAW Tally-Ho
♉ Wine 🜠Steam ⭕ GoG
#4222348 - 01/28/16 01:20 AM Re: Airfield.dat [Re: MrJelly]  
Joined: Feb 2006
Posts: 4,859
Rotton50 Offline
3DZ / campaign designer
Rotton50  Offline
3DZ / campaign designer
Senior Member

Joined: Feb 2006
Posts: 4,859
Cape Charles, Virginia, USA
Eh,

NOW you show up? biggrin

Actually sounds like you've got a good understanding of what's under the hood of the game.

If I might ask, when you say you modify and program the game what do you mean?


Heck, even paranoids have enemies.
#4222367 - 01/28/16 02:25 AM Re: Airfield.dat [Re: MrJelly]  
Joined: Dec 2015
Posts: 602
FsFOOT Offline
Member
FsFOOT  Offline
Member

Joined: Dec 2015
Posts: 602
I didn't just show up, I lurk without login mostly and frequently was away for years at a time.
You guys know me (No I'm not from Holland and I'm not with any recent developers)
I'm just not using my old handle anymore for privacy reasons, and not ready to discuss much personal in an open forum.

Yes I do have a lot of time under the hood but not so much the newest stuff.

I have knowledge of making scenarios, terrains, addons.
and have made programs that can modify EAW data.

I don't have code later than about experimental 1.3 / 1.29f stuff, since MrJelly basically maintains his own source, and EAW has no dedicated code repository like github etc. (the code is not open source).

My progamming skills and time are limited so I'm certainly not going to be a panacea for unsolved issues in the code, sorry.

And I don't like following "rolling release" or unstable models much. I'm more of a "stable' release guy.

My interest has come back recently since I have hopes that MrJelly and the rest of you might make reissues of old exe series with bug fixes from the later discoveries and upgrades and scenarios for 1.2 1.28 1.28c 1.28E like you are doing.
My current interests are as said - based on the 1.2 1.28 series particulary 1.28E based.

My other interests are Linux and I have a EAW 1.28E almost running on Wine 1.62 Linux Kernal 3.16 Debian 8 Jessie. It ran instant mission for few minutes but I don't have the proprietary ATI driver installed, and some other needed stuff. too much to tell here but it should work soon will post details at some point I'm not a linux guru but fairly sure I will have be working soon)


Back on the topic I have a few questions:

Do you have any recent programs for editing airfields.dat?

Isn't there a setting to make any base have available all aircraft from the airfield? the bits I think would correspond to 512 from what I recall?
That issue has stopped me from making some scenarios since its a PITA to have aircraft that won't use all the bases,

This would be most convenient for some scenarios although it may be undesirable for various reasons in a campaign or default file.

I could have wrote a program to do the bit-switching editing but never got around to it.
As you know EAW so have many little files and changes it can be discouraging to make a new project even out of an old one.

Also I forgot what changes were made to the file post 1.2 can you guys recap?


✅ Roy's EAW Addons â“EAW HS ⛽ EAW Tally-Ho
♉ Wine 🜠Steam ⭕ GoG
#4222439 - 01/28/16 07:53 AM Re: Airfield.dat [Re: MrJelly]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
Quote:

Isn't there a setting to make any base have available all aircraft from the airfield? the bits I think would correspond to 512 from what I recall?


Hi- and good to hear from you

That is what I tried first up with Lechfeld. According to Alatriste the two bytes you refer to are either 1 0 (256) or 2 0 (512), but he did not know the difference. When neither seemed to allow an allied plane using Lechfeld I started looking at the last two bytes.

There is a whole lot of documentation re- the changes. Some is at MarkEAW's site, but I may have a pack elsewhere with most of the things in it.

wink


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4222441 - 01/28/16 08:05 AM Re: Airfield.dat [Re: MrJelly]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
Ray:
To save me from having to look here there and everywhere can you please give me an airfield (or more than one) with a freighter so I can check it and find the cause.

wink


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4222452 - 01/28/16 09:48 AM Re: Airfield.dat [Re: MrJelly]  
Joined: Feb 2006
Posts: 4,859
Rotton50 Offline
3DZ / campaign designer
Rotton50  Offline
3DZ / campaign designer
Senior Member

Joined: Feb 2006
Posts: 4,859
Cape Charles, Virginia, USA
Sorry, I didn't think to look at the airfield name.

I just went in to run the same plane but it was assigned to a different airfield. No freighter but there is a very oversized ground model of a Ju87 on the field.

As I test the loadouts I'll look for more of these anomalies and keep a list.


Heck, even paranoids have enemies.
#4222465 - 01/28/16 11:13 AM Re: Airfield.dat [Re: MrJelly]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
When you find a problem then let me know the location so I can investigate.
I have just fixed a problem with the carriers by editing TMod203.dat to give SmokeOffsetX=0. This stops the windmill code routine continually shifting the TMod.
If a TMod has no smoke, but a SmokeOffsetX > 0 (which superficially makes no sense if there in no smoke) then its X position increases by the value of SmokeOffsetX. It was really useful when I needed to line up the windmill tower and the rotating sails.
I am using your TMod203 as the FAA carrier and not 74.

wink


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4222489 - 01/28/16 01:33 PM Re: Airfield.dat [Re: MrJelly]  
Joined: Aug 2000
Posts: 7,428
Moggy Offline
EAW Old Timer and Bodger
Moggy  Offline
EAW Old Timer and Bodger
Hotshot

Joined: Aug 2000
Posts: 7,428
A slit trench at RAF Gravesend
As far as I recall those last two bytes simply read up the country name from the string file, they didn't actually change anything.

#4222564 - 01/28/16 03:41 PM Re: Airfield.dat [Re: MrJelly]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
Well they do, and hence the thread smile

Editing Lechfeld

I switched the byte in col 43 from zero to 1 and saved the file:


Selecting a target to locate Lechfeld:

Selecting a base and Lechfeld is not available:



I re-set it back to zero and saved the file:

Lechfeld is available again as a base:


smile


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4222680 - 01/28/16 09:29 PM Re: Airfield.dat [Re: MrJelly]  
Joined: Aug 2000
Posts: 7,428
Moggy Offline
EAW Old Timer and Bodger
Moggy  Offline
EAW Old Timer and Bodger
Hotshot

Joined: Aug 2000
Posts: 7,428
A slit trench at RAF Gravesend
Well of course I am out of the loop regards recent developments. But way back when I was making EAW worlds, getting previously axis bases to operate as allied was a problem.

POPrune it was who originally cracked the last two bytes in each record in airfield.dat - on my old tech page I said: Bytes 42 and 43 were cracked by Pilot Officer Prune, and relate to the nationality string in the text file "briefing.str". The data is with one exception either 00, 01, 02, 03, or 04, which relates to British, French, German, Belgian, and Durch bases. The single 06 seems to have been intended to relate to Czechoslovakia, but there is no text string for that value.

I tried to use this feature of airfields.dat to change nationality of bases - principally to make axis bases work as allied, but it never worked. Perhaps because very few of those were near the frontline?

What did work was using bytes 41 and 42. My old tech page says this: Bytes 40 and 41 are not yet fully understood. Alatriste (see his notes) believes they relate to the airbases designated as Advance Landing Grounds (ALGs). The only empirical knowledge I can add to this is that by changing often null values here to "02 09" I was able to take airfields previously located in Germany, or occupied countries and dedicated to the German side, move them to France and have them used by the Allies.

#4222977 - 01/29/16 03:28 PM Re: Airfield.dat [Re: MrJelly]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
These are not recent developments wink
AFAIK ther have been no changes to the "airfield.dat" file structure, or to the way that the eaw.exe handles the data in it since 1.2 or maybe even before.
I will have a look at the source code to see which routines that use these last two bytes smile


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4222982 - 01/29/16 03:33 PM Re: Airfield.dat [Re: MrJelly]  
Joined: Feb 2006
Posts: 4,859
Rotton50 Offline
3DZ / campaign designer
Rotton50  Offline
3DZ / campaign designer
Senior Member

Joined: Feb 2006
Posts: 4,859
Cape Charles, Virginia, USA
Except maybe the addition of the carrier?

Or was that only in runways.dat?


Heck, even paranoids have enemies.
#4224695 - 02/03/16 01:38 AM Re: Airfield.dat [Re: MrJelly]  
Joined: Dec 2015
Posts: 602
FsFOOT Offline
Member
FsFOOT  Offline
Member

Joined: Dec 2015
Posts: 602
Yes there was a change in airfields.dat file according to these notes:
http://www.sandbagger.uk.com/RafRoy/EAW1.28C-b-a-Editing.zip

Quote:

runways.dat
To make the use of 32 airfield runway types
is now possible to use the new airfields you need to use the newer runways.dat

and to have additonal runways displayed in game you would need to add airfld.3dz files for the runways you make

runways.dat changes:

The runwways.dat differences are mainly the addition of a 'shadow record' in the first entry of runways.dat to use for carriers, and then the addition of some 28 records at the end of the noraml default records.

to compare the 1.2 default to the new I make some pics available;

this pic shows the first record and the new header pointer which is 20h instead 0Bh meaing there are now 20h (32 in decimal) records in the file instead of 0Bh (11 decimal)

i this example the 1.28B ruways.dat on left compared to the 1.2 default on the right

the second shows the end of the file, on the right the old 1.2 default end of record and left with hexeditor highlighting the last byte in the new file where the old data last byte occurs

to use the new and combine with an old runways.dat you have customed you can see what you would need to add with a hex editor, use the new first record and header and then at the end tack on all the extra bytes of data
or simply paste your current data into the new in the proper area

Take note that this is only the 1.28b release runways.dat shown here, later ones, or those used by customized campaigns like SPAW, etc. may differ in the data


--
1.28a and on
Again not all changes recorded here yet 1/2010

in additon to the runways.dat described above..

1.28a and (by inheritence later .exes that may use the same data.cdf conating the .dats) have change to the targets.dat, tardata.dat, griddata.dat and airfield.dat files

The main change is due to the editing of Mr Jelly who added an extra base to targets.dat and airfield record to airfiled.dat as well as corresponding griddata changes, and a change of tardata.dat record locations pointed to from targets.dat

I only realized this recently so am only noting it now

The only part I document here is only the changes to targets.dat records pointers -
is found out by using my 2datscheck.exe program, which scans a targets.dat and airfield.dat file and makes a text file record output for the data from the 2 files to compare.
the comparison of the targets.dat and pointers in 1.28a (1.28b shown but the changes started in 1.28a and later) vs those of the 1.28 which had no such changes but adhered to the default 1.2 schema are shown in my pics here.

on the left in the pictures you see the 1.28b data and on right the 1.28 standard data

(My program uses a zero based offset to show here meaning the records start from 0 a 1 based offset shown in parenthesis() )
Except for the pointers to tardata.dat are different all is same until:
The first change you notice is at record #120 (121) things have changed, some records shifted around, so be aware of it
--




--
next you see major change at record #127 (128) a base was added with a new Acode
--
(2 more pics not shown here)
--
the effects of this are:
- a new base record which means the total number of bases is increased by 1 and so the targets.dat contains an extra record

- all bases afterwards are shifted in the records by increase of 1

- a new airfield.dat record and thus the airfield. dat since 1.28a has an extra record in it



- This makes it a inconvent for modders to try to use old data with the new, If you use my old tools or old documents you have to take the changes and data shift into account

- Also it means if you use a scenario / mission / campaign you cannot mix and match files
you would need targets.dat, tardata.dat, airfield.dat, griddata.dat all matching or you will get errors, ctds

- The possible effects on campaigns is unknown at this time


What I have found is that you can use an older scenario set of files that doesn't contain the extra airbase (provided you have made all other appropriate scenario file changes) with 1.28E etc

You would just be short the extra airbase / carrier.

Not an ideal way to do it, but in general with EAW if the base is not "called" the exe doesn't care about whether its data is there or not.
That might shift some things around though (- all bases afterwards are shifted in the records by increase decrease of 1) so it would be best not to.

If you notice things are a bit odd with bases expected shifting ~ having the wrong name, etc ~ when you try using some older files then suspect here and check the filesize and pointers and so forth.

---
Warning - just to not confuse the newbies: most 1.2 scenarios won't work in later .exes without redoing by an expert!


✅ Roy's EAW Addons â“EAW HS ⛽ EAW Tally-Ho
♉ Wine 🜠Steam ⭕ GoG
#4224749 - 02/03/16 07:46 AM Re: Airfield.dat [Re: MrJelly]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
To clarify I must stress that there has been no change in the "airfield.dat" data structure, or to the way in which the eaw.exe uses that data since 1.2 or possibly even before.

There have been changes to files. "Runways.dat" has additional runways.
The default "targets.dat", "tardata.dat", "Griddata.dat" and "airfield.dat" had the Allied Carrier added as a target and airfield in 1.28c.
These files were added to the 1.28c "Data.CDF" when 1.28c was released.

Most old scenarios work in 1.28c, especially the ones such as DAW that have their own tilemaps, "targets.dat", "tardata.dat", "griddata.dat" and "airfield.dat" files.
The ones that need the 1.28 default files work fine if these files are put in the theatre folder, or in the root folder.

There are several versions of these old theatres available for 1.28c, 1.28e/f, 1.29 and 1.40 available. Moggy is currently working on a few more for 1.28c.

wink Jel


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4224794 - 02/03/16 11:44 AM Re: Airfield.dat [Re: MrJelly]  
Joined: Aug 2000
Posts: 7,428
Moggy Offline
EAW Old Timer and Bodger
Moggy  Offline
EAW Old Timer and Bodger
Hotshot

Joined: Aug 2000
Posts: 7,428
A slit trench at RAF Gravesend
Jel is I think right. Most old scenarios will basically work in exes up to 128C. For example I have DOM's AITW functioning fine in Jel's new 128C-2016 DSP setup.


Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Headphones
by RossUK. 04/24/24 03:48 PM
Skymaster down.
by Mr_Blastman. 04/24/24 03:28 PM
The Old Breed and the Costs of War
by wormfood. 04/24/24 01:39 PM
Actors portraying British Prime Ministers
by Tarnsman. 04/24/24 01:11 AM
Roy Cross is 100 Years Old
by F4UDash4. 04/23/24 11:22 AM
Actors portraying US Presidents
by PanzerMeyer. 04/19/24 12:19 PM
Dickey Betts was 80
by Rick_Rawlings. 04/19/24 01:11 AM
Exodus
by RedOneAlpha. 04/18/24 05:46 PM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0