Tiles--Creating+the+EAW+Ground+World

**Editing the EAW World--Use of Tiles**
The standard EAW "world" is created by a repeating set of "Tiles"---square slices of ground or water. There are 59 standard tiles in original EAW. Some additional tiles have been created or discovered.

Many new tiles are available in newly created scenarios for world locations. The "world" of any EAW scenario is XXXX wide by XXXX high.

Tiles are contained in the Eaw.TM compressed data file. (eaw.tm is for "terrain model")

Tile height (altitude) is controlled in the eaw.hm compressed data file. See "Tools" for more info.

A tile is a drawing or picture, known as a PCX for its graphic format. It must be converted to PCX to be viewed and modified (modded--see "Tools").

Tiles are numbered in a series of different types so locations appear in-game.

As usual with "mods", any tile files placed into the EAW directory will be used first by the game. If the modded file fails to open or is not found, the EAW.exe will revert back to the CDF (Compressed Data File, or "channel file") and use the standard tiles instead.

Tiles may be used or changed in any combination chosen by the modder. Some tiles have special characteristics controlled by the EAW "EXE".

More details following "Tools".


 * Tools**

Terrain Tools are available (scroll down past the pictures) on Moggy's website, Wudpecker page http://www.mogggy.org/midway/wudy/wudpecker.htm

Two tile editors are available now, one by Woolfman and the newly-released editor used by MicroProse in original game creation. Use allowed courtesy of Atari, the current owners of EAW. At Sandbagger's Tally-Ho library site.

http://www.sandbaggereaw.com/LFtoolsandutilities.html --site link by Pobs

at Cord's site, Utilities, Tools page: http://www.sandbaggereaw.com/CORD/frames.html or a package from Col. Gibbon's "Wings Over By Tom" pages, add-ons: http://www.sandbaggereaw.com/WOBT/WOBTaddons.html containing both CRFRW and the CDFile (which can pack files back into a .CDF) which also has some helpful batch files and instructions. From Redeyes' site Guest Add-ons page: http://www.sandbaggereaw.com/RED/guestaddons.html is gpmwapl's tool for converting .tpc, .ter etc. files to .pcx files Also the "picpac" tool from Cord's is most used to convert .pcx images to those used by the game .ter or .tpc. PicPac is the standard conversion tool. --contributed by RAF_Roy

The EAW.HM is editable in Photoshop as it's a 16 bit .RAW in 640*320 format. (Eaw.hm is the tile "height model" for altitude on tiles for mountains, etc.) The EAW.TM can also be opened in Photoshop, this is an 8 bit .RAW single channel, same size. The TM (terrain model) can further be edited with a program originally intended to edit the Gunship helicopter game and was available from FNG2K's site.

Targets can be edited with Mr. Jelly's target editor, available from his d/l's page. This program will also let you edit the EAW_RRD.DAT ( railway lines ).

Further I've developed a set of Photoshop palettes for TM and HM editing purposes which let you isolate specific tiles, coastlines, cities, roads, forrests, rivers, sea, fields and mountains . These are very usefull for converting one area to another, copy/paste areas or specific features and can be used for building an HM based on tilespecific elevations. The filters only come with a very rudimentary explanation but their use should be obvious enough for those who have a bit of insight in the use of Photoshop and palettes, but they haven't been released yet. --by VonBeerhofen


 * Tile Sizes**

Standard is 256x256 pixels in the BN*.ter tile. It is considered "high resolution" for its size. BN*.ter tiles can be extracted from the **EAW.tm**, a compressed data file. The *star is for any tile type.

Standard LR*.ter tiles are "low resolution" 128x128 pixels. Extracted from the Eaw.tm.

BN tile sizes can be copied as LR tiles, and will be used as 256x256 pixels by the game without problems.

Tile sizes must be exact. Black tiles will display if wrong sizes are used, or the game will crash (CTD).

Tile sizes of 512x512 pixels or bigger have been experimentally used in a search for higher resolution graphics. Works on some computer machines and not others. Problems are signalled by an error code or CTD (Crash To Desktop).

--Wudpecker


 * Tile Types**

SEA GRASS FIELD FOREST MOUNTAIN RIVER ROAD CITY

-courtesy of Von Beerhofen.

Plus a new "Lake tile" with the name BP*.ter, created by Von Beerhofen, where the * star is the number of the tile. This new Lake tile allows water characteristics in land areas.


 * Tile Functions**

SEA tiles, "BNwater.ter" tiles will trigger a "crash" sequence in the EAW.exe when an aircraft lands on water. Sea landings are possible with great care, and depend greatly on speed. Contact with landing gear is not desirable, as in reality. BNwater.ter and LRwater.ter are "sea" tiles.

GRASS and FIELD tiles can be used for landing and take-off if no object is in the path. Airfields are sometimes hidden beneath BNfield.ter tiles by making them transparent. An airfield is a fixed takeoff or landing point and a target for mission use.

Note: Aircraft carriers are often created at sea by use of a transparent airfield land tile, BNcoast.ter or BNfield.ter. Battle damage produces earth craters and other oddities because the tile is not truly water despite a water appearance. The BP*.ter tile may provide a way to limit "land" to carrier surface.

FOREST tiles obviously are filled with obstructions.

MOUNTAIN tiles have changing heights, usually making them obstacles.

RIVER

ROAD tiles are good landing points.

CITY tiles may be used for landings and take-offs, but are normally overlaid with 3-dimensional ground objects by the modder, which are obstructions and cause crashes.


 * Tile Orientation and Rotation**

A tile has rotational states of N, E, S, W (North ,East, South, and West) which can be set so the tile faces one way, two ways, three ways, or all directions randomly.

The direction can be set in a terrain manager program, or left to rotate randomly by the game, as "sea" (water) tiles normally do.

If you don't rotate any tiles then obviously you could use a photograph and cut it into 59 areas to create a small but detailed little area.

But only 59 standard tiles are available. Usually all rotational states must be set for a variety of terrain to appear.

You're free to use just 1, 2, 3 or all 4 rotational states. In most cases, using all 4 rotational states is what will give the most diverse results.

You can treat a terrain as being tiles of a single type nature (such as water tiles--ed) in which case no transitions are necessary. However all tiles should match all other tiles in all of its four rotational states.

A hint for the modder is to provide "transitions", such as grassy areas around cities, or coastal tiles for land/sea meetings.

-- Von Beerhofen. Wudpecker edit


 * Joining One Tile to Another**

Rotating a terrain tile will change its "match" to other tiles next to it. The modder must deal with the problem of making matches symmetrical.

Discussion taken from "Geometry of The Tile" on SimHQ Forums, August 21-24, 2005 and "Exploring Data.CDF"

http://www.simhq.com/simhq3/sims/boards/bbs/ultimatebb.php?ubb=get_topic;f=41;t=029851

http://www.simhq.com/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=41&t=029831

As everything has to be symmetrical on a tile I made up this simple background to help me line up new rivers, and roads, ect, and then I deleted it before I saved the tile as a PCX. --Col. Gibbon

(Picture of alternating red and white checkerboard by Col. Gibbon)

(Picture of forest and roads by Von Beerhofen)

Fixed points from either edges of the tile were used to connect the roads on all sides, similar to the squares used by Col. Gibbon. The roads were then drawn inward using a random pattern and a few dead ends. You can probably imagine the variation of this one single tile. As for creating seamless tile borders, I often created a basic template taken from 1/2 a border and copy it mirrored on the other 1/2. This border was then also copied on all 3 other sides when rotating the tile. This one template was then used for all tiles of the same nature guaranteeing they're all the same and connecting perfectly. Details were then drawn into it's centre. The trick is to create a border which like the roads gives the possibillaty to form at least two nature types so it's corners can be used as a transition to form a different type terrain when these corners connect. For this I've done the same as Col. Gibbon and used the entire corner for one type and the two centre border squares for another terrain type. The four centre squares were then drawn in to give the tile it's specific feature. As in EAW all roads and rivers use the same technique, they all start on pixel 64, 128, 192, or directly from a corner so they're allways guaranteed to connect with any other tiles. Setting a structure offcentre will further dimminish the regularity of the terrain. --Von Beerhofen

Four -way rotational tiles are particularly difficult. Here is my little modification of the method described by VB above. It does not solve transition, but it not suppose to. It only assures seamlessness and if the border width ratio is well balanced kills repetitious "kaleidoscopic" effect of the mirror copy. Not much new, but little something. (Picture by Polak--diagram of matches) PS. Obviously the edges of the border are brushed and 1/4 and 1/8 is just to show the concept as it depends of the terrain type.

-Polak

Sea tiles (water.ter) are difficult because there is no mathematical way to match all tile sides to one another in the usual random sequence without creating a "pattern" easily noticed by the pilot in the air.

Even the standard sea tile in EAW will show a pattern if its colors are lightened up for viewing.

Solution? Blur or fuzz the corners and tile edges with random patterns in the graphics editor. Edges will not precisely match, but this is seldom noticed at flying height. Another solution is complete random patterning across the tile, or partial copying of tile joins instead of complete repeating copies.

--this document submitted by Wudpecker

- notes on new tiles - submitted by RAF_Roy from moggy's posts and code forum notes-- added tiles in EAW : moggy's post on the extra terrain files Modders' Bonus in 128 includes: (1) Five extra terrain tiles: These are the additional tile names in 128A and their codes for each orientation in eaw.tm Normal 90deg 180deg 270deg "alcty6.ter", 3B 7B BB FB "base.ter", 3C 7C BC FC "field3.ter", 3D 7D BD FD "field9.ter", 3E 7E BE FE "river3.ter", 3F 7F BF FF For modding purposes all of these have been potenially part water with BP overlays. (2) The ability to have 32 airbase types Runways.dat now extends to 32 records, and with the ability to have transparent panels in airbase 3dz files it is particularly easy to create new airbases from simple tiled shapes


 * How to make / use BPtiles (Water/Land overlays) by RAF_Roy August 2009**

I've found this method descibed in the pic tutorial the easiest method to do this.There are other transparent colors / indexes you can use, etc. but there is no reason to. The important thing to know is the index must remain the same 0 or 255 (the 256th), so that is why I load the palette last, otherwise I find the indexes get switched on the file annoyingly. (it is not enough to use the particular color, you need the same index in the palette also). Also be careful to name the file BP prefix and not BN or LR, you will need those obviously for the terrain to render, these BP tiles are merely hidden overlays the game uses to chart the water/land areas on a tile.

Also; Per the EAW code version @ 1.28b There are 32 tiles that can be water/land tiles and use BP tiles set, as follows excepted from the adjusted code;

"BPCoast1.ter" "BPCoast2.ter" "BPCoast3.ter" "BPCoast4.ter" "BPCoast5.ter" "BPCoast6.ter" "BPCoast7.ter" "BPCostBr.ter" "BPCostRv.ter" "BPCostU1.ter" "BPCostU2.ter" "BPRiver1.ter" "BPRiver2.ter" "BPRiver3.ter" "BPRiver4.ter" "BPRiver5.ter" "BPRiver6.ter" "BPRiver7.ter" "BPRiver8.ter" "BPRiver9.ter" "BPRivrBr.ter" "BPRivrnd.ter" "BPRivrfk.ter" "BPForst3.ter" //23 <<<< 23-31 additional new water property tiles. Provided with blank "BPForst5.ter"// 24 BP tile overlays for modders use >>>> "BPForst7.ter" //25// Moggy "BPAlcty5.ter" //26 "BPAlcty6.ter"// 27 <<<< 27-31 These are the tiles brought back into the game see below >>>> "BPBase.ter" //28 "BPField3.ter"// 29 "BPField9.ter" //30 "BPRiver3.ter"// 31 -- These are hardcoded from the .exe, only these can be used, there is no use in trying to code a tile that is not listed, i.e Field1 or something will not render in the game as a water/land tile even if you rename a BP tile and BN or Lr it will not work.

I have a .zip here with same tutorial, but it has included a Paint Shop Pro palette of the bpfield3.ter, and a text version of the file: []

-notes by RAF_Roy

Using 24-bit tiles, Tiles sizes and graphics settings:

24-bit (16.7 million color) terrains can be used They have to be .bmp files, 24-bit You make the terrain tiles 256 x 256 size for the BN tiles (note see exceptions below) name them instead of .ter as example: bnforst1.bmp (note; to be safe you will still need the .ter files as in some graphics setups the distance tiles will be used if the new .bmp tiles are not the correct size (see below)) The LR 24-bit tiles will need to be 128 x 128 size (with exception of the 5 new tiles enabled see later notes) named by same convention i.e.: Lrforst1.bmp note by RAF_Roy: --- There are some exceptions for graphics settings: field3 alcty6 base field9 river3 they all need a 256 x 256 size LR .bmp tile for the distance view in other words with a 256 x 256 BN tile set and including 128 x 128 LR distance tiles at the same time, the 128 x 128 distance LR .bmp files are used for the regular tiles in long range views, but the exceptions are with the new tiles.. they do not work if 128 x 128, and thus the default .ter tiles show up Exception to above; with graphics setting med or low terrain detail a 256 x 256 size LR .bmp is used for Both views! this only aplies when using graphic terrain level settings of medium or low; ...for some reason only the 256 x256 LR distance tiles will render, for BOTH views for the 5 new tiles only (in other words the presence of the 5 BN tiles does not matter, they are not used.

Really its not a problem, just as long as modders are aware of it. You just need include the 256 x 256 LR tiles for the 5 new tiles in a set if you add it to a scenario. or possible a second optional folder containing the alternate files.

above applies to 1.28b also --notes by RAF_Roy airfields and 24-bit 64x64 size may be needed for some airstrip as seen in this copy of Aldo Britt44's test pics:

--notes by RAF_Roy