Difference between revisions of "MCDEdit"

From UFOpaedia
Jump to navigation Jump to search
(Created page with "= 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 consis...")
 
Line 9: Line 9:
  
 
* '''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.
 
* '''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 loose 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.
+
* '''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''' trigger 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.
 
* '''Checkered''' trigger 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 [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn't affect anything else.
 
* '''UFO/TFTD''' changes gametype. Vanilla mode will switch between game folders and re-read '''Tilesets'''. In '''custom MCD''' mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn't affect anything else.
* '''Palette''' dropdown menu changes current palette. Current palette is displayed at the right top corner. Ambiguous color entries in the palette will be highlighted in yellow (different indexes but same RGB) - these colours could cause problem when working with RGB graphics (not indexed). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended free tool to edit paletted png files in indexed mode.
+
* '''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 colours could cause problems when working with RGB graphics (not indexed). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended free tool to edit paletted png files in indexed mode.
  
 
At the top of the main area is the MCD preview/selection line with the bar. Yellow highlighted MCDs are animated. You can use the mouse wheel to scroll this list, and ''cursor key/home/end/pgup/pgdown'' to change the selected MCD. '''RMB''' calls the context menu for the clicked MCD (''Copy MCD / Paste MCD / Insert MCD / Add MCD / Delete MCD / Clear MCD'') - 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.
 
At the top of the main area is the MCD preview/selection line with the bar. Yellow highlighted MCDs are animated. You can use the mouse wheel to scroll this list, and ''cursor key/home/end/pgup/pgdown'' to change the selected MCD. '''RMB''' calls the context menu for the clicked MCD (''Copy MCD / Paste MCD / Insert MCD / Add MCD / Delete MCD / Clear MCD'') - 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.

Revision as of 03:38, 29 July 2014

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 trigger 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 colours could cause problems when working with RGB graphics (not indexed). mtPaint is a recommended free tool to edit paletted png files in indexed mode.

At the top of the main area is the MCD preview/selection line with the bar. Yellow highlighted MCDs are animated. You can use the mouse wheel to scroll this list, and cursor key/home/end/pgup/pgdown to change the selected MCD. RMB calls the context menu for the clicked MCD (Copy MCD / Paste MCD / Insert MCD / Add MCD / Delete MCD / Clear MCD) - 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 MCD is not animated - all of them are the same). LMB on a particular image opens the PCK selection screen.

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.

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 screen

PCK view

Besides selecting PCK images you can also manipulate the PCK sheet, associated with the current MCD.

RMB on each PCK opens a context menu (PCK info / Export PCK / Import PCK / Delete PCK / Insert PCK / Export PNG sheet / Import PNG sheet).

Single PCKs are exported as png images at 32x40 resolution, 8bit color (with current palette). Color 0 is "invisible". When importing an image to a PCK, it takes the top-left 32x40 pixels, everything else will be ignored.

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 253/254/255 can't be used because they are used for PCK encoding, and colors below 16 are treated as system thus also not used. For TFTD palettes it also don't use colors of group 9 (144..159).

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). If even a single color is changed, or doesn't match the current palette, it treats it as a "different" palette, and re-converts as if it's RGB+alpha.

PNG sheets 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.

MCDEdit.txt

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.

Download

Current version 1.13 (2014-07-09) (download)