Difference between revisions of "Custom Maps (UFO2000)"

From UFOpaedia
Jump to navigation Jump to search
(Maps consist of three hiearchy levels: tiles make maps which make a battlescape)
 
Line 5: Line 5:
  
 
Tiles are the small squares, one soldier occupies one tile. A tileset is an assortment of tiles. The graphics (also called sprites) of a tileset are in a png master image list file (dawnmasterimagelist.png) and the attributes of the tiles in a lua file (like dawncitybeta102.lua). Dawn City beta 102 has 236 tiles in the lua file and 242 sprites in the master image list file.
 
Tiles are the small squares, one soldier occupies one tile. A tileset is an assortment of tiles. The graphics (also called sprites) of a tileset are in a png master image list file (dawnmasterimagelist.png) and the attributes of the tiles in a lua file (like dawncitybeta102.lua). Dawn City beta 102 has 236 tiles in the lua file and 242 sprites in the master image list file.
 +
 +
A tile can be a floor tile, a left wall or a right wall tile or an item tile.
  
  
 
== Maps ==
 
== Maps ==
  
Maps are stuff like buildings, often of size 8x8 tiles horizontally, 4 or 8 vertically. Maps are constructed out of tiles. Maps are saved into binary .map files. (Like dawn00.map, dawn01.map etc...)
+
Maps are stuff like buildings. Maps are constructed out of tiles. They are often of size 10x10 tiles horizontally, 4 or 8 vertically. A 1x1 map is 10x10 tiles. Maps are saved into binary .map files. (Like dawn00.map, dawn01.map etc...).
  
  
Line 24: Line 26:
  
 
== Tile Editor ==
 
== Tile Editor ==
Wiki part yet to be written. The tile editor has a pretty good help file.
+
The tile editor has a pretty good help file that explains the most.
 +
First you have to set the right working directory, for example d:/ufo2000/extensions/terrain-dawncity-beta102
 +
To be able to edit or add tiles to the tileset, you have to copy-paste in the tileset's lua script. You also have to give the name of the master image file so that the editor can load the graphics.
  
 
== Map Editor ==
 
== Map Editor ==
Wiki part yet to be written. The map editor has a pretty good help file.
+
The map editor has a pretty good help file that explains how it works.
 +
First of course set the working directory.
 +
Then you have to load a tileset, done by copy-pasting the tileset lua file. (Tileset and battlescape are in the same lua, for example dawncitybeta102.lua.)
 +
 
 +
If you want to edit existing maps, or save into a format that ufo2000 reads, you need a hex editor to save or load the binary .map files. Use the editor recommended in the help of the map editor as the copying and pasting will work with that.
  
== Relevant Threads ==
+
== Relevant Links ==
 
Map maker and tile maker, with download link:
 
Map maker and tile maker, with download link:
 
http://www.xcomufo.com/forums/index.php?showtopic=242025548
 
http://www.xcomufo.com/forums/index.php?showtopic=242025548
--[[User:Bamb|Bamb]] 02:35, 25 April 2007 (PDT)
+
.map fileformat:
 +
http://www.xcomufo.com/forums/index.php?showtopic=242025366&hl=mapeditor
 +
Addtileset script:
 +
http://www.xcomufo.com/forums/index.php?showtopic=242024650

Revision as of 09:49, 25 April 2007

The new lua map format is pretty clear once you have cleared the initial confusions, understanding the map format really the biggest hurdle for a newcomer.


Tiles

Tiles are the small squares, one soldier occupies one tile. A tileset is an assortment of tiles. The graphics (also called sprites) of a tileset are in a png master image list file (dawnmasterimagelist.png) and the attributes of the tiles in a lua file (like dawncitybeta102.lua). Dawn City beta 102 has 236 tiles in the lua file and 242 sprites in the master image list file.

A tile can be a floor tile, a left wall or a right wall tile or an item tile.


Maps

Maps are stuff like buildings. Maps are constructed out of tiles. They are often of size 10x10 tiles horizontally, 4 or 8 vertically. A 1x1 map is 10x10 tiles. Maps are saved into binary .map files. (Like dawn00.map, dawn01.map etc...).


Battlescape

The Battlescape consists of many maps, that are mixed pretty randomly according to a script. The script is in a lua file (dawncitybeta102.lua).



Editing

For editing, for making tiles, the javascript tile editor that runs in a web browser does the attributes for the tiles and you need a paint program for making the sprites in the master image list.

For making maps, you need the javascript map maker that runs in the browser.

Tile Editor

The tile editor has a pretty good help file that explains the most. First you have to set the right working directory, for example d:/ufo2000/extensions/terrain-dawncity-beta102 To be able to edit or add tiles to the tileset, you have to copy-paste in the tileset's lua script. You also have to give the name of the master image file so that the editor can load the graphics.

Map Editor

The map editor has a pretty good help file that explains how it works. First of course set the working directory. Then you have to load a tileset, done by copy-pasting the tileset lua file. (Tileset and battlescape are in the same lua, for example dawncitybeta102.lua.)

If you want to edit existing maps, or save into a format that ufo2000 reads, you need a hex editor to save or load the binary .map files. Use the editor recommended in the help of the map editor as the copying and pasting will work with that.

Relevant Links

Map maker and tile maker, with download link: http://www.xcomufo.com/forums/index.php?showtopic=242025548 .map fileformat: http://www.xcomufo.com/forums/index.php?showtopic=242025366&hl=mapeditor Addtileset script: http://www.xcomufo.com/forums/index.php?showtopic=242024650