Jump to content
XCOMUFO & Xenocide

.map Fileformat


Oldtype

Recommended Posts

The first three bytes are the dimensions (width, length, height), then comes a list of all the map cells as chunks of four bytes, each byte representing one of the map elements/planes (Floor, Left wall, Right wall, and Object, respectively). AFAIK, there's nothing more to it.
Link to comment
Share on other sites

OK, thank you.

What is the first cell though?

I would guess that it is like this:

1|3|6|...

2|5|...

4|...

...

Turn this a bit to the right to match isometric view.

Starting with the lowest Maplevel to the highest.

Is that correct?

That means this format can not save maps bigger than 255X255X255 and can not have more than 255 different tiles/objects?

Link to comment
Share on other sites

OK, thank you.

What is the first cell though?

I would guess that it is like this:

1|3|6|...

2|5|...

4|...

...

Turn this a bit to the right to match isometric view.

Starting with the lowest Maplevel to the highest.

Is that correct?

That means this format can not save maps bigger than 255X255X255 and can not have more than 255 different tiles/objects?

 

Each map file for UFO2000 can have 10, 20, 30...up to 60 squares on its side. Height for all maps is 4. Maximum tiles are 256, but 2 of those are automatically reserved, leaving.

 

The first batch of cells seems to represent height level of 1, then it either represents the individual lines or columns (I never figured out which is the direction) of the square. Then it represents the next level, until 4.

Link to comment
Share on other sites

possible map editor? this sounds like just the thing! even if it doesnt, a map veiwer would still be an invauble tool. Goodluck dude
Link to comment
Share on other sites

No, I do not intend to mess with all the old files from the original. Maybe I will write a programm that converts the stuff from original X-COM to my format, but not the other way.

If I make a mapeditor I will only include the newer LUA/png format/tileset stuff.

Say is the moonbase.lua file actually used?

I parsed the lua file now and aplied the info to the moonbase.png file, so that all the tiles mapped in the lua file are shown in my program.

Strange thing is that not all tiles that are in the png show in my program and one of the white placeholder boxes does show up.

 

P.S. parsing lua files is no fun

Link to comment
Share on other sites

Not all of the tiles in moonbase.png are implemented in the lua. Partly because of the limitations in using daishiva's editor for what it was not intended, partly because some things are not supported by the UFO2000 engine yet. (such as the animated doors) There may also be some junk in the lua, explaining the placeholder box appearing in your viewer. The moonbase terrain is still largely unfinished (I consider it only approximately 25% done), so I have not been too careful in trying to clean the thing up. Edited by nappes
Link to comment
Share on other sites

if your after a mapless but complete terrain, I can send you Tron. Its an odd terrain but ive used Nachtwolfs tilemaker to create the LUA along with accurate hitboxes and animated tiles. It doesnt, however, have any sort of mapdata with it. Edited by Sporb
Link to comment
Share on other sites

if your after a mapless but complete terrain, I can send you Tron. Its an odd terrain but ive used Nachtwolfs tilemaker to create the LUA along with accurate hitboxes and animated tiles. It doesnt, however, have any sort of mapdata with it.

That would help a lot, thank you.

I am not at the map reading stage yet anyway, but it seems to be pretty simple to implement from where I am now.

Wich reminds me:

 

Where does the .map file start to list those tileboxes anyway and by wich order does it go on to list them?

Link to comment
Share on other sites

Using a HEX editor you will see the following :

 

.map file format :

Contains header info : 00 00 00

Width, height, number of levels.

Every value is a Hex number... so 10 = 0A, 20 = 14; Those two values are the only ones valid for width and heigth.

 

After the header, all following values represent 1 tile for each set of four numbers defined as : 00 00 00 00

first value is floor tile index.

second value is left wall index.

third value is right wall index.

fourth value is object index.

so 10 x 10 x 1 would be described by 100 tiles (403 values), but 20x20x4 would be described by 1600 tiles (6403 values).

Link to comment
Share on other sites

I know that much, nappes already wrote that.

But I want to know where the tilelist starts.

I mean:

Where is the first tile located on the map and where the second and so on.

 

from what I seen, tile are ordered this way :

 

On the battlescape... from Top to Right, Top-Right to Bottom-left.

Link to comment
Share on other sites

Yes, thank you.

That worked, it shows all the moonbase maps now. =b

The .map file starts listing in the northern corner and goes on to the eastern corner, lowest level first.

Too bad there is only that one tile/map-set in that format as far as I can tell, all the others seem to use data from X-COM 1&2.

Link to comment
Share on other sites

Here be the terrain named Tron. In the archive you will find the Tile graphics, the LUA and probably some hidden files windows slipped in there when i wasnt looking. This is probably the first look at the completed tiles anyone has had. This tileset is completely free of all copyrighted Xcom materia.

 

OT: making all tiles transparant on the map has no effect on performance on my Computer - a prlim version of it can be made avliable to those who might want to test performance on older computers. This intrigues me. If its possible to make all tiles transparant, would it be possible to intergrate a scnen into the black background of the map? like A paralax background depicting a mountain range or a wasteland? If we could, it means we could make cool floating maps instead of just the square ones

Edited by Sporb
Link to comment
Share on other sites

Sporb the png in your tileset differs from the moonbase png, I do not know who used the "correct" way, but the difference did cause problems for me.

The problem for me is that your png is 2 rows smaller, wich causes problems when I try to cut out the tileimages in the last row. If you add an empty row of pixels at the top and the bottom it will be the same.

Link to comment
Share on other sites

that should be easy to correct (Tron.png) if nappes png is different its a fair bet its mine that is faulty since his png is actually used in a map. I'll fix it and re-post
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...