Hi Moggy,I am very nearly done with the various promised mods(all of them! )and to keep from suffering a "burnout" I have been playing with various other mods and ideas(see my Frugals and SimHQ recent posts)all the while I have been gathering the multitude of editing programs and attempting to teach myself how to use them......now the questions...though I have read the "sparse" and "vague" read-me's,and searched the forums,I have NOT found much of relevance to "how to create a new map/world for EAW"...truthfully I find that knowledge of editing 3dz's to be tenfold "out there" vs. terrain editing/map-making...since you are the "pre-eminent" EAW editor,and obviously the most experienced with this facet of EAW...could you please help dispel some of the "darkness" surrounding this particular area of EAW editing?knowing full-well that you have a LOT on your plate right now,and I've NO wish to slow your progress,however you are the most logical person to ask in these regards...okay,so I have TK's terrain editor(SFP1)and the giant topo map that fng2k directed me too as well,Also I have Woolfmans terrain editor up and runningl,I have an excellent set of terrain tiles for the "future" map as well...I am very comfortable with hex-editing now too...sooooo,how do I turn this giant topo map into a finished EAW "world"...I am attempting to create a Vietnam mod for EAW,and in addition to the topo map I have many military and civilian maps of Vietnam...being in such close proximity to Korea,I also wonder if a "dual-use" map/world is possible...could help boost the KAW cause,which I wanted to be a part of anyway...so,there you have it 1)how does one create a world for EAW. and 2)would said world be useable for both KAW and VAW based on the stock EAW mapsize? I have MANY more questions,but I figure the answers from these two will keep me busy quite a while...thanks for taking the time to answer these! S!...Shreck
BTW,third question would any of the existing maps/worlds out there be useful for this?i.e. China or Gurneys ANZAC?
Well, I have done a lot of world making, though precious little of it has been released. The middle east world is very near beta. The pacific world is only available for testing here, as is the China world.
I'll get down to details later, but first you have to realise that making worlds is a very long and sometimes tedious business. I haven't used some of the editing tools available, and od most by hand still, so it may be some of the creations of Mr. Jelly etc would help a great deal.
I expect you know the basics:
(1) Make a new basic bitmap using Woolfman's map maker. This will give you a basic shape for land, rivers, forest and mountain, and put down your basic town/city layout
(2) Use a terrain editor to get your coasts and rivers straight. No better than woolfmans
Thanks Like I said,"the answers from these two will keep me busy quite a while"...and your answers...will do just that!!! Thanks a million(pounds? LOL) S!.....Shreck
Hmmm,maybe longer than expected as....I cannot find a copy of Woolfmans map maker...or,is the terrain editor from Woolfman the prog of which you speak?If there is a seperate map making tool,I cannot find it,could you mail a copy?or perhaps put it up on your ftp server?......whew! Thanks again! S!...Shreck
Okay Schreckie - I can make Woolfman's map maker available here. What this does is convert a simple bitmap into an EAW tm file. You can do this by manual editing (Prune's notes have full instructions on how to move between bitmap and EAW-TM format) but Woolfman's mapmaker gives you a good start which you spen a long time refining.
First you need a simple physical map of your theatre which is the right size and shape for an EAW world. That means it has to be about 1125 x 750 miles.
Wait! You say - shouldn't that be 1500 x 750 - a 2:1 ratio?
In fact no. The EAW-TM is a 2:1 file, but the map it depicts is a distortion of a 1.5:1 file. Here is a direct translation of the default EAW world from TM to bitmap:
The elongation is clear.
So you have to start with a 1.5:1 rectangular map of an area approximately 1125x750 miles. If you start with a simple physical terrain map it is easy to make from this a bitmap with very few colours to depict sea, rivers, open country, forests, mountains, towns and cities as required by Woolfman's map maker.
Once you have your basic bitmap and its equivalent TM file there are two possible ways to go. You can either use a terrain editor such as Woolfman's, or Prune's system to edit the TM in detail, or you could do what I did for the Middle east world, and continue to use multicolours in the bitmap and only use the terrain editors for very fine detail and correcting final errors.
If you continue to work with the bitmap as I did most recently, you take advantage of the fact that you can make each tile in the EAW terrain tile list take a colour in the 256 colour bitmap pallette. If you want to try this I can let you have the tools I used. But first you need to be fully familiar with moving between bitmap and TM formats.
(Prune's notes have full instructions on how to move between bitmap and EAW-TM format)
Ahh,another rub!,P.O.Prunes has been gone for a while,could you make his notes available as well?or are you knowledgeable on a source to obtain them?sorry to be a "Yankee PITA" but you are certainly "shedding light" on an otherwise dark area S!...Shreck
DOM's original notes and Prunes terrain editing notes are a primer for this sort of thing. I can send then later when I get back. I might find some way to put them up here or on RAF Chattenden as a fixed reference.
Because a 256-colour bitmap has a similar structure to EAW.tm , a suitable bitmap can be used as the basis for an EAW tile layout. This will not prevent the need to edit tiles, but it will ensure that you get your basic geography sorted out right from the beginning.
One odd thing to note is that the bitmap is “upside down”. If you convert a .tm file to a bitmap and then open the bitmap, you will see that the geography is inverted. It is then easier to edit as a bitmap if you invert it into the correct position first. Don’t forget to re-invert it again before converting to a different file type!
Converting a .tm file to a bitmap
1.Using your hex editor, open the included file EAW.bmp
2.Select the first 1078 bytes (hex: 436 bytes, ie. bytes h000 to h435) and copy them to the clipboard.
3.Close the file, but not the editor.
4.Using the hex editor, open EAW.tm.
5.Paste in the saved bytes at the very beginning.
6.Save it as [whatever].bmp
The file should now open in any decent graphics program. Apply the palette tileplan.pal (PSP7 version) or tileplan.act (Adobe Photoshop version) to see (and edit) it in colours which reflect the types of tiles in use.
Converting a bitmap to a .tm file
Even easier. Just use your hex editor to remove the first 1078 bytes (in hex, bytes 0 to h435 inclusive) of the bitmap.
EDITING NOTES ON EAW TERRAIN AND AIRFIELD/GROUND TARGET FILES
September 20th, 2000
Dominique "DOM" Legrand
Table of contents :
A) Introduction
B) EAW.TM
C) EAW16.HM
D) Targets.dat
E) Airfield.dat
F) Tardata.dat
G) Griddata.dat
H) XY coordinates and the 640x320 tiles matrix
I) Files provided in this ZIP
J) Creating a new theater - a practical approach
A) *************** INTRODUCTION ***********************
The landscape in EAW is controlled, at least in part, by two files contained in DATA.CDF : EAW.TM and EAW16.HM. While EAW.TM codes for the sequence of the 640x320 (204800) tiles that constitute the EAW landscape, EAW16.HM codes for the height of these tiles.
A tile represents a surface of 16.8 Km2 (4.1x4.1 Km). Therefore, the whole EAW map covers an area of about 2600x1300 Km (1500 x 750 miles).
The nature and location of airbases/ground targets are controlled, at least in part, by four files : Targets.dat, Airfield.dat, Griddata.dat and Tardata.dat.
- Targets.dat contains a complete list of the 302 targets/airbases (162 airbases and 140 static ground targets) with corresponding XY coordinates.
- Tardata.dat also contains the list of the 302 targets/airbases but with extensive infos on the composition of the targets.
- Airfield.dat contains infos about the nature and orientation of the 162 airfields.
- Griddata.dat manages the appearance of airbases and ground targets on the map. In other terms, it says to the program which targets will be displayed in a certain area. In fact, Griddata.dat looks like a "picture" of the 640x320 tiles matrix but in the 40x20 format.
B) ********************** EAW.TM ***********************
EAW.TM contains 204800 bytes which correspond to the 204800 tiles of the EAW landscape. As a matter of fact, every tile is coded by only one byte.
The EAW.TM bytes form a 640x320 matrix.
Bytes 00d to 639d correspond to the Northern upper row of tiles, from west to east. Bytes 640d to 1279d correspond to the row of tiles just below, also from west to east, and so on ...
There are 68 different terrain tiles provided in the PicPac utility (BN*.PCX files which can be transformed into BN*.TER (low altitude) and LR*.TER (high altitude)) but only 59 of them are used by the program.
Every tile is coded by four values corresponding to four different orientations (north, east, south and west). All these values range from 00 to FA. Values CB, CC, CD, CE ,CF, DB, DC, DD, DE, DF, EB, EC, ED, EE, EF, FB, FC, FD, FE and FF are not used. Changing an existing value with any of these values displays a black tile on the terrain.
The different values are listed thereafter :
Codes defining the nature and orientation of tiles in EAW
Orientation of the upper side of tiles
Tiles North East South West
(BN*.PCX files in PicPac)
Cities
BNALCTY 0A 4A 8A CA
BNALCTY2 0B 4B 8B CB
BNALCTY3 0C 4C 8C CC
BNALCTY4 0D 4D 8D CD
BNALCTY5 2A 6A AA EA
BNALCTY6* - - - -
BNALCTY7 30 70 B0 F0
BNALCTY8 31 71 B1 F1
BNALCTY9 2E 6E AE EE
C) *************** EAW16.HM ***********************
EAW16.HM codes for the height of tiles (more precisely, the upper left corner (node) of tiles) in EAW. The structure is very similar to the one of EAW.TM. However, the data for every tile are coded by two bytes whose values range from 00h 00h (sea level) to FFh FFh (higher altitude, about 5000 meters).
EAW16.HM is 409600 bytes long and is organized as a 1280x320 matrix.
Bytes 00d to 1279d correspond to the Northern row of tiles, from west to east. Bytes 1280d to 2559d correspond to the row of tiles just below, also from west to east, and so on ...
00 00 00 00 9A C2 18 FE 9C 6E B3 E7 DE 22 00 00
76 3D 14 00 61 00 41 0B 8D 04 00 00 82 00 00 00
Structure of a chunk :
Bytes 0d & 1d : 2E01 in the first chunk; always 0000 in the 301
other chunks
Bytes 2d & 3d : always 0000
Bytes 4d-7d : X coordinate of the target (see further chapter)
Bytes 8d-11d : Y coordinate of the target (see further chapter)
Bytes 12d-13d : still unknown
Bytes 14d-15d : always 0000
Bytes 16d-25d : still unknown
Bytes 26d-32d : 000000000000 for a target which is not an airbase
0000XXXX0000 for an airbase, where XXXX is so-
called the "A code" in the EAWK3.wdb file. The A
code identifies the different airbases in the
Squ*.dat files (campaigns). For example, in chunk
#2, "82" refers to Morlaix, France.
The "A code" of every target is contained in
EAWK3.wdb
The file is 7132 bytes big. It consists of 162 chunks of 44 bytes more 4 "end" bytes.
The 62 chunks correspond to the 162 airfields available in EAW.
It contains data on the nature, size and orientation of the airfields.
Bytes 0d-5d : still unknown, sometimes all 00
Bytes 6d &7d : still unknown, never 00
Bytes 8d-23d : always 00
Bytes 24d-39d : still unknown, repeats of 0X 00
Bytes 40d & 41d: so-called "T code" in EAWK3.wdb.
This code is specific to a given airfield. Elsewhere, any of the 302 targets
in EAW has its own T code.
Bytes 42d & 43d : always 00
The bytes coding for every airfield and the T codes are indicated in EAWK3.wdb
I noted that the exchange of a chunk of an existing airfield
(displayed on the map) with the one of an airfield which is not activated,
does activate this latter and desactivates the first one.
This finding was used to move some allied bases from west to east, in order to play with frontlines #10 to 22.
Tardata.dat is 122436 bytes big. It consists of 3826 chunks of 32 bytes more 4 "end" bytes. Every chunk corresponds to an element (sub-target) of a given target. Depending on the target, the number of chunks may vary from 4 to 22.
Example of a set of 5 chunks coding for the "Fürth" target (bytes 20224d-20383d):
Bytes 0d-3d: always 00h
Byte 4d: still unknown
Bytes 5d-7d: always 00h
Byte 8d: Code specific to a "subtarget". There are 25
subtargets in total. So far I know, 01 and 02 code
for factories, 03 = oil factory, 05 = factory, 05 =
the airfield itself, 06 = factory, 07 = RR station,
08 small hangar, 09 submarine shelter, 0A = ???, 11
= AAA, 12 = airfield light AAA, 13 = oil tank, 14 =
radar center, 15 = radar tower, 17 = Bunker, 18 =
airfield petrol storage, 19 = airfield control
tower, 1A = airfield bunker, 1B = airfield large
hangar, 1C = airfield small barrack, 1D = airfield
mess, 1E = airfield QG, 1F, airfield large barrack
and 29 = large hangar. Warning : some of these codes
are maybe not correct and have to be further
investigated.
Bytes 9d-31d: still unknown but they are likely to code for the
relative positions of subtargets inside the main
target. Setting these bytes to 00 moves the
subtargets to an unique position.
When studying the Tardata.dat file, very odd things occured when replacing some data with others. Managing data in Tardata.dat is probably not so simple as one could imagine ...For example, one subtarget can be changed with an other one, but not all. Some changed subtargets can be viewed on one side (german for example) but not when playing on the other side (allies). The Tardata.dat structure has to be further investigated.
Griddata.dat is 6400 bytes big. It manages the appearance of airbases and ground targets on the map.
Griddata.dat consists of 800 chunks of 8 bytes each. It is organized as a 40 columns (40x8=320 bytes) x 20 lines matrix. It is like a "picture" of the 640x320 tiles matrix but in the 40x20 format.
The content of a chunk indicates to the program which airbases/targets are present in a given area. This area is 2304 (48x48) tiles big.
A chunk is in the format :
XX 00 00 00 YY YY 00 00
where XX is the number of airbases/targets coded by the chunk and YY YY is the "T code" of the first airbase/target.
For example, such a chunk :
"00 00 00 00 00 00 00 00" indicates to the program that no airbase/target needs to be displayed within a given 48x48 tiles area.
Another example :
"01 00 00 00 01 00 00 00"
indicates to the program that one airbase/target corresponding to Morlaix, France (01 is the T code for Morlaix) will be present within 48x48 tiles on the map.
Last example :
"03 00 00 00 FC 00 00 00"
indicates to the program that three airbases/targets with consecutive T codes (FC, FD and FE) will be present within 48x48 tiles on the map.
About the 48x48 tiles areas covered by the chunks:
Up to 9 different chunks may code for a airbase/target or a series of airbases/targets at a given location on the map. In fact, two adjacent chunks code for areas which overlap on 32 tiles (i.e. the areas are shifted by 16 tiles).
Correspondence between the 640x320 tiles matrix and the 40x20 griddata chunks matrix :
Columns :
Chunk #1 of one of the 20 lines of the griddata matrix covers columns 1 to 31 of the 640x320 tiles matrix.
Chunk #2 covers columns 1 to 48 of the 640x320 tiles matrix.
Chunk #3 covers columns 17 to 64 of the 640x320 tiles matrix.
Chunk #4 covers columns 33 to 80 of the 640x320 tiles matrix.
.........
Chunk #40 covers columns 609 to 640 of the 640x320 tiles matrix.
Lines :
Chunks of the first line of the griddata matrix cover lines 1 to 31 of the 640x320 tiles matrix.
Chunks of the second line of the griddata matrix cover lines 1 to 48 of the 640x320 tiles matrix.
Chunks of the third line of the griddata matrix cover lines 17 to 64 of the 640x320 tiles matrix.
Chunks of the fourth line of the griddata matrix cover lines 33 to 80 of the 640x320 tiles matrix.
........
Chunks of the 20th line of the griddata matrix cover lines 289 to 320 of the 640x320 tiles matrix.
H) ******* XY coordinates and the 640x320 tiles matrix *****
The precise position of targets on the map is coded through the XY coordinates found in targets.dat. The format of these coordinates is similar to the one of frontlines coordinates (frntline.dat).
About the X coordinates :
They range from 00 00 81 FD to 00 00 80 07 that correspond to column #1 and #640 of the 640x320 tiles matrix, respectively.
Every increment of the fourth byte corresponds to 64 columns. For example, 00 00 81 FE will correspond to column #64, 00 00 81 FF to column #128, 00 00 81 00 to column #192 and so on...
Every four increments of the third byte correspond to one column. For example, 00 00 85 FE will correspond to column #65, and so on ...
Bytes one and two are much less important and correspond to fractions of a column.
About the Y coordinates :
They range from 00 00 81 E4 to 00 00 80 E9 that correspond to line #1 and #320 of the 640x320 tiles matrix, respectively.
Every increment of the fourth byte corresponds to 64 lines. For example, 00 00 81 E5 will correspond to line #64, 00 00 81 E6 to line #128, 00 00 81 E7 to line #192 and so on...
Every four increments of the third byte correspond to one column. For example, 00 00 85 E5 will correspond to line #65, and so on ...
Bytes one and two correspond to fractions of a line.
I) *************** Files provided in this ZIP ******************
- Readme.txt (this file)
- Eawk3.wdb (database file in MSWorks 3.0 format)containing infos about any of the 302 targets in the original EAW configuration : Name of target; T code; A code, bytes in Griddata.dat; bytes in Airfield.dat; line in Griddata.dat matrix; X coordinates; Y coordinates; bytes in Targets.dat; offset in EAW.TM; line and column numbers of the 640x320 Tiles matrix.
- Targetset.zip containing utilities written in MS Qbasic :
* Convert.bas : utility which converts the XY coordinates of targets from targets.dat into the corresponding tiles of the 640x320 terrain matrix (lines and columns of the 640x320 matrix and bytes in EAW.TM), the bytes coding for the height of tiles (bytes in EAW16.HM) and the corresponding bytes in Griddata.dat.
* Vertcon.bas : the same as Convert.bas but allowing the reverse thing, i.e. the conversion of lines/columns into the XY coordinates used in Targets.dat.
* French Qbasic.exe and Qbasic.hlp for running the utilities (if necessary, of course) are included.
- Blankfiles.zip : a set of Targets.dat and Griddata.dat files providing a "no target/airbase" map. These files should be used as a starting material for constructing new maps, adding airbases and targets one by one.
J) ****** Creating a new theater - a practical approach ******
This last chapter deals with the practical way to create a new EAW theater.
First main step : creating a new map.
It is better starting with a EAW.TM file filled with randomly-distributed 02, 42, 82 and C2 tiles. This gives the ocean everywhere. "Ground" tiles should be added, one by one to get islands/continents on the map.
Then, or later, a blank EAW16.HM (all bytes set to zero) should be modified to set the height of tiles.
Second main step : placing new airbases/targets on the blank map.
A practical and simple example :
How to set two airbases/targets on a blank map ?
1) Lille at line #145 and column #209 of the 640x320 tiles matrix
2) Cambrai at line #97 and column #190 of the 640x320 tiles matrix
The way to do :
1) Open EAWK3.wdb and search for the T codes of Lille and Cambrai, as well as the corresponding bytes in targets.dat.
T codes are 85 and 88 for Lille and Cambr ai, respectively, and the bytes in Targets.dat are 4256-4287 and 4352-4383.
2) Place Qbasic.exe, Qbasic.hlp, convert.bas, vertcon.bas in a temporary folder.
- Open a DOS-windows and set the pathway to the temporary folder. - Type "Qbasic.exe /run vertcon.bas" to run the utility.
- Enter line = 145 and column = 209.
- The utility gives you the offsets in EAW.TM, EAW.HM but also :
* the corresponding X & Y coordinates as X = 0000C600
and Y = 0000C2E6
* the bytes of the adequate griddata.dat chunks. In that
case, 2984-2991 is the best choice.
- Press Space to run the utility again
- Enter line = 97 and column = 190
- The utility gives you the offsets in EAW.TM, EAW.HM but also :
* the corresponding X & Y coordinates as X = 00007A00
and Y= 000002E6
* the bytes of the adequate griddata.dat chunks. In that
case, 2016-2023 is the best choice.
3) Using a Hex-editor, open the "blank" Targets.dat provided within this ZIP. The targets.dat file has any of the targets set in only one default location (north-west corner of the map).
- Display bytes 4256-4287 (bytes for Lille)
- Type 0000C600 at bytes 4260-4263 and 0000C2E6 at bytes 4264-
4267.
- Display bytes 4352-4383 (bytes for Cambrai)
- Type 00007A00 at bytes 4356-4359 and 000002E6 at bytes 4360-
4363.
- Record and close Targets.dat
4) Using a Hex-editor, open the blank Griddata.dat provided within this ZIP. All bytes are set to zero.
- Display bytes 2984-2991
- Type 01 00 00 00 85 00 00 00 (i.e. one airbase/target whose T
code is 85 and corresponds to Lille)
- Display bytes 2016-2023
- Type 01 00 00 00 88 00 00 00 (i.e. one airbase/target whose T
code is 88 and corresponds to Cambrai).
- Record and close Griddata.dat
That's done : the two first airbases/targets are now available on the map. This can be checked by dropping both modified Targets.dat and Griddata.dat into the EAW directory and running EAW. Of course, the default frontline (#1) has to be loaded to play Cambrai as Allied and Lille as Axis.
WARNING : depending on the size, complexity (various subtargets) and exact XY coordinates of a given airbase/target, the airbase/target may lie on several tiles. Thus, both convert.bas and vertcon.bas utilities give the main tile (in the center of the 9 tiles patch) which supports the airbase/target, more the adjacent tiles. This is also true for the height of tiles.
Please, give credits to this work in further applications and developments.
Thanks.
Thank you again Moggy I have been painting away most of the day,cavalry and Lancaster,and have periodically stopped and checked the forums...the cavalry has proven to be a most complicated task,but the end result will,hopefully,be visually pleasing(and historically accurate within the confines of EAW)...anyway,I have dutifully copied all of these notes and opened the progs and inspected them (ran some too)as well...will plunge into it head first upon completion of these few mods that have been promised.much Thanks!!! S!...Shreck
Schreckie - if I can do this stuff, then believe me anyone can. I started off with a copy of Charles Gunst's notes and no previous experience of hex editing, graphics editing or anything like that, and no formal training in computers, just my dad's words "coomputers are clever bead frames, that's all".
LOL,as I like to repeat on occasion,I had NEVER ventured into "program files" before I found out that EAW could be modified...In fact I was one of those whom said...computers?...Bah...now I am considered the "head nerd" of redneckville seriously though,I never stopped to consider why I wanted to do these things,I just knew that I had to learn how...not quite three years now since I received my EAW disc...and I am doing things that I would never have imagined me doing on a 'puter....worse yet,now I have manipulated most if not all of my sims in various ways(no-cd cracks,add-on mods,etc.)...why buy new sims?I have enough to keep me going for YEARS S!.....Shreck