RAF_Roy's
 
Creating OAW - type EAW Missions - Page 1 - ver.2 republished 4/2007

Tutorial for anyone wishing to compose a complete OAW - type mission for EAW.



(This type is the easiest to make, and can be used offline and online, even without any other OAW files.
However; for online use the OAWrp's Flight Model would still needed to enable the U.S. Planes -especially Bombers- to take off from mainland European bases instead of the UK.)



For reference, documents from my site are useful including:
RAFRoysEAWEditingOverview.pdf (RAF_Roys brief summary of Mission editing files - ver. 2)

RAFRoysFrontlineHowTo (RAF_Roys Frontlines and X,Y editing notes - republished)

Also although I don't cover griddata.dat placement in this tutorial you would also need to understand how to code a griddata with Tcodes to get objects to appear in the EAW world correctly.I have a document roughly illustrating grid coverage:
RAFRoysEAWgridexplained.pdf (RAF_Roys EAW Griddata Grid Explained - v1.0)
The other relevent notes about that and more coding are found in Dom's Notes,Charles Gunst notes,P.O.Prunes notes as well as Moggy's notes.



~ Understanding the needed Files ~

As shown in Table 1 there are only 5 files needed for such missions:
Data File Name Edited for use in OAWMission1? EAW Data Use Function
Frntline.dat Yes Sets the Allied/Axis frontlines
Targets.dat Yes Actives the Targets or deactivates them; Sets entire Target locations; Assigns address pointers to Tardata for EAW to find the individual object records
Tardata.dat Yes Encodes specific target data and Target codes
Airfield.dat Yes Codes airfields as active or not; also some location info & cross checks
Griddata.dat Yes Codes special location information; sets appearance of Targets on Map

Getting the Tools :

The EAW World coordinates X, Y can be grasped somewhat by RAFRoysFrontlineHowTo and I will show you the practical issues needed anyway as we go.Don't worry if "what it all means" is confusing at first.

You will also need the EAWK3wdb.html document.

Editing the Frontline is almost next, so download:
DOM's EAW WORLD MAP NOTES N UTILITIES.ZIP
This is also needed because the essential tools called Vertcon and Convert for locating the proper Griddata coordinates come with it.And Dom's HillGmap.jpg - a picture of the EAW World, in conjunction with ABTGList.rtf - a list of EAW bases, comes in handy for finding the EAW base locations in the 640 x 320 grid.

You will need a hex editor, any will do, but I use and recommend XVI32 and also since I have a page about using it you can take quick look at XVI32notes.html.

Additionally for tutorial purpose I will show how to locate the EAW World coordinates from scratch, and be using my EAW World Browser

---------
Getting Started
First starting with a briefing of the EAW World grid:

If you look at the RAFRoysFrontlineHowTo and the HillGmap.jpg or EAW World Browser you'll get an idea of this.The grid is broken up into 640 x 320.What might not be obvious is as far as the data files of EAW is concerned it is all coded as hexidecimal coordinates and in the form; xx,xx,xx,xx and yy,yy,yy,yy.

Open the EAWK3wdb.html and look at a base.The data for x , y is listed.For example, Berlin :


The Berlin data shown starting at the x , y address.The data is in the hexidecimal coordinate format used by EAW.This is what you will also see if you look in the targets.dat.Shown on the far right is the location reference using a conventional 640 x 320 decimal grid.That is; Column 589 , Line 80.

Shown below is Berlin data seen with the ABTGList.rtf and HillGmap.jpg opened.

Note; Berlin is listed as #21 strictly for reference - it is not an EAW data entry.

Now look to the Targets.dat with XVI32 hex editor at Berlin's data;
(jump 9280 after the 4 header bytes)

As you see highlighted in red is the coded EAW address - Berlin's data starts there at the cursor.

An examination with the EAW World Browser is seen below:

This is the very upper right quadrant of the EAW map.
Berlin is the large gray area beginning at the specified coordinates and covering a very large area.Note the large 07 which appears at Column 608.

At this point if you are asking yourself; how does one convert the Decimal reference for X , Y to the Hexidecimal form used by EAW data files? - You are thinking well! ;)
This is mostly easily achieved using Dominique LeGrand's Vertcon program.

An example of the reverse, that is; converting hexidecimal to decimal using Convert is illuminated well in my RAFRoysFrontlineHowTo document.

But in this case the opposite is called for - I'll show this, and at the same time, using the EAW World Browser - you will easily understand how to pick a location where no base was formerly present and gather the needed data for coding the EAW files, as follows:

~ But first, a quick digression to creating a Frontline is in order ~
Taking the OAWM1 frntline.dat and making a slight adjustment will suffice, as follows:

Shown below; Altering OAWM1 frntline.dat with Dom's Frontline Generator

Here you can see I've altered the frntline.dat at point 7 to reach Column 576 and Line 80 then at point 8 to Column 592 and Line 64 after which it proceeds along Column 592 to Line 32 and then Line 20 - which is close enough to the edge of the map to complete the frontline.This will give room for the Allied side close to Berlin for the placement of an entirely new base which I will show you next.
At right you can see data from Alatriste's program as seen in the RAFRoysFrontlineHowTo document.

~ Now back to the Coordinate issue ~

Open Vertcon and enter for the Line : 65 then press enter and for Column: 580 and enter.

Vertcon returns the x , y conversion data and a whole lot more.

Most important is to record the Griddata.dat information.Griddata placement is one area that can get very sticky, as often a needed data address is already occupied.Having the provided alternatives is usually necessary.Fortunately, Dom is a brilliant man who thought of this when he created the program ;)

~ Finding a Base to move, Targets.dat and the relation to Griddata ~

There are a few important issues to consider in this.One of which is not apparent until your know a key issue; that being the sequencing of base coding in the Griddata.

First we open OAWM1 Griddata.dat and..

..what the?..
This is the OAWM1 Griddata.dat at the primary address jump 1568.

Yes, it s supposed to be "zeroed" as for the Mission I removed all default EAW bases from appearing except the @ 50+ found in the scenario.I just wanted to show you this, so you would be aware of it.

Now opening a default Griddata.dat we see the data.

The cursor at 1568 (note; there is no header in Griddata.dat) highlights the number 02.This means there are 2 bases present.In the bytes to the right we see 22 01.

Looking in Dom's (converted) EAWK3wdb.html you will find that this is the "Target code" (T-code) for Berlin.
What this data means is there are 2 bases coded; beginning with T-code 22 01.So the other base that would show up in the EAW World is?.. .. 2301 the T-code for Orianenburg.

The number sceme is clarified when you convert to hexidecimal.
22 01 is really "spelling" 0122 which is 290 in decimal.Since there are 302 bases in EAW you will find the higher numbered T-codes in this format. - The majority of EAW bases have T-codes of only one set of numbers between 0 and 256. -

Shown: Brussels in Griddata

As you can see, a single T-code occupies the 5th byte from the address.

Now back to the matter at hand:
If you wanted to add a base at the EAW World location you basically have one of 3 options:


1 - You could move the base(s) data already present there to another Griddata location.

2 - You choose one the alternative (and hopefully empty) data locations as provided by Vertcon.

3 - You could add a base at the 1568 address in Griddata.dat - But only if it is numerically sequenced to the present base(s) T-code(s).

What does that mean?

For example; you could add Juterborg whch has a T-code of 2401 since it follows in sequence.Or Tutow which has a T-code of 2101.Then you would change the number at the beginning of the address to 03 to indicate that here are 3 bases now to be sought at the EAW World location.
In the case of Tutow since the T-code of 2101 is previous in numerical sequence to 2201 you would replace 2201 with 2101.
EAW expects to count the T-codes occuring at Griddata address locations in numerically increasing order.

Here's an example of "type 3" Griddata alteration

I've altered the number of bases to 03 and at the right you can see it starts with Tutow's T-code of 2101.
So the bases now coded here would be Tutow; T-code of 2101, Berlin; T-code of 2201, Orianenburg; T-code of 2301.

I'm not satisfied, as I am looking to code an allied base.I'll change it back and show another method.

This is very convenient - the address 1576 just after is available

First I have to pick a suitable base.

Hmm.. in light of the length of this tutorial, it will be continued on Page 2..
Dec. 13, 2003

more