Custom Maps (UFO2000)

From UFOpaedia
Jump to navigation Jump to search

Terrain Requirements

Each UFO2000 terrain (such as Moon Base) requires 3 elements:

  • Tiles (ground, walls and objects)
  • Maps (the individual blocks that form the battlescape)
  • Code for battlescape generation (written in .lua language)

UFO2000 and X-COM terrain file formats

  • There are 2 types of file formats for the tile and map files required. The UFO2000 format, which uses .LUA and .PNG

files. And the original X-COM files, with .MCD, .PCK, .TAB and .MAP file formats.

  • The formats are interchangeable, i.e., a terrain can have its maps with the .MAP format while the tiles come in a .LUA

and a .PNG file.

  • The battlescape code always comes in a .LUA file.

Basic Terrain Concepts

  • The layout of the battlescape is composed from several maps, and a map

consists of individual 3D cells, with the size of 16x16x24 pixels.

  • Each individual map 3D cell is made of tiles, which are interactive terrain items, such as walls, doors, ladders, lifts, etc.


Tiles

  • A tile is composed of two assigned elements: its image and physical properties on battlescape. The images are organized into .PNG format file(s) (.PCK/.TAB), while the code for its physical properties uses a .LUA format file (.MCD for XCOM).
  • Tiles are organized into tilesets and there are 4 types of tiles:
    • Ground (floors, roofs, lifts, etc.)
    • Left (a.k.a. West) Wall
    • Right (a.k.a. North) Wall
    • Object

Tile Properties

Maps

  • The minimal length and width of a map is 10x10 cells and the largest 60x60. The game cannot accept maps with dimensions that are not multiples of 10 (20, 30, 40...).
  • The maps can be either squared (e.g. 20x20) or rectangular (e.g. 20x10).
  • The maximum height is 16 levels.

Map Design Tips

  • It is better to assign the tiles to their proper locations (ground, walls,etc.) otherwise the map might look/act weird during gameplay.
  • The West walls that look like small pillars should be placed at the intersection of West and North walls when it points downward, otherwise it will be possible to look thru the wall into buildings (see existing maps to see what is their proper placement).
  • Concerning walls, in some maps there are outer and inner walls (especially on buildings). One example is the light blue brick (outer side) and yellow (inner side) walls on City.
  • The ground of a map's 1st level must be filled.
  • If a door is placed as a wall at a corner of a intersection of walls, when it is opened it will occupy the place of the opposing wall. If the door is closed again, the wall will disappear.
  • To help visually the players to distinguish between floor levels and to spot holes made by weapons, use different tiles for the ground of each floor.
  • You can make buildings having its parts across several maps but you will have to use specific Battlescape Generation Code for them to connect correctly. Otherwise, if the battlefield is generated randomly you will have to apply differently the principle of the XBase and Alien Base terrains: instead of all sides connecting, the maps must all have one or two sides that has a connecting part, either to form a larger structure or to serve as end to a building.
  • Large maps or buildings can look very nice and be fun to build. Unfortunately, they also can turn boring and be difficult to play very easily. The same can happen with lots of small rooms, narrow corridors, lots of objects and maps with several levels.
  • It is best to keep terrains simple, with space for units to move and easy communications between maps.


Battlescape Generation Code

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.

Battlescape Generation scripts only required a text editor.

Tile Editors

Map Editors

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

Old map format description: http://www.xcomufo.com/forums/index.php?act=attach&type=post&id=9254