From UFOpaedia
Jump to navigation Jump to search

Disclamer: This page is dedicated not to the great old MCDView (MCDEdit) tool by Koralt (manual), but for another one, written by Volutar for OpenXcom, though still suitable for xcom1/2.

MCD Edit tool

The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.

Tilesets in xcom1/2 consist of 3 files with the same name and different extensions. MCD is the main file with values and references to images. PCK+TAB are the files of sprite images. The number of tiles in the MCD is not necessary equal to the number of images in the PCKs. If there are animated tiles, the number of PCK entries will be more than number of MCDs. In some tilesets, single PCK images are reused in several MCDs, but with different heights.

Main screen

Main screen
  • Custom button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as File->Open custom MCD .... If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.
  • Tileset switches between different MCDs in the folder. Don't forget to save the current MCD if you don't want to lose your work (File->Save MCD+PCK+TAB or File->Save MCD+PCK+TAB as.... The '*' sign indicates it's a vanilla MCD, and you will not be able to change the number of MCDs in the file, this is in order to prevent breaking the vanilla maps.
  • Checkered button changes the image background from black (or underwater background) to checkered, just to highlight any holes you've made. Kinda handy when dealing with dark sprites.
  • UFO/TFTD changes gametype. Vanilla mode will switch between game folders and re-read Tilesets. In custom MCD mode it will simply change associated LOFT and SCANg (and will treat tiles as of another game type). It doesn't affect anything else.
  • Palette dropdown menu changes the current palette. The current palette is displayed at the right top corner. Ambiguous color entries in the palette will be highlighted (different indexes but same RGB) - these colors could cause problems when working with RGB graphics (not indexed). mtPaint is a recommended external free tool to edit paletted png files in indexed mode.
  • Edit PCKs opens PCK editor window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.

At the top of the main area is the MCD preview/selection line with the bar. Yellow highlighted MCDs are animated. Red dot indicates it's a referenced MCD (by some other MCDs, which will be shown at the right part of Status Bar). You can use the mouse wheel to scroll this list, and cursor key/home/end/pgup/pgdown to change the selected MCD. You can select multiple MCDs with Shift and Ctrl, it will aggregate MCD data, and it's possible to change multiple values through selected (different values are displayed as "mix"). RMB calls the context menu for the clicked MCD (Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs) - same as in the Edit menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.

Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). LMB on these small shaded sprites toggles animation mode (off by default).

Slightly lower is the stipe with the 8 zoomed animation frames of this tile. If frame is the same as previous - it displayed pixel-transparent way, and PCK# below is greyed (though it can be edited). LMB on a particular image opens the PCK selection screen. If next frames are "greyed", their values are also changed, so it looks like changing "Keyframe". RMB calls for context menu with Edit PCK entry which opens PCK editor for this frame.

At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold LMB to rotate the voxel view (after release it will switch back to the center). The small bar below changes view angle permanently. Remember: it alters only view angle.

The rightmost part is the heap of voxel slices or LOFTs. LMB click on particular layer image to open LOFT sheet and change it.

The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. Tab/Shift+Tab jumps between fields.

The status bar at the bottom shows current PCK file size (in bytes), TAB (in number of records, or PCK images), LOFTemps size (in images), and SCANGs (also in images). The last two are fixed for each particular game type.

SCANg icon is clickable and opens the minimap image selection.

You can also create the new tileset (MCD+PCK+TAB) by clicking File->New MCD. It will ask you for the path and filename for the new MCD, and if it is in a vanilla folder - it will automatically switch into the respective game mode/palette.

PCK editor

PCK edit

At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are "orphans" - they aren't used in the MCDs. You can use the mouse wheel to scroll this list, and cursor key/home/end/pgup/pgdown to change the selected MCD. You also can select multiple PCKs with Shift and Ctrl. RMB opens a context menu (PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs).

Selected PCKs are exported as PNG image with sprites of 32x40 pixels size, placed side by side, 10 in row (as default). PNG is saved as 8bit color (with current palette). Color 0 is "invisible". If only one is selected - it will export PCK under the cursor (it can be different from the selected).

When importing an image to a PCK, it runs through selected PCKs, filling them with sprites from PNG image. If number of selected exceeds number of sprites in the PNG, it will start from the 0, thus it will work as cloning.

You can change spacing between sprites, and margins in Edit->Settings.... It will work for both export to and import from PNG, so pay attention, if you're using non-standard values. Also you can change number of sprites per row when exporting images.

Copy to clipboard mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).

It can import RGB+alpha PNG files. If the alpha is greater than 128, it assumes this pixel is invisible, even if there are color components - XCom uses binary transparency. Other color RGB values are taken from the closest matching color of the current palette, excluding system parts. Colors 254/255 can't be used because they are used for PCK encoding. For TFTD palettes it also don't use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.

If it's a paletted PNG, and the palette isn't changed, and matches the current selection - it keeps every pixel index intact (it won't re-convert and won't add ambiguity). But if it's PCK of TFTD, it won't allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.

If even a single color is changed, or doesn't match the current palette, it treats it as a "different" palette, and re-converts whole image as if it's RGB+alpha.

PNG sheets (Menu-> Export PNG sheet / Import PNG sheet) are exported and imported as consisting of sprites with 32x40 size (without any spacing). The image itself can be of any size, it just runs from the top to the bottom, from the left to the right, if the sprite can't fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.

Slightly below of the selection line there's a toolbar where you can save changes (they will immedately reflect in MCD Editor screen). Next to it "mode" buttons: Pixel selection, Rectangle selection, Lasso selection, Color selection, Area selection and Drawing mode.

At the right are toggle buttons, for the following from the left to the right: wrap scrolling (makes selections be wrapped when moved over the edge), paste order (when pasted fragments needed be pasted "under"), checkered background, regular pixel grid, isometric template, and show surroundings.

Palette dropdown selector is at the right (you can't change its value with mouse wheel or cursor keys).

Top part of the palette is the current Foreground (LMB) and Background (RMB) colors (with hex and decimal index values).

Palette works as color picker for both LMB and RMB. Shift/Alt/Shift+Alt in selection modes are also work. Selected colors are shown as contrast dots at the top left/right corners of the color square. Small dot at the bottom indicates that color is used within current sprite.

Below is the smaller 2x preview of the current sprite, tile sprites of CURRENT preview tile (which coord is displayed at the header), elevation offset, and camera controls.

At the right of the palette is "Autoconfirm" checkbox (saving changes of sprites without confirm window). Lower are set of color/group modification buttons. They change colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself. Lower are rotating/flipping buttons.

Slightly lower is the preview import/open/save block. With it, you can import Xcom1 map block file (.map), or load/save MCD Editor map preview file (.pmap). After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.

At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into "preview surroundings" mode. Window header shows current map coord and sub-tile index. In this mode you can edit each of four sub-tiles of current tile, and change their elevation offset. Also in this mode and with "Show surroundings" mode (or with key "Q" down) you will see all surroundings in the main editor window. Blue dotted outline represents current tile, Red outline is showing "foreground" part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use "Space" key over the sprite to switch to it. "Underlayer dots" at the center of each pixel indicate "underlying" hidden pixels.

In the Menu "Preview map resize ..." opens dialog window to manipulate preview map size. White cells represent empty tiles, grey cells are filled with insides. By clicking arrows you will modify "border" of the map. If you will try to crop the map and actual tiles gonna be cleared, it will warn you. At the right part it's Z adjustment.


  • Mouse wheel scrolling - change foreground color within color group.
  • Ctrl+Z - undo last action (number of current undo levels are shown in the status bar)
  • Ctrl+Shift+Z - redo actions.
  • Ctrl+A - select all.
  • Ctrl+D,Esc - deselect.
  • Shift+Ctrl+D - reselect last selection.
  • Ctrl+Shift+I - invert selection.
  • Ins - fill selected area with foreground (LMB) color.
  • Del - fill selected area with background (RMB) color (ie clears).
  • Cursor keys - move selected area, or pasted fragment. Affected by Wrap scrolling mode.
  • LMB Dragging - over selected pixels move selected area or pasted fragment. Also affected by Wrap scrolling.
  • Enter - Apply pasted fragment.
  • Ctrl+S - save sprite into the memory.
  • Ctrl+X - cut selection into the clipboard, as text (same as copy in clipboard + delete).
  • Ctrl+C - copy selection into the clipboard, as text, which is interchangable with 'Copy/Paste as TXT from the PCK selection line.
  • Ctrl+V - paste selection. Pasted fragment temporarily is in the "second layer" mode (Paste mode in the status bar), and can be repositioned with ctrl+cursor or ctrl+lmb drag. Any other action applies it to the sprite.
  • Ctrl - modifier for scissors mode: cuts selected part and moves it either by cursor keys, or LMB dragging. Cut area is filled with background (RMB) color. Moved fragment gets into the "Paste mode" and affected by Wrap scrolling mode. Ctrl is not necessary to hold to continue dragging.
  • F1 - pixel selection.
  • F2 - rectangle selection.
  • F3 - lasso selection.
  • F4 - color selection.
  • F5 - area selection.
  • F6 - draw mode.
  • .(period) - toggle checkered background.
  • '(single quote) - toggle pixel grid.
  • ;(semicolon) - toggle isometric template.
  • ,(comma) - toggle underlaying dots for preview surroundings.
  • [ - toggle sprite contours.
  • Q - when held, toggle "show surroundings" state.
  • Space - over particular pixel in the edit area switch to this tile (its coord is shown at the right part of status bar), only in surround preview mode.

In selection modes you can use Shift to add to the selection (cursor gets '+' sign), Alt to subtract from the selection (cursor gets '-' sign), or both Shift+Alt to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.

Drawing mode

Alt key switches into color picker/highlighter mode, LMB and RMB are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector Color picker works without Alt pressed.

Pixels are drawn with LMB and RMB of respective colors. It works in "smart" drawing mode, when diagonally "touched" neighbour pixels aren't changed (as is often a problem with pixel-based editors).

With Shift key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).

When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).


The config file contains paths to the game folders for ufo and tftd and optionally folders for "alternative" versions.

Setting alternative folders switches MCDEdit into compare mode - if MCD values are different, they will be shown at the right of the current values in red.

Also it contains information about editable MCD fields (index, name, type, help text). If you want to clarify help/field names - you can do that any time, and feel free to share the config.

boxpat entries are defining "isometric template", you can modify it if you want.


Current version 1.17j (2016-08-27) (download - right click on the link and select 'Save As')


MCD Edit is a Windows based application. Designed to run natively on both x86/x64 systems, it is written using Borland Delphi 7, and can be easily run on other platforms using Wine (or a similar tool).