<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://temp.ufopaedia.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Volutar</id>
	<title>UFOpaedia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://temp.ufopaedia.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Volutar"/>
	<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/Special:Contributions/Volutar"/>
	<updated>2026-05-03T09:04:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=72640</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=72640"/>
		<updated>2016-08-27T17:48:30Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Download 1.17j */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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&#039;s a referenced MCD (by some other MCDs, which will be shown at the right part of Status Bar).&lt;br /&gt;
You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;Tab&#039;&#039;/&#039;&#039;Shift+Tab&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You can change spacing between sprites, and margins in &#039;&#039;Edit-&amp;gt;Settings...&#039;&#039;. It will work for both export to and import from PNG, so pay attention, if you&#039;re using non-standard values. Also you can change number of sprites per row when exporting images.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Autoconfirm&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17j (2016-08-27) ([http://volutar.eu5.org/_mcdedit117j.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=72639</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=72639"/>
		<updated>2016-08-27T17:47:32Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 2016-08-26 v1.17j */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-09 v1.17c====&lt;br /&gt;
* Added &amp;quot;Append MCD&amp;quot; (File menu) - chosing another MCD file to be added to the end of current (including PCK and all necessary reference values). MCD count shouldn&#039;t exceed 255.&lt;br /&gt;
* Added command line options, which override corresponding .lyt file values during the start (case sensitive):&lt;br /&gt;
  -custom_mcd [true/false, if it&#039;s custom MCD mode or not]&lt;br /&gt;
  -game_type [1/2]&lt;br /&gt;
  -pal_idx [0-4]&lt;br /&gt;
  -mcd_pref [full path to mcd folder]&lt;br /&gt;
  -selectedfilename [mcd/pck/tab filename without extension]&lt;br /&gt;
  -SelectMCD [selected mcd ID]&lt;br /&gt;
* Added special file (MCD_Saved.dat), which will receivereach saved file absolute path and filename (without extension).&lt;br /&gt;
* RMB click to MCD list doesn&#039;t selcet clicked MCD anymore.&lt;br /&gt;
* Added multiple MCD selection (shift, ctrl)&lt;br /&gt;
* Added delete/clear/copy/paste MCDs throughout selected.&lt;br /&gt;
* Paste MCDs works in two modes: 1. Only one MCD is selected during paste - it will override MCDs sequentially from the buffer; 2. Multiple MCDs are selected during paste (as targets) - it will run through selected MCDs and will override them from the buffer, if buffer run out of MCDs - it will start from first in the buffer (so if copy 1, and paste to 10 will clone it);&lt;br /&gt;
* When multiple MCDs are selected, it becomes possible to modify values of selected MCDs at once (works only for data values, no SCANG, sprite or LOFT). If values are different throughout the selection, it will show &amp;quot;mix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
** Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
====2015-02-18 v1.17e====&lt;br /&gt;
* Added aggregation of SCANG, PCK numbers (animation) and LOFTs for multiple selected MCDs, and multiple modification.&lt;br /&gt;
* When there&#039;s no multiple selected MCDs, it will paste MCD only for single selection (previously paste worked sequentially).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** More informative PCK deletion error.&lt;br /&gt;
** Fixed png import with untouched palette (they were still re-converted for first 16 columnts).&lt;br /&gt;
** Added copy/paste into/from clipboard of multiple PCKs&lt;br /&gt;
** Added export/import from PNG of multiple PCKs (the way similar to sheet - side by side, 10 in row)&lt;br /&gt;
&lt;br /&gt;
====2015-02-19 v1.17f====&lt;br /&gt;
* Added multiple MCDs adding to menu (1,5 and 15)&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCKs adding to menu (1,5 and 15)&lt;br /&gt;
&lt;br /&gt;
====2015-04-06 v1.17g====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Fixed RGBA png import.&lt;br /&gt;
** Fixed insert new PCK.&lt;br /&gt;
** Added &amp;quot;Settings&amp;quot; menu with PCK sheet margin/spacing options and number of sprites per row for export.&lt;br /&gt;
&lt;br /&gt;
====2015-06-21 v1.17h==== &lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* Adding/Deleting MCDs will change particular fields accordingly (Alt_MCD/Die_MCD fields), including consideration if it&#039;s a &amp;quot;door&amp;quot; field or not. Special characters are needed at the tail of particular field names to work properly.&lt;br /&gt;
* Informative warning message if you&#039;re trying to delete MCDs which are used in other MCDs (as Alt_MCD/Die_MCD).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** PasteMode is not going to be turned off in Draw mode until you start drawing.&lt;br /&gt;
** Hover color info and highlight cross now works correcty with overlay/underlay &amp;quot;pasted&amp;quot; fragment.&lt;br /&gt;
** Added tools to rotate (CW/CCW) + Flip (Horizontal/vertical) of selection or &amp;quot;pasted&amp;quot; fragment.&lt;br /&gt;
** Additional small fixes.&lt;br /&gt;
&lt;br /&gt;
====2015-06-23 v1.17i==== &lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* Alt_MCD/Die_MCD readjustment rules are changed - now it affects Alt_MCD only if it&#039;s a door, and Die_MCD only if it&#039;s not 0.&lt;br /&gt;
* Same rules are applied when &amp;quot;Append MCDs&amp;quot; happens (through File menu).&lt;br /&gt;
* Doesn&#039;t allow adding MCDs more than 256 (either through Add or Append or Insert).&lt;br /&gt;
* Fixed graying add/del/ins options for &amp;quot;vanilla&amp;quot; MCDsets (as it meant to be eariler) - now you can&#039;t accidentally change number of vanilla tiles.&lt;br /&gt;
* Showing in which MCDs selected one is used (as Alt/Die) at the right part of the Status Bar.&lt;br /&gt;
* Showing red dots at the &amp;quot;Used&amp;quot; MCDs (the ones which are better not to delete).&lt;br /&gt;
* Fixed wrong &amp;quot;using: MCDs&amp;quot; in warnings when deleting them.&lt;br /&gt;
* If Used MCDs are still deleted, the Using MCDs are getting wrong value replaced with even more wrong &amp;quot;255&amp;quot; (to make it easier to catch).&lt;br /&gt;
&lt;br /&gt;
====2016-08-27 v1.17j==== &lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added new command line option &amp;quot;-pckonly&amp;quot; which runs program in single-window PCK edit mode, without need of MCD files.&lt;br /&gt;
** Separate configuration/layout file pckedit.lyt for standalone PCK mode (without interfering with mcdedit+pckedit settings).&lt;br /&gt;
** &#039;&#039;View-&amp;gt;Height 48&#039;&#039; option toggles full PCK height, useful for bigobs.&lt;br /&gt;
** Import and export of png sheets are now depend on &#039;&#039;Height 48&#039;&#039; mode (either 40 or 48 pixels height).&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=66006</id>
		<title>UNITREF.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=66006"/>
		<updated>2015-06-24T08:38:25Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /*clarification */ 0x77 +0x80/0x82&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [[Saved Game Files|save game file]] that has a record size of 124 bytes for UFO, or 132 for TFTD. Values are unsigned unless otherwise stated. Some bytes represent bitfields. There are 80 records (not all of them necessarily used) for a fixed file size of 9,920 bytes (or 10,560 for TFTD). It goes hand in hand with [[UNITPOS.DAT]].&lt;br /&gt;
&lt;br /&gt;
Comes in three flavours:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Initially created by the GeoScape engine before tactical battles. Stored in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder and contains info on all units that will be present in the coming mission (in an alive state - the deaths of aliens killed by exploding UFO power units isn&#039;t determined until [[Battlescape_Map_Generation#KABOOM.21.21|later]]). Unlike the other two versions, this only contains the bare minimum number of records required to store the units it details.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNITREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Created along with a [[Saved_Game_Files#Battlescape_Files|battlescape save]], contains the mid-mission state of the unit table.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF2.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Appears in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder at the end of combat. Used to determine which troopers/tanks survived, statistic gains via [[experience]], and which aliens need to be hauled off to the [[Alien Containment]] unit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values are presented according to byte offset ([[#0|0]] to [[#123|123]] (or [[#131|131]] for TFTD)) followed by the equivalent hex offset ([[#0x00|0x00]] to [[#0x7B|0x7B]] (or [[#0x83|0x83]] for TFTD)). Notes apply to both UFO and TFTD unless otherwise stated. Let us know what else you can find - refer to the [[#Notes|bottom of the page]] for those values that&#039;re unknown, or to the [[Talk:UNITREF.DAT|talk page]] for further ideas as to what they could be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Decimal)&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Hex)&lt;br /&gt;
!Usage&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x00&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x00&lt;br /&gt;
|Type of unit. Unit scream and movement sound effects are based on this and gender. Gender and flying abilities affect the sprites as well. Not turrets. Specifically: [[#53|[53]]] &amp;amp; [[#54|[54]]] (weapons in hands), [[#115|[115]]] (gender) and [[#120|[120]]] (other flags) affect the final screen image. If the unit is a large unit, this will also determine the appearance of the last three quarters of the unit. This does NOT affect: the flying ability of the unit, the soldier image in the inventory screen, or the special abilities for certain aliens.&lt;br /&gt;
      &amp;lt;b&amp;gt;UFO&amp;lt;/b&amp;gt;                                        &amp;lt;b&amp;gt;TFTD&amp;lt;/b&amp;gt;&lt;br /&gt;
   0: Male/female unarmored X-COM soldier     0: Male/female unarmored X-COM diver   &lt;br /&gt;
   1: Male/female personal armor soldier      1: Male/female plastic armor diver&lt;br /&gt;
   2: Power/flying suit soldier               2: Power/flying suit diver&lt;br /&gt;
   3: Tank                                    3: Tank&lt;br /&gt;
   4: Sectoid                                 4: Aquatoid&lt;br /&gt;
   5: Snakeman                                5: Gillman&lt;br /&gt;
   6: Ethereal                                6: Lobster Man&lt;br /&gt;
   7: Muton                                   7: Tasoth&lt;br /&gt;
   8: Floater                                 8: Calcinite&lt;br /&gt;
   9: Celatid                                 9: Deep One&lt;br /&gt;
  10: Silacoid                               0A: BioDrone&lt;br /&gt;
  11: Chryssalid                             0B: Tentaculat&lt;br /&gt;
  12: Reaper                                 0C: Triscene&lt;br /&gt;
  13: Sectopod                               0D: Hallucinoid&lt;br /&gt;
  14: Cyberdisc                              0E: Xarquid&lt;br /&gt;
  15: Male civilian                          0F: Male civilians&lt;br /&gt;
  16: Female civilian                        10: Female civilians&lt;br /&gt;
  17: Zombie                                 11: Zombie&lt;br /&gt;
 255: Unused                                255: Unused&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;If the corresponding [[UNITPOS.DAT]] record is unused, then the record is unused.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;1&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x01&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x01&lt;br /&gt;
|Inventory paper doll image. File &amp;quot;UFOGRAPH\MAN_&amp;quot;+(char)(value + 48)+&amp;quot;.SPK&amp;quot; will be used as the inventory sprite, unless the value is 0 or 1. In those cases, [[#115|[115]]] and [[#116|[116]]] are used to determine the picture.&lt;br /&gt;
 0: No armor.&lt;br /&gt;
 1: Personal armour.&lt;br /&gt;
 2: Power suit.&lt;br /&gt;
 3: Flying suit.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;2-5&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;2-5&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x02-0x05&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x02-0x05&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|PCK set]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;6-9&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;6-9&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x06-0x09&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x06-0x09&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|TAB index for the PCK data]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;10&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0A&lt;br /&gt;
|Unit facing. Does NOT control HWP turret direction; see [[#24|[24]]].&lt;br /&gt;
   0: North     (up right)&lt;br /&gt;
   1: Northeast (right)&lt;br /&gt;
   2: East      (down right)&lt;br /&gt;
   3: Southeast (down)&lt;br /&gt;
   4: South     (down left)&lt;br /&gt;
   5: Southwest (left)&lt;br /&gt;
   6: West      (up left)&lt;br /&gt;
   7: Northwest (up)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;11&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0B&lt;br /&gt;
|Movement type. When entering a given map location, each tile is checked to see the TU requirements accordingly. [[MCD]][39+[[#11|UnitRef[11]]]] is the offset used. Note: By default, this is 0 for ALL unit types.&lt;br /&gt;
   0: Walking&lt;br /&gt;
   1: Sliding&lt;br /&gt;
   2: Flying&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;12&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0C&lt;br /&gt;
|Current TUs.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;13&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0D&lt;br /&gt;
|Current Health. Health of 0 = Dead. Compare [[#42|[42]]], [[#120|[120]]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For my [[Talk:Bravery|Bravery experience point testing]], I killed 15 of 16 aliens by setting this to zero, and my soldiers to 0 Morale. When I loaded the savegame, the aliens were still &amp;quot;alive&amp;quot; (i.e., up), then all died when I ended this turn. So death is probably only checked when injury happens, and at end of turn... to truly kill them dead on the ground through savegame editing must take more. And arg - when they all died, my soldiers all went to 100 Morale! So I edited them back to 0 Morale. But guess what... then all the aliens died &#039;&#039;&#039;again&#039;&#039;&#039; at the end of &#039;&#039;&#039;next&#039;&#039;&#039; turn, even though they were all on the ground (I heard screams, and all soldiers&#039; Morale went to 100 again). What the heck? The aliens stayed down after that, though. --[[User:MikeTheRed|MikeTheRed]] 16:01, 3 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Update: [[UNITPOS.DAT]] offset 10 bit 2 should be used to kill a unit entirely dead. Thanks, NKF &amp;amp; BB - MTR&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;While the game kills characters when Health&amp;lt;=Fatal Wounds (__ dies message), XComUtil will recover them based if their health is greater than 0.  Haven&#039;t tested an unmodified game.  --[[User:Zaimoni|Zaimoni]] 11:52, 14 April 2007 (CDT)&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;14&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0E&lt;br /&gt;
|Current Stun level &#039;&#039;how much falloff of paralysis every turn? What determines it?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;15&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0F&lt;br /&gt;
|Current Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;16&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x10&lt;br /&gt;
|Current Reactions  &#039;&#039;NKF: affected by health percentage&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;17&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x11&lt;br /&gt;
|Strength&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;18&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x12&lt;br /&gt;
|Current Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;19&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x13&lt;br /&gt;
|Current Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;20&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x14&lt;br /&gt;
|Current Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;21&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x15&lt;br /&gt;
|Current Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;22&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x16&lt;br /&gt;
|Current Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;quot;Base&amp;quot; means the original (total) value (as carried forward from geoscape) - Also see Note 1 re: Base soldier stat values.&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;23&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x17&lt;br /&gt;
|Base Firing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;24&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x18&lt;br /&gt;
|Base Throwing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Tanks (turreted units?) always have 0 throwing accuracy. They use this for turret facing, relative to unit facing. 0 means it&#039;s facing forwards. Additional values are clockwise increments; see [[#10|[10]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;25&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x19&lt;br /&gt;
|Base TUs&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;26&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1A&lt;br /&gt;
|Base Health&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;27&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1B&lt;br /&gt;
|Base Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;28&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1C&lt;br /&gt;
|Base Reactions&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;These Base Armour values are used to show the starting armor value in the Attributes screen (so you can readily see if it&#039;s been damaged&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;29&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1D&lt;br /&gt;
|Base Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;30&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1E&lt;br /&gt;
|Base Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;31&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1F&lt;br /&gt;
|Base Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;32&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x20&lt;br /&gt;
|Base Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;33&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x21&lt;br /&gt;
|Base Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;34&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x22&lt;br /&gt;
|Supposedly this was going to be Health Recharge which would function like the Energy Recharge. Always 0 and ignored by game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;35&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x23&lt;br /&gt;
|Energy to recharge each turn. Equals &#039;&#039;&#039;recruit initial&#039;&#039;&#039; TUs/3 ([[SOLDIER.DAT]][43], &#039;&#039;&#039;not&#039;&#039;&#039; total base TUs). This is a signed byte. See [[Time Units]] and [[Energy#Usage|Energy Usage]]; also see [[#45|[45]]] (energy usage when walking/turning). &#039;&#039;BombBloke: Is this affected by damage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;36&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x24&lt;br /&gt;
|Supposedly this was going to be Armor Recharge which would function like the Energy Recharge. Always 0 and probably unused, but needs testing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;37&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x25&lt;br /&gt;
|Psi skill. Psi stats not displayed/usable until this is greater then 0.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;38&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x26&lt;br /&gt;
|Item to create when unit is unconscious/dead (index into obdata.dat).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;NKF:&amp;lt;/i&amp;gt; If you set this value to that of a usable item, the item that is created in place of the unconscious or dead soldier can be used like the ordinary item. Elerium pods, for example, can be recovered for 50 elerium each after the battle. Weapons can be used as you normally use them, etc.&lt;br /&gt;
&lt;br /&gt;
For unconscious &#039;units&#039;, the item will be treated as the unconscious body - it will retain the name of the unconscious unit when looked at via the inventory screen. Picking up and using the &#039;item&#039; will work, but when the unit wakes up, the &#039;item&#039; image in the soldier&#039;s hands is not cleared, even though the item no longer &#039;exists&#039; in the soldier&#039;s hands. Using this &#039;item&#039; will just crash the battlescape.&lt;br /&gt;
&lt;br /&gt;
Actually, I do not even want to think about what would happen if you &#039;prime&#039; a grenade/stunned body.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;39&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x27&lt;br /&gt;
|&amp;quot;Soldier value&amp;quot; a.k.a. victory points. You gain (or lose, as the case may be) score at the end of combat according to this value when the unit dies.&lt;br /&gt;
*For X-COM units: A soldier with 42 will be worth -42 points if killed. Note this doesn&#039;t seem to apply if the soldier is killed when unconscious. The soldier just vanishes.&lt;br /&gt;
*For aliens: A commander with 35 will give you +35 points if killed.&lt;br /&gt;
*This value is the same as [[SOLDIER.DAT]] bytes 15-16 (a Word) and equals: &lt;br /&gt;
    20 + Missions + Rank Bonus&lt;br /&gt;
    &lt;br /&gt;
    with [[Rank]] Bonus as follows: SGT +1, CPT +3, COL +6, CDR +10&lt;br /&gt;
Note that although this equation holds true, the value is not actually computed per se. Instead, 1 is added directly to it each mission, as is a rank-bonus delta if you advance (e.g. COL to CDR, delta +4). In other words, hacking the Missions or Rank fields does not affect this value.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;40&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x28&lt;br /&gt;
|Index into [[SOLDIER.DAT]], so game knows what to update. 255 = does not belong to anyone (i.e., it&#039;s not a soldier). &#039;&#039;NKF: This byte is critical for player controlled units. If this doesn&#039;t refer to anything, the unit ceases to exist at the end of the game. If it points to a valid soldier entry in soldier.dat, the soldier.dat entry will be updated.&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;41&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x29&lt;br /&gt;
|Animation frame counter for the unit. Used by eg [[Celatid]]s and [[Silacoid]]s. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;42&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2A&lt;br /&gt;
|Rank. Affects morale loss and interface icon (hull for tanks). Only X-COM troopers display rank icons.&lt;br /&gt;
    &amp;lt;u&amp;gt;X-COM&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Rookie   &#039;&#039;Civvies are 0 too&#039;&#039;&lt;br /&gt;
      1: Squaddie&lt;br /&gt;
      2: Sergeant&lt;br /&gt;
      3: Captain&lt;br /&gt;
      4: Colonel&lt;br /&gt;
      5: Commander&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Aliens&amp;lt;/u&amp;gt;&lt;br /&gt;
      1: Commander&lt;br /&gt;
      2: Leader&lt;br /&gt;
      3: Engineer&lt;br /&gt;
      4: Medic&lt;br /&gt;
      5: Navigator&lt;br /&gt;
      6: Soldier&lt;br /&gt;
      7: Terrorist&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Hull shape for X-COM tanks:&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Treaded&lt;br /&gt;
      1: Hover&lt;br /&gt;
&#039;&#039;I don&#039;t see 255 set for three dead mutons in a current game... [[#13|[13]]] (Health=0) seems to be the only reliable death indicator for them. Compare [[#120|[120]]]. -[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;43&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2B&lt;br /&gt;
|Called &amp;quot;deployment&amp;quot; with values of 0 or 1 (0=inside, 1=outside). When alien units are generated for a battle, there is a random chance for this byte to be set. That unit is a &amp;quot;scout&amp;quot; and can be assigned to one of the neutral spawn points on the map without the need to fill up all the alien exclusive points first. In other words with &amp;quot;1&amp;quot; alien unit is spawned at exact random node marked as &amp;quot;civilian/scout&amp;quot; ignoring actual rank of unit. As result - Commander can occasionally be spawned outside of the UFO craft (and ramble around UFO), not in the &amp;quot;contol room&amp;quot;, which has exclusive commander spawn node.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;44&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2C&lt;br /&gt;
|Alien aggression. The higher it is, the less likely an alien will take cover. Maximum of 2. 0=Cautious,1=Normal,2=Aggressive  &#039;&#039;MTR: This is true for aliens in Hobbes game, but soldiers have values from 4 to 254. Garbage? Delete this comment if so.&#039;&#039; This determines the amount of the unit&#039;s TUs that are devoted to shooting: 0=50%,1=60%,2=66%.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;45&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2D&lt;br /&gt;
|Used to calculate energy loss when walking or turning as: INT( TUs / 2&amp;lt;sup&amp;gt;[45]&amp;lt;/sup&amp;gt; ). See [[Energy#Usage]]; compare [[#35|[35]]] (energy recharge per turn). Set this byte to 4 to ensure no energy use whatsoever (maximum map [[Time Units#Time_Unit_Walking_Usage_Tables|tile TU cost]] is 12). &#039;&#039;In Hobbes game, many aliens are 0 and all soldiers are 1, but a dozen aliens have higher values ranging all the way up to 112! Garbage and/or the game doesn&#039;t care if they are garbage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;46&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2E&lt;br /&gt;
|HWP turret image. Only used (and only appears) if unit type [[#0|[0]]]=3 (X-COM tanks):&lt;br /&gt;
    0: Cannon&lt;br /&gt;
    1: Rocket&lt;br /&gt;
    2: Laser&lt;br /&gt;
    3: Plasma&lt;br /&gt;
    4: Blaster&lt;br /&gt;
    5,6: ? Blanks&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For non-tanks, this controls the inventory layout. &#039;&#039;Only&#039;&#039; 0 and 1 are valid. 0 is the standard layout seen on all soldiers. 1 is an alternate layout that may have been intended for custom tank equipment. Larger values only crash the game due to missing files. Also see [[#113|[113]]] and [[#117|[117]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;47&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2F&lt;br /&gt;
|This is a direct copy of offset[48] from the [[MCD]] record of the tile the unit is standing on. A signed byte.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;48&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x30&lt;br /&gt;
|Values for this byte always equal [[#52|[52]]] and are:&lt;br /&gt;
   2  (3x3 square; legacy 5 pixels):  Sectoid&lt;br /&gt;
   3  (5x5 square, corners removed; legacy 7 pixels):  Celatid, Chryssalid, Civvie,&lt;br /&gt;
      Ethereal, Floater, Muton, Snake, &#039;&#039;&#039;Soldier&#039;&#039;&#039;&lt;br /&gt;
   4  (7x7 octagon; legacy 9 pixels):  Cyberdisc, Hovertank, Reaper, Sectopod, Tank&lt;br /&gt;
   5 (9x9 square, Ls with 3-pixel legs removed; legacy 11 pixels):  Silacoid&lt;br /&gt;
Based on copious research by [[User:Bomb_Bloke|Bomb_Bloke]], [[User:Seb76|Seb76]], [[user:Zombie|Zombie]], and others, this has been found to be a LOF Template look-up for the shape of targets; Loftemps 2 to 5 define the &amp;quot;3D&amp;quot; shape of units relative to Line Of Fire as a cylinder, where 2 (Sectoid) is a thin cylinder and 5 (Silacoid) is very wide. The pixel width of each &amp;quot;silhoutte&amp;quot; that [[LOFTEMPS.DAT]] corresponds to has been added to the list above (see LOFTemps images 2-5). Tiles are 16 pixels wide in the X or Y direction (that&#039;s what this byte is about), and 24 pixels high (compare [[#49|[49]]]).&lt;br /&gt;
&lt;br /&gt;
This cylindrical shape is used in conjunction with height [[#49|[49]]] to define the silhouette that targets present to a shooter. Combine the pixel-width cross-section from Loftemps with height to find the cross-sectional area presented to shooters (sorted on increasing cross-section):&lt;br /&gt;
&lt;br /&gt;
                     LOF     LOF             Cross    Percent&lt;br /&gt;
                    Lookup  Width   Height  Section   of 384    Float   4x?&lt;br /&gt;
 Type               &#039;&#039;UR[48]  Pixels  UR[[#49|[49]]] Pxls X Ht  (16x24)   UR[[#51|[51]]]&#039;&#039;&lt;br /&gt;
 ----               ------  ------  ------ ---------  -------   ------  ---&lt;br /&gt;
 Sectoid               2       5      16       80      20.8%       -     -&lt;br /&gt;
 Celatid               3       7      12       84      21.9%       6     -&lt;br /&gt;
 Soldier (Kneeling)    3       7      14       98      25.5%       -     -&lt;br /&gt;
 Hovertank             4       9      12      108      28.1%       6    Yes&lt;br /&gt;
 Silacoid              5      11      10      110      28.6%       -     -&lt;br /&gt;
 Snakeman              3       7      18      126      32.8%       -     -&lt;br /&gt;
 Zombie                3       7      18      126      32.8%       -     -&lt;br /&gt;
 Ethereal              3       7      20      140      36.5%       -     -&lt;br /&gt;
 Cyberdisc             4       9      15      135      35.2%       2    Yes&lt;br /&gt;
 Chryssalid            3       7      21      147      38.3%       -     -&lt;br /&gt;
 Civilian              3       7      21      147      38.3%       2     -&lt;br /&gt;
 Floater               3       7      21      147      38.3%       2     -&lt;br /&gt;
 Muton                 3       7      21      147      38.3%       -     -&lt;br /&gt;
 Tank                  4       9      16      144      37.5%       -    Yes&lt;br /&gt;
 Soldier               3       7      22      154      40.1%       -     -&lt;br /&gt;
 Reaper                4       9      23      207      53.9%       -    Yes&lt;br /&gt;
 Sectopod              4       9      23      207      53.9%       -    Yes&lt;br /&gt;
Units take up an amount of the whole tile (as seen in cross-section by a shooter) as shown in the &amp;quot;Percent of 384&amp;quot; column. In reality, though, the [[Firing Accuracy|accuracy]] of shots makes this a more complex topic than the percents suggest. Also, dividing by 384 is an oversimplification, since it implies a directly rectangular shot (shooting right down the X or Y axis). While it&#039;s useful to see, keep in mind that this column only shows relative numbers.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;[[User:Zaimoni|Zaimoni]]: actual cross section depends on shot facing.  The table is close to correct for pure diagonal shots, so leaving alone for now.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The unit Float number ([[#51|[51]]], below) is shown simply for convenience. It does not enter into the cross-sectional computations. &amp;quot;4x&amp;quot; units actually consist of four units grouped in tight 2x2 formation (making their cross section effectively much larger then the percentage stated).&lt;br /&gt;
&lt;br /&gt;
Note that causing an X-Com soldier to kneel causes their cross section to fall by 36.36~% of that of when they are standing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;49&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x31&lt;br /&gt;
|[[height|Standing height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;50&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x32&lt;br /&gt;
|[[height|Kneeling height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;51&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x33&lt;br /&gt;
|Floating [[height]]. A unit &#039;floats&#039; this high above the ground, thus allowing shots to fly underneath. The highest point of a unit can be found by adding this to the units height stat. &amp;lt;i&amp;gt;Does this have an effect on explosive damage?&amp;lt;/i&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;52&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x34&lt;br /&gt;
|&amp;quot;Radius&amp;quot; of LOF Template. Always the same as [[#48|[48]]] in all known saved games. More info can be found at [[Talk:UNITREF.DAT#Offsets_0x30_.26_0x34|Talk:UNITREF.DAT#Offsets_0x30_&amp;amp;_0x34]] ([48] and [52]).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;53&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x35&lt;br /&gt;
|Image index for item in left hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;54&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x36&lt;br /&gt;
|Image index for item in right hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;NKF:&#039;&#039; If there is no item in the unit&#039;s hands, but one of the above two bytes are set, the &#039;image&#039; that represents the item will still be displayed in the battlescape. If these phantom items are clicked on, the game crashes. If the image is not the right type for the real item in hand, the ammo count doesn&#039;t get displayed. Otherwise, it&#039;ll work as normal.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;55&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x37&lt;br /&gt;
|[[Damage#Susceptible_to...|Damage Modifier]] Category&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed in the executable. A value of 1 indicates the first DM category, a value of 4 indicates the 4th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but I think there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Value&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
    &#039;&#039;&#039;0&#039;&#039;&#039;      Terrain and Items&lt;br /&gt;
    &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
    &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
    &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
    &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
    &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
    &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
    &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
    &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
    &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
   &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
   &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
   &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
   &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;56&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;56&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x38&lt;br /&gt;
|[[Melee Accuracy]] ([[SOLDIER.DAT]] bytes 50 (initial) &amp;amp; 60 (increase) added together)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;57&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;57&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x39&lt;br /&gt;
|[[Psionic Strength]]&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;58&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;58&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3A&lt;br /&gt;
|Current [[Morale]]. Base morale is hardcoded to 100.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;59&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;59&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3B&lt;br /&gt;
|[[Bravery]] = 110 - (10 * &#039;&#039;this value&#039;&#039;)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;60&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3C&lt;br /&gt;
|Panic mode. This takes effect at the start of the unit&#039;s next turn. Since it is cleared at that point, you&#039;ll never see it at anything other then 0 in the save files. You can manually change it to other values to force a specific panic attack on the next turn.&lt;br /&gt;
   0: None&lt;br /&gt;
   1: Freeze&lt;br /&gt;
   2: Running&lt;br /&gt;
   3: Berserk&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;61&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;61&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3D&lt;br /&gt;
|[[#62|[62]]] will increment by this amount whenever the unit moves.&lt;br /&gt;
   3: Sectiod                                    &#039;&#039;- Hobbes&#039;&#039;&lt;br /&gt;
   4: Soldiers, civs, and all other aliens (but Hobbes had no Large aliens)&lt;br /&gt;
  30: Tank/Laser&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;62&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;62&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3E&lt;br /&gt;
|Visibility via motion scanner. The bigger it is, the bigger the blip. Test this one out for values.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;63&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;63&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3F&lt;br /&gt;
|Number of [[Fatal Wounds]] to head.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;64&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;64&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x40&lt;br /&gt;
|Number of fatal wounds to torso.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;65&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;65&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x41&lt;br /&gt;
|Number of fatal wounds to right arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;66&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;66&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x42&lt;br /&gt;
|Number of fatal wounds to left arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;67&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;67&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x43&lt;br /&gt;
|Number of fatal wounds to right leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;68&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;68&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x44&lt;br /&gt;
|Number of fatal wounds to left leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;69-70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;69-70&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x45-0x46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x45-0x46&lt;br /&gt;
|Indexes into [[ROUTES.DAT]]. To start with, aliens will be located at the same position as the node indicated by byte 69.&lt;br /&gt;
:For patrol AI (no X-COM units sighted in turn 1, either X-COM or alien):&lt;br /&gt;
::Byte 69 is the index of the node of the start of the planned move.&lt;br /&gt;
::Byte 70 is the index of the node of the end of the planned move.&lt;br /&gt;
:Note that the move may be multi-turn, and byte 69 is not guaranteed to update during a multi-turn move.  I think it will if the alien ends its move on a node, however. -- Zaimoni&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;71&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x47&lt;br /&gt;
|Unit lighting: always 16 for XCom units, 0 for most aliens but 1 for cyberdisc. If greater than 1, it is set to 1 when unit inactive - see the [[Talk:UNITREF.DAT#Offset_0x47|Talk]] page.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;72&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x48&lt;br /&gt;
|The amount of [[Morale]] that has been restored using the [[Medi-Kit (EU)|Medkit&#039;s]] painkillers. The amount that &#039;&#039;can&#039;&#039; be restored is equal to the maximum health of the unit (index 26) minus their current health (index 13) further minus this.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;73&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x49&lt;br /&gt;
|Intelligence. Rated from 2 - 8. Indicates for how many turns the alien will know the location of spotted soldiers. &#039;&#039;Hey - why do humans have zero intelligence? :(&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;74&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4A&lt;br /&gt;
|AI Mode. Zaimoni found [http://www.strategycore.co.uk/forums/UFO-AI-patch-t8908.html&amp;amp;st=20&amp;amp;start=20 Here] that the values are 0:PATROL, 1:SNIPER, 2:ATTACKING, 3:ESCAPING, 4:GUARD, 5:Returning to UFO. 255 (-1) is also possible. Zaimoni tripped this by wounding a Floater in SNIPER mode; it returned fire, then was taken down by another soldier. Snap guess is that this is a &amp;quot;recalculate&amp;quot; marker.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;75&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4B&lt;br /&gt;
|Unknown. With that said, the only item remaining on my list is called &amp;quot;lightdirect&amp;quot; or direction of light for a unit (0=all around, 1=direction unit facing). Unused by game code and always 0. Maybe it was for a hand-held light source, or a armor-mounted flashlight?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;76-77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;76-77&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4C-0x4D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4C-0x4D&lt;br /&gt;
|Mission count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]  &#039;&#039;MTR: Wonder why they bothered to put this in Unitref since this will never change &#039;&#039;&#039;during&#039;&#039;&#039; a mission; compare how soldier stats are actually read from SOLDIER (not UNITREF) on return to geoscape. Is Missions shown anywhere on the combatscape?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;78-79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;78-79&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4E-0x4F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4E-0x4F&lt;br /&gt;
|Kill count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]. Number of kills this unit has made for ALL missions, not just this one. This one &#039;&#039;&#039;can&#039;&#039;&#039; vary &amp;quot;unpredictably&amp;quot; and thus is the only byte known to directly carry forward into the geoscape / Soldier.Dat!&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;80&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;80&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x50&lt;br /&gt;
|[[Reactions]] experience counter, for number of reaction shots. It doesn&#039;t matter if they hit the target; reactions still count. &amp;lt;b&amp;gt;See Note 2 re: Experience counters.&amp;lt;/b&amp;gt; (Also note: Aliens do not use experience counters.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NKF:&#039;&#039; Where does death by fire (overexposure rather than incendiary shell impact) fit into the experience counters? It becomes a non-assigned kill, I guess, like death by wounds, or death by a grenade that hasn&#039;t got an owner?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;81&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x51&lt;br /&gt;
|[[Firing Accuracy]] experience counter, for number of hits on an enemy (lethal or not, grenades or bullets). Each Autoshot hit counts as 1, so you can get 3 hits from one Autoshot burst. Likewise, grenades and blaster bombs can hit multiple targets with one explosion. Also, if you miss the intended target but hit a different alien, it still counts. Finally, if your shot actually has zero [[Damage]], it does still count as a hit. (Not due to armor blockage; a pure roll of 0 coming out of the gun.) &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;82&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;82&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x52&lt;br /&gt;
|[[Melee Accuracy]] experience counter, for number of times stun rod has been used (not stun bombs).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;83&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x53&lt;br /&gt;
|[[Throwing Accuracy]] experience counter, for number of times unit has thrown any object.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;84&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;84&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x54&lt;br /&gt;
|&amp;lt;div id=&amp;quot;Psi_Skill_Experience_Counter&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;[[Psionic Skill]] experience counter, for number of psi attacks performed. 1 is added if attempt was unsuccessful, 3 if it was successful. Note: if this value goes over 255, all psi experience is lost. That&#039;s 85 successful psis (255/3). So be careful of marathon psi&#039;ing (a minimum of 43 turns at 2 psis/turn, 29 turns at 3/turn).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;85&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;85&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x55&lt;br /&gt;
|[[Bravery]] experience counter, for number of times unit has &#039;&#039;resisted&#039;&#039; panicking, despite Morale &amp;lt; 50.  Being mind-controlled, panicking, or going berserk does &#039;&#039;not&#039;&#039; increase this stat -- although Panic Unit attacks will reduce Morale to the point where panic checks will be performed by the game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;86-110&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;86-110&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x56-0x6E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x56-0x6E&lt;br /&gt;
|Unit&#039;s &amp;lt;b&amp;gt;Name&amp;lt;/b&amp;gt;. Standard string ended by null byte. The rest can hold garbage.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;111&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;111&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x6F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x6F&lt;br /&gt;
|Called &amp;quot;BigFire&amp;quot;. If true (value of 1) then the unit is currently firing a weapon. It reverts back to 0 afterwards - determines whether to render the gun and firing arm in the &amp;quot;pointing weapon&amp;quot; position, or whether the weapon is being held against the chest. If manually set to a value above 0, the unit will hold its weapon out until such time as it actually uses it.&lt;br /&gt;
&lt;br /&gt;
Note that this value is only used by units holding two-handed weapons. A unit holding for eg a pistol will &#039;&#039;always&#039;&#039; point the weapon, and uses a different arm sprite for the purposes of doing so (regardless of whether or not the weapon is being fired).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;112&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;112&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x70&lt;br /&gt;
|Called &amp;quot;Finished&amp;quot;. If true (value of 1) signifies that the unit finished AI actions for current turn.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;113&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;113&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x71&lt;br /&gt;
|If 1, then you can&#039;t use the inventory button and the unit will be immune to stun. Used for tanks. Mind controlled units don&#039;t use this but their button disables anyway.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;BombBloke:&#039;&#039; This is the only way to access tank inventories.&lt;br /&gt;
*Tank/Cannon has a normal inventory and uses man_1m0.spk.&lt;br /&gt;
*Tank/Rocket Launcher has a different layout and uses man_1m0.spk.&lt;br /&gt;
*Tank/Laser Cannon uses man_œ.spk, which doesn&#039;t exist normally. Providing this file still crashes.&lt;br /&gt;
*Hovertank/Plasma simply crashes.&lt;br /&gt;
*Hovertank/Launcher simply crashes.&lt;br /&gt;
&lt;br /&gt;
[[#1|[1]]] actually determines the inventory screen used, might be worth playing with that. [[#46|[46]]] determines the layout.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;114&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;114&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x72&lt;br /&gt;
|If not 0, then unit is on fire, and will burn for this amount of turns.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;115&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;115&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x73&lt;br /&gt;
|Gender: 0 = male, 1 = female.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;116&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;116&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x74&lt;br /&gt;
|Hair/skin colour (for inventory; all other units = 0):&lt;br /&gt;
   0: Blond caucasian&lt;br /&gt;
   1: Brunette caucasian&lt;br /&gt;
   2: Asian&lt;br /&gt;
   3: Black&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;117&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;117&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x75&lt;br /&gt;
|Turret weapon. Over-rides hand held weapon. Turret images are not centered; that would be impossible because they aren&#039;t all &#039;objects&#039; (e.g. Celatid). &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
                                                       F.A.  TUs        F.A.  TUs&lt;br /&gt;
   0: HWP cannon (bigobs[40])....................Aimed  90%  80%   Snap  60%  33%&lt;br /&gt;
   1: HWP rocket (bigobs[42])....................Aimed 115%  75%   Snap  55%  45%&lt;br /&gt;
   2: HWP laser (bigobs[54]).....................Aimed  85%  75%   Snap  50%  33%&lt;br /&gt;
   3: HWP plasma cannon (bigobs[43]).............Aimed 100%  60%   Snap  86%  30%&lt;br /&gt;
   4: HWP blaster (bigobs[43]) (looks like ordinary cannon?)......Aimed 120%  80%&lt;br /&gt;
   5: Celatid plasma cannon (bigobs[38]).........Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   6: Cyberdisc plasma cannon (bigobs[34]).......Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   7: Sectopod Laser* cannon (bigobs[34])as cyberdisk, above, plus Auto  50%  35%&lt;br /&gt;
  22: Invalid - Incredibly powerful armour piercing shell. Overpowering.&lt;br /&gt;
 255: Unused&lt;br /&gt;
Note: This item will take precendence over any item carried in the hand slots. It can be installed on non-tanks, but then the unit won&#039;t be able to use any carried weapons or items. This weapon is NOT affected by the kneeling modifier, but it is affected by the current unit&#039;s accuracy stat. Also note, this byte does NOT determine the turret image for HWPs in the battlescape.&lt;br /&gt;
&lt;br /&gt;
[*]The damage type for the Sectopod is indeed set to (3)laser in the executable! Graphical/sound effects of a turret weapon is set there as well, via a reference to a weapon in OBDATA.DAT (HWP Cannon=4=Heavy Cannon, Sectopod=34=Heavy Plasma) &#039;&#039;When I changed HWP Cannon to 2, it looked/sounded like rifle fire - Crus8r&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also see [[#46|[46]]], [[#113|[113]]], and [[#118|[118]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;118&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;118&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x76&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x76&lt;br /&gt;
|Ammo for [[#117|[117]]] turret weapon&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;119&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;119&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x77&lt;br /&gt;
|[Garbage unused by game] Movement related? Large unit related? Possible bitfield.&lt;br /&gt;
 &#039;&#039;MTR:&#039;&#039;&lt;br /&gt;
 00000000   0 Chryssalid(2), Civilian(9), Ethereal(2), Floater(2), Muton, &lt;br /&gt;
 00000001   1 Muton, PA Soldier(2)                   Sectoid(2), Silacoid(2), &lt;br /&gt;
 00000011   3 PA Soldier                            PA Soldier(2), Tank/Laser&lt;br /&gt;
 00000101   5 Snakeman&lt;br /&gt;
 00001010  10 Celatid             &#039;&#039;- Hobbes game - could have some garbage&#039;&#039;&lt;br /&gt;
 00001101  13 Muton, PA Soldier   &#039;&#039;  (parens) is count, if more than 1 unit&#039;&#039;&lt;br /&gt;
 00010011  19 Snakeman&lt;br /&gt;
 00100110  38 PA Soldier&lt;br /&gt;
 00101010  42 Muton(3)&lt;br /&gt;
 00110001  49 Muton&lt;br /&gt;
 00110010  50 PA Soldier&lt;br /&gt;
 00110101  53 Silacoid(2)&lt;br /&gt;
 00111011  59 Celatid&lt;br /&gt;
 00111111  63 Silacoid&lt;br /&gt;
 01001110  78 PA Soldier&lt;br /&gt;
 01100111 103 PA Soldier&lt;br /&gt;
 01111111 127 Muton&lt;br /&gt;
 10010000 144 Muton&lt;br /&gt;
 11000000 192 Celatid&lt;br /&gt;
 11111110 254 Muton&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;120-123&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;120-123&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x78-0x7B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x78-0x7B&lt;br /&gt;
|Unit bit flags (32bit), mainly re: mobility. They do NOT affect the soldier in inventory screen: &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
 (  1) 1: 1 = Unit moving.&lt;br /&gt;
 (  2) 2: 1 = Unit can fly.&lt;br /&gt;
 (  4) 3: 1 = Unit is flying. (Toggles leg sprites for power armour.)&lt;br /&gt;
 (  8) 4: 1 = Has been to this unit in next unit loop. Or to put it another way, has the unit been selected this turn.&lt;br /&gt;
 ( 16) 5: 1 = Unit has been disabled for selection.&lt;br /&gt;
              (Stops the unit tab button from selecting this soldier.)&lt;br /&gt;
 ( 32) 6: 0 = Unit has left hand object selected, 1 = right hand object selected.&lt;br /&gt;
 ( 64) 7: 1 = Unit is kneeling.&lt;br /&gt;
 (128) 8: 1 = Unit is wearing power/flying suit. (Can&#039;t be stunned by smoke flag? &lt;br /&gt;
              Seems to work for fire, too.)&lt;br /&gt;
If a unit is carrying something in either hand, it is impossible to get him to appear as if he is carrying nothing - in the game, at least. If he is carrying nothing, bit 6 can flag (as though the unit was using it&#039;s right hand item). But maybe it&#039;s just the order of dropped items affecting this?&lt;br /&gt;
&lt;br /&gt;
Note: A unit is only considered as flying if it is not on the ground. For example, a hover tank is not always considered as flying.&lt;br /&gt;
&lt;br /&gt;
What if a hovertank is half on the ground, half in the air? What about a treaded tank, or large alien unit? What about units in lifts?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;124-125&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;124-125&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7C-0x7D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7C-0x7D&lt;br /&gt;
|TFTD ONLY - Bubble animation count for soldiers.  Can be 0 to 16 (0x0F).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;126-127&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;126-127&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7E-0x7F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7E-0x7F&lt;br /&gt;
|TFTD ONLY - Bubble animation delay, skips this amount of frames.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;128-129&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;128-129&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x80-0x81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x80-0x81&lt;br /&gt;
|TFTD ONLY - Bubble animation enable. (0=disable, 1=enable) - [unused by game - taken from &amp;quot;underwater&amp;quot; flag]&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;130-131&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;130-131&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x82-0x83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x82-0x83&lt;br /&gt;
|TFTD ONLY - Called &amp;quot;floorabove&amp;quot; flag. Is there a floor above unit? (0=no, 1=yes) [unused by game - calculated on-fly]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
1) The original/base values for &amp;lt;b&amp;gt;soldier stats&amp;lt;/b&amp;gt; (offsets [[#23|[23]]]-[[#28|[28]]], etc.) correspond to the initial+increase bytes from [[SOLDIER.DAT|Soldier.Dat]] (bytes 43-62). Changes to these Unitref bytes are &amp;lt;i&amp;gt;lost&amp;lt;/i&amp;gt;  when the mission ends; instead, XCOM re-reads them from Soldier at that time. This makes sense because base soldier stats don&#039;t change &amp;lt;i&amp;gt;during&amp;lt;/i&amp;gt; a mission per se (although they might increase when the mission ends); in this way, the programmers didn&#039;t have to bother with separately storing and/or adding initial+increase during combat. (It&#039;s also why you don&#039;t see the initial+increase in the soldier stat display during combat, that you can see back at base.) On a practical note, if you are testing soldier stat increases versus experience counters, change the experience counters in Unitref, but change the soldier stats in Soldier. (IOW, it doesn&#039;t matter what the soldier stats are in the combat mission.)&lt;br /&gt;
&lt;br /&gt;
The Kill count (offset [[#78-79|[78-79]]]) is the only Unitref value I know of that is directly carried forward into the geoscape and Soldier.dat. However, some others do indirectly carry forward, for example: experience (offsets [[#80|[80]]]-[[#85|[85]]]) causes stat and rank increases, and decreased health (offset [[#26|[26]]] - offset [[#13|[13]]]) means hospital time. And, of course, death is permanent. Heh.&lt;br /&gt;
&lt;br /&gt;
2) &amp;lt;b&amp;gt;Experience counters&amp;lt;/b&amp;gt; (offsets [[#80|[80]]]-[[#85|[85]]]) determine the likelihood of soldier stat increases at the end of the combat mission, according to the formula for Primary Stats shown [[Experience#How_Experience_Points_Are_Applied|here]]. The Bravery counter (offset [[#85|[85]]]) affects Bravery as shown [[Bravery|here]].&lt;br /&gt;
&lt;br /&gt;
Also, if at least one of the experience counters (except Throws) has a count, your secondary stats will increase, as discussed [[Experience#Secondary_Stats|here]]. All you need is at least a 1 in offsets [[#80|[80]]]-[[#82|[82]]] or [[#84|[84]]]-[[#85|[85]]]; more than 1 and/or multiple counters has no additional effect.&lt;br /&gt;
&lt;br /&gt;
3) BombBloke&#039;s additional &amp;quot;To be Done&amp;quot; notes - can we cross some of these off yet?&lt;br /&gt;
&lt;br /&gt;
   Need to research:&lt;br /&gt;
   Stun recovery rate, does it exist?&lt;br /&gt;
   Hand to hand attacks&lt;br /&gt;
   &amp;lt;strike&amp;gt;Offset of weapon from unit image?&amp;lt;/strike&amp;gt; &lt;br /&gt;
   &#039;&#039;Based on unit height and nothing else. There may be values to determine what arm sprites to use,&#039;&#039;&lt;br /&gt;
   &#039;&#039;but I doubt it.&#039;&#039;&lt;br /&gt;
   Firing sprite offset? &lt;br /&gt;
   &#039;&#039;Probably just based on unit height and some hardcoded values in the executable.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Inventory lockout?&amp;lt;/strike&amp;gt; &#039;&#039;All mind controlled units are locked out.&#039;&#039;&lt;br /&gt;
   Kneel lockout? &lt;br /&gt;
   &#039;&#039;Probably the same as above, I seem to remember that using XcomUtil to &amp;quot;swap sides&amp;quot; would make it&#039;&#039;&lt;br /&gt;
   &#039;&#039;possible to kneel small alien units.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Aliens seen?&amp;lt;/strike&amp;gt; &#039;&#039;Not used in unitref.dat, only in unitpos.dat. -[[User:Zombie|Zombie]] 23:48, 29 September 2006 (PDT)&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Whether a unit slides/floats/hovers/rolls/walks (movement noise)?&amp;lt;/strike&amp;gt; &#039;&#039;Set according to unit type.&#039;&#039;&lt;br /&gt;
   What else? The more to look for, the easier it is...&lt;br /&gt;
   &lt;br /&gt;
   Know 119 values.&lt;br /&gt;
   Unknown values (5 in total):&lt;br /&gt;
   [[#75|[075 / 0x4B]]] - Always 0?&lt;br /&gt;
   [[#119|[119 / 0x77]]] - No idea, possible bitfield, could be anything.&lt;br /&gt;
   [[#121|[121 / 0x79]]] - Second unit gets a value of 16. Everyone else gets 0. No obvious purpose.&lt;br /&gt;
   [[#122|[122 / 0x7A]]] - Always 0?&lt;br /&gt;
   [[#123|[123 / 0x7B]]] - Always 0?&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
4) Hobbes posted a savegame with a TON of different aliens in it [http://www.xcomufo.com/forums/index.php?showtopic=8591 here] (message 6). Interesting for testing. But note it was made with XCOMUTIL and there may(?) be concerns over vailidity of unit info - see [[Talk:UNITREF.DAT]].&lt;br /&gt;
&lt;br /&gt;
5) A [[HackerTools|Hex Workshop]] Structure Library for UNITREF.DAT created by Danial is [[UNITREF_DAT_HSL|here]].&lt;br /&gt;
&lt;br /&gt;
== For More Information ==&lt;br /&gt;
*[[SOLDIER.DAT]]&lt;br /&gt;
*[[Soldiers|Soldier Stats]]&lt;br /&gt;
*[[Experience]]&lt;br /&gt;
*[[HackerTools|Hex editing]]&lt;br /&gt;
&lt;br /&gt;
Return to [[Saved_Game_Files|Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=66005</id>
		<title>UNITREF.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=66005"/>
		<updated>2015-06-24T08:30:09Z</updated>

		<summary type="html">&lt;p&gt;Volutar: Undo revision 66004 by Volutar (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [[Saved Game Files|save game file]] that has a record size of 124 bytes for UFO, or 132 for TFTD. Values are unsigned unless otherwise stated. Some bytes represent bitfields. There are 80 records (not all of them necessarily used) for a fixed file size of 9,920 bytes (or 10,560 for TFTD). It goes hand in hand with [[UNITPOS.DAT]].&lt;br /&gt;
&lt;br /&gt;
Comes in three flavours:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Initially created by the GeoScape engine before tactical battles. Stored in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder and contains info on all units that will be present in the coming mission (in an alive state - the deaths of aliens killed by exploding UFO power units isn&#039;t determined until [[Battlescape_Map_Generation#KABOOM.21.21|later]]). Unlike the other two versions, this only contains the bare minimum number of records required to store the units it details.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNITREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Created along with a [[Saved_Game_Files#Battlescape_Files|battlescape save]], contains the mid-mission state of the unit table.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF2.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Appears in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder at the end of combat. Used to determine which troopers/tanks survived, statistic gains via [[experience]], and which aliens need to be hauled off to the [[Alien Containment]] unit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values are presented according to byte offset ([[#0|0]] to [[#123|123]] (or [[#131|131]] for TFTD)) followed by the equivalent hex offset ([[#0x00|0x00]] to [[#0x7B|0x7B]] (or [[#0x83|0x83]] for TFTD)). Notes apply to both UFO and TFTD unless otherwise stated. Let us know what else you can find - refer to the [[#Notes|bottom of the page]] for those values that&#039;re unknown, or to the [[Talk:UNITREF.DAT|talk page]] for further ideas as to what they could be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Decimal)&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Hex)&lt;br /&gt;
!Usage&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x00&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x00&lt;br /&gt;
|Type of unit. Unit scream and movement sound effects are based on this and gender. Gender and flying abilities affect the sprites as well. Not turrets. Specifically: [[#53|[53]]] &amp;amp; [[#54|[54]]] (weapons in hands), [[#115|[115]]] (gender) and [[#120|[120]]] (other flags) affect the final screen image. If the unit is a large unit, this will also determine the appearance of the last three quarters of the unit. This does NOT affect: the flying ability of the unit, the soldier image in the inventory screen, or the special abilities for certain aliens.&lt;br /&gt;
      &amp;lt;b&amp;gt;UFO&amp;lt;/b&amp;gt;                                        &amp;lt;b&amp;gt;TFTD&amp;lt;/b&amp;gt;&lt;br /&gt;
   0: Male/female unarmored X-COM soldier     0: Male/female unarmored X-COM diver   &lt;br /&gt;
   1: Male/female personal armor soldier      1: Male/female plastic armor diver&lt;br /&gt;
   2: Power/flying suit soldier               2: Power/flying suit diver&lt;br /&gt;
   3: Tank                                    3: Tank&lt;br /&gt;
   4: Sectoid                                 4: Aquatoid&lt;br /&gt;
   5: Snakeman                                5: Gillman&lt;br /&gt;
   6: Ethereal                                6: Lobster Man&lt;br /&gt;
   7: Muton                                   7: Tasoth&lt;br /&gt;
   8: Floater                                 8: Calcinite&lt;br /&gt;
   9: Celatid                                 9: Deep One&lt;br /&gt;
  10: Silacoid                               0A: BioDrone&lt;br /&gt;
  11: Chryssalid                             0B: Tentaculat&lt;br /&gt;
  12: Reaper                                 0C: Triscene&lt;br /&gt;
  13: Sectopod                               0D: Hallucinoid&lt;br /&gt;
  14: Cyberdisc                              0E: Xarquid&lt;br /&gt;
  15: Male civilian                          0F: Male civilians&lt;br /&gt;
  16: Female civilian                        10: Female civilians&lt;br /&gt;
  17: Zombie                                 11: Zombie&lt;br /&gt;
 255: Unused                                255: Unused&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;If the corresponding [[UNITPOS.DAT]] record is unused, then the record is unused.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;1&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x01&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x01&lt;br /&gt;
|Inventory paper doll image. File &amp;quot;UFOGRAPH\MAN_&amp;quot;+(char)(value + 48)+&amp;quot;.SPK&amp;quot; will be used as the inventory sprite, unless the value is 0 or 1. In those cases, [[#115|[115]]] and [[#116|[116]]] are used to determine the picture.&lt;br /&gt;
 0: No armor.&lt;br /&gt;
 1: Personal armour.&lt;br /&gt;
 2: Power suit.&lt;br /&gt;
 3: Flying suit.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;2-5&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;2-5&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x02-0x05&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x02-0x05&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|PCK set]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;6-9&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;6-9&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x06-0x09&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x06-0x09&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|TAB index for the PCK data]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;10&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0A&lt;br /&gt;
|Unit facing. Does NOT control HWP turret direction; see [[#24|[24]]].&lt;br /&gt;
   0: North     (up right)&lt;br /&gt;
   1: Northeast (right)&lt;br /&gt;
   2: East      (down right)&lt;br /&gt;
   3: Southeast (down)&lt;br /&gt;
   4: South     (down left)&lt;br /&gt;
   5: Southwest (left)&lt;br /&gt;
   6: West      (up left)&lt;br /&gt;
   7: Northwest (up)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;11&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0B&lt;br /&gt;
|Movement type. When entering a given map location, each tile is checked to see the TU requirements accordingly. [[MCD]][39+[[#11|UnitRef[11]]]] is the offset used. Note: By default, this is 0 for ALL unit types.&lt;br /&gt;
   0: Walking&lt;br /&gt;
   1: Sliding&lt;br /&gt;
   2: Flying&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;12&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0C&lt;br /&gt;
|Current TUs.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;13&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0D&lt;br /&gt;
|Current Health. Health of 0 = Dead. Compare [[#42|[42]]], [[#120|[120]]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For my [[Talk:Bravery|Bravery experience point testing]], I killed 15 of 16 aliens by setting this to zero, and my soldiers to 0 Morale. When I loaded the savegame, the aliens were still &amp;quot;alive&amp;quot; (i.e., up), then all died when I ended this turn. So death is probably only checked when injury happens, and at end of turn... to truly kill them dead on the ground through savegame editing must take more. And arg - when they all died, my soldiers all went to 100 Morale! So I edited them back to 0 Morale. But guess what... then all the aliens died &#039;&#039;&#039;again&#039;&#039;&#039; at the end of &#039;&#039;&#039;next&#039;&#039;&#039; turn, even though they were all on the ground (I heard screams, and all soldiers&#039; Morale went to 100 again). What the heck? The aliens stayed down after that, though. --[[User:MikeTheRed|MikeTheRed]] 16:01, 3 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Update: [[UNITPOS.DAT]] offset 10 bit 2 should be used to kill a unit entirely dead. Thanks, NKF &amp;amp; BB - MTR&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;While the game kills characters when Health&amp;lt;=Fatal Wounds (__ dies message), XComUtil will recover them based if their health is greater than 0.  Haven&#039;t tested an unmodified game.  --[[User:Zaimoni|Zaimoni]] 11:52, 14 April 2007 (CDT)&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;14&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0E&lt;br /&gt;
|Current Stun level &#039;&#039;how much falloff of paralysis every turn? What determines it?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;15&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0F&lt;br /&gt;
|Current Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;16&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x10&lt;br /&gt;
|Current Reactions  &#039;&#039;NKF: affected by health percentage&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;17&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x11&lt;br /&gt;
|Strength&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;18&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x12&lt;br /&gt;
|Current Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;19&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x13&lt;br /&gt;
|Current Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;20&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x14&lt;br /&gt;
|Current Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;21&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x15&lt;br /&gt;
|Current Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;22&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x16&lt;br /&gt;
|Current Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;quot;Base&amp;quot; means the original (total) value (as carried forward from geoscape) - Also see Note 1 re: Base soldier stat values.&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;23&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x17&lt;br /&gt;
|Base Firing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;24&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x18&lt;br /&gt;
|Base Throwing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Tanks (turreted units?) always have 0 throwing accuracy. They use this for turret facing, relative to unit facing. 0 means it&#039;s facing forwards. Additional values are clockwise increments; see [[#10|[10]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;25&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x19&lt;br /&gt;
|Base TUs&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;26&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1A&lt;br /&gt;
|Base Health&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;27&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1B&lt;br /&gt;
|Base Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;28&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1C&lt;br /&gt;
|Base Reactions&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;These Base Armour values are used to show the starting armor value in the Attributes screen (so you can readily see if it&#039;s been damaged&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;29&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1D&lt;br /&gt;
|Base Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;30&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1E&lt;br /&gt;
|Base Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;31&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1F&lt;br /&gt;
|Base Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;32&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x20&lt;br /&gt;
|Base Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;33&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x21&lt;br /&gt;
|Base Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;34&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x22&lt;br /&gt;
|Supposedly this was going to be Health Recharge which would function like the Energy Recharge. Always 0 and ignored by game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;35&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x23&lt;br /&gt;
|Energy to recharge each turn. Equals &#039;&#039;&#039;recruit initial&#039;&#039;&#039; TUs/3 ([[SOLDIER.DAT]][43], &#039;&#039;&#039;not&#039;&#039;&#039; total base TUs). This is a signed byte. See [[Time Units]] and [[Energy#Usage|Energy Usage]]; also see [[#45|[45]]] (energy usage when walking/turning). &#039;&#039;BombBloke: Is this affected by damage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;36&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x24&lt;br /&gt;
|Supposedly this was going to be Armor Recharge which would function like the Energy Recharge. Always 0 and probably unused, but needs testing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;37&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x25&lt;br /&gt;
|Psi skill. Psi stats not displayed/usable until this is greater then 0.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;38&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x26&lt;br /&gt;
|Item to create when unit is unconscious/dead (index into obdata.dat).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;NKF:&amp;lt;/i&amp;gt; If you set this value to that of a usable item, the item that is created in place of the unconscious or dead soldier can be used like the ordinary item. Elerium pods, for example, can be recovered for 50 elerium each after the battle. Weapons can be used as you normally use them, etc.&lt;br /&gt;
&lt;br /&gt;
For unconscious &#039;units&#039;, the item will be treated as the unconscious body - it will retain the name of the unconscious unit when looked at via the inventory screen. Picking up and using the &#039;item&#039; will work, but when the unit wakes up, the &#039;item&#039; image in the soldier&#039;s hands is not cleared, even though the item no longer &#039;exists&#039; in the soldier&#039;s hands. Using this &#039;item&#039; will just crash the battlescape.&lt;br /&gt;
&lt;br /&gt;
Actually, I do not even want to think about what would happen if you &#039;prime&#039; a grenade/stunned body.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;39&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x27&lt;br /&gt;
|&amp;quot;Soldier value&amp;quot; a.k.a. victory points. You gain (or lose, as the case may be) score at the end of combat according to this value when the unit dies.&lt;br /&gt;
*For X-COM units: A soldier with 42 will be worth -42 points if killed. Note this doesn&#039;t seem to apply if the soldier is killed when unconscious. The soldier just vanishes.&lt;br /&gt;
*For aliens: A commander with 35 will give you +35 points if killed.&lt;br /&gt;
*This value is the same as [[SOLDIER.DAT]] bytes 15-16 (a Word) and equals: &lt;br /&gt;
    20 + Missions + Rank Bonus&lt;br /&gt;
    &lt;br /&gt;
    with [[Rank]] Bonus as follows: SGT +1, CPT +3, COL +6, CDR +10&lt;br /&gt;
Note that although this equation holds true, the value is not actually computed per se. Instead, 1 is added directly to it each mission, as is a rank-bonus delta if you advance (e.g. COL to CDR, delta +4). In other words, hacking the Missions or Rank fields does not affect this value.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;40&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x28&lt;br /&gt;
|Index into [[SOLDIER.DAT]], so game knows what to update. 255 = does not belong to anyone (i.e., it&#039;s not a soldier). &#039;&#039;NKF: This byte is critical for player controlled units. If this doesn&#039;t refer to anything, the unit ceases to exist at the end of the game. If it points to a valid soldier entry in soldier.dat, the soldier.dat entry will be updated.&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;41&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x29&lt;br /&gt;
|Animation frame counter for the unit. Used by eg [[Celatid]]s and [[Silacoid]]s. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;42&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2A&lt;br /&gt;
|Rank. Affects morale loss and interface icon (hull for tanks). Only X-COM troopers display rank icons.&lt;br /&gt;
    &amp;lt;u&amp;gt;X-COM&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Rookie   &#039;&#039;Civvies are 0 too&#039;&#039;&lt;br /&gt;
      1: Squaddie&lt;br /&gt;
      2: Sergeant&lt;br /&gt;
      3: Captain&lt;br /&gt;
      4: Colonel&lt;br /&gt;
      5: Commander&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Aliens&amp;lt;/u&amp;gt;&lt;br /&gt;
      1: Commander&lt;br /&gt;
      2: Leader&lt;br /&gt;
      3: Engineer&lt;br /&gt;
      4: Medic&lt;br /&gt;
      5: Navigator&lt;br /&gt;
      6: Soldier&lt;br /&gt;
      7: Terrorist&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Hull shape for X-COM tanks:&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Treaded&lt;br /&gt;
      1: Hover&lt;br /&gt;
&#039;&#039;I don&#039;t see 255 set for three dead mutons in a current game... [[#13|[13]]] (Health=0) seems to be the only reliable death indicator for them. Compare [[#120|[120]]]. -[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;43&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2B&lt;br /&gt;
|Called &amp;quot;deployment&amp;quot; with values of 0 or 1 (0=inside, 1=outside). When alien units are generated for a battle, there is a random chance for this byte to be set. That unit is a &amp;quot;scout&amp;quot; and can be assigned to one of the neutral spawn points on the map without the need to fill up all the alien exclusive points first. In other words with &amp;quot;1&amp;quot; alien unit is spawned at exact random node marked as &amp;quot;civilian/scout&amp;quot; ignoring actual rank of unit. As result - Commander can occasionally be spawned outside of the UFO craft (and ramble around UFO), not in the &amp;quot;contol room&amp;quot;, which has exclusive commander spawn node.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;44&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2C&lt;br /&gt;
|Alien aggression. The higher it is, the less likely an alien will take cover. Maximum of 2. 0=Cautious,1=Normal,2=Aggressive  &#039;&#039;MTR: This is true for aliens in Hobbes game, but soldiers have values from 4 to 254. Garbage? Delete this comment if so.&#039;&#039; This determines the amount of the unit&#039;s TUs that are devoted to shooting: 0=50%,1=60%,2=66%.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;45&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2D&lt;br /&gt;
|Used to calculate energy loss when walking or turning as: INT( TUs / 2&amp;lt;sup&amp;gt;[45]&amp;lt;/sup&amp;gt; ). See [[Energy#Usage]]; compare [[#35|[35]]] (energy recharge per turn). Set this byte to 4 to ensure no energy use whatsoever (maximum map [[Time Units#Time_Unit_Walking_Usage_Tables|tile TU cost]] is 12). &#039;&#039;In Hobbes game, many aliens are 0 and all soldiers are 1, but a dozen aliens have higher values ranging all the way up to 112! Garbage and/or the game doesn&#039;t care if they are garbage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;46&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2E&lt;br /&gt;
|HWP turret image. Only used (and only appears) if unit type [[#0|[0]]]=3 (X-COM tanks):&lt;br /&gt;
    0: Cannon&lt;br /&gt;
    1: Rocket&lt;br /&gt;
    2: Laser&lt;br /&gt;
    3: Plasma&lt;br /&gt;
    4: Blaster&lt;br /&gt;
    5,6: ? Blanks&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For non-tanks, this controls the inventory layout. &#039;&#039;Only&#039;&#039; 0 and 1 are valid. 0 is the standard layout seen on all soldiers. 1 is an alternate layout that may have been intended for custom tank equipment. Larger values only crash the game due to missing files. Also see [[#113|[113]]] and [[#117|[117]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;47&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2F&lt;br /&gt;
|This is a direct copy of offset[48] from the [[MCD]] record of the tile the unit is standing on. A signed byte.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;48&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x30&lt;br /&gt;
|Values for this byte always equal [[#52|[52]]] and are:&lt;br /&gt;
   2  (3x3 square; legacy 5 pixels):  Sectoid&lt;br /&gt;
   3  (5x5 square, corners removed; legacy 7 pixels):  Celatid, Chryssalid, Civvie,&lt;br /&gt;
      Ethereal, Floater, Muton, Snake, &#039;&#039;&#039;Soldier&#039;&#039;&#039;&lt;br /&gt;
   4  (7x7 octagon; legacy 9 pixels):  Cyberdisc, Hovertank, Reaper, Sectopod, Tank&lt;br /&gt;
   5 (9x9 square, Ls with 3-pixel legs removed; legacy 11 pixels):  Silacoid&lt;br /&gt;
Based on copious research by [[User:Bomb_Bloke|Bomb_Bloke]], [[User:Seb76|Seb76]], [[user:Zombie|Zombie]], and others, this has been found to be a LOF Template look-up for the shape of targets; Loftemps 2 to 5 define the &amp;quot;3D&amp;quot; shape of units relative to Line Of Fire as a cylinder, where 2 (Sectoid) is a thin cylinder and 5 (Silacoid) is very wide. The pixel width of each &amp;quot;silhoutte&amp;quot; that [[LOFTEMPS.DAT]] corresponds to has been added to the list above (see LOFTemps images 2-5). Tiles are 16 pixels wide in the X or Y direction (that&#039;s what this byte is about), and 24 pixels high (compare [[#49|[49]]]).&lt;br /&gt;
&lt;br /&gt;
This cylindrical shape is used in conjunction with height [[#49|[49]]] to define the silhouette that targets present to a shooter. Combine the pixel-width cross-section from Loftemps with height to find the cross-sectional area presented to shooters (sorted on increasing cross-section):&lt;br /&gt;
&lt;br /&gt;
                     LOF     LOF             Cross    Percent&lt;br /&gt;
                    Lookup  Width   Height  Section   of 384    Float   4x?&lt;br /&gt;
 Type               &#039;&#039;UR[48]  Pixels  UR[[#49|[49]]] Pxls X Ht  (16x24)   UR[[#51|[51]]]&#039;&#039;&lt;br /&gt;
 ----               ------  ------  ------ ---------  -------   ------  ---&lt;br /&gt;
 Sectoid               2       5      16       80      20.8%       -     -&lt;br /&gt;
 Celatid               3       7      12       84      21.9%       6     -&lt;br /&gt;
 Soldier (Kneeling)    3       7      14       98      25.5%       -     -&lt;br /&gt;
 Hovertank             4       9      12      108      28.1%       6    Yes&lt;br /&gt;
 Silacoid              5      11      10      110      28.6%       -     -&lt;br /&gt;
 Snakeman              3       7      18      126      32.8%       -     -&lt;br /&gt;
 Zombie                3       7      18      126      32.8%       -     -&lt;br /&gt;
 Ethereal              3       7      20      140      36.5%       -     -&lt;br /&gt;
 Cyberdisc             4       9      15      135      35.2%       2    Yes&lt;br /&gt;
 Chryssalid            3       7      21      147      38.3%       -     -&lt;br /&gt;
 Civilian              3       7      21      147      38.3%       2     -&lt;br /&gt;
 Floater               3       7      21      147      38.3%       2     -&lt;br /&gt;
 Muton                 3       7      21      147      38.3%       -     -&lt;br /&gt;
 Tank                  4       9      16      144      37.5%       -    Yes&lt;br /&gt;
 Soldier               3       7      22      154      40.1%       -     -&lt;br /&gt;
 Reaper                4       9      23      207      53.9%       -    Yes&lt;br /&gt;
 Sectopod              4       9      23      207      53.9%       -    Yes&lt;br /&gt;
Units take up an amount of the whole tile (as seen in cross-section by a shooter) as shown in the &amp;quot;Percent of 384&amp;quot; column. In reality, though, the [[Firing Accuracy|accuracy]] of shots makes this a more complex topic than the percents suggest. Also, dividing by 384 is an oversimplification, since it implies a directly rectangular shot (shooting right down the X or Y axis). While it&#039;s useful to see, keep in mind that this column only shows relative numbers.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;[[User:Zaimoni|Zaimoni]]: actual cross section depends on shot facing.  The table is close to correct for pure diagonal shots, so leaving alone for now.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The unit Float number ([[#51|[51]]], below) is shown simply for convenience. It does not enter into the cross-sectional computations. &amp;quot;4x&amp;quot; units actually consist of four units grouped in tight 2x2 formation (making their cross section effectively much larger then the percentage stated).&lt;br /&gt;
&lt;br /&gt;
Note that causing an X-Com soldier to kneel causes their cross section to fall by 36.36~% of that of when they are standing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;49&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x31&lt;br /&gt;
|[[height|Standing height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;50&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x32&lt;br /&gt;
|[[height|Kneeling height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;51&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x33&lt;br /&gt;
|Floating [[height]]. A unit &#039;floats&#039; this high above the ground, thus allowing shots to fly underneath. The highest point of a unit can be found by adding this to the units height stat. &amp;lt;i&amp;gt;Does this have an effect on explosive damage?&amp;lt;/i&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;52&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x34&lt;br /&gt;
|&amp;quot;Radius&amp;quot; of LOF Template. Always the same as [[#48|[48]]] in all known saved games. More info can be found at [[Talk:UNITREF.DAT#Offsets_0x30_.26_0x34|Talk:UNITREF.DAT#Offsets_0x30_&amp;amp;_0x34]] ([48] and [52]).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;53&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x35&lt;br /&gt;
|Image index for item in left hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;54&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x36&lt;br /&gt;
|Image index for item in right hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;NKF:&#039;&#039; If there is no item in the unit&#039;s hands, but one of the above two bytes are set, the &#039;image&#039; that represents the item will still be displayed in the battlescape. If these phantom items are clicked on, the game crashes. If the image is not the right type for the real item in hand, the ammo count doesn&#039;t get displayed. Otherwise, it&#039;ll work as normal.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;55&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x37&lt;br /&gt;
|[[Damage#Susceptible_to...|Damage Modifier]] Category&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed in the executable. A value of 1 indicates the first DM category, a value of 4 indicates the 4th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but I think there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Value&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
    &#039;&#039;&#039;0&#039;&#039;&#039;      Terrain and Items&lt;br /&gt;
    &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
    &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
    &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
    &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
    &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
    &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
    &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
    &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
    &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
   &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
   &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
   &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
   &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;56&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;56&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x38&lt;br /&gt;
|[[Melee Accuracy]] ([[SOLDIER.DAT]] bytes 50 (initial) &amp;amp; 60 (increase) added together)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;57&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;57&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x39&lt;br /&gt;
|[[Psionic Strength]]&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;58&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;58&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3A&lt;br /&gt;
|Current [[Morale]]. Base morale is hardcoded to 100.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;59&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;59&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3B&lt;br /&gt;
|[[Bravery]] = 110 - (10 * &#039;&#039;this value&#039;&#039;)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;60&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3C&lt;br /&gt;
|Panic mode. This takes effect at the start of the unit&#039;s next turn. Since it is cleared at that point, you&#039;ll never see it at anything other then 0 in the save files. You can manually change it to other values to force a specific panic attack on the next turn.&lt;br /&gt;
   0: None&lt;br /&gt;
   1: Freeze&lt;br /&gt;
   2: Running&lt;br /&gt;
   3: Berserk&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;61&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;61&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3D&lt;br /&gt;
|[[#62|[62]]] will increment by this amount whenever the unit moves.&lt;br /&gt;
   3: Sectiod                                    &#039;&#039;- Hobbes&#039;&#039;&lt;br /&gt;
   4: Soldiers, civs, and all other aliens (but Hobbes had no Large aliens)&lt;br /&gt;
  30: Tank/Laser&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;62&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;62&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3E&lt;br /&gt;
|Visibility via motion scanner. The bigger it is, the bigger the blip. Test this one out for values.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;63&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;63&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3F&lt;br /&gt;
|Number of [[Fatal Wounds]] to head.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;64&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;64&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x40&lt;br /&gt;
|Number of fatal wounds to torso.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;65&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;65&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x41&lt;br /&gt;
|Number of fatal wounds to right arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;66&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;66&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x42&lt;br /&gt;
|Number of fatal wounds to left arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;67&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;67&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x43&lt;br /&gt;
|Number of fatal wounds to right leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;68&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;68&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x44&lt;br /&gt;
|Number of fatal wounds to left leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;69-70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;69-70&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x45-0x46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x45-0x46&lt;br /&gt;
|Indexes into [[ROUTES.DAT]]. To start with, aliens will be located at the same position as the node indicated by byte 69.&lt;br /&gt;
:For patrol AI (no X-COM units sighted in turn 1, either X-COM or alien):&lt;br /&gt;
::Byte 69 is the index of the node of the start of the planned move.&lt;br /&gt;
::Byte 70 is the index of the node of the end of the planned move.&lt;br /&gt;
:Note that the move may be multi-turn, and byte 69 is not guaranteed to update during a multi-turn move.  I think it will if the alien ends its move on a node, however. -- Zaimoni&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;71&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x47&lt;br /&gt;
|Unit lighting: always 16 for XCom units, 0 for most aliens but 1 for cyberdisc. If greater than 1, it is set to 1 when unit inactive - see the [[Talk:UNITREF.DAT#Offset_0x47|Talk]] page.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;72&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x48&lt;br /&gt;
|The amount of [[Morale]] that has been restored using the [[Medi-Kit (EU)|Medkit&#039;s]] painkillers. The amount that &#039;&#039;can&#039;&#039; be restored is equal to the maximum health of the unit (index 26) minus their current health (index 13) further minus this.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;73&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x49&lt;br /&gt;
|Intelligence. Rated from 2 - 8. Indicates for how many turns the alien will know the location of spotted soldiers. &#039;&#039;Hey - why do humans have zero intelligence? :(&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;74&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4A&lt;br /&gt;
|AI Mode. Zaimoni found [http://www.strategycore.co.uk/forums/UFO-AI-patch-t8908.html&amp;amp;st=20&amp;amp;start=20 Here] that the values are 0:PATROL, 1:SNIPER, 2:ATTACKING, 3:ESCAPING, 4:GUARD, 5:Returning to UFO. 255 (-1) is also possible. Zaimoni tripped this by wounding a Floater in SNIPER mode; it returned fire, then was taken down by another soldier. Snap guess is that this is a &amp;quot;recalculate&amp;quot; marker.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;75&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4B&lt;br /&gt;
|Unknown. With that said, the only item remaining on my list is called &amp;quot;lightdirect&amp;quot; or direction of light for a unit (0=all around, 1=direction unit facing). Unused by game code and always 0. Maybe it was for a hand-held light source, or a armor-mounted flashlight?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;76-77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;76-77&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4C-0x4D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4C-0x4D&lt;br /&gt;
|Mission count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]  &#039;&#039;MTR: Wonder why they bothered to put this in Unitref since this will never change &#039;&#039;&#039;during&#039;&#039;&#039; a mission; compare how soldier stats are actually read from SOLDIER (not UNITREF) on return to geoscape. Is Missions shown anywhere on the combatscape?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;78-79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;78-79&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4E-0x4F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4E-0x4F&lt;br /&gt;
|Kill count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]. Number of kills this unit has made for ALL missions, not just this one. This one &#039;&#039;&#039;can&#039;&#039;&#039; vary &amp;quot;unpredictably&amp;quot; and thus is the only byte known to directly carry forward into the geoscape / Soldier.Dat!&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;80&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;80&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x50&lt;br /&gt;
|[[Reactions]] experience counter, for number of reaction shots. It doesn&#039;t matter if they hit the target; reactions still count. &amp;lt;b&amp;gt;See Note 2 re: Experience counters.&amp;lt;/b&amp;gt; (Also note: Aliens do not use experience counters.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NKF:&#039;&#039; Where does death by fire (overexposure rather than incendiary shell impact) fit into the experience counters? It becomes a non-assigned kill, I guess, like death by wounds, or death by a grenade that hasn&#039;t got an owner?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;81&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x51&lt;br /&gt;
|[[Firing Accuracy]] experience counter, for number of hits on an enemy (lethal or not, grenades or bullets). Each Autoshot hit counts as 1, so you can get 3 hits from one Autoshot burst. Likewise, grenades and blaster bombs can hit multiple targets with one explosion. Also, if you miss the intended target but hit a different alien, it still counts. Finally, if your shot actually has zero [[Damage]], it does still count as a hit. (Not due to armor blockage; a pure roll of 0 coming out of the gun.) &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;82&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;82&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x52&lt;br /&gt;
|[[Melee Accuracy]] experience counter, for number of times stun rod has been used (not stun bombs).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;83&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x53&lt;br /&gt;
|[[Throwing Accuracy]] experience counter, for number of times unit has thrown any object.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;84&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;84&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x54&lt;br /&gt;
|&amp;lt;div id=&amp;quot;Psi_Skill_Experience_Counter&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;[[Psionic Skill]] experience counter, for number of psi attacks performed. 1 is added if attempt was unsuccessful, 3 if it was successful. Note: if this value goes over 255, all psi experience is lost. That&#039;s 85 successful psis (255/3). So be careful of marathon psi&#039;ing (a minimum of 43 turns at 2 psis/turn, 29 turns at 3/turn).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;85&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;85&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x55&lt;br /&gt;
|[[Bravery]] experience counter, for number of times unit has &#039;&#039;resisted&#039;&#039; panicking, despite Morale &amp;lt; 50.  Being mind-controlled, panicking, or going berserk does &#039;&#039;not&#039;&#039; increase this stat -- although Panic Unit attacks will reduce Morale to the point where panic checks will be performed by the game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;86-110&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;86-110&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x56-0x6E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x56-0x6E&lt;br /&gt;
|Unit&#039;s &amp;lt;b&amp;gt;Name&amp;lt;/b&amp;gt;. Standard string ended by null byte. The rest can hold garbage.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;111&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;111&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x6F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x6F&lt;br /&gt;
|Called &amp;quot;BigFire&amp;quot;. If true (value of 1) then the unit is currently firing a weapon. It reverts back to 0 afterwards - determines whether to render the gun and firing arm in the &amp;quot;pointing weapon&amp;quot; position, or whether the weapon is being held against the chest. If manually set to a value above 0, the unit will hold its weapon out until such time as it actually uses it.&lt;br /&gt;
&lt;br /&gt;
Note that this value is only used by units holding two-handed weapons. A unit holding for eg a pistol will &#039;&#039;always&#039;&#039; point the weapon, and uses a different arm sprite for the purposes of doing so (regardless of whether or not the weapon is being fired).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;112&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;112&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x70&lt;br /&gt;
|Called &amp;quot;Finished&amp;quot;. If true (value of 1) signifies that the unit finished AI actions for current turn.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;113&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;113&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x71&lt;br /&gt;
|If 1, then you can&#039;t use the inventory button and the unit will be immune to stun. Used for tanks. Mind controlled units don&#039;t use this but their button disables anyway.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;BombBloke:&#039;&#039; This is the only way to access tank inventories.&lt;br /&gt;
*Tank/Cannon has a normal inventory and uses man_1m0.spk.&lt;br /&gt;
*Tank/Rocket Launcher has a different layout and uses man_1m0.spk.&lt;br /&gt;
*Tank/Laser Cannon uses man_œ.spk, which doesn&#039;t exist normally. Providing this file still crashes.&lt;br /&gt;
*Hovertank/Plasma simply crashes.&lt;br /&gt;
*Hovertank/Launcher simply crashes.&lt;br /&gt;
&lt;br /&gt;
[[#1|[1]]] actually determines the inventory screen used, might be worth playing with that. [[#46|[46]]] determines the layout.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;114&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;114&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x72&lt;br /&gt;
|If not 0, then unit is on fire, and will burn for this amount of turns.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;115&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;115&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x73&lt;br /&gt;
|Gender: 0 = male, 1 = female.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;116&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;116&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x74&lt;br /&gt;
|Hair/skin colour (for inventory; all other units = 0):&lt;br /&gt;
   0: Blond caucasian&lt;br /&gt;
   1: Brunette caucasian&lt;br /&gt;
   2: Asian&lt;br /&gt;
   3: Black&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;117&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;117&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x75&lt;br /&gt;
|Turret weapon. Over-rides hand held weapon. Turret images are not centered; that would be impossible because they aren&#039;t all &#039;objects&#039; (e.g. Celatid). &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
                                                       F.A.  TUs        F.A.  TUs&lt;br /&gt;
   0: HWP cannon (bigobs[40])....................Aimed  90%  80%   Snap  60%  33%&lt;br /&gt;
   1: HWP rocket (bigobs[42])....................Aimed 115%  75%   Snap  55%  45%&lt;br /&gt;
   2: HWP laser (bigobs[54]).....................Aimed  85%  75%   Snap  50%  33%&lt;br /&gt;
   3: HWP plasma cannon (bigobs[43]).............Aimed 100%  60%   Snap  86%  30%&lt;br /&gt;
   4: HWP blaster (bigobs[43]) (looks like ordinary cannon?)......Aimed 120%  80%&lt;br /&gt;
   5: Celatid plasma cannon (bigobs[38]).........Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   6: Cyberdisc plasma cannon (bigobs[34]).......Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   7: Sectopod Laser* cannon (bigobs[34])as cyberdisk, above, plus Auto  50%  35%&lt;br /&gt;
  22: Invalid - Incredibly powerful armour piercing shell. Overpowering.&lt;br /&gt;
 255: Unused&lt;br /&gt;
Note: This item will take precendence over any item carried in the hand slots. It can be installed on non-tanks, but then the unit won&#039;t be able to use any carried weapons or items. This weapon is NOT affected by the kneeling modifier, but it is affected by the current unit&#039;s accuracy stat. Also note, this byte does NOT determine the turret image for HWPs in the battlescape.&lt;br /&gt;
&lt;br /&gt;
[*]The damage type for the Sectopod is indeed set to (3)laser in the executable! Graphical/sound effects of a turret weapon is set there as well, via a reference to a weapon in OBDATA.DAT (HWP Cannon=4=Heavy Cannon, Sectopod=34=Heavy Plasma) &#039;&#039;When I changed HWP Cannon to 2, it looked/sounded like rifle fire - Crus8r&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also see [[#46|[46]]], [[#113|[113]]], and [[#118|[118]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;118&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;118&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x76&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x76&lt;br /&gt;
|Ammo for [[#117|[117]]] turret weapon&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;119&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;119&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x77&lt;br /&gt;
|Movement related? Large unit related? Possible bitfield.&lt;br /&gt;
 &#039;&#039;MTR:&#039;&#039;&lt;br /&gt;
 00000000   0 Chryssalid(2), Civilian(9), Ethereal(2), Floater(2), Muton, &lt;br /&gt;
 00000001   1 Muton, PA Soldier(2)                   Sectoid(2), Silacoid(2), &lt;br /&gt;
 00000011   3 PA Soldier                            PA Soldier(2), Tank/Laser&lt;br /&gt;
 00000101   5 Snakeman&lt;br /&gt;
 00001010  10 Celatid             &#039;&#039;- Hobbes game - could have some garbage&#039;&#039;&lt;br /&gt;
 00001101  13 Muton, PA Soldier   &#039;&#039;  (parens) is count, if more than 1 unit&#039;&#039;&lt;br /&gt;
 00010011  19 Snakeman&lt;br /&gt;
 00100110  38 PA Soldier&lt;br /&gt;
 00101010  42 Muton(3)&lt;br /&gt;
 00110001  49 Muton&lt;br /&gt;
 00110010  50 PA Soldier&lt;br /&gt;
 00110101  53 Silacoid(2)&lt;br /&gt;
 00111011  59 Celatid&lt;br /&gt;
 00111111  63 Silacoid&lt;br /&gt;
 01001110  78 PA Soldier&lt;br /&gt;
 01100111 103 PA Soldier&lt;br /&gt;
 01111111 127 Muton&lt;br /&gt;
 10010000 144 Muton&lt;br /&gt;
 11000000 192 Celatid&lt;br /&gt;
 11111110 254 Muton&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;120-123&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;120-123&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x78-0x7B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x78-0x7B&lt;br /&gt;
|Unit bit flags (32bit), mainly re: mobility. They do NOT affect the soldier in inventory screen: &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
 (  1) 1: 1 = Unit moving.&lt;br /&gt;
 (  2) 2: 1 = Unit can fly.&lt;br /&gt;
 (  4) 3: 1 = Unit is flying. (Toggles leg sprites for power armour.)&lt;br /&gt;
 (  8) 4: 1 = Has been to this unit in next unit loop. Or to put it another way, has the unit been selected this turn.&lt;br /&gt;
 ( 16) 5: 1 = Unit has been disabled for selection.&lt;br /&gt;
              (Stops the unit tab button from selecting this soldier.)&lt;br /&gt;
 ( 32) 6: 0 = Unit has left hand object selected, 1 = right hand object selected.&lt;br /&gt;
 ( 64) 7: 1 = Unit is kneeling.&lt;br /&gt;
 (128) 8: 1 = Unit is wearing power/flying suit. (Can&#039;t be stunned by smoke flag? &lt;br /&gt;
              Seems to work for fire, too.)&lt;br /&gt;
If a unit is carrying something in either hand, it is impossible to get him to appear as if he is carrying nothing - in the game, at least. If he is carrying nothing, bit 6 can flag (as though the unit was using it&#039;s right hand item). But maybe it&#039;s just the order of dropped items affecting this?&lt;br /&gt;
&lt;br /&gt;
Note: A unit is only considered as flying if it is not on the ground. For example, a hover tank is not always considered as flying.&lt;br /&gt;
&lt;br /&gt;
What if a hovertank is half on the ground, half in the air? What about a treaded tank, or large alien unit? What about units in lifts?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;124-125&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;124-125&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7C-0x7D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7C-0x7D&lt;br /&gt;
|TFTD ONLY - Bubble animation count for soldiers.  Can be 0 to 16 (0x0F).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;126-127&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;126-127&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7E-0x7F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7E-0x7F&lt;br /&gt;
|TFTD ONLY - Bubble animation delay, skips this amount of frames.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;128-129&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;128-129&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x80-0x81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x80-0x81&lt;br /&gt;
|TFTD ONLY - Bubble animation enable. (0=disable, 1=enable)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;130-131&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;130-131&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x82-0x83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x82-0x83&lt;br /&gt;
|TFTD ONLY - Called &amp;quot;floorabove&amp;quot; flag. Is there a floor above unit? (0=no, 1=yes)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
1) The original/base values for &amp;lt;b&amp;gt;soldier stats&amp;lt;/b&amp;gt; (offsets [[#23|[23]]]-[[#28|[28]]], etc.) correspond to the initial+increase bytes from [[SOLDIER.DAT|Soldier.Dat]] (bytes 43-62). Changes to these Unitref bytes are &amp;lt;i&amp;gt;lost&amp;lt;/i&amp;gt;  when the mission ends; instead, XCOM re-reads them from Soldier at that time. This makes sense because base soldier stats don&#039;t change &amp;lt;i&amp;gt;during&amp;lt;/i&amp;gt; a mission per se (although they might increase when the mission ends); in this way, the programmers didn&#039;t have to bother with separately storing and/or adding initial+increase during combat. (It&#039;s also why you don&#039;t see the initial+increase in the soldier stat display during combat, that you can see back at base.) On a practical note, if you are testing soldier stat increases versus experience counters, change the experience counters in Unitref, but change the soldier stats in Soldier. (IOW, it doesn&#039;t matter what the soldier stats are in the combat mission.)&lt;br /&gt;
&lt;br /&gt;
The Kill count (offset [[#78-79|[78-79]]]) is the only Unitref value I know of that is directly carried forward into the geoscape and Soldier.dat. However, some others do indirectly carry forward, for example: experience (offsets [[#80|[80]]]-[[#85|[85]]]) causes stat and rank increases, and decreased health (offset [[#26|[26]]] - offset [[#13|[13]]]) means hospital time. And, of course, death is permanent. Heh.&lt;br /&gt;
&lt;br /&gt;
2) &amp;lt;b&amp;gt;Experience counters&amp;lt;/b&amp;gt; (offsets [[#80|[80]]]-[[#85|[85]]]) determine the likelihood of soldier stat increases at the end of the combat mission, according to the formula for Primary Stats shown [[Experience#How_Experience_Points_Are_Applied|here]]. The Bravery counter (offset [[#85|[85]]]) affects Bravery as shown [[Bravery|here]].&lt;br /&gt;
&lt;br /&gt;
Also, if at least one of the experience counters (except Throws) has a count, your secondary stats will increase, as discussed [[Experience#Secondary_Stats|here]]. All you need is at least a 1 in offsets [[#80|[80]]]-[[#82|[82]]] or [[#84|[84]]]-[[#85|[85]]]; more than 1 and/or multiple counters has no additional effect.&lt;br /&gt;
&lt;br /&gt;
3) BombBloke&#039;s additional &amp;quot;To be Done&amp;quot; notes - can we cross some of these off yet?&lt;br /&gt;
&lt;br /&gt;
   Need to research:&lt;br /&gt;
   Stun recovery rate, does it exist?&lt;br /&gt;
   Hand to hand attacks&lt;br /&gt;
   &amp;lt;strike&amp;gt;Offset of weapon from unit image?&amp;lt;/strike&amp;gt; &lt;br /&gt;
   &#039;&#039;Based on unit height and nothing else. There may be values to determine what arm sprites to use,&#039;&#039;&lt;br /&gt;
   &#039;&#039;but I doubt it.&#039;&#039;&lt;br /&gt;
   Firing sprite offset? &lt;br /&gt;
   &#039;&#039;Probably just based on unit height and some hardcoded values in the executable.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Inventory lockout?&amp;lt;/strike&amp;gt; &#039;&#039;All mind controlled units are locked out.&#039;&#039;&lt;br /&gt;
   Kneel lockout? &lt;br /&gt;
   &#039;&#039;Probably the same as above, I seem to remember that using XcomUtil to &amp;quot;swap sides&amp;quot; would make it&#039;&#039;&lt;br /&gt;
   &#039;&#039;possible to kneel small alien units.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Aliens seen?&amp;lt;/strike&amp;gt; &#039;&#039;Not used in unitref.dat, only in unitpos.dat. -[[User:Zombie|Zombie]] 23:48, 29 September 2006 (PDT)&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Whether a unit slides/floats/hovers/rolls/walks (movement noise)?&amp;lt;/strike&amp;gt; &#039;&#039;Set according to unit type.&#039;&#039;&lt;br /&gt;
   What else? The more to look for, the easier it is...&lt;br /&gt;
   &lt;br /&gt;
   Know 119 values.&lt;br /&gt;
   Unknown values (5 in total):&lt;br /&gt;
   [[#75|[075 / 0x4B]]] - Always 0?&lt;br /&gt;
   [[#119|[119 / 0x77]]] - No idea, possible bitfield, could be anything.&lt;br /&gt;
   [[#121|[121 / 0x79]]] - Second unit gets a value of 16. Everyone else gets 0. No obvious purpose.&lt;br /&gt;
   [[#122|[122 / 0x7A]]] - Always 0?&lt;br /&gt;
   [[#123|[123 / 0x7B]]] - Always 0?&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
4) Hobbes posted a savegame with a TON of different aliens in it [http://www.xcomufo.com/forums/index.php?showtopic=8591 here] (message 6). Interesting for testing. But note it was made with XCOMUTIL and there may(?) be concerns over vailidity of unit info - see [[Talk:UNITREF.DAT]].&lt;br /&gt;
&lt;br /&gt;
5) A [[HackerTools|Hex Workshop]] Structure Library for UNITREF.DAT created by Danial is [[UNITREF_DAT_HSL|here]].&lt;br /&gt;
&lt;br /&gt;
== For More Information ==&lt;br /&gt;
*[[SOLDIER.DAT]]&lt;br /&gt;
*[[Soldiers|Soldier Stats]]&lt;br /&gt;
*[[Experience]]&lt;br /&gt;
*[[HackerTools|Hex editing]]&lt;br /&gt;
&lt;br /&gt;
Return to [[Saved_Game_Files|Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=66004</id>
		<title>UNITREF.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=66004"/>
		<updated>2015-06-24T08:27:16Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /*0x78-0x7b*/ mobility is 32bit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [[Saved Game Files|save game file]] that has a record size of 124 bytes for UFO, or 132 for TFTD. Values are unsigned unless otherwise stated. Some bytes represent bitfields. There are 80 records (not all of them necessarily used) for a fixed file size of 9,920 bytes (or 10,560 for TFTD). It goes hand in hand with [[UNITPOS.DAT]].&lt;br /&gt;
&lt;br /&gt;
Comes in three flavours:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Initially created by the GeoScape engine before tactical battles. Stored in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder and contains info on all units that will be present in the coming mission (in an alive state - the deaths of aliens killed by exploding UFO power units isn&#039;t determined until [[Battlescape_Map_Generation#KABOOM.21.21|later]]). Unlike the other two versions, this only contains the bare minimum number of records required to store the units it details.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNITREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Created along with a [[Saved_Game_Files#Battlescape_Files|battlescape save]], contains the mid-mission state of the unit table.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF2.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Appears in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder at the end of combat. Used to determine which troopers/tanks survived, statistic gains via [[experience]], and which aliens need to be hauled off to the [[Alien Containment]] unit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values are presented according to byte offset ([[#0|0]] to [[#123|123]] (or [[#131|131]] for TFTD)) followed by the equivalent hex offset ([[#0x00|0x00]] to [[#0x7B|0x7B]] (or [[#0x83|0x83]] for TFTD)). Notes apply to both UFO and TFTD unless otherwise stated. Let us know what else you can find - refer to the [[#Notes|bottom of the page]] for those values that&#039;re unknown, or to the [[Talk:UNITREF.DAT|talk page]] for further ideas as to what they could be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Decimal)&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Hex)&lt;br /&gt;
!Usage&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x00&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x00&lt;br /&gt;
|Type of unit. Unit scream and movement sound effects are based on this and gender. Gender and flying abilities affect the sprites as well. Not turrets. Specifically: [[#53|[53]]] &amp;amp; [[#54|[54]]] (weapons in hands), [[#115|[115]]] (gender) and [[#120|[120]]] (other flags) affect the final screen image. If the unit is a large unit, this will also determine the appearance of the last three quarters of the unit. This does NOT affect: the flying ability of the unit, the soldier image in the inventory screen, or the special abilities for certain aliens.&lt;br /&gt;
      &amp;lt;b&amp;gt;UFO&amp;lt;/b&amp;gt;                                        &amp;lt;b&amp;gt;TFTD&amp;lt;/b&amp;gt;&lt;br /&gt;
   0: Male/female unarmored X-COM soldier     0: Male/female unarmored X-COM diver   &lt;br /&gt;
   1: Male/female personal armor soldier      1: Male/female plastic armor diver&lt;br /&gt;
   2: Power/flying suit soldier               2: Power/flying suit diver&lt;br /&gt;
   3: Tank                                    3: Tank&lt;br /&gt;
   4: Sectoid                                 4: Aquatoid&lt;br /&gt;
   5: Snakeman                                5: Gillman&lt;br /&gt;
   6: Ethereal                                6: Lobster Man&lt;br /&gt;
   7: Muton                                   7: Tasoth&lt;br /&gt;
   8: Floater                                 8: Calcinite&lt;br /&gt;
   9: Celatid                                 9: Deep One&lt;br /&gt;
  10: Silacoid                               0A: BioDrone&lt;br /&gt;
  11: Chryssalid                             0B: Tentaculat&lt;br /&gt;
  12: Reaper                                 0C: Triscene&lt;br /&gt;
  13: Sectopod                               0D: Hallucinoid&lt;br /&gt;
  14: Cyberdisc                              0E: Xarquid&lt;br /&gt;
  15: Male civilian                          0F: Male civilians&lt;br /&gt;
  16: Female civilian                        10: Female civilians&lt;br /&gt;
  17: Zombie                                 11: Zombie&lt;br /&gt;
 255: Unused                                255: Unused&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;If the corresponding [[UNITPOS.DAT]] record is unused, then the record is unused.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;1&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x01&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x01&lt;br /&gt;
|Inventory paper doll image. File &amp;quot;UFOGRAPH\MAN_&amp;quot;+(char)(value + 48)+&amp;quot;.SPK&amp;quot; will be used as the inventory sprite, unless the value is 0 or 1. In those cases, [[#115|[115]]] and [[#116|[116]]] are used to determine the picture.&lt;br /&gt;
 0: No armor.&lt;br /&gt;
 1: Personal armour.&lt;br /&gt;
 2: Power suit.&lt;br /&gt;
 3: Flying suit.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;2-5&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;2-5&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x02-0x05&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x02-0x05&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|PCK set]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;6-9&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;6-9&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x06-0x09&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x06-0x09&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|TAB index for the PCK data]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;10&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0A&lt;br /&gt;
|Unit facing. Does NOT control HWP turret direction; see [[#24|[24]]].&lt;br /&gt;
   0: North     (up right)&lt;br /&gt;
   1: Northeast (right)&lt;br /&gt;
   2: East      (down right)&lt;br /&gt;
   3: Southeast (down)&lt;br /&gt;
   4: South     (down left)&lt;br /&gt;
   5: Southwest (left)&lt;br /&gt;
   6: West      (up left)&lt;br /&gt;
   7: Northwest (up)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;11&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0B&lt;br /&gt;
|Movement type. When entering a given map location, each tile is checked to see the TU requirements accordingly. [[MCD]][39+[[#11|UnitRef[11]]]] is the offset used. Note: By default, this is 0 for ALL unit types.&lt;br /&gt;
   0: Walking&lt;br /&gt;
   1: Sliding&lt;br /&gt;
   2: Flying&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;12&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0C&lt;br /&gt;
|Current TUs.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;13&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0D&lt;br /&gt;
|Current Health. Health of 0 = Dead. Compare [[#42|[42]]], [[#120|[120]]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For my [[Talk:Bravery|Bravery experience point testing]], I killed 15 of 16 aliens by setting this to zero, and my soldiers to 0 Morale. When I loaded the savegame, the aliens were still &amp;quot;alive&amp;quot; (i.e., up), then all died when I ended this turn. So death is probably only checked when injury happens, and at end of turn... to truly kill them dead on the ground through savegame editing must take more. And arg - when they all died, my soldiers all went to 100 Morale! So I edited them back to 0 Morale. But guess what... then all the aliens died &#039;&#039;&#039;again&#039;&#039;&#039; at the end of &#039;&#039;&#039;next&#039;&#039;&#039; turn, even though they were all on the ground (I heard screams, and all soldiers&#039; Morale went to 100 again). What the heck? The aliens stayed down after that, though. --[[User:MikeTheRed|MikeTheRed]] 16:01, 3 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Update: [[UNITPOS.DAT]] offset 10 bit 2 should be used to kill a unit entirely dead. Thanks, NKF &amp;amp; BB - MTR&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;While the game kills characters when Health&amp;lt;=Fatal Wounds (__ dies message), XComUtil will recover them based if their health is greater than 0.  Haven&#039;t tested an unmodified game.  --[[User:Zaimoni|Zaimoni]] 11:52, 14 April 2007 (CDT)&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;14&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0E&lt;br /&gt;
|Current Stun level &#039;&#039;how much falloff of paralysis every turn? What determines it?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;15&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0F&lt;br /&gt;
|Current Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;16&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x10&lt;br /&gt;
|Current Reactions  &#039;&#039;NKF: affected by health percentage&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;17&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x11&lt;br /&gt;
|Strength&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;18&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x12&lt;br /&gt;
|Current Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;19&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x13&lt;br /&gt;
|Current Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;20&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x14&lt;br /&gt;
|Current Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;21&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x15&lt;br /&gt;
|Current Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;22&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x16&lt;br /&gt;
|Current Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;quot;Base&amp;quot; means the original (total) value (as carried forward from geoscape) - Also see Note 1 re: Base soldier stat values.&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;23&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x17&lt;br /&gt;
|Base Firing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;24&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x18&lt;br /&gt;
|Base Throwing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Tanks (turreted units?) always have 0 throwing accuracy. They use this for turret facing, relative to unit facing. 0 means it&#039;s facing forwards. Additional values are clockwise increments; see [[#10|[10]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;25&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x19&lt;br /&gt;
|Base TUs&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;26&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1A&lt;br /&gt;
|Base Health&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;27&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1B&lt;br /&gt;
|Base Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;28&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1C&lt;br /&gt;
|Base Reactions&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;These Base Armour values are used to show the starting armor value in the Attributes screen (so you can readily see if it&#039;s been damaged&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;29&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1D&lt;br /&gt;
|Base Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;30&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1E&lt;br /&gt;
|Base Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;31&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1F&lt;br /&gt;
|Base Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;32&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x20&lt;br /&gt;
|Base Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;33&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x21&lt;br /&gt;
|Base Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;34&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x22&lt;br /&gt;
|Supposedly this was going to be Health Recharge which would function like the Energy Recharge. Always 0 and ignored by game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;35&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x23&lt;br /&gt;
|Energy to recharge each turn. Equals &#039;&#039;&#039;recruit initial&#039;&#039;&#039; TUs/3 ([[SOLDIER.DAT]][43], &#039;&#039;&#039;not&#039;&#039;&#039; total base TUs). This is a signed byte. See [[Time Units]] and [[Energy#Usage|Energy Usage]]; also see [[#45|[45]]] (energy usage when walking/turning). &#039;&#039;BombBloke: Is this affected by damage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;36&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x24&lt;br /&gt;
|Supposedly this was going to be Armor Recharge which would function like the Energy Recharge. Always 0 and probably unused, but needs testing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;37&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x25&lt;br /&gt;
|Psi skill. Psi stats not displayed/usable until this is greater then 0.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;38&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x26&lt;br /&gt;
|Item to create when unit is unconscious/dead (index into obdata.dat).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;NKF:&amp;lt;/i&amp;gt; If you set this value to that of a usable item, the item that is created in place of the unconscious or dead soldier can be used like the ordinary item. Elerium pods, for example, can be recovered for 50 elerium each after the battle. Weapons can be used as you normally use them, etc.&lt;br /&gt;
&lt;br /&gt;
For unconscious &#039;units&#039;, the item will be treated as the unconscious body - it will retain the name of the unconscious unit when looked at via the inventory screen. Picking up and using the &#039;item&#039; will work, but when the unit wakes up, the &#039;item&#039; image in the soldier&#039;s hands is not cleared, even though the item no longer &#039;exists&#039; in the soldier&#039;s hands. Using this &#039;item&#039; will just crash the battlescape.&lt;br /&gt;
&lt;br /&gt;
Actually, I do not even want to think about what would happen if you &#039;prime&#039; a grenade/stunned body.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;39&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x27&lt;br /&gt;
|&amp;quot;Soldier value&amp;quot; a.k.a. victory points. You gain (or lose, as the case may be) score at the end of combat according to this value when the unit dies.&lt;br /&gt;
*For X-COM units: A soldier with 42 will be worth -42 points if killed. Note this doesn&#039;t seem to apply if the soldier is killed when unconscious. The soldier just vanishes.&lt;br /&gt;
*For aliens: A commander with 35 will give you +35 points if killed.&lt;br /&gt;
*This value is the same as [[SOLDIER.DAT]] bytes 15-16 (a Word) and equals: &lt;br /&gt;
    20 + Missions + Rank Bonus&lt;br /&gt;
    &lt;br /&gt;
    with [[Rank]] Bonus as follows: SGT +1, CPT +3, COL +6, CDR +10&lt;br /&gt;
Note that although this equation holds true, the value is not actually computed per se. Instead, 1 is added directly to it each mission, as is a rank-bonus delta if you advance (e.g. COL to CDR, delta +4). In other words, hacking the Missions or Rank fields does not affect this value.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;40&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x28&lt;br /&gt;
|Index into [[SOLDIER.DAT]], so game knows what to update. 255 = does not belong to anyone (i.e., it&#039;s not a soldier). &#039;&#039;NKF: This byte is critical for player controlled units. If this doesn&#039;t refer to anything, the unit ceases to exist at the end of the game. If it points to a valid soldier entry in soldier.dat, the soldier.dat entry will be updated.&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;41&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x29&lt;br /&gt;
|Animation frame counter for the unit. Used by eg [[Celatid]]s and [[Silacoid]]s. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;42&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2A&lt;br /&gt;
|Rank. Affects morale loss and interface icon (hull for tanks). Only X-COM troopers display rank icons.&lt;br /&gt;
    &amp;lt;u&amp;gt;X-COM&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Rookie   &#039;&#039;Civvies are 0 too&#039;&#039;&lt;br /&gt;
      1: Squaddie&lt;br /&gt;
      2: Sergeant&lt;br /&gt;
      3: Captain&lt;br /&gt;
      4: Colonel&lt;br /&gt;
      5: Commander&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Aliens&amp;lt;/u&amp;gt;&lt;br /&gt;
      1: Commander&lt;br /&gt;
      2: Leader&lt;br /&gt;
      3: Engineer&lt;br /&gt;
      4: Medic&lt;br /&gt;
      5: Navigator&lt;br /&gt;
      6: Soldier&lt;br /&gt;
      7: Terrorist&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Hull shape for X-COM tanks:&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Treaded&lt;br /&gt;
      1: Hover&lt;br /&gt;
&#039;&#039;I don&#039;t see 255 set for three dead mutons in a current game... [[#13|[13]]] (Health=0) seems to be the only reliable death indicator for them. Compare [[#120|[120]]]. -[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;43&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2B&lt;br /&gt;
|Called &amp;quot;deployment&amp;quot; with values of 0 or 1 (0=inside, 1=outside). When alien units are generated for a battle, there is a random chance for this byte to be set. That unit is a &amp;quot;scout&amp;quot; and can be assigned to one of the neutral spawn points on the map without the need to fill up all the alien exclusive points first. In other words with &amp;quot;1&amp;quot; alien unit is spawned at exact random node marked as &amp;quot;civilian/scout&amp;quot; ignoring actual rank of unit. As result - Commander can occasionally be spawned outside of the UFO craft (and ramble around UFO), not in the &amp;quot;contol room&amp;quot;, which has exclusive commander spawn node.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;44&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2C&lt;br /&gt;
|Alien aggression. The higher it is, the less likely an alien will take cover. Maximum of 2. 0=Cautious,1=Normal,2=Aggressive  &#039;&#039;MTR: This is true for aliens in Hobbes game, but soldiers have values from 4 to 254. Garbage? Delete this comment if so.&#039;&#039; This determines the amount of the unit&#039;s TUs that are devoted to shooting: 0=50%,1=60%,2=66%.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;45&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2D&lt;br /&gt;
|Used to calculate energy loss when walking or turning as: INT( TUs / 2&amp;lt;sup&amp;gt;[45]&amp;lt;/sup&amp;gt; ). See [[Energy#Usage]]; compare [[#35|[35]]] (energy recharge per turn). Set this byte to 4 to ensure no energy use whatsoever (maximum map [[Time Units#Time_Unit_Walking_Usage_Tables|tile TU cost]] is 12). &#039;&#039;In Hobbes game, many aliens are 0 and all soldiers are 1, but a dozen aliens have higher values ranging all the way up to 112! Garbage and/or the game doesn&#039;t care if they are garbage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;46&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2E&lt;br /&gt;
|HWP turret image. Only used (and only appears) if unit type [[#0|[0]]]=3 (X-COM tanks):&lt;br /&gt;
    0: Cannon&lt;br /&gt;
    1: Rocket&lt;br /&gt;
    2: Laser&lt;br /&gt;
    3: Plasma&lt;br /&gt;
    4: Blaster&lt;br /&gt;
    5,6: ? Blanks&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For non-tanks, this controls the inventory layout. &#039;&#039;Only&#039;&#039; 0 and 1 are valid. 0 is the standard layout seen on all soldiers. 1 is an alternate layout that may have been intended for custom tank equipment. Larger values only crash the game due to missing files. Also see [[#113|[113]]] and [[#117|[117]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;47&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2F&lt;br /&gt;
|This is a direct copy of offset[48] from the [[MCD]] record of the tile the unit is standing on. A signed byte.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;48&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x30&lt;br /&gt;
|Values for this byte always equal [[#52|[52]]] and are:&lt;br /&gt;
   2  (3x3 square; legacy 5 pixels):  Sectoid&lt;br /&gt;
   3  (5x5 square, corners removed; legacy 7 pixels):  Celatid, Chryssalid, Civvie,&lt;br /&gt;
      Ethereal, Floater, Muton, Snake, &#039;&#039;&#039;Soldier&#039;&#039;&#039;&lt;br /&gt;
   4  (7x7 octagon; legacy 9 pixels):  Cyberdisc, Hovertank, Reaper, Sectopod, Tank&lt;br /&gt;
   5 (9x9 square, Ls with 3-pixel legs removed; legacy 11 pixels):  Silacoid&lt;br /&gt;
Based on copious research by [[User:Bomb_Bloke|Bomb_Bloke]], [[User:Seb76|Seb76]], [[user:Zombie|Zombie]], and others, this has been found to be a LOF Template look-up for the shape of targets; Loftemps 2 to 5 define the &amp;quot;3D&amp;quot; shape of units relative to Line Of Fire as a cylinder, where 2 (Sectoid) is a thin cylinder and 5 (Silacoid) is very wide. The pixel width of each &amp;quot;silhoutte&amp;quot; that [[LOFTEMPS.DAT]] corresponds to has been added to the list above (see LOFTemps images 2-5). Tiles are 16 pixels wide in the X or Y direction (that&#039;s what this byte is about), and 24 pixels high (compare [[#49|[49]]]).&lt;br /&gt;
&lt;br /&gt;
This cylindrical shape is used in conjunction with height [[#49|[49]]] to define the silhouette that targets present to a shooter. Combine the pixel-width cross-section from Loftemps with height to find the cross-sectional area presented to shooters (sorted on increasing cross-section):&lt;br /&gt;
&lt;br /&gt;
                     LOF     LOF             Cross    Percent&lt;br /&gt;
                    Lookup  Width   Height  Section   of 384    Float   4x?&lt;br /&gt;
 Type               &#039;&#039;UR[48]  Pixels  UR[[#49|[49]]] Pxls X Ht  (16x24)   UR[[#51|[51]]]&#039;&#039;&lt;br /&gt;
 ----               ------  ------  ------ ---------  -------   ------  ---&lt;br /&gt;
 Sectoid               2       5      16       80      20.8%       -     -&lt;br /&gt;
 Celatid               3       7      12       84      21.9%       6     -&lt;br /&gt;
 Soldier (Kneeling)    3       7      14       98      25.5%       -     -&lt;br /&gt;
 Hovertank             4       9      12      108      28.1%       6    Yes&lt;br /&gt;
 Silacoid              5      11      10      110      28.6%       -     -&lt;br /&gt;
 Snakeman              3       7      18      126      32.8%       -     -&lt;br /&gt;
 Zombie                3       7      18      126      32.8%       -     -&lt;br /&gt;
 Ethereal              3       7      20      140      36.5%       -     -&lt;br /&gt;
 Cyberdisc             4       9      15      135      35.2%       2    Yes&lt;br /&gt;
 Chryssalid            3       7      21      147      38.3%       -     -&lt;br /&gt;
 Civilian              3       7      21      147      38.3%       2     -&lt;br /&gt;
 Floater               3       7      21      147      38.3%       2     -&lt;br /&gt;
 Muton                 3       7      21      147      38.3%       -     -&lt;br /&gt;
 Tank                  4       9      16      144      37.5%       -    Yes&lt;br /&gt;
 Soldier               3       7      22      154      40.1%       -     -&lt;br /&gt;
 Reaper                4       9      23      207      53.9%       -    Yes&lt;br /&gt;
 Sectopod              4       9      23      207      53.9%       -    Yes&lt;br /&gt;
Units take up an amount of the whole tile (as seen in cross-section by a shooter) as shown in the &amp;quot;Percent of 384&amp;quot; column. In reality, though, the [[Firing Accuracy|accuracy]] of shots makes this a more complex topic than the percents suggest. Also, dividing by 384 is an oversimplification, since it implies a directly rectangular shot (shooting right down the X or Y axis). While it&#039;s useful to see, keep in mind that this column only shows relative numbers.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;[[User:Zaimoni|Zaimoni]]: actual cross section depends on shot facing.  The table is close to correct for pure diagonal shots, so leaving alone for now.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The unit Float number ([[#51|[51]]], below) is shown simply for convenience. It does not enter into the cross-sectional computations. &amp;quot;4x&amp;quot; units actually consist of four units grouped in tight 2x2 formation (making their cross section effectively much larger then the percentage stated).&lt;br /&gt;
&lt;br /&gt;
Note that causing an X-Com soldier to kneel causes their cross section to fall by 36.36~% of that of when they are standing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;49&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x31&lt;br /&gt;
|[[height|Standing height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;50&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x32&lt;br /&gt;
|[[height|Kneeling height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;51&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x33&lt;br /&gt;
|Floating [[height]]. A unit &#039;floats&#039; this high above the ground, thus allowing shots to fly underneath. The highest point of a unit can be found by adding this to the units height stat. &amp;lt;i&amp;gt;Does this have an effect on explosive damage?&amp;lt;/i&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;52&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x34&lt;br /&gt;
|&amp;quot;Radius&amp;quot; of LOF Template. Always the same as [[#48|[48]]] in all known saved games. More info can be found at [[Talk:UNITREF.DAT#Offsets_0x30_.26_0x34|Talk:UNITREF.DAT#Offsets_0x30_&amp;amp;_0x34]] ([48] and [52]).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;53&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x35&lt;br /&gt;
|Image index for item in left hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;54&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x36&lt;br /&gt;
|Image index for item in right hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;NKF:&#039;&#039; If there is no item in the unit&#039;s hands, but one of the above two bytes are set, the &#039;image&#039; that represents the item will still be displayed in the battlescape. If these phantom items are clicked on, the game crashes. If the image is not the right type for the real item in hand, the ammo count doesn&#039;t get displayed. Otherwise, it&#039;ll work as normal.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;55&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x37&lt;br /&gt;
|[[Damage#Susceptible_to...|Damage Modifier]] Category&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed in the executable. A value of 1 indicates the first DM category, a value of 4 indicates the 4th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but I think there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Value&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
    &#039;&#039;&#039;0&#039;&#039;&#039;      Terrain and Items&lt;br /&gt;
    &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
    &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
    &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
    &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
    &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
    &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
    &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
    &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
    &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
   &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
   &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
   &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
   &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;56&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;56&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x38&lt;br /&gt;
|[[Melee Accuracy]] ([[SOLDIER.DAT]] bytes 50 (initial) &amp;amp; 60 (increase) added together)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;57&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;57&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x39&lt;br /&gt;
|[[Psionic Strength]]&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;58&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;58&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3A&lt;br /&gt;
|Current [[Morale]]. Base morale is hardcoded to 100.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;59&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;59&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3B&lt;br /&gt;
|[[Bravery]] = 110 - (10 * &#039;&#039;this value&#039;&#039;)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;60&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3C&lt;br /&gt;
|Panic mode. This takes effect at the start of the unit&#039;s next turn. Since it is cleared at that point, you&#039;ll never see it at anything other then 0 in the save files. You can manually change it to other values to force a specific panic attack on the next turn.&lt;br /&gt;
   0: None&lt;br /&gt;
   1: Freeze&lt;br /&gt;
   2: Running&lt;br /&gt;
   3: Berserk&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;61&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;61&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3D&lt;br /&gt;
|[[#62|[62]]] will increment by this amount whenever the unit moves.&lt;br /&gt;
   3: Sectiod                                    &#039;&#039;- Hobbes&#039;&#039;&lt;br /&gt;
   4: Soldiers, civs, and all other aliens (but Hobbes had no Large aliens)&lt;br /&gt;
  30: Tank/Laser&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;62&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;62&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3E&lt;br /&gt;
|Visibility via motion scanner. The bigger it is, the bigger the blip. Test this one out for values.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;63&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;63&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3F&lt;br /&gt;
|Number of [[Fatal Wounds]] to head.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;64&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;64&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x40&lt;br /&gt;
|Number of fatal wounds to torso.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;65&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;65&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x41&lt;br /&gt;
|Number of fatal wounds to right arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;66&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;66&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x42&lt;br /&gt;
|Number of fatal wounds to left arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;67&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;67&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x43&lt;br /&gt;
|Number of fatal wounds to right leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;68&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;68&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x44&lt;br /&gt;
|Number of fatal wounds to left leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;69-70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;69-70&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x45-0x46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x45-0x46&lt;br /&gt;
|Indexes into [[ROUTES.DAT]]. To start with, aliens will be located at the same position as the node indicated by byte 69.&lt;br /&gt;
:For patrol AI (no X-COM units sighted in turn 1, either X-COM or alien):&lt;br /&gt;
::Byte 69 is the index of the node of the start of the planned move.&lt;br /&gt;
::Byte 70 is the index of the node of the end of the planned move.&lt;br /&gt;
:Note that the move may be multi-turn, and byte 69 is not guaranteed to update during a multi-turn move.  I think it will if the alien ends its move on a node, however. -- Zaimoni&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;71&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x47&lt;br /&gt;
|Unit lighting: always 16 for XCom units, 0 for most aliens but 1 for cyberdisc. If greater than 1, it is set to 1 when unit inactive - see the [[Talk:UNITREF.DAT#Offset_0x47|Talk]] page.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;72&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x48&lt;br /&gt;
|The amount of [[Morale]] that has been restored using the [[Medi-Kit (EU)|Medkit&#039;s]] painkillers. The amount that &#039;&#039;can&#039;&#039; be restored is equal to the maximum health of the unit (index 26) minus their current health (index 13) further minus this.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;73&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x49&lt;br /&gt;
|Intelligence. Rated from 2 - 8. Indicates for how many turns the alien will know the location of spotted soldiers. &#039;&#039;Hey - why do humans have zero intelligence? :(&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;74&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4A&lt;br /&gt;
|AI Mode. Zaimoni found [http://www.strategycore.co.uk/forums/UFO-AI-patch-t8908.html&amp;amp;st=20&amp;amp;start=20 Here] that the values are 0:PATROL, 1:SNIPER, 2:ATTACKING, 3:ESCAPING, 4:GUARD, 5:Returning to UFO. 255 (-1) is also possible. Zaimoni tripped this by wounding a Floater in SNIPER mode; it returned fire, then was taken down by another soldier. Snap guess is that this is a &amp;quot;recalculate&amp;quot; marker.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;75&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4B&lt;br /&gt;
|Unknown. With that said, the only item remaining on my list is called &amp;quot;lightdirect&amp;quot; or direction of light for a unit (0=all around, 1=direction unit facing). Unused by game code and always 0. Maybe it was for a hand-held light source, or a armor-mounted flashlight?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;76-77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;76-77&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4C-0x4D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4C-0x4D&lt;br /&gt;
|Mission count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]  &#039;&#039;MTR: Wonder why they bothered to put this in Unitref since this will never change &#039;&#039;&#039;during&#039;&#039;&#039; a mission; compare how soldier stats are actually read from SOLDIER (not UNITREF) on return to geoscape. Is Missions shown anywhere on the combatscape?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;78-79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;78-79&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4E-0x4F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4E-0x4F&lt;br /&gt;
|Kill count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]. Number of kills this unit has made for ALL missions, not just this one. This one &#039;&#039;&#039;can&#039;&#039;&#039; vary &amp;quot;unpredictably&amp;quot; and thus is the only byte known to directly carry forward into the geoscape / Soldier.Dat!&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;80&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;80&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x50&lt;br /&gt;
|[[Reactions]] experience counter, for number of reaction shots. It doesn&#039;t matter if they hit the target; reactions still count. &amp;lt;b&amp;gt;See Note 2 re: Experience counters.&amp;lt;/b&amp;gt; (Also note: Aliens do not use experience counters.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NKF:&#039;&#039; Where does death by fire (overexposure rather than incendiary shell impact) fit into the experience counters? It becomes a non-assigned kill, I guess, like death by wounds, or death by a grenade that hasn&#039;t got an owner?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;81&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x51&lt;br /&gt;
|[[Firing Accuracy]] experience counter, for number of hits on an enemy (lethal or not, grenades or bullets). Each Autoshot hit counts as 1, so you can get 3 hits from one Autoshot burst. Likewise, grenades and blaster bombs can hit multiple targets with one explosion. Also, if you miss the intended target but hit a different alien, it still counts. Finally, if your shot actually has zero [[Damage]], it does still count as a hit. (Not due to armor blockage; a pure roll of 0 coming out of the gun.) &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;82&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;82&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x52&lt;br /&gt;
|[[Melee Accuracy]] experience counter, for number of times stun rod has been used (not stun bombs).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;83&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x53&lt;br /&gt;
|[[Throwing Accuracy]] experience counter, for number of times unit has thrown any object.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;84&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;84&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x54&lt;br /&gt;
|&amp;lt;div id=&amp;quot;Psi_Skill_Experience_Counter&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;[[Psionic Skill]] experience counter, for number of psi attacks performed. 1 is added if attempt was unsuccessful, 3 if it was successful. Note: if this value goes over 255, all psi experience is lost. That&#039;s 85 successful psis (255/3). So be careful of marathon psi&#039;ing (a minimum of 43 turns at 2 psis/turn, 29 turns at 3/turn).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;85&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;85&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x55&lt;br /&gt;
|[[Bravery]] experience counter, for number of times unit has &#039;&#039;resisted&#039;&#039; panicking, despite Morale &amp;lt; 50.  Being mind-controlled, panicking, or going berserk does &#039;&#039;not&#039;&#039; increase this stat -- although Panic Unit attacks will reduce Morale to the point where panic checks will be performed by the game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;86-110&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;86-110&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x56-0x6E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x56-0x6E&lt;br /&gt;
|Unit&#039;s &amp;lt;b&amp;gt;Name&amp;lt;/b&amp;gt;. Standard string ended by null byte. The rest can hold garbage.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;111&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;111&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x6F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x6F&lt;br /&gt;
|Called &amp;quot;BigFire&amp;quot;. If true (value of 1) then the unit is currently firing a weapon. It reverts back to 0 afterwards - determines whether to render the gun and firing arm in the &amp;quot;pointing weapon&amp;quot; position, or whether the weapon is being held against the chest. If manually set to a value above 0, the unit will hold its weapon out until such time as it actually uses it.&lt;br /&gt;
&lt;br /&gt;
Note that this value is only used by units holding two-handed weapons. A unit holding for eg a pistol will &#039;&#039;always&#039;&#039; point the weapon, and uses a different arm sprite for the purposes of doing so (regardless of whether or not the weapon is being fired).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;112&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;112&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x70&lt;br /&gt;
|Called &amp;quot;Finished&amp;quot;. If true (value of 1) signifies that the unit finished AI actions for current turn.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;113&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;113&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x71&lt;br /&gt;
|If 1, then you can&#039;t use the inventory button and the unit will be immune to stun. Used for tanks. Mind controlled units don&#039;t use this but their button disables anyway.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;BombBloke:&#039;&#039; This is the only way to access tank inventories.&lt;br /&gt;
*Tank/Cannon has a normal inventory and uses man_1m0.spk.&lt;br /&gt;
*Tank/Rocket Launcher has a different layout and uses man_1m0.spk.&lt;br /&gt;
*Tank/Laser Cannon uses man_œ.spk, which doesn&#039;t exist normally. Providing this file still crashes.&lt;br /&gt;
*Hovertank/Plasma simply crashes.&lt;br /&gt;
*Hovertank/Launcher simply crashes.&lt;br /&gt;
&lt;br /&gt;
[[#1|[1]]] actually determines the inventory screen used, might be worth playing with that. [[#46|[46]]] determines the layout.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;114&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;114&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x72&lt;br /&gt;
|If not 0, then unit is on fire, and will burn for this amount of turns.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;115&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;115&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x73&lt;br /&gt;
|Gender: 0 = male, 1 = female.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;116&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;116&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x74&lt;br /&gt;
|Hair/skin colour (for inventory; all other units = 0):&lt;br /&gt;
   0: Blond caucasian&lt;br /&gt;
   1: Brunette caucasian&lt;br /&gt;
   2: Asian&lt;br /&gt;
   3: Black&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;117&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;117&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x75&lt;br /&gt;
|Turret weapon. Over-rides hand held weapon. Turret images are not centered; that would be impossible because they aren&#039;t all &#039;objects&#039; (e.g. Celatid). &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
                                                       F.A.  TUs        F.A.  TUs&lt;br /&gt;
   0: HWP cannon (bigobs[40])....................Aimed  90%  80%   Snap  60%  33%&lt;br /&gt;
   1: HWP rocket (bigobs[42])....................Aimed 115%  75%   Snap  55%  45%&lt;br /&gt;
   2: HWP laser (bigobs[54]).....................Aimed  85%  75%   Snap  50%  33%&lt;br /&gt;
   3: HWP plasma cannon (bigobs[43]).............Aimed 100%  60%   Snap  86%  30%&lt;br /&gt;
   4: HWP blaster (bigobs[43]) (looks like ordinary cannon?)......Aimed 120%  80%&lt;br /&gt;
   5: Celatid plasma cannon (bigobs[38]).........Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   6: Cyberdisc plasma cannon (bigobs[34]).......Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   7: Sectopod Laser* cannon (bigobs[34])as cyberdisk, above, plus Auto  50%  35%&lt;br /&gt;
  22: Invalid - Incredibly powerful armour piercing shell. Overpowering.&lt;br /&gt;
 255: Unused&lt;br /&gt;
Note: This item will take precendence over any item carried in the hand slots. It can be installed on non-tanks, but then the unit won&#039;t be able to use any carried weapons or items. This weapon is NOT affected by the kneeling modifier, but it is affected by the current unit&#039;s accuracy stat. Also note, this byte does NOT determine the turret image for HWPs in the battlescape.&lt;br /&gt;
&lt;br /&gt;
[*]The damage type for the Sectopod is indeed set to (3)laser in the executable! Graphical/sound effects of a turret weapon is set there as well, via a reference to a weapon in OBDATA.DAT (HWP Cannon=4=Heavy Cannon, Sectopod=34=Heavy Plasma) &#039;&#039;When I changed HWP Cannon to 2, it looked/sounded like rifle fire - Crus8r&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also see [[#46|[46]]], [[#113|[113]]], and [[#118|[118]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;118&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;118&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x76&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x76&lt;br /&gt;
|Ammo for [[#117|[117]]] turret weapon&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;119&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;119&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x77&lt;br /&gt;
|Movement related? Large unit related? Possible bitfield.&lt;br /&gt;
 &#039;&#039;MTR:&#039;&#039;&lt;br /&gt;
 00000000   0 Chryssalid(2), Civilian(9), Ethereal(2), Floater(2), Muton, &lt;br /&gt;
 00000001   1 Muton, PA Soldier(2)                   Sectoid(2), Silacoid(2), &lt;br /&gt;
 00000011   3 PA Soldier                            PA Soldier(2), Tank/Laser&lt;br /&gt;
 00000101   5 Snakeman&lt;br /&gt;
 00001010  10 Celatid             &#039;&#039;- Hobbes game - could have some garbage&#039;&#039;&lt;br /&gt;
 00001101  13 Muton, PA Soldier   &#039;&#039;  (parens) is count, if more than 1 unit&#039;&#039;&lt;br /&gt;
 00010011  19 Snakeman&lt;br /&gt;
 00100110  38 PA Soldier&lt;br /&gt;
 00101010  42 Muton(3)&lt;br /&gt;
 00110001  49 Muton&lt;br /&gt;
 00110010  50 PA Soldier&lt;br /&gt;
 00110101  53 Silacoid(2)&lt;br /&gt;
 00111011  59 Celatid&lt;br /&gt;
 00111111  63 Silacoid&lt;br /&gt;
 01001110  78 PA Soldier&lt;br /&gt;
 01100111 103 PA Soldier&lt;br /&gt;
 01111111 127 Muton&lt;br /&gt;
 10010000 144 Muton&lt;br /&gt;
 11000000 192 Celatid&lt;br /&gt;
 11111110 254 Muton&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;120-123&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;120-123&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x78-0x7B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x78-0x7B&lt;br /&gt;
|Unit bit flags (32bit value), mainly re: mobility. They do NOT affect the soldier in inventory screen: &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
 (  1) 1: 1 = Unit moving.&lt;br /&gt;
 (  2) 2: 1 = Unit can fly.&lt;br /&gt;
 (  4) 3: 1 = Unit is flying. (Toggles leg sprites for power armour.)&lt;br /&gt;
 (  8) 4: 1 = Has been to this unit in next unit loop. Or to put it another way, has the unit been selected this turn.&lt;br /&gt;
 ( 16) 5: 1 = Unit has been disabled for selection.&lt;br /&gt;
              (Stops the unit tab button from selecting this soldier.)&lt;br /&gt;
 ( 32) 6: 0 = Unit has left hand object selected, 1 = right hand object selected.&lt;br /&gt;
 ( 64) 7: 1 = Unit is kneeling.&lt;br /&gt;
 (128) 8: 1 = Unit is wearing power/flying suit. (Can&#039;t be stunned by smoke flag? &lt;br /&gt;
              Seems to work for fire, too.)&lt;br /&gt;
If a unit is carrying something in either hand, it is impossible to get him to appear as if he is carrying nothing - in the game, at least. If he is carrying nothing, bit 6 can flag (as though the unit was using it&#039;s right hand item). But maybe it&#039;s just the order of dropped items affecting this?&lt;br /&gt;
&lt;br /&gt;
Note: A unit is only considered as flying if it is not on the ground. For example, a hover tank is not always considered as flying.&lt;br /&gt;
&lt;br /&gt;
What if a hovertank is half on the ground, half in the air? What about a treaded tank, or large alien unit? What about units in lifts?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;124-125&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;124-125&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7C-0x7D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7C-0x7D&lt;br /&gt;
|TFTD ONLY - Bubble animation count for soldiers.  Can be 0 to 16 (0x0F).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;126-127&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;126-127&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7E-0x7F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7E-0x7F&lt;br /&gt;
|TFTD ONLY - Bubble animation delay, skips this amount of frames.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;128-129&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;128-129&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x80-0x81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x80-0x81&lt;br /&gt;
|TFTD ONLY - Bubble animation enable. (0=disable, 1=enable)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;130-131&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;130-131&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x82-0x83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x82-0x83&lt;br /&gt;
|TFTD ONLY - Called &amp;quot;floorabove&amp;quot; flag. Is there a floor above unit? (0=no, 1=yes)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
1) The original/base values for &amp;lt;b&amp;gt;soldier stats&amp;lt;/b&amp;gt; (offsets [[#23|[23]]]-[[#28|[28]]], etc.) correspond to the initial+increase bytes from [[SOLDIER.DAT|Soldier.Dat]] (bytes 43-62). Changes to these Unitref bytes are &amp;lt;i&amp;gt;lost&amp;lt;/i&amp;gt;  when the mission ends; instead, XCOM re-reads them from Soldier at that time. This makes sense because base soldier stats don&#039;t change &amp;lt;i&amp;gt;during&amp;lt;/i&amp;gt; a mission per se (although they might increase when the mission ends); in this way, the programmers didn&#039;t have to bother with separately storing and/or adding initial+increase during combat. (It&#039;s also why you don&#039;t see the initial+increase in the soldier stat display during combat, that you can see back at base.) On a practical note, if you are testing soldier stat increases versus experience counters, change the experience counters in Unitref, but change the soldier stats in Soldier. (IOW, it doesn&#039;t matter what the soldier stats are in the combat mission.)&lt;br /&gt;
&lt;br /&gt;
The Kill count (offset [[#78-79|[78-79]]]) is the only Unitref value I know of that is directly carried forward into the geoscape and Soldier.dat. However, some others do indirectly carry forward, for example: experience (offsets [[#80|[80]]]-[[#85|[85]]]) causes stat and rank increases, and decreased health (offset [[#26|[26]]] - offset [[#13|[13]]]) means hospital time. And, of course, death is permanent. Heh.&lt;br /&gt;
&lt;br /&gt;
2) &amp;lt;b&amp;gt;Experience counters&amp;lt;/b&amp;gt; (offsets [[#80|[80]]]-[[#85|[85]]]) determine the likelihood of soldier stat increases at the end of the combat mission, according to the formula for Primary Stats shown [[Experience#How_Experience_Points_Are_Applied|here]]. The Bravery counter (offset [[#85|[85]]]) affects Bravery as shown [[Bravery|here]].&lt;br /&gt;
&lt;br /&gt;
Also, if at least one of the experience counters (except Throws) has a count, your secondary stats will increase, as discussed [[Experience#Secondary_Stats|here]]. All you need is at least a 1 in offsets [[#80|[80]]]-[[#82|[82]]] or [[#84|[84]]]-[[#85|[85]]]; more than 1 and/or multiple counters has no additional effect.&lt;br /&gt;
&lt;br /&gt;
3) BombBloke&#039;s additional &amp;quot;To be Done&amp;quot; notes - can we cross some of these off yet?&lt;br /&gt;
&lt;br /&gt;
   Need to research:&lt;br /&gt;
   Stun recovery rate, does it exist?&lt;br /&gt;
   Hand to hand attacks&lt;br /&gt;
   &amp;lt;strike&amp;gt;Offset of weapon from unit image?&amp;lt;/strike&amp;gt; &lt;br /&gt;
   &#039;&#039;Based on unit height and nothing else. There may be values to determine what arm sprites to use,&#039;&#039;&lt;br /&gt;
   &#039;&#039;but I doubt it.&#039;&#039;&lt;br /&gt;
   Firing sprite offset? &lt;br /&gt;
   &#039;&#039;Probably just based on unit height and some hardcoded values in the executable.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Inventory lockout?&amp;lt;/strike&amp;gt; &#039;&#039;All mind controlled units are locked out.&#039;&#039;&lt;br /&gt;
   Kneel lockout? &lt;br /&gt;
   &#039;&#039;Probably the same as above, I seem to remember that using XcomUtil to &amp;quot;swap sides&amp;quot; would make it&#039;&#039;&lt;br /&gt;
   &#039;&#039;possible to kneel small alien units.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Aliens seen?&amp;lt;/strike&amp;gt; &#039;&#039;Not used in unitref.dat, only in unitpos.dat. -[[User:Zombie|Zombie]] 23:48, 29 September 2006 (PDT)&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Whether a unit slides/floats/hovers/rolls/walks (movement noise)?&amp;lt;/strike&amp;gt; &#039;&#039;Set according to unit type.&#039;&#039;&lt;br /&gt;
   What else? The more to look for, the easier it is...&lt;br /&gt;
   &lt;br /&gt;
   Know 111 values.&lt;br /&gt;
   Unknown values (13 in total):&lt;br /&gt;
   [[#34|[034 / 0x22]]] - Always 0?&lt;br /&gt;
   [[#36|[036 / 0x24]]] - Always 0?&lt;br /&gt;
   [[#43|[043 / 0x2B]]] - Set to 1 on occasion, usually 0.&lt;br /&gt;
   [[#52|[052 / 0x34]]] - Seems to be a mirror of 48 / 0x30, the LOFTemp index for the unit.&lt;br /&gt;
   [[#71|[071 / 0x47]]] - Appears to relate to lighting caused by the unit, [[Talk:UNITREF.DAT#Offset_0x47|discussion here]].&lt;br /&gt;
   [[#74|[074 / 0x4A]]] - Appears to relate to the AI-mode used by the unit, [[Talk:UNITREF.DAT#Offset_0x4A_.2874.29|discussion here]].&lt;br /&gt;
   [[#75|[075 / 0x4B]]] - Always 0?&lt;br /&gt;
   [[#112|[112 / 0x70]]] - Set to 1 for some aliens, 0 otherwise.&lt;br /&gt;
   [[#119|[119 / 0x77]]] - No idea, possible bitfield, could be anything.&lt;br /&gt;
   [[#120|[120 / 0x78]]] - Unit bit flags, mainly re: mobility. Only one bit not 100% identified.&lt;br /&gt;
   [[#121|[121 / 0x79]]] - Second unit gets a value of 16. Everyone else gets 0. No obvious purpose.&lt;br /&gt;
   [[#122|[122 / 0x7A]]] - Always 0?&lt;br /&gt;
   [[#123|[123 / 0x7B]]] - Always 0?&lt;br /&gt;
   &lt;br /&gt;
   Know 1 TFTD value.   &lt;br /&gt;
   Unknown TFTD values (7 in total):&lt;br /&gt;
   [[#125|[125]]] [[#126|[126]]] [[#127|[127]]] [[#128|[128]]] [[#129|[129]]] [[#130|[130]]] [[#131|[131]]]&lt;br /&gt;
&lt;br /&gt;
4) Hobbes posted a savegame with a TON of different aliens in it [http://www.xcomufo.com/forums/index.php?showtopic=8591 here] (message 6). Interesting for testing. But note it was made with XCOMUTIL and there may(?) be concerns over vailidity of unit info - see [[Talk:UNITREF.DAT]].&lt;br /&gt;
&lt;br /&gt;
5) A [[HackerTools|Hex Workshop]] Structure Library for UNITREF.DAT created by Danial is [[UNITREF_DAT_HSL|here]].&lt;br /&gt;
&lt;br /&gt;
== For More Information ==&lt;br /&gt;
*[[SOLDIER.DAT]]&lt;br /&gt;
*[[Soldiers|Soldier Stats]]&lt;br /&gt;
*[[Experience]]&lt;br /&gt;
*[[HackerTools|Hex editing]]&lt;br /&gt;
&lt;br /&gt;
Return to [[Saved_Game_Files|Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=66000</id>
		<title>UNITREF.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=66000"/>
		<updated>2015-06-24T05:47:13Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* fix back*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [[Saved Game Files|save game file]] that has a record size of 124 bytes for UFO, or 132 for TFTD. Values are unsigned unless otherwise stated. Some bytes represent bitfields. There are 80 records (not all of them necessarily used) for a fixed file size of 9,920 bytes (or 10,560 for TFTD). It goes hand in hand with [[UNITPOS.DAT]].&lt;br /&gt;
&lt;br /&gt;
Comes in three flavours:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Initially created by the GeoScape engine before tactical battles. Stored in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder and contains info on all units that will be present in the coming mission (in an alive state - the deaths of aliens killed by exploding UFO power units isn&#039;t determined until [[Battlescape_Map_Generation#KABOOM.21.21|later]]). Unlike the other two versions, this only contains the bare minimum number of records required to store the units it details.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNITREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Created along with a [[Saved_Game_Files#Battlescape_Files|battlescape save]], contains the mid-mission state of the unit table.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF2.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Appears in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder at the end of combat. Used to determine which troopers/tanks survived, statistic gains via [[experience]], and which aliens need to be hauled off to the [[Alien Containment]] unit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values are presented according to byte offset ([[#0|0]] to [[#123|123]] (or [[#131|131]] for TFTD)) followed by the equivalent hex offset ([[#0x00|0x00]] to [[#0x7B|0x7B]] (or [[#0x83|0x83]] for TFTD)). Notes apply to both UFO and TFTD unless otherwise stated. Let us know what else you can find - refer to the [[#Notes|bottom of the page]] for those values that&#039;re unknown, or to the [[Talk:UNITREF.DAT|talk page]] for further ideas as to what they could be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Decimal)&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Hex)&lt;br /&gt;
!Usage&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x00&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x00&lt;br /&gt;
|Type of unit. Unit scream and movement sound effects are based on this and gender. Gender and flying abilities affect the sprites as well. Not turrets. Specifically: [[#53|[53]]] &amp;amp; [[#54|[54]]] (weapons in hands), [[#115|[115]]] (gender) and [[#120|[120]]] (other flags) affect the final screen image. If the unit is a large unit, this will also determine the appearance of the last three quarters of the unit. This does NOT affect: the flying ability of the unit, the soldier image in the inventory screen, or the special abilities for certain aliens.&lt;br /&gt;
      &amp;lt;b&amp;gt;UFO&amp;lt;/b&amp;gt;                                        &amp;lt;b&amp;gt;TFTD&amp;lt;/b&amp;gt;&lt;br /&gt;
   0: Male/female unarmored X-COM soldier     0: Male/female unarmored X-COM diver   &lt;br /&gt;
   1: Male/female personal armor soldier      1: Male/female plastic armor diver&lt;br /&gt;
   2: Power/flying suit soldier               2: Power/flying suit diver&lt;br /&gt;
   3: Tank                                    3: Tank&lt;br /&gt;
   4: Sectoid                                 4: Aquatoid&lt;br /&gt;
   5: Snakeman                                5: Gillman&lt;br /&gt;
   6: Ethereal                                6: Lobster Man&lt;br /&gt;
   7: Muton                                   7: Tasoth&lt;br /&gt;
   8: Floater                                 8: Calcinite&lt;br /&gt;
   9: Celatid                                 9: Deep One&lt;br /&gt;
  10: Silacoid                               0A: BioDrone&lt;br /&gt;
  11: Chryssalid                             0B: Tentaculat&lt;br /&gt;
  12: Reaper                                 0C: Triscene&lt;br /&gt;
  13: Sectopod                               0D: Hallucinoid&lt;br /&gt;
  14: Cyberdisc                              0E: Xarquid&lt;br /&gt;
  15: Male civilian                          0F: Male civilians&lt;br /&gt;
  16: Female civilian                        10: Female civilians&lt;br /&gt;
  17: Zombie                                 11: Zombie&lt;br /&gt;
 255: Unused                                255: Unused&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;If the corresponding [[UNITPOS.DAT]] record is unused, then the record is unused.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;1&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x01&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x01&lt;br /&gt;
|Inventory paper doll image. File &amp;quot;UFOGRAPH\MAN_&amp;quot;+(char)(value + 48)+&amp;quot;.SPK&amp;quot; will be used as the inventory sprite, unless the value is 0 or 1. In those cases, [[#115|[115]]] and [[#116|[116]]] are used to determine the picture.&lt;br /&gt;
 0: No armor.&lt;br /&gt;
 1: Personal armour.&lt;br /&gt;
 2: Power suit.&lt;br /&gt;
 3: Flying suit.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;2-5&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;2-5&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x02-0x05&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x02-0x05&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|PCK set]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;6-9&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;6-9&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x06-0x09&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x06-0x09&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|TAB index for the PCK data]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;10&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0A&lt;br /&gt;
|Unit facing. Does NOT control HWP turret direction; see [[#24|[24]]].&lt;br /&gt;
   0: North     (up right)&lt;br /&gt;
   1: Northeast (right)&lt;br /&gt;
   2: East      (down right)&lt;br /&gt;
   3: Southeast (down)&lt;br /&gt;
   4: South     (down left)&lt;br /&gt;
   5: Southwest (left)&lt;br /&gt;
   6: West      (up left)&lt;br /&gt;
   7: Northwest (up)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;11&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0B&lt;br /&gt;
|Movement type. When entering a given map location, each tile is checked to see the TU requirements accordingly. [[MCD]][39+[[#11|UnitRef[11]]]] is the offset used. Note: By default, this is 0 for ALL unit types.&lt;br /&gt;
   0: Walking&lt;br /&gt;
   1: Sliding&lt;br /&gt;
   2: Flying&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;12&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0C&lt;br /&gt;
|Current TUs.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;13&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0D&lt;br /&gt;
|Current Health. Health of 0 = Dead. Compare [[#42|[42]]], [[#120|[120]]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For my [[Talk:Bravery|Bravery experience point testing]], I killed 15 of 16 aliens by setting this to zero, and my soldiers to 0 Morale. When I loaded the savegame, the aliens were still &amp;quot;alive&amp;quot; (i.e., up), then all died when I ended this turn. So death is probably only checked when injury happens, and at end of turn... to truly kill them dead on the ground through savegame editing must take more. And arg - when they all died, my soldiers all went to 100 Morale! So I edited them back to 0 Morale. But guess what... then all the aliens died &#039;&#039;&#039;again&#039;&#039;&#039; at the end of &#039;&#039;&#039;next&#039;&#039;&#039; turn, even though they were all on the ground (I heard screams, and all soldiers&#039; Morale went to 100 again). What the heck? The aliens stayed down after that, though. --[[User:MikeTheRed|MikeTheRed]] 16:01, 3 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Update: [[UNITPOS.DAT]] offset 10 bit 2 should be used to kill a unit entirely dead. Thanks, NKF &amp;amp; BB - MTR&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;While the game kills characters when Health&amp;lt;=Fatal Wounds (__ dies message), XComUtil will recover them based if their health is greater than 0.  Haven&#039;t tested an unmodified game.  --[[User:Zaimoni|Zaimoni]] 11:52, 14 April 2007 (CDT)&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;14&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0E&lt;br /&gt;
|Current Stun level &#039;&#039;how much falloff of paralysis every turn? What determines it?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;15&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0F&lt;br /&gt;
|Current Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;16&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x10&lt;br /&gt;
|Current Reactions  &#039;&#039;NKF: affected by health percentage&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;17&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x11&lt;br /&gt;
|Strength&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;18&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x12&lt;br /&gt;
|Current Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;19&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x13&lt;br /&gt;
|Current Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;20&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x14&lt;br /&gt;
|Current Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;21&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x15&lt;br /&gt;
|Current Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;22&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x16&lt;br /&gt;
|Current Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;quot;Base&amp;quot; means the original (total) value (as carried forward from geoscape) - Also see Note 1 re: Base soldier stat values.&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;23&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x17&lt;br /&gt;
|Base Firing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;24&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x18&lt;br /&gt;
|Base Throwing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Tanks (turreted units?) always have 0 throwing accuracy. They use this for turret facing, relative to unit facing. 0 means it&#039;s facing forwards. Additional values are clockwise increments; see [[#10|[10]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;25&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x19&lt;br /&gt;
|Base TUs&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;26&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1A&lt;br /&gt;
|Base Health&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;27&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1B&lt;br /&gt;
|Base Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;28&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1C&lt;br /&gt;
|Base Reactions&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;These Base Armour values are used to show the starting armor value in the Attributes screen (so you can readily see if it&#039;s been damaged&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;29&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1D&lt;br /&gt;
|Base Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;30&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1E&lt;br /&gt;
|Base Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;31&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1F&lt;br /&gt;
|Base Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;32&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x20&lt;br /&gt;
|Base Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;33&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x21&lt;br /&gt;
|Base Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;34&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x22&lt;br /&gt;
|Supposedly this was going to be Health Recharge which would function like the Energy Recharge. Always 0 and ignored by game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;35&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x23&lt;br /&gt;
|Energy to recharge each turn. Equals &#039;&#039;&#039;recruit initial&#039;&#039;&#039; TUs/3 ([[SOLDIER.DAT]][43], &#039;&#039;&#039;not&#039;&#039;&#039; total base TUs). This is a signed byte. See [[Time Units]] and [[Energy#Usage|Energy Usage]]; also see [[#45|[45]]] (energy usage when walking/turning). &#039;&#039;BombBloke: Is this affected by damage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;36&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x24&lt;br /&gt;
|Supposedly this was going to be Armor Recharge which would function like the Energy Recharge. Always 0 and probably unused, but needs testing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;37&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x25&lt;br /&gt;
|Psi skill. Psi stats not displayed/usable until this is greater then 0.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;38&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x26&lt;br /&gt;
|Item to create when unit is unconscious/dead (index into obdata.dat).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;NKF:&amp;lt;/i&amp;gt; If you set this value to that of a usable item, the item that is created in place of the unconscious or dead soldier can be used like the ordinary item. Elerium pods, for example, can be recovered for 50 elerium each after the battle. Weapons can be used as you normally use them, etc.&lt;br /&gt;
&lt;br /&gt;
For unconscious &#039;units&#039;, the item will be treated as the unconscious body - it will retain the name of the unconscious unit when looked at via the inventory screen. Picking up and using the &#039;item&#039; will work, but when the unit wakes up, the &#039;item&#039; image in the soldier&#039;s hands is not cleared, even though the item no longer &#039;exists&#039; in the soldier&#039;s hands. Using this &#039;item&#039; will just crash the battlescape.&lt;br /&gt;
&lt;br /&gt;
Actually, I do not even want to think about what would happen if you &#039;prime&#039; a grenade/stunned body.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;39&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x27&lt;br /&gt;
|&amp;quot;Soldier value&amp;quot; a.k.a. victory points. You gain (or lose, as the case may be) score at the end of combat according to this value when the unit dies.&lt;br /&gt;
*For X-COM units: A soldier with 42 will be worth -42 points if killed. Note this doesn&#039;t seem to apply if the soldier is killed when unconscious. The soldier just vanishes.&lt;br /&gt;
*For aliens: A commander with 35 will give you +35 points if killed.&lt;br /&gt;
*This value is the same as [[SOLDIER.DAT]] bytes 15-16 (a Word) and equals: &lt;br /&gt;
    20 + Missions + Rank Bonus&lt;br /&gt;
    &lt;br /&gt;
    with [[Rank]] Bonus as follows: SGT +1, CPT +3, COL +6, CDR +10&lt;br /&gt;
Note that although this equation holds true, the value is not actually computed per se. Instead, 1 is added directly to it each mission, as is a rank-bonus delta if you advance (e.g. COL to CDR, delta +4). In other words, hacking the Missions or Rank fields does not affect this value.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;40&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x28&lt;br /&gt;
|Index into [[SOLDIER.DAT]], so game knows what to update. 255 = does not belong to anyone (i.e., it&#039;s not a soldier). &#039;&#039;NKF: This byte is critical for player controlled units. If this doesn&#039;t refer to anything, the unit ceases to exist at the end of the game. If it points to a valid soldier entry in soldier.dat, the soldier.dat entry will be updated.&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;41&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x29&lt;br /&gt;
|Animation frame counter for the unit. Used by eg [[Celatid]]s and [[Silacoid]]s. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;42&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2A&lt;br /&gt;
|Rank. Affects morale loss and interface icon (hull for tanks). Only X-COM troopers display rank icons.&lt;br /&gt;
    &amp;lt;u&amp;gt;X-COM&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Rookie   &#039;&#039;Civvies are 0 too&#039;&#039;&lt;br /&gt;
      1: Squaddie&lt;br /&gt;
      2: Sergeant&lt;br /&gt;
      3: Captain&lt;br /&gt;
      4: Colonel&lt;br /&gt;
      5: Commander&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Aliens&amp;lt;/u&amp;gt;&lt;br /&gt;
      1: Commander&lt;br /&gt;
      2: Leader&lt;br /&gt;
      3: Engineer&lt;br /&gt;
      4: Medic&lt;br /&gt;
      5: Navigator&lt;br /&gt;
      6: Soldier&lt;br /&gt;
      7: Terrorist&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Hull shape for X-COM tanks:&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Treaded&lt;br /&gt;
      1: Hover&lt;br /&gt;
&#039;&#039;I don&#039;t see 255 set for three dead mutons in a current game... [[#13|[13]]] (Health=0) seems to be the only reliable death indicator for them. Compare [[#120|[120]]]. -[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;43&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2B&lt;br /&gt;
|Called &amp;quot;deployment&amp;quot; with values of 0 or 1 (0=inside, 1=outside). When alien units are generated for a battle, there is a random chance for this byte to be set. That unit is a &amp;quot;scout&amp;quot; and can be assigned to one of the neutral spawn points on the map without the need to fill up all the alien exclusive points first. In other words with &amp;quot;1&amp;quot; alien unit is spawned at exact random node marked as &amp;quot;civilian/scout&amp;quot; ignoring actual rank of unit. As result - Commander can occasionally be spawned outside of the UFO craft (and ramble around UFO), not in the &amp;quot;contol room&amp;quot;, which has exclusive commander spawn node.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;44&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2C&lt;br /&gt;
|Alien aggression. The higher it is, the less likely an alien will take cover. Maximum of 2. 0=Cautious,1=Normal,2=Aggressive  &#039;&#039;MTR: This is true for aliens in Hobbes game, but soldiers have values from 4 to 254. Garbage? Delete this comment if so.&#039;&#039; This determines the amount of the unit&#039;s TUs that are devoted to shooting: 0=50%,1=60%,2=66%.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;45&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2D&lt;br /&gt;
|Used to calculate energy loss when walking or turning as: INT( TUs / 2&amp;lt;sup&amp;gt;[45]&amp;lt;/sup&amp;gt; ). See [[Energy#Usage]]; compare [[#35|[35]]] (energy recharge per turn). Set this byte to 4 to ensure no energy use whatsoever (maximum map [[Time Units#Time_Unit_Walking_Usage_Tables|tile TU cost]] is 12). &#039;&#039;In Hobbes game, many aliens are 0 and all soldiers are 1, but a dozen aliens have higher values ranging all the way up to 112! Garbage and/or the game doesn&#039;t care if they are garbage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;46&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2E&lt;br /&gt;
|HWP turret image. Only used (and only appears) if unit type [[#0|[0]]]=3 (X-COM tanks):&lt;br /&gt;
    0: Cannon&lt;br /&gt;
    1: Rocket&lt;br /&gt;
    2: Laser&lt;br /&gt;
    3: Plasma&lt;br /&gt;
    4: Blaster&lt;br /&gt;
    5,6: ? Blanks&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For non-tanks, this controls the inventory layout. &#039;&#039;Only&#039;&#039; 0 and 1 are valid. 0 is the standard layout seen on all soldiers. 1 is an alternate layout that may have been intended for custom tank equipment. Larger values only crash the game due to missing files. Also see [[#113|[113]]] and [[#117|[117]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;47&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2F&lt;br /&gt;
|This is a direct copy of offset[48] from the [[MCD]] record of the tile the unit is standing on. A signed byte.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;48&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x30&lt;br /&gt;
|Values for this byte always equal [[#52|[52]]] and are:&lt;br /&gt;
   2  (3x3 square; legacy 5 pixels):  Sectoid&lt;br /&gt;
   3  (5x5 square, corners removed; legacy 7 pixels):  Celatid, Chryssalid, Civvie,&lt;br /&gt;
      Ethereal, Floater, Muton, Snake, &#039;&#039;&#039;Soldier&#039;&#039;&#039;&lt;br /&gt;
   4  (7x7 octagon; legacy 9 pixels):  Cyberdisc, Hovertank, Reaper, Sectopod, Tank&lt;br /&gt;
   5 (9x9 square, Ls with 3-pixel legs removed; legacy 11 pixels):  Silacoid&lt;br /&gt;
Based on copious research by [[User:Bomb_Bloke|Bomb_Bloke]], [[User:Seb76|Seb76]], [[user:Zombie|Zombie]], and others, this has been found to be a LOF Template look-up for the shape of targets; Loftemps 2 to 5 define the &amp;quot;3D&amp;quot; shape of units relative to Line Of Fire as a cylinder, where 2 (Sectoid) is a thin cylinder and 5 (Silacoid) is very wide. The pixel width of each &amp;quot;silhoutte&amp;quot; that [[LOFTEMPS.DAT]] corresponds to has been added to the list above (see LOFTemps images 2-5). Tiles are 16 pixels wide in the X or Y direction (that&#039;s what this byte is about), and 24 pixels high (compare [[#49|[49]]]).&lt;br /&gt;
&lt;br /&gt;
This cylindrical shape is used in conjunction with height [[#49|[49]]] to define the silhouette that targets present to a shooter. Combine the pixel-width cross-section from Loftemps with height to find the cross-sectional area presented to shooters (sorted on increasing cross-section):&lt;br /&gt;
&lt;br /&gt;
                     LOF     LOF             Cross    Percent&lt;br /&gt;
                    Lookup  Width   Height  Section   of 384    Float   4x?&lt;br /&gt;
 Type               &#039;&#039;UR[48]  Pixels  UR[[#49|[49]]] Pxls X Ht  (16x24)   UR[[#51|[51]]]&#039;&#039;&lt;br /&gt;
 ----               ------  ------  ------ ---------  -------   ------  ---&lt;br /&gt;
 Sectoid               2       5      16       80      20.8%       -     -&lt;br /&gt;
 Celatid               3       7      12       84      21.9%       6     -&lt;br /&gt;
 Soldier (Kneeling)    3       7      14       98      25.5%       -     -&lt;br /&gt;
 Hovertank             4       9      12      108      28.1%       6    Yes&lt;br /&gt;
 Silacoid              5      11      10      110      28.6%       -     -&lt;br /&gt;
 Snakeman              3       7      18      126      32.8%       -     -&lt;br /&gt;
 Zombie                3       7      18      126      32.8%       -     -&lt;br /&gt;
 Ethereal              3       7      20      140      36.5%       -     -&lt;br /&gt;
 Cyberdisc             4       9      15      135      35.2%       2    Yes&lt;br /&gt;
 Chryssalid            3       7      21      147      38.3%       -     -&lt;br /&gt;
 Civilian              3       7      21      147      38.3%       2     -&lt;br /&gt;
 Floater               3       7      21      147      38.3%       2     -&lt;br /&gt;
 Muton                 3       7      21      147      38.3%       -     -&lt;br /&gt;
 Tank                  4       9      16      144      37.5%       -    Yes&lt;br /&gt;
 Soldier               3       7      22      154      40.1%       -     -&lt;br /&gt;
 Reaper                4       9      23      207      53.9%       -    Yes&lt;br /&gt;
 Sectopod              4       9      23      207      53.9%       -    Yes&lt;br /&gt;
Units take up an amount of the whole tile (as seen in cross-section by a shooter) as shown in the &amp;quot;Percent of 384&amp;quot; column. In reality, though, the [[Firing Accuracy|accuracy]] of shots makes this a more complex topic than the percents suggest. Also, dividing by 384 is an oversimplification, since it implies a directly rectangular shot (shooting right down the X or Y axis). While it&#039;s useful to see, keep in mind that this column only shows relative numbers.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;[[User:Zaimoni|Zaimoni]]: actual cross section depends on shot facing.  The table is close to correct for pure diagonal shots, so leaving alone for now.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The unit Float number ([[#51|[51]]], below) is shown simply for convenience. It does not enter into the cross-sectional computations. &amp;quot;4x&amp;quot; units actually consist of four units grouped in tight 2x2 formation (making their cross section effectively much larger then the percentage stated).&lt;br /&gt;
&lt;br /&gt;
Note that causing an X-Com soldier to kneel causes their cross section to fall by 36.36~% of that of when they are standing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;49&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x31&lt;br /&gt;
|[[height|Standing height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;50&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x32&lt;br /&gt;
|[[height|Kneeling height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;51&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x33&lt;br /&gt;
|Floating [[height]]. A unit &#039;floats&#039; this high above the ground, thus allowing shots to fly underneath. The highest point of a unit can be found by adding this to the units height stat. &amp;lt;i&amp;gt;Does this have an effect on explosive damage?&amp;lt;/i&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;52&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x34&lt;br /&gt;
|&amp;quot;Radius&amp;quot; of LOF Template. Always the same as [[#48|[48]]] in all known saved games. More info can be found at [[Talk:UNITREF.DAT#Offsets_0x30_.26_0x34|Talk:UNITREF.DAT#Offsets_0x30_&amp;amp;_0x34]] ([48] and [52]).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;53&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x35&lt;br /&gt;
|Image index for item in left hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;54&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x36&lt;br /&gt;
|Image index for item in right hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;NKF:&#039;&#039; If there is no item in the unit&#039;s hands, but one of the above two bytes are set, the &#039;image&#039; that represents the item will still be displayed in the battlescape. If these phantom items are clicked on, the game crashes. If the image is not the right type for the real item in hand, the ammo count doesn&#039;t get displayed. Otherwise, it&#039;ll work as normal.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;55&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x37&lt;br /&gt;
|[[Damage#Susceptible_to...|Damage Modifier]] Category&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed in the executable. A value of 1 indicates the first DM category, a value of 4 indicates the 4th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but I think there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Value&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
    &#039;&#039;&#039;0&#039;&#039;&#039;      Terrain and Items&lt;br /&gt;
    &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
    &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
    &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
    &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
    &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
    &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
    &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
    &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
    &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
   &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
   &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
   &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
   &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;56&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;56&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x38&lt;br /&gt;
|[[Melee Accuracy]] ([[SOLDIER.DAT]] bytes 50 (initial) &amp;amp; 60 (increase) added together)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;57&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;57&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x39&lt;br /&gt;
|[[Psionic Strength]]&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;58&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;58&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3A&lt;br /&gt;
|Current [[Morale]]. Base morale is hardcoded to 100.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;59&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;59&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3B&lt;br /&gt;
|[[Bravery]] = 110 - (10 * &#039;&#039;this value&#039;&#039;)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;60&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3C&lt;br /&gt;
|Panic mode. This takes effect at the start of the unit&#039;s next turn. Since it is cleared at that point, you&#039;ll never see it at anything other then 0 in the save files. You can manually change it to other values to force a specific panic attack on the next turn.&lt;br /&gt;
   0: None&lt;br /&gt;
   1: Freeze&lt;br /&gt;
   2: Running&lt;br /&gt;
   3: Berserk&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;61&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;61&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3D&lt;br /&gt;
|[[#62|[62]]] will increment by this amount whenever the unit moves.&lt;br /&gt;
   3: Sectiod                                    &#039;&#039;- Hobbes&#039;&#039;&lt;br /&gt;
   4: Soldiers, civs, and all other aliens (but Hobbes had no Large aliens)&lt;br /&gt;
  30: Tank/Laser&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;62&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;62&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3E&lt;br /&gt;
|Visibility via motion scanner. The bigger it is, the bigger the blip. Test this one out for values.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;63&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;63&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3F&lt;br /&gt;
|Number of [[Fatal Wounds]] to head.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;64&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;64&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x40&lt;br /&gt;
|Number of fatal wounds to torso.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;65&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;65&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x41&lt;br /&gt;
|Number of fatal wounds to right arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;66&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;66&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x42&lt;br /&gt;
|Number of fatal wounds to left arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;67&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;67&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x43&lt;br /&gt;
|Number of fatal wounds to right leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;68&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;68&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x44&lt;br /&gt;
|Number of fatal wounds to left leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;69-70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;69-70&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x45-0x46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x45-0x46&lt;br /&gt;
|Indexes into [[ROUTES.DAT]]. To start with, aliens will be located at the same position as the node indicated by byte 69.&lt;br /&gt;
:For patrol AI (no X-COM units sighted in turn 1, either X-COM or alien):&lt;br /&gt;
::Byte 69 is the index of the node of the start of the planned move.&lt;br /&gt;
::Byte 70 is the index of the node of the end of the planned move.&lt;br /&gt;
:Note that the move may be multi-turn, and byte 69 is not guaranteed to update during a multi-turn move.  I think it will if the alien ends its move on a node, however. -- Zaimoni&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;71&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x47&lt;br /&gt;
|Unit lighting: always 16 for XCom units, 0 for most aliens but 1 for cyberdisc. If greater than 1, it is set to 1 when unit inactive - see the [[Talk:UNITREF.DAT#Offset_0x47|Talk]] page.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;72&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x48&lt;br /&gt;
|The amount of [[Morale]] that has been restored using the [[Medi-Kit (EU)|Medkit&#039;s]] painkillers. The amount that &#039;&#039;can&#039;&#039; be restored is equal to the maximum health of the unit (index 26) minus their current health (index 13) further minus this.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;73&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x49&lt;br /&gt;
|Intelligence. Rated from 2 - 8. Indicates for how many turns the alien will know the location of spotted soldiers. &#039;&#039;Hey - why do humans have zero intelligence? :(&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;74&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4A&lt;br /&gt;
|AI Mode. Zaimoni found [http://www.strategycore.co.uk/forums/UFO-AI-patch-t8908.html&amp;amp;st=20&amp;amp;start=20 Here] that the values are 0:PATROL, 1:SNIPER, 2:ATTACKING, 3:ESCAPING, 4:GUARD, 5:Returning to UFO. 255 (-1) is also possible. Zaimoni tripped this by wounding a Floater in SNIPER mode; it returned fire, then was taken down by another soldier. Snap guess is that this is a &amp;quot;recalculate&amp;quot; marker.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;75&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4B&lt;br /&gt;
|Unknown. With that said, the only item remaining on my list is called &amp;quot;lightdirect&amp;quot; or direction of light for a unit (0=all around, 1=direction unit facing). Unused by game code and always 0. Maybe it was for a hand-held light source, or a armor-mounted flashlight?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;76-77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;76-77&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4C-0x4D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4C-0x4D&lt;br /&gt;
|Mission count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]  &#039;&#039;MTR: Wonder why they bothered to put this in Unitref since this will never change &#039;&#039;&#039;during&#039;&#039;&#039; a mission; compare how soldier stats are actually read from SOLDIER (not UNITREF) on return to geoscape. Is Missions shown anywhere on the combatscape?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;78-79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;78-79&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4E-0x4F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4E-0x4F&lt;br /&gt;
|Kill count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]. Number of kills this unit has made for ALL missions, not just this one. This one &#039;&#039;&#039;can&#039;&#039;&#039; vary &amp;quot;unpredictably&amp;quot; and thus is the only byte known to directly carry forward into the geoscape / Soldier.Dat!&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;80&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;80&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x50&lt;br /&gt;
|[[Reactions]] experience counter, for number of reaction shots. It doesn&#039;t matter if they hit the target; reactions still count. &amp;lt;b&amp;gt;See Note 2 re: Experience counters.&amp;lt;/b&amp;gt; (Also note: Aliens do not use experience counters.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NKF:&#039;&#039; Where does death by fire (overexposure rather than incendiary shell impact) fit into the experience counters? It becomes a non-assigned kill, I guess, like death by wounds, or death by a grenade that hasn&#039;t got an owner?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;81&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x51&lt;br /&gt;
|[[Firing Accuracy]] experience counter, for number of hits on an enemy (lethal or not, grenades or bullets). Each Autoshot hit counts as 1, so you can get 3 hits from one Autoshot burst. Likewise, grenades and blaster bombs can hit multiple targets with one explosion. Also, if you miss the intended target but hit a different alien, it still counts. Finally, if your shot actually has zero [[Damage]], it does still count as a hit. (Not due to armor blockage; a pure roll of 0 coming out of the gun.) &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;82&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;82&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x52&lt;br /&gt;
|[[Melee Accuracy]] experience counter, for number of times stun rod has been used (not stun bombs).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;83&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x53&lt;br /&gt;
|[[Throwing Accuracy]] experience counter, for number of times unit has thrown any object.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;84&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;84&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x54&lt;br /&gt;
|&amp;lt;div id=&amp;quot;Psi_Skill_Experience_Counter&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;[[Psionic Skill]] experience counter, for number of psi attacks performed. 1 is added if attempt was unsuccessful, 3 if it was successful. Note: if this value goes over 255, all psi experience is lost. That&#039;s 85 successful psis (255/3). So be careful of marathon psi&#039;ing (a minimum of 43 turns at 2 psis/turn, 29 turns at 3/turn).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;85&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;85&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x55&lt;br /&gt;
|[[Bravery]] experience counter, for number of times unit has &#039;&#039;resisted&#039;&#039; panicking, despite Morale &amp;lt; 50.  Being mind-controlled, panicking, or going berserk does &#039;&#039;not&#039;&#039; increase this stat -- although Panic Unit attacks will reduce Morale to the point where panic checks will be performed by the game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;86-110&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;86-110&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x56-0x6E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x56-0x6E&lt;br /&gt;
|Unit&#039;s &amp;lt;b&amp;gt;Name&amp;lt;/b&amp;gt;. Standard string ended by null byte. The rest can hold garbage.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;111&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;111&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x6F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x6F&lt;br /&gt;
|Called &amp;quot;BigFire&amp;quot;. If true (value of 1) then the unit is currently firing a weapon. It reverts back to 0 afterwards - determines whether to render the gun and firing arm in the &amp;quot;pointing weapon&amp;quot; position, or whether the weapon is being held against the chest. If manually set to a value above 0, the unit will hold its weapon out until such time as it actually uses it.&lt;br /&gt;
&lt;br /&gt;
Note that this value is only used by units holding two-handed weapons. A unit holding for eg a pistol will &#039;&#039;always&#039;&#039; point the weapon, and uses a different arm sprite for the purposes of doing so (regardless of whether or not the weapon is being fired).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;112&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;112&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x70&lt;br /&gt;
|Called &amp;quot;Finished&amp;quot;. If true (value of 1) signifies that the unit finished AI actions for current turn.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;113&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;113&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x71&lt;br /&gt;
|If 1, then you can&#039;t use the inventory button and the unit will be immune to stun. Used for tanks. Mind controlled units don&#039;t use this but their button disables anyway.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;BombBloke:&#039;&#039; This is the only way to access tank inventories.&lt;br /&gt;
*Tank/Cannon has a normal inventory and uses man_1m0.spk.&lt;br /&gt;
*Tank/Rocket Launcher has a different layout and uses man_1m0.spk.&lt;br /&gt;
*Tank/Laser Cannon uses man_œ.spk, which doesn&#039;t exist normally. Providing this file still crashes.&lt;br /&gt;
*Hovertank/Plasma simply crashes.&lt;br /&gt;
*Hovertank/Launcher simply crashes.&lt;br /&gt;
&lt;br /&gt;
[[#1|[1]]] actually determines the inventory screen used, might be worth playing with that. [[#46|[46]]] determines the layout.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;114&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;114&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x72&lt;br /&gt;
|If not 0, then unit is on fire, and will burn for this amount of turns.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;115&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;115&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x73&lt;br /&gt;
|Gender: 0 = male, 1 = female.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;116&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;116&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x74&lt;br /&gt;
|Hair/skin colour (for inventory; all other units = 0):&lt;br /&gt;
   0: Blond caucasian&lt;br /&gt;
   1: Brunette caucasian&lt;br /&gt;
   2: Asian&lt;br /&gt;
   3: Black&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;117&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;117&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x75&lt;br /&gt;
|Turret weapon. Over-rides hand held weapon. Turret images are not centered; that would be impossible because they aren&#039;t all &#039;objects&#039; (e.g. Celatid). &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
                                                       F.A.  TUs        F.A.  TUs&lt;br /&gt;
   0: HWP cannon (bigobs[40])....................Aimed  90%  80%   Snap  60%  33%&lt;br /&gt;
   1: HWP rocket (bigobs[42])....................Aimed 115%  75%   Snap  55%  45%&lt;br /&gt;
   2: HWP laser (bigobs[54]).....................Aimed  85%  75%   Snap  50%  33%&lt;br /&gt;
   3: HWP plasma cannon (bigobs[43]).............Aimed 100%  60%   Snap  86%  30%&lt;br /&gt;
   4: HWP blaster (bigobs[43]) (looks like ordinary cannon?)......Aimed 120%  80%&lt;br /&gt;
   5: Celatid plasma cannon (bigobs[38]).........Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   6: Cyberdisc plasma cannon (bigobs[34]).......Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   7: Sectopod Laser* cannon (bigobs[34])as cyberdisk, above, plus Auto  50%  35%&lt;br /&gt;
  22: Invalid - Incredibly powerful armour piercing shell. Overpowering.&lt;br /&gt;
 255: Unused&lt;br /&gt;
Note: This item will take precendence over any item carried in the hand slots. It can be installed on non-tanks, but then the unit won&#039;t be able to use any carried weapons or items. This weapon is NOT affected by the kneeling modifier, but it is affected by the current unit&#039;s accuracy stat. Also note, this byte does NOT determine the turret image for HWPs in the battlescape.&lt;br /&gt;
&lt;br /&gt;
[*]The damage type for the Sectopod is indeed set to (3)laser in the executable! Graphical/sound effects of a turret weapon is set there as well, via a reference to a weapon in OBDATA.DAT (HWP Cannon=4=Heavy Cannon, Sectopod=34=Heavy Plasma) &#039;&#039;When I changed HWP Cannon to 2, it looked/sounded like rifle fire - Crus8r&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also see [[#46|[46]]], [[#113|[113]]], and [[#118|[118]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;118&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;118&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x76&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x76&lt;br /&gt;
|Ammo for [[#117|[117]]] turret weapon&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;119&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;119&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x77&lt;br /&gt;
|Movement related? Large unit related? Possible bitfield.&lt;br /&gt;
 &#039;&#039;MTR:&#039;&#039;&lt;br /&gt;
 00000000   0 Chryssalid(2), Civilian(9), Ethereal(2), Floater(2), Muton, &lt;br /&gt;
 00000001   1 Muton, PA Soldier(2)                   Sectoid(2), Silacoid(2), &lt;br /&gt;
 00000011   3 PA Soldier                            PA Soldier(2), Tank/Laser&lt;br /&gt;
 00000101   5 Snakeman&lt;br /&gt;
 00001010  10 Celatid             &#039;&#039;- Hobbes game - could have some garbage&#039;&#039;&lt;br /&gt;
 00001101  13 Muton, PA Soldier   &#039;&#039;  (parens) is count, if more than 1 unit&#039;&#039;&lt;br /&gt;
 00010011  19 Snakeman&lt;br /&gt;
 00100110  38 PA Soldier&lt;br /&gt;
 00101010  42 Muton(3)&lt;br /&gt;
 00110001  49 Muton&lt;br /&gt;
 00110010  50 PA Soldier&lt;br /&gt;
 00110101  53 Silacoid(2)&lt;br /&gt;
 00111011  59 Celatid&lt;br /&gt;
 00111111  63 Silacoid&lt;br /&gt;
 01001110  78 PA Soldier&lt;br /&gt;
 01100111 103 PA Soldier&lt;br /&gt;
 01111111 127 Muton&lt;br /&gt;
 10010000 144 Muton&lt;br /&gt;
 11000000 192 Celatid&lt;br /&gt;
 11111110 254 Muton&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;120&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;120&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x78&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x78&lt;br /&gt;
|Unit bit flags, mainly re: mobility. They do NOT affect the soldier in inventory screen: &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
 (  1) 1: 1 = Dead.  &#039;&#039;This was only set for 2 of 3 dead aliens in my current game.&#039;&#039;&lt;br /&gt;
                     &#039;&#039;[[#13|[13]]] (Health=0) is the most reliable indicator for me.&#039;&#039;&lt;br /&gt;
                     &#039;&#039;-[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
 (  2) 2: 1 = Unit can fly.&lt;br /&gt;
 (  4) 3: 1 = Unit is flying. (Toggles leg sprites for power armour.)&lt;br /&gt;
 (  8) 4: 1 = Has been to this unit in next unit loop. Or to put it another way, has the unit been selected this turn.&lt;br /&gt;
 ( 16) 5: 1 = Unit has been disabled for selection.&lt;br /&gt;
              (Stops the unit tab button from selecting this soldier.)&lt;br /&gt;
 ( 32) 6: 0 = Unit has left hand object selected, 1 = right hand object selected.&lt;br /&gt;
 ( 64) 7: 1 = Unit is kneeling.&lt;br /&gt;
 (128) 8: 1 = Unit is wearing power/flying suit. (Can&#039;t be stunned by smoke flag? &lt;br /&gt;
              Seems to work for fire, too.)&lt;br /&gt;
If a unit is carrying something in either hand, it is impossible to get him to appear as if he is carrying nothing - in the game, at least. If he is carrying nothing, bit 6 can flag (as though the unit was using it&#039;s right hand item). But maybe it&#039;s just the order of dropped items affecting this?&lt;br /&gt;
&lt;br /&gt;
Note: A unit is only considered as flying if it is not on the ground. For example, a hover tank is not always considered as flying.&lt;br /&gt;
&lt;br /&gt;
What if a hovertank is half on the ground, half in the air? What about a treaded tank, or large alien unit? What about units in lifts?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;121&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;121&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x79&lt;br /&gt;
|Possible Values: 0 or 16. All units in unitref.dat get a value of 0 except for the second unit in the list which gets 16. Doesn&#039;t matter if the second unit is a soldier, a tank, or an alien. It&#039;s always 16. Editing it to 0 doesn&#039;t crash the game or have any dire consequences. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;122&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;122&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7A&lt;br /&gt;
|Always 0?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;123&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;123&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7B&lt;br /&gt;
|Always 0?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;124-125&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;124-125&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7C-0x7D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7C-0x7D&lt;br /&gt;
|TFTD ONLY - Bubble animation count for soldiers.  Can be 0 to 16 (0x0F).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;126-127&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;126-127&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7E-0x7F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7E-0x7F&lt;br /&gt;
|TFTD ONLY - Bubble animation delay, skips this amount of frames.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;128-129&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;128-129&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x80-0x81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x80-ox81&lt;br /&gt;
|TFTD ONLY - Bubble animation enable. (0=disable, 1=enable)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;130-131&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;130-131&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x82-0x83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x82-0x83&lt;br /&gt;
|TFTD ONLY - Called &amp;quot;floorabove&amp;quot; flag. Is there a floor above unit? (0=no, 1=yes)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
1) The original/base values for &amp;lt;b&amp;gt;soldier stats&amp;lt;/b&amp;gt; (offsets [[#23|[23]]]-[[#28|[28]]], etc.) correspond to the initial+increase bytes from [[SOLDIER.DAT|Soldier.Dat]] (bytes 43-62). Changes to these Unitref bytes are &amp;lt;i&amp;gt;lost&amp;lt;/i&amp;gt;  when the mission ends; instead, XCOM re-reads them from Soldier at that time. This makes sense because base soldier stats don&#039;t change &amp;lt;i&amp;gt;during&amp;lt;/i&amp;gt; a mission per se (although they might increase when the mission ends); in this way, the programmers didn&#039;t have to bother with separately storing and/or adding initial+increase during combat. (It&#039;s also why you don&#039;t see the initial+increase in the soldier stat display during combat, that you can see back at base.) On a practical note, if you are testing soldier stat increases versus experience counters, change the experience counters in Unitref, but change the soldier stats in Soldier. (IOW, it doesn&#039;t matter what the soldier stats are in the combat mission.)&lt;br /&gt;
&lt;br /&gt;
The Kill count (offset [[#78-79|[78-79]]]) is the only Unitref value I know of that is directly carried forward into the geoscape and Soldier.dat. However, some others do indirectly carry forward, for example: experience (offsets [[#80|[80]]]-[[#85|[85]]]) causes stat and rank increases, and decreased health (offset [[#26|[26]]] - offset [[#13|[13]]]) means hospital time. And, of course, death is permanent. Heh.&lt;br /&gt;
&lt;br /&gt;
2) &amp;lt;b&amp;gt;Experience counters&amp;lt;/b&amp;gt; (offsets [[#80|[80]]]-[[#85|[85]]]) determine the likelihood of soldier stat increases at the end of the combat mission, according to the formula for Primary Stats shown [[Experience#How_Experience_Points_Are_Applied|here]]. The Bravery counter (offset [[#85|[85]]]) affects Bravery as shown [[Bravery|here]].&lt;br /&gt;
&lt;br /&gt;
Also, if at least one of the experience counters (except Throws) has a count, your secondary stats will increase, as discussed [[Experience#Secondary_Stats|here]]. All you need is at least a 1 in offsets [[#80|[80]]]-[[#82|[82]]] or [[#84|[84]]]-[[#85|[85]]]; more than 1 and/or multiple counters has no additional effect.&lt;br /&gt;
&lt;br /&gt;
3) BombBloke&#039;s additional &amp;quot;To be Done&amp;quot; notes - can we cross some of these off yet?&lt;br /&gt;
&lt;br /&gt;
   Need to research:&lt;br /&gt;
   Stun recovery rate, does it exist?&lt;br /&gt;
   Hand to hand attacks&lt;br /&gt;
   &amp;lt;strike&amp;gt;Offset of weapon from unit image?&amp;lt;/strike&amp;gt; &lt;br /&gt;
   &#039;&#039;Based on unit height and nothing else. There may be values to determine what arm sprites to use,&#039;&#039;&lt;br /&gt;
   &#039;&#039;but I doubt it.&#039;&#039;&lt;br /&gt;
   Firing sprite offset? &lt;br /&gt;
   &#039;&#039;Probably just based on unit height and some hardcoded values in the executable.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Inventory lockout?&amp;lt;/strike&amp;gt; &#039;&#039;All mind controlled units are locked out.&#039;&#039;&lt;br /&gt;
   Kneel lockout? &lt;br /&gt;
   &#039;&#039;Probably the same as above, I seem to remember that using XcomUtil to &amp;quot;swap sides&amp;quot; would make it&#039;&#039;&lt;br /&gt;
   &#039;&#039;possible to kneel small alien units.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Aliens seen?&amp;lt;/strike&amp;gt; &#039;&#039;Not used in unitref.dat, only in unitpos.dat. -[[User:Zombie|Zombie]] 23:48, 29 September 2006 (PDT)&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Whether a unit slides/floats/hovers/rolls/walks (movement noise)?&amp;lt;/strike&amp;gt; &#039;&#039;Set according to unit type.&#039;&#039;&lt;br /&gt;
   What else? The more to look for, the easier it is...&lt;br /&gt;
   &lt;br /&gt;
   Know 111 values.&lt;br /&gt;
   Unknown values (13 in total):&lt;br /&gt;
   [[#34|[034 / 0x22]]] - Always 0?&lt;br /&gt;
   [[#36|[036 / 0x24]]] - Always 0?&lt;br /&gt;
   [[#43|[043 / 0x2B]]] - Set to 1 on occasion, usually 0.&lt;br /&gt;
   [[#52|[052 / 0x34]]] - Seems to be a mirror of 48 / 0x30, the LOFTemp index for the unit.&lt;br /&gt;
   [[#71|[071 / 0x47]]] - Appears to relate to lighting caused by the unit, [[Talk:UNITREF.DAT#Offset_0x47|discussion here]].&lt;br /&gt;
   [[#74|[074 / 0x4A]]] - Appears to relate to the AI-mode used by the unit, [[Talk:UNITREF.DAT#Offset_0x4A_.2874.29|discussion here]].&lt;br /&gt;
   [[#75|[075 / 0x4B]]] - Always 0?&lt;br /&gt;
   [[#112|[112 / 0x70]]] - Set to 1 for some aliens, 0 otherwise.&lt;br /&gt;
   [[#119|[119 / 0x77]]] - No idea, possible bitfield, could be anything.&lt;br /&gt;
   [[#120|[120 / 0x78]]] - Unit bit flags, mainly re: mobility. Only one bit not 100% identified.&lt;br /&gt;
   [[#121|[121 / 0x79]]] - Second unit gets a value of 16. Everyone else gets 0. No obvious purpose.&lt;br /&gt;
   [[#122|[122 / 0x7A]]] - Always 0?&lt;br /&gt;
   [[#123|[123 / 0x7B]]] - Always 0?&lt;br /&gt;
   &lt;br /&gt;
   Know 1 TFTD value.   &lt;br /&gt;
   Unknown TFTD values (7 in total):&lt;br /&gt;
   [[#125|[125]]] [[#126|[126]]] [[#127|[127]]] [[#128|[128]]] [[#129|[129]]] [[#130|[130]]] [[#131|[131]]]&lt;br /&gt;
&lt;br /&gt;
4) Hobbes posted a savegame with a TON of different aliens in it [http://www.xcomufo.com/forums/index.php?showtopic=8591 here] (message 6). Interesting for testing. But note it was made with XCOMUTIL and there may(?) be concerns over vailidity of unit info - see [[Talk:UNITREF.DAT]].&lt;br /&gt;
&lt;br /&gt;
5) A [[HackerTools|Hex Workshop]] Structure Library for UNITREF.DAT created by Danial is [[UNITREF_DAT_HSL|here]].&lt;br /&gt;
&lt;br /&gt;
== For More Information ==&lt;br /&gt;
*[[SOLDIER.DAT]]&lt;br /&gt;
*[[Soldiers|Soldier Stats]]&lt;br /&gt;
*[[Experience]]&lt;br /&gt;
*[[HackerTools|Hex editing]]&lt;br /&gt;
&lt;br /&gt;
Return to [[Saved_Game_Files|Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=65999</id>
		<title>UNITREF.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=65999"/>
		<updated>2015-06-24T05:39:13Z</updated>

		<summary type="html">&lt;p&gt;Volutar: Undo revision 65998 by Volutar (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [[Saved Game Files|save game file]] that has a record size of 124 bytes for UFO, or 132 for TFTD. Values are unsigned unless otherwise stated. Some bytes represent bitfields. There are 80 records (not all of them necessarily used) for a fixed file size of 9,920 bytes (or 10,560 for TFTD). It goes hand in hand with [[UNITPOS.DAT]].&lt;br /&gt;
&lt;br /&gt;
Comes in three flavours:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Initially created by the GeoScape engine before tactical battles. Stored in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder and contains info on all units that will be present in the coming mission (in an alive state - the deaths of aliens killed by exploding UFO power units isn&#039;t determined until [[Battlescape_Map_Generation#KABOOM.21.21|later]]). Unlike the other two versions, this only contains the bare minimum number of records required to store the units it details.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNITREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Created along with a [[Saved_Game_Files#Battlescape_Files|battlescape save]], contains the mid-mission state of the unit table.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF2.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Appears in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder at the end of combat. Used to determine which troopers/tanks survived, statistic gains via [[experience]], and which aliens need to be hauled off to the [[Alien Containment]] unit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values are presented according to byte offset ([[#0|0]] to [[#123|123]] (or [[#131|131]] for TFTD)) followed by the equivalent hex offset ([[#0x00|0x00]] to [[#0x7B|0x7B]] (or [[#0x83|0x83]] for TFTD)). Notes apply to both UFO and TFTD unless otherwise stated. Let us know what else you can find - refer to the [[#Notes|bottom of the page]] for those values that&#039;re unknown, or to the [[Talk:UNITREF.DAT|talk page]] for further ideas as to what they could be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Decimal)&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Hex)&lt;br /&gt;
!Usage&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x00&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x00&lt;br /&gt;
|Type of unit. Unit scream and movement sound effects are based on this and gender. Gender and flying abilities affect the sprites as well. Not turrets. Specifically: [[#53|[53]]] &amp;amp; [[#54|[54]]] (weapons in hands), [[#115|[115]]] (gender) and [[#120|[120]]] (other flags) affect the final screen image. If the unit is a large unit, this will also determine the appearance of the last three quarters of the unit. This does NOT affect: the flying ability of the unit, the soldier image in the inventory screen, or the special abilities for certain aliens.&lt;br /&gt;
      &amp;lt;b&amp;gt;UFO&amp;lt;/b&amp;gt;                                        &amp;lt;b&amp;gt;TFTD&amp;lt;/b&amp;gt;&lt;br /&gt;
   0: Male/female unarmored X-COM soldier     0: Male/female unarmored X-COM diver   &lt;br /&gt;
   1: Male/female personal armor soldier      1: Male/female plastic armor diver&lt;br /&gt;
   2: Power/flying suit soldier               2: Power/flying suit diver&lt;br /&gt;
   3: Tank                                    3: Tank&lt;br /&gt;
   4: Sectoid                                 4: Aquatoid&lt;br /&gt;
   5: Snakeman                                5: Gillman&lt;br /&gt;
   6: Ethereal                                6: Lobster Man&lt;br /&gt;
   7: Muton                                   7: Tasoth&lt;br /&gt;
   8: Floater                                 8: Calcinite&lt;br /&gt;
   9: Celatid                                 9: Deep One&lt;br /&gt;
  10: Silacoid                               0A: BioDrone&lt;br /&gt;
  11: Chryssalid                             0B: Tentaculat&lt;br /&gt;
  12: Reaper                                 0C: Triscene&lt;br /&gt;
  13: Sectopod                               0D: Hallucinoid&lt;br /&gt;
  14: Cyberdisc                              0E: Xarquid&lt;br /&gt;
  15: Male civilian                          0F: Male civilians&lt;br /&gt;
  16: Female civilian                        10: Female civilians&lt;br /&gt;
  17: Zombie                                 11: Zombie&lt;br /&gt;
 255: Unused                                255: Unused&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;If the corresponding [[UNITPOS.DAT]] record is unused, then the record is unused.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;1&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x01&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x01&lt;br /&gt;
|Inventory paper doll image. File &amp;quot;UFOGRAPH\MAN_&amp;quot;+(char)(value + 48)+&amp;quot;.SPK&amp;quot; will be used as the inventory sprite, unless the value is 0 or 1. In those cases, [[#115|[115]]] and [[#116|[116]]] are used to determine the picture.&lt;br /&gt;
 0: No armor.&lt;br /&gt;
 1: Personal armour.&lt;br /&gt;
 2: Power suit.&lt;br /&gt;
 3: Flying suit.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;2-5&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;2-5&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x02-0x05&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x02-0x05&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|PCK set]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;6-9&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;6-9&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x06-0x09&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x06-0x09&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|TAB index for the PCK data]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;10&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0A&lt;br /&gt;
|Unit facing. Does NOT control HWP turret direction; see [[#24|[24]]].&lt;br /&gt;
   0: North     (up right)&lt;br /&gt;
   1: Northeast (right)&lt;br /&gt;
   2: East      (down right)&lt;br /&gt;
   3: Southeast (down)&lt;br /&gt;
   4: South     (down left)&lt;br /&gt;
   5: Southwest (left)&lt;br /&gt;
   6: West      (up left)&lt;br /&gt;
   7: Northwest (up)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;11&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0B&lt;br /&gt;
|Movement type. When entering a given map location, each tile is checked to see the TU requirements accordingly. [[MCD]][39+[[#11|UnitRef[11]]]] is the offset used. Note: By default, this is 0 for ALL unit types.&lt;br /&gt;
   0: Walking&lt;br /&gt;
   1: Sliding&lt;br /&gt;
   2: Flying&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;12&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0C&lt;br /&gt;
|Current TUs.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;13&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0D&lt;br /&gt;
|Current Health. Health of 0 = Dead. Compare [[#42|[42]]], [[#120|[120]]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For my [[Talk:Bravery|Bravery experience point testing]], I killed 15 of 16 aliens by setting this to zero, and my soldiers to 0 Morale. When I loaded the savegame, the aliens were still &amp;quot;alive&amp;quot; (i.e., up), then all died when I ended this turn. So death is probably only checked when injury happens, and at end of turn... to truly kill them dead on the ground through savegame editing must take more. And arg - when they all died, my soldiers all went to 100 Morale! So I edited them back to 0 Morale. But guess what... then all the aliens died &#039;&#039;&#039;again&#039;&#039;&#039; at the end of &#039;&#039;&#039;next&#039;&#039;&#039; turn, even though they were all on the ground (I heard screams, and all soldiers&#039; Morale went to 100 again). What the heck? The aliens stayed down after that, though. --[[User:MikeTheRed|MikeTheRed]] 16:01, 3 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Update: [[UNITPOS.DAT]] offset 10 bit 2 should be used to kill a unit entirely dead. Thanks, NKF &amp;amp; BB - MTR&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;While the game kills characters when Health&amp;lt;=Fatal Wounds (__ dies message), XComUtil will recover them based if their health is greater than 0.  Haven&#039;t tested an unmodified game.  --[[User:Zaimoni|Zaimoni]] 11:52, 14 April 2007 (CDT)&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;14&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0E&lt;br /&gt;
|Current Stun level &#039;&#039;how much falloff of paralysis every turn? What determines it?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;15&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0F&lt;br /&gt;
|Current Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;16&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x10&lt;br /&gt;
|Current Reactions  &#039;&#039;NKF: affected by health percentage&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;17&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x11&lt;br /&gt;
|Strength&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;18&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x12&lt;br /&gt;
|Current Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;19&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x13&lt;br /&gt;
|Current Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;20&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x14&lt;br /&gt;
|Current Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;21&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x15&lt;br /&gt;
|Current Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;22&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x16&lt;br /&gt;
|Current Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;quot;Base&amp;quot; means the original (total) value (as carried forward from geoscape) - Also see Note 1 re: Base soldier stat values.&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;23&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x17&lt;br /&gt;
|Base Firing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;24&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x18&lt;br /&gt;
|Base Throwing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Tanks (turreted units?) always have 0 throwing accuracy. They use this for turret facing, relative to unit facing. 0 means it&#039;s facing forwards. Additional values are clockwise increments; see [[#10|[10]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;25&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x19&lt;br /&gt;
|Base TUs&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;26&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1A&lt;br /&gt;
|Base Health&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;27&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1B&lt;br /&gt;
|Base Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;28&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1C&lt;br /&gt;
|Base Reactions&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;These Base Armour values are used to show the starting armor value in the Attributes screen (so you can readily see if it&#039;s been damaged&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;29&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1D&lt;br /&gt;
|Base Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;30&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1E&lt;br /&gt;
|Base Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;31&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1F&lt;br /&gt;
|Base Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;32&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x20&lt;br /&gt;
|Base Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;33&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x21&lt;br /&gt;
|Base Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;34&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x22&lt;br /&gt;
|Supposedly this was going to be Health Recharge which would function like the Energy Recharge. Always 0 and ignored by game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;35&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x23&lt;br /&gt;
|Energy to recharge each turn. Equals &#039;&#039;&#039;recruit initial&#039;&#039;&#039; TUs/3 ([[SOLDIER.DAT]][43], &#039;&#039;&#039;not&#039;&#039;&#039; total base TUs). This is a signed byte. See [[Time Units]] and [[Energy#Usage|Energy Usage]]; also see [[#45|[45]]] (energy usage when walking/turning). &#039;&#039;BombBloke: Is this affected by damage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;36&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x24&lt;br /&gt;
|Supposedly this was going to be Armor Recharge which would function like the Energy Recharge. Always 0 and probably unused, but needs testing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;37&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x25&lt;br /&gt;
|Psi skill. Psi stats not displayed/usable until this is greater then 0.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;38&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x26&lt;br /&gt;
|Item to create when unit is unconscious/dead (index into obdata.dat).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;NKF:&amp;lt;/i&amp;gt; If you set this value to that of a usable item, the item that is created in place of the unconscious or dead soldier can be used like the ordinary item. Elerium pods, for example, can be recovered for 50 elerium each after the battle. Weapons can be used as you normally use them, etc.&lt;br /&gt;
&lt;br /&gt;
For unconscious &#039;units&#039;, the item will be treated as the unconscious body - it will retain the name of the unconscious unit when looked at via the inventory screen. Picking up and using the &#039;item&#039; will work, but when the unit wakes up, the &#039;item&#039; image in the soldier&#039;s hands is not cleared, even though the item no longer &#039;exists&#039; in the soldier&#039;s hands. Using this &#039;item&#039; will just crash the battlescape.&lt;br /&gt;
&lt;br /&gt;
Actually, I do not even want to think about what would happen if you &#039;prime&#039; a grenade/stunned body.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;39&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x27&lt;br /&gt;
|&amp;quot;Soldier value&amp;quot; a.k.a. victory points. You gain (or lose, as the case may be) score at the end of combat according to this value when the unit dies.&lt;br /&gt;
*For X-COM units: A soldier with 42 will be worth -42 points if killed. Note this doesn&#039;t seem to apply if the soldier is killed when unconscious. The soldier just vanishes.&lt;br /&gt;
*For aliens: A commander with 35 will give you +35 points if killed.&lt;br /&gt;
*This value is the same as [[SOLDIER.DAT]] bytes 15-16 (a Word) and equals: &lt;br /&gt;
    20 + Missions + Rank Bonus&lt;br /&gt;
    &lt;br /&gt;
    with [[Rank]] Bonus as follows: SGT +1, CPT +3, COL +6, CDR +10&lt;br /&gt;
Note that although this equation holds true, the value is not actually computed per se. Instead, 1 is added directly to it each mission, as is a rank-bonus delta if you advance (e.g. COL to CDR, delta +4). In other words, hacking the Missions or Rank fields does not affect this value.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;40&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x28&lt;br /&gt;
|Index into [[SOLDIER.DAT]], so game knows what to update. 255 = does not belong to anyone (i.e., it&#039;s not a soldier). &#039;&#039;NKF: This byte is critical for player controlled units. If this doesn&#039;t refer to anything, the unit ceases to exist at the end of the game. If it points to a valid soldier entry in soldier.dat, the soldier.dat entry will be updated.&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;41&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x29&lt;br /&gt;
|Animation frame counter for the unit. Used by eg [[Celatid]]s and [[Silacoid]]s. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;42&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2A&lt;br /&gt;
|Rank. Affects morale loss and interface icon (hull for tanks). Only X-COM troopers display rank icons.&lt;br /&gt;
    &amp;lt;u&amp;gt;X-COM&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Rookie   &#039;&#039;Civvies are 0 too&#039;&#039;&lt;br /&gt;
      1: Squaddie&lt;br /&gt;
      2: Sergeant&lt;br /&gt;
      3: Captain&lt;br /&gt;
      4: Colonel&lt;br /&gt;
      5: Commander&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Aliens&amp;lt;/u&amp;gt;&lt;br /&gt;
      1: Commander&lt;br /&gt;
      2: Leader&lt;br /&gt;
      3: Engineer&lt;br /&gt;
      4: Medic&lt;br /&gt;
      5: Navigator&lt;br /&gt;
      6: Soldier&lt;br /&gt;
      7: Terrorist&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Hull shape for X-COM tanks:&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Treaded&lt;br /&gt;
      1: Hover&lt;br /&gt;
&#039;&#039;I don&#039;t see 255 set for three dead mutons in a current game... [[#13|[13]]] (Health=0) seems to be the only reliable death indicator for them. Compare [[#120|[120]]]. -[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;43&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2B&lt;br /&gt;
|Called &amp;quot;deployment&amp;quot; with values of 0 or 1 (0=inside, 1=outside). When alien units are generated for a battle, there is a random chance for this byte to be set. That unit is a &amp;quot;scout&amp;quot; and can be assigned to one of the neutral spawn points on the map without the need to fill up all the alien exclusive points first. In other words (and if I understand the terminology correctly), a value of 0 means the alien will spawn on (aka inside) the tile it was assigned to, while a value of 1 means the alien will spawn outside of the assigned node on a civ-scout route.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;44&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2C&lt;br /&gt;
|Alien aggression. The higher it is, the less likely an alien will take cover. Maximum of 2. 0=Cautious,1=Normal,2=Aggressive  &#039;&#039;MTR: This is true for aliens in Hobbes game, but soldiers have values from 4 to 254. Garbage? Delete this comment if so.&#039;&#039; This determines the amount of the unit&#039;s TUs that are devoted to shooting: 0=50%,1=60%,2=66%.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;45&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2D&lt;br /&gt;
|Used to calculate energy loss when walking or turning as: INT( TUs / 2&amp;lt;sup&amp;gt;[45]&amp;lt;/sup&amp;gt; ). See [[Energy#Usage]]; compare [[#35|[35]]] (energy recharge per turn). Set this byte to 4 to ensure no energy use whatsoever (maximum map [[Time Units#Time_Unit_Walking_Usage_Tables|tile TU cost]] is 12). &#039;&#039;In Hobbes game, many aliens are 0 and all soldiers are 1, but a dozen aliens have higher values ranging all the way up to 112! Garbage and/or the game doesn&#039;t care if they are garbage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;46&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2E&lt;br /&gt;
|HWP turret image. Only used (and only appears) if unit type [[#0|[0]]]=3 (X-COM tanks):&lt;br /&gt;
    0: Cannon&lt;br /&gt;
    1: Rocket&lt;br /&gt;
    2: Laser&lt;br /&gt;
    3: Plasma&lt;br /&gt;
    4: Blaster&lt;br /&gt;
    5,6: ? Blanks&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For non-tanks, this controls the inventory layout. &#039;&#039;Only&#039;&#039; 0 and 1 are valid. 0 is the standard layout seen on all soldiers. 1 is an alternate layout that may have been intended for custom tank equipment. Larger values only crash the game due to missing files. Also see [[#113|[113]]] and [[#117|[117]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;47&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2F&lt;br /&gt;
|This is a direct copy of offset[48] from the [[MCD]] record of the tile the unit is standing on. A signed byte.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;48&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x30&lt;br /&gt;
|Values for this byte always equal [[#52|[52]]] and are:&lt;br /&gt;
   2  (3x3 square; legacy 5 pixels):  Sectoid&lt;br /&gt;
   3  (5x5 square, corners removed; legacy 7 pixels):  Celatid, Chryssalid, Civvie,&lt;br /&gt;
      Ethereal, Floater, Muton, Snake, &#039;&#039;&#039;Soldier&#039;&#039;&#039;&lt;br /&gt;
   4  (7x7 octagon; legacy 9 pixels):  Cyberdisc, Hovertank, Reaper, Sectopod, Tank&lt;br /&gt;
   5 (9x9 square, Ls with 3-pixel legs removed; legacy 11 pixels):  Silacoid&lt;br /&gt;
Based on copious research by [[User:Bomb_Bloke|Bomb_Bloke]], [[User:Seb76|Seb76]], [[user:Zombie|Zombie]], and others, this has been found to be a LOF Template look-up for the shape of targets; Loftemps 2 to 5 define the &amp;quot;3D&amp;quot; shape of units relative to Line Of Fire as a cylinder, where 2 (Sectoid) is a thin cylinder and 5 (Silacoid) is very wide. The pixel width of each &amp;quot;silhoutte&amp;quot; that [[LOFTEMPS.DAT]] corresponds to has been added to the list above (see LOFTemps images 2-5). Tiles are 16 pixels wide in the X or Y direction (that&#039;s what this byte is about), and 24 pixels high (compare [[#49|[49]]]).&lt;br /&gt;
&lt;br /&gt;
This cylindrical shape is used in conjunction with height [[#49|[49]]] to define the silhouette that targets present to a shooter. Combine the pixel-width cross-section from Loftemps with height to find the cross-sectional area presented to shooters (sorted on increasing cross-section):&lt;br /&gt;
&lt;br /&gt;
                     LOF     LOF             Cross    Percent&lt;br /&gt;
                    Lookup  Width   Height  Section   of 384    Float   4x?&lt;br /&gt;
 Type               &#039;&#039;UR[48]  Pixels  UR[[#49|[49]]] Pxls X Ht  (16x24)   UR[[#51|[51]]]&#039;&#039;&lt;br /&gt;
 ----               ------  ------  ------ ---------  -------   ------  ---&lt;br /&gt;
 Sectoid               2       5      16       80      20.8%       -     -&lt;br /&gt;
 Celatid               3       7      12       84      21.9%       6     -&lt;br /&gt;
 Soldier (Kneeling)    3       7      14       98      25.5%       -     -&lt;br /&gt;
 Hovertank             4       9      12      108      28.1%       6    Yes&lt;br /&gt;
 Silacoid              5      11      10      110      28.6%       -     -&lt;br /&gt;
 Snakeman              3       7      18      126      32.8%       -     -&lt;br /&gt;
 Zombie                3       7      18      126      32.8%       -     -&lt;br /&gt;
 Ethereal              3       7      20      140      36.5%       -     -&lt;br /&gt;
 Cyberdisc             4       9      15      135      35.2%       2    Yes&lt;br /&gt;
 Chryssalid            3       7      21      147      38.3%       -     -&lt;br /&gt;
 Civilian              3       7      21      147      38.3%       2     -&lt;br /&gt;
 Floater               3       7      21      147      38.3%       2     -&lt;br /&gt;
 Muton                 3       7      21      147      38.3%       -     -&lt;br /&gt;
 Tank                  4       9      16      144      37.5%       -    Yes&lt;br /&gt;
 Soldier               3       7      22      154      40.1%       -     -&lt;br /&gt;
 Reaper                4       9      23      207      53.9%       -    Yes&lt;br /&gt;
 Sectopod              4       9      23      207      53.9%       -    Yes&lt;br /&gt;
Units take up an amount of the whole tile (as seen in cross-section by a shooter) as shown in the &amp;quot;Percent of 384&amp;quot; column. In reality, though, the [[Firing Accuracy|accuracy]] of shots makes this a more complex topic than the percents suggest. Also, dividing by 384 is an oversimplification, since it implies a directly rectangular shot (shooting right down the X or Y axis). While it&#039;s useful to see, keep in mind that this column only shows relative numbers.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;[[User:Zaimoni|Zaimoni]]: actual cross section depends on shot facing.  The table is close to correct for pure diagonal shots, so leaving alone for now.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The unit Float number ([[#51|[51]]], below) is shown simply for convenience. It does not enter into the cross-sectional computations. &amp;quot;4x&amp;quot; units actually consist of four units grouped in tight 2x2 formation (making their cross section effectively much larger then the percentage stated).&lt;br /&gt;
&lt;br /&gt;
Note that causing an X-Com soldier to kneel causes their cross section to fall by 36.36~% of that of when they are standing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;49&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x31&lt;br /&gt;
|[[height|Standing height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;50&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x32&lt;br /&gt;
|[[height|Kneeling height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;51&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x33&lt;br /&gt;
|Floating [[height]]. A unit &#039;floats&#039; this high above the ground, thus allowing shots to fly underneath. The highest point of a unit can be found by adding this to the units height stat. &amp;lt;i&amp;gt;Does this have an effect on explosive damage?&amp;lt;/i&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;52&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x34&lt;br /&gt;
|&amp;quot;Radius&amp;quot; of LOF Template. Always the same as [[#48|[48]]] in all known saved games. More info can be found at [[Talk:UNITREF.DAT#Offsets_0x30_.26_0x34|Talk:UNITREF.DAT#Offsets_0x30_&amp;amp;_0x34]] ([48] and [52]).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;53&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x35&lt;br /&gt;
|Image index for item in left hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;54&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x36&lt;br /&gt;
|Image index for item in right hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;NKF:&#039;&#039; If there is no item in the unit&#039;s hands, but one of the above two bytes are set, the &#039;image&#039; that represents the item will still be displayed in the battlescape. If these phantom items are clicked on, the game crashes. If the image is not the right type for the real item in hand, the ammo count doesn&#039;t get displayed. Otherwise, it&#039;ll work as normal.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;55&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x37&lt;br /&gt;
|[[Damage#Susceptible_to...|Damage Modifier]] Category&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed in the executable. A value of 1 indicates the first DM category, a value of 4 indicates the 4th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but I think there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Value&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
    &#039;&#039;&#039;0&#039;&#039;&#039;      Terrain and Items&lt;br /&gt;
    &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
    &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
    &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
    &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
    &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
    &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
    &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
    &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
    &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
   &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
   &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
   &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
   &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;56&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;56&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x38&lt;br /&gt;
|[[Melee Accuracy]] ([[SOLDIER.DAT]] bytes 50 (initial) &amp;amp; 60 (increase) added together)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;57&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;57&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x39&lt;br /&gt;
|[[Psionic Strength]]&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;58&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;58&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3A&lt;br /&gt;
|Current [[Morale]]. Base morale is hardcoded to 100.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;59&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;59&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3B&lt;br /&gt;
|[[Bravery]] = 110 - (10 * &#039;&#039;this value&#039;&#039;)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;60&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3C&lt;br /&gt;
|Panic mode. This takes effect at the start of the unit&#039;s next turn. Since it is cleared at that point, you&#039;ll never see it at anything other then 0 in the save files. You can manually change it to other values to force a specific panic attack on the next turn.&lt;br /&gt;
   0: None&lt;br /&gt;
   1: Freeze&lt;br /&gt;
   2: Running&lt;br /&gt;
   3: Berserk&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;61&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;61&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3D&lt;br /&gt;
|[[#62|[62]]] will increment by this amount whenever the unit moves.&lt;br /&gt;
   3: Sectiod                                    &#039;&#039;- Hobbes&#039;&#039;&lt;br /&gt;
   4: Soldiers, civs, and all other aliens (but Hobbes had no Large aliens)&lt;br /&gt;
  30: Tank/Laser&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;62&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;62&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3E&lt;br /&gt;
|Visibility via motion scanner. The bigger it is, the bigger the blip. Test this one out for values.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;63&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;63&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3F&lt;br /&gt;
|Number of [[Fatal Wounds]] to head.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;64&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;64&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x40&lt;br /&gt;
|Number of fatal wounds to torso.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;65&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;65&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x41&lt;br /&gt;
|Number of fatal wounds to right arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;66&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;66&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x42&lt;br /&gt;
|Number of fatal wounds to left arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;67&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;67&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x43&lt;br /&gt;
|Number of fatal wounds to right leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;68&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;68&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x44&lt;br /&gt;
|Number of fatal wounds to left leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;69-70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;69-70&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x45-0x46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x45-0x46&lt;br /&gt;
|Indexes into [[ROUTES.DAT]]. To start with, aliens will be located at the same position as the node indicated by byte 69.&lt;br /&gt;
:For patrol AI (no X-COM units sighted in turn 1, either X-COM or alien):&lt;br /&gt;
::Byte 69 is the index of the node of the start of the planned move.&lt;br /&gt;
::Byte 70 is the index of the node of the end of the planned move.&lt;br /&gt;
:Note that the move may be multi-turn, and byte 69 is not guaranteed to update during a multi-turn move.  I think it will if the alien ends its move on a node, however. -- Zaimoni&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;71&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x47&lt;br /&gt;
|Unit lighting: always 16 for XCom units, 0 for most aliens but 1 for cyberdisc. If greater than 1, it is set to 1 when unit inactive - see the [[Talk:UNITREF.DAT#Offset_0x47|Talk]] page.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;72&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x48&lt;br /&gt;
|The amount of [[Morale]] that has been restored using the [[Medi-Kit (EU)|Medkit&#039;s]] painkillers. The amount that &#039;&#039;can&#039;&#039; be restored is equal to the maximum health of the unit (index 26) minus their current health (index 13) further minus this.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;73&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x49&lt;br /&gt;
|Intelligence. Rated from 2 - 8. Indicates for how many turns the alien will know the location of spotted soldiers. &#039;&#039;Hey - why do humans have zero intelligence? :(&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;74&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4A&lt;br /&gt;
|AI Mode. Zaimoni found [http://www.strategycore.co.uk/forums/UFO-AI-patch-t8908.html&amp;amp;st=20&amp;amp;start=20 Here] that the values are 0:PATROL, 1:SNIPER, 2:ATTACKING, 3:ESCAPING, 4:GUARD, 5:Returning to UFO. 255 (-1) is also possible. Zaimoni tripped this by wounding a Floater in SNIPER mode; it returned fire, then was taken down by another soldier. Snap guess is that this is a &amp;quot;recalculate&amp;quot; marker.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;75&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4B&lt;br /&gt;
|Unknown. With that said, the only item remaining on my list is called &amp;quot;lightdirect&amp;quot; or direction of light for a unit (0=all around, 1=direction unit facing). Probably unused and always 0. Maybe it was for a hand-held light source, or a armor-mounted flashlight?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;76-77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;76-77&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4C-0x4D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4C-0x4D&lt;br /&gt;
|Mission count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]  &#039;&#039;MTR: Wonder why they bothered to put this in Unitref since this will never change &#039;&#039;&#039;during&#039;&#039;&#039; a mission; compare how soldier stats are actually read from SOLDIER (not UNITREF) on return to geoscape. Is Missions shown anywhere on the combatscape?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;78-79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;78-79&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4E-0x4F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4E-0x4F&lt;br /&gt;
|Kill count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]. Number of kills this unit has made for ALL missions, not just this one. This one &#039;&#039;&#039;can&#039;&#039;&#039; vary &amp;quot;unpredictably&amp;quot; and thus is the only byte known to directly carry forward into the geoscape / Soldier.Dat!&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;80&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;80&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x50&lt;br /&gt;
|[[Reactions]] experience counter, for number of reaction shots. It doesn&#039;t matter if they hit the target; reactions still count. &amp;lt;b&amp;gt;See Note 2 re: Experience counters.&amp;lt;/b&amp;gt; (Also note: Aliens do not use experience counters.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NKF:&#039;&#039; Where does death by fire (overexposure rather than incendiary shell impact) fit into the experience counters? It becomes a non-assigned kill, I guess, like death by wounds, or death by a grenade that hasn&#039;t got an owner?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;81&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x51&lt;br /&gt;
|[[Firing Accuracy]] experience counter, for number of hits on an enemy (lethal or not, grenades or bullets). Each Autoshot hit counts as 1, so you can get 3 hits from one Autoshot burst. Likewise, grenades and blaster bombs can hit multiple targets with one explosion. Also, if you miss the intended target but hit a different alien, it still counts. Finally, if your shot actually has zero [[Damage]], it does still count as a hit. (Not due to armor blockage; a pure roll of 0 coming out of the gun.) &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;82&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;82&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x52&lt;br /&gt;
|[[Melee Accuracy]] experience counter, for number of times stun rod has been used (not stun bombs).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;83&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x53&lt;br /&gt;
|[[Throwing Accuracy]] experience counter, for number of times unit has thrown any object.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;84&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;84&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x54&lt;br /&gt;
|&amp;lt;div id=&amp;quot;Psi_Skill_Experience_Counter&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;[[Psionic Skill]] experience counter, for number of psi attacks performed. 1 is added if attempt was unsuccessful, 3 if it was successful. Note: if this value goes over 255, all psi experience is lost. That&#039;s 85 successful psis (255/3). So be careful of marathon psi&#039;ing (a minimum of 43 turns at 2 psis/turn, 29 turns at 3/turn).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;85&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;85&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x55&lt;br /&gt;
|[[Bravery]] experience counter, for number of times unit has &#039;&#039;resisted&#039;&#039; panicking, despite Morale &amp;lt; 50.  Being mind-controlled, panicking, or going berserk does &#039;&#039;not&#039;&#039; increase this stat -- although Panic Unit attacks will reduce Morale to the point where panic checks will be performed by the game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;86-110&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;86-110&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x56-0x6E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x56-0x6E&lt;br /&gt;
|Unit&#039;s &amp;lt;b&amp;gt;Name&amp;lt;/b&amp;gt;. Standard string ended by null byte. The rest can hold garbage.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;111&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;111&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x6F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x6F&lt;br /&gt;
|Called &amp;quot;BigFire&amp;quot;. If true (value of 1) then the unit is currently firing a weapon. It reverts back to 0 afterwards - determines whether to render the gun and firing arm in the &amp;quot;pointing weapon&amp;quot; position, or whether the weapon is being held against the chest. If manually set to a value above 0, the unit will hold its weapon out until such time as it actually uses it.&lt;br /&gt;
&lt;br /&gt;
Note that this value is only used by units holding two-handed weapons. A unit holding for eg a pistol will &#039;&#039;always&#039;&#039; point the weapon, and uses a different arm sprite for the purposes of doing so (regardless of whether or not the weapon is being fired).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;112&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;112&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x70&lt;br /&gt;
|Called &amp;quot;Finished&amp;quot;. If true (value of 1) signifies that the unit finished AI actions for current turn.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;113&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;113&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x71&lt;br /&gt;
|If 1, then you can&#039;t use the inventory button and the unit will be immune to stun. Used for tanks. Mind controlled units don&#039;t use this but their button disables anyway.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;BombBloke:&#039;&#039; This is the only way to access tank inventories.&lt;br /&gt;
*Tank/Cannon has a normal inventory and uses man_1m0.spk.&lt;br /&gt;
*Tank/Rocket Launcher has a different layout and uses man_1m0.spk.&lt;br /&gt;
*Tank/Laser Cannon uses man_œ.spk, which doesn&#039;t exist normally. Providing this file still crashes.&lt;br /&gt;
*Hovertank/Plasma simply crashes.&lt;br /&gt;
*Hovertank/Launcher simply crashes.&lt;br /&gt;
&lt;br /&gt;
[[#1|[1]]] actually determines the inventory screen used, might be worth playing with that. [[#46|[46]]] determines the layout.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;114&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;114&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x72&lt;br /&gt;
|If not 0, then unit is on fire, and will burn for this amount of turns.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;115&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;115&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x73&lt;br /&gt;
|Gender: 0 = male, 1 = female.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;116&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;116&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x74&lt;br /&gt;
|Hair/skin colour (for inventory; all other units = 0):&lt;br /&gt;
   0: Blond caucasian&lt;br /&gt;
   1: Brunette caucasian&lt;br /&gt;
   2: Asian&lt;br /&gt;
   3: Black&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;117&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;117&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x75&lt;br /&gt;
|Turret weapon. Over-rides hand held weapon. Turret images are not centered; that would be impossible because they aren&#039;t all &#039;objects&#039; (e.g. Celatid). &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
                                                       F.A.  TUs        F.A.  TUs&lt;br /&gt;
   0: HWP cannon (bigobs[40])....................Aimed  90%  80%   Snap  60%  33%&lt;br /&gt;
   1: HWP rocket (bigobs[42])....................Aimed 115%  75%   Snap  55%  45%&lt;br /&gt;
   2: HWP laser (bigobs[54]).....................Aimed  85%  75%   Snap  50%  33%&lt;br /&gt;
   3: HWP plasma cannon (bigobs[43]).............Aimed 100%  60%   Snap  86%  30%&lt;br /&gt;
   4: HWP blaster (bigobs[43]) (looks like ordinary cannon?)......Aimed 120%  80%&lt;br /&gt;
   5: Celatid plasma cannon (bigobs[38]).........Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   6: Cyberdisc plasma cannon (bigobs[34]).......Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   7: Sectopod Laser* cannon (bigobs[34])as cyberdisk, above, plus Auto  50%  35%&lt;br /&gt;
  22: Invalid - Incredibly powerful armour piercing shell. Overpowering.&lt;br /&gt;
 255: Unused&lt;br /&gt;
Note: This item will take precendence over any item carried in the hand slots. It can be installed on non-tanks, but then the unit won&#039;t be able to use any carried weapons or items. This weapon is NOT affected by the kneeling modifier, but it is affected by the current unit&#039;s accuracy stat. Also note, this byte does NOT determine the turret image for HWPs in the battlescape.&lt;br /&gt;
&lt;br /&gt;
[*]The damage type for the Sectopod is indeed set to (3)laser in the executable! Graphical/sound effects of a turret weapon is set there as well, via a reference to a weapon in OBDATA.DAT (HWP Cannon=4=Heavy Cannon, Sectopod=34=Heavy Plasma) &#039;&#039;When I changed HWP Cannon to 2, it looked/sounded like rifle fire - Crus8r&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also see [[#46|[46]]], [[#113|[113]]], and [[#118|[118]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;118&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;118&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x76&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x76&lt;br /&gt;
|Ammo for [[#117|[117]]] turret weapon&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;119&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;119&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x77&lt;br /&gt;
|Movement related? Large unit related? Possible bitfield.&lt;br /&gt;
 &#039;&#039;MTR:&#039;&#039;&lt;br /&gt;
 00000000   0 Chryssalid(2), Civilian(9), Ethereal(2), Floater(2), Muton, &lt;br /&gt;
 00000001   1 Muton, PA Soldier(2)                   Sectoid(2), Silacoid(2), &lt;br /&gt;
 00000011   3 PA Soldier                            PA Soldier(2), Tank/Laser&lt;br /&gt;
 00000101   5 Snakeman&lt;br /&gt;
 00001010  10 Celatid             &#039;&#039;- Hobbes game - could have some garbage&#039;&#039;&lt;br /&gt;
 00001101  13 Muton, PA Soldier   &#039;&#039;  (parens) is count, if more than 1 unit&#039;&#039;&lt;br /&gt;
 00010011  19 Snakeman&lt;br /&gt;
 00100110  38 PA Soldier&lt;br /&gt;
 00101010  42 Muton(3)&lt;br /&gt;
 00110001  49 Muton&lt;br /&gt;
 00110010  50 PA Soldier&lt;br /&gt;
 00110101  53 Silacoid(2)&lt;br /&gt;
 00111011  59 Celatid&lt;br /&gt;
 00111111  63 Silacoid&lt;br /&gt;
 01001110  78 PA Soldier&lt;br /&gt;
 01100111 103 PA Soldier&lt;br /&gt;
 01111111 127 Muton&lt;br /&gt;
 10010000 144 Muton&lt;br /&gt;
 11000000 192 Celatid&lt;br /&gt;
 11111110 254 Muton&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;120&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;120&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x78&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x78&lt;br /&gt;
|Unit bit flags, mainly re: mobility. They do NOT affect the soldier in inventory screen: &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
 (  1) 1: 1 = Dead.  &#039;&#039;This was only set for 2 of 3 dead aliens in my current game.&#039;&#039;&lt;br /&gt;
                     &#039;&#039;[[#13|[13]]] (Health=0) is the most reliable indicator for me.&#039;&#039;&lt;br /&gt;
                     &#039;&#039;-[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
 (  2) 2: 1 = Unit can fly.&lt;br /&gt;
 (  4) 3: 1 = Unit is flying. (Toggles leg sprites for power armour.)&lt;br /&gt;
 (  8) 4: 1 = Has been to this unit in next unit loop. Or to put it another way, has the unit been selected this turn.&lt;br /&gt;
 ( 16) 5: 1 = Unit has been disabled for selection.&lt;br /&gt;
              (Stops the unit tab button from selecting this soldier.)&lt;br /&gt;
 ( 32) 6: 0 = Unit has left hand object selected, 1 = right hand object selected.&lt;br /&gt;
 ( 64) 7: 1 = Unit is kneeling.&lt;br /&gt;
 (128) 8: 1 = Unit is wearing power/flying suit. (Can&#039;t be stunned by smoke flag? &lt;br /&gt;
              Seems to work for fire, too.)&lt;br /&gt;
If a unit is carrying something in either hand, it is impossible to get him to appear as if he is carrying nothing - in the game, at least. If he is carrying nothing, bit 6 can flag (as though the unit was using it&#039;s right hand item). But maybe it&#039;s just the order of dropped items affecting this?&lt;br /&gt;
&lt;br /&gt;
Note: A unit is only considered as flying if it is not on the ground. For example, a hover tank is not always considered as flying.&lt;br /&gt;
&lt;br /&gt;
What if a hovertank is half on the ground, half in the air? What about a treaded tank, or large alien unit? What about units in lifts?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;121&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;121&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x79&lt;br /&gt;
|Possible Values: 0 or 16. All units in unitref.dat get a value of 0 except for the second unit in the list which gets 16. Doesn&#039;t matter if the second unit is a soldier, a tank, or an alien. It&#039;s always 16. Editing it to 0 doesn&#039;t crash the game or have any dire consequences. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;122&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;122&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7A&lt;br /&gt;
|Always 0?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;123&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;123&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7B&lt;br /&gt;
|Always 0?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;124-125&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;124-125&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7C-0x7D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7C-0x7D&lt;br /&gt;
|TFTD ONLY - Bubble animation count for soldiers.  Can be 0 to 16 (0x0F).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;126-127&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;126-127&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7E-0x7F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7E-0x7F&lt;br /&gt;
|TFTD ONLY - Bubble animation delay, skips this amount of frames.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;128-129&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;128-129&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x80-0x81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x80-ox81&lt;br /&gt;
|TFTD ONLY - Bubble animation enable. (0=disable, 1=enable)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;130-131&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;130-131&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x82-0x83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x82-0x83&lt;br /&gt;
|TFTD ONLY - Called &amp;quot;floorabove&amp;quot; flag. Is there a floor above unit? (0=no, 1=yes)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
1) The original/base values for &amp;lt;b&amp;gt;soldier stats&amp;lt;/b&amp;gt; (offsets [[#23|[23]]]-[[#28|[28]]], etc.) correspond to the initial+increase bytes from [[SOLDIER.DAT|Soldier.Dat]] (bytes 43-62). Changes to these Unitref bytes are &amp;lt;i&amp;gt;lost&amp;lt;/i&amp;gt;  when the mission ends; instead, XCOM re-reads them from Soldier at that time. This makes sense because base soldier stats don&#039;t change &amp;lt;i&amp;gt;during&amp;lt;/i&amp;gt; a mission per se (although they might increase when the mission ends); in this way, the programmers didn&#039;t have to bother with separately storing and/or adding initial+increase during combat. (It&#039;s also why you don&#039;t see the initial+increase in the soldier stat display during combat, that you can see back at base.) On a practical note, if you are testing soldier stat increases versus experience counters, change the experience counters in Unitref, but change the soldier stats in Soldier. (IOW, it doesn&#039;t matter what the soldier stats are in the combat mission.)&lt;br /&gt;
&lt;br /&gt;
The Kill count (offset [[#78-79|[78-79]]]) is the only Unitref value I know of that is directly carried forward into the geoscape and Soldier.dat. However, some others do indirectly carry forward, for example: experience (offsets [[#80|[80]]]-[[#85|[85]]]) causes stat and rank increases, and decreased health (offset [[#26|[26]]] - offset [[#13|[13]]]) means hospital time. And, of course, death is permanent. Heh.&lt;br /&gt;
&lt;br /&gt;
2) &amp;lt;b&amp;gt;Experience counters&amp;lt;/b&amp;gt; (offsets [[#80|[80]]]-[[#85|[85]]]) determine the likelihood of soldier stat increases at the end of the combat mission, according to the formula for Primary Stats shown [[Experience#How_Experience_Points_Are_Applied|here]]. The Bravery counter (offset [[#85|[85]]]) affects Bravery as shown [[Bravery|here]].&lt;br /&gt;
&lt;br /&gt;
Also, if at least one of the experience counters (except Throws) has a count, your secondary stats will increase, as discussed [[Experience#Secondary_Stats|here]]. All you need is at least a 1 in offsets [[#80|[80]]]-[[#82|[82]]] or [[#84|[84]]]-[[#85|[85]]]; more than 1 and/or multiple counters has no additional effect.&lt;br /&gt;
&lt;br /&gt;
3) BombBloke&#039;s additional &amp;quot;To be Done&amp;quot; notes - can we cross some of these off yet?&lt;br /&gt;
&lt;br /&gt;
   Need to research:&lt;br /&gt;
   Stun recovery rate, does it exist?&lt;br /&gt;
   Hand to hand attacks&lt;br /&gt;
   &amp;lt;strike&amp;gt;Offset of weapon from unit image?&amp;lt;/strike&amp;gt; &lt;br /&gt;
   &#039;&#039;Based on unit height and nothing else. There may be values to determine what arm sprites to use,&#039;&#039;&lt;br /&gt;
   &#039;&#039;but I doubt it.&#039;&#039;&lt;br /&gt;
   Firing sprite offset? &lt;br /&gt;
   &#039;&#039;Probably just based on unit height and some hardcoded values in the executable.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Inventory lockout?&amp;lt;/strike&amp;gt; &#039;&#039;All mind controlled units are locked out.&#039;&#039;&lt;br /&gt;
   Kneel lockout? &lt;br /&gt;
   &#039;&#039;Probably the same as above, I seem to remember that using XcomUtil to &amp;quot;swap sides&amp;quot; would make it&#039;&#039;&lt;br /&gt;
   &#039;&#039;possible to kneel small alien units.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Aliens seen?&amp;lt;/strike&amp;gt; &#039;&#039;Not used in unitref.dat, only in unitpos.dat. -[[User:Zombie|Zombie]] 23:48, 29 September 2006 (PDT)&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Whether a unit slides/floats/hovers/rolls/walks (movement noise)?&amp;lt;/strike&amp;gt; &#039;&#039;Set according to unit type.&#039;&#039;&lt;br /&gt;
   What else? The more to look for, the easier it is...&lt;br /&gt;
   &lt;br /&gt;
   Know 111 values.&lt;br /&gt;
   Unknown values (13 in total):&lt;br /&gt;
   [[#34|[034 / 0x22]]] - Always 0?&lt;br /&gt;
   [[#36|[036 / 0x24]]] - Always 0?&lt;br /&gt;
   [[#43|[043 / 0x2B]]] - Set to 1 on occasion, usually 0.&lt;br /&gt;
   [[#52|[052 / 0x34]]] - Seems to be a mirror of 48 / 0x30, the LOFTemp index for the unit.&lt;br /&gt;
   [[#71|[071 / 0x47]]] - Appears to relate to lighting caused by the unit, [[Talk:UNITREF.DAT#Offset_0x47|discussion here]].&lt;br /&gt;
   [[#74|[074 / 0x4A]]] - Appears to relate to the AI-mode used by the unit, [[Talk:UNITREF.DAT#Offset_0x4A_.2874.29|discussion here]].&lt;br /&gt;
   [[#75|[075 / 0x4B]]] - Always 0?&lt;br /&gt;
   [[#112|[112 / 0x70]]] - Set to 1 for some aliens, 0 otherwise.&lt;br /&gt;
   [[#119|[119 / 0x77]]] - No idea, possible bitfield, could be anything.&lt;br /&gt;
   [[#120|[120 / 0x78]]] - Unit bit flags, mainly re: mobility. Only one bit not 100% identified.&lt;br /&gt;
   [[#121|[121 / 0x79]]] - Second unit gets a value of 16. Everyone else gets 0. No obvious purpose.&lt;br /&gt;
   [[#122|[122 / 0x7A]]] - Always 0?&lt;br /&gt;
   [[#123|[123 / 0x7B]]] - Always 0?&lt;br /&gt;
   &lt;br /&gt;
   Know 1 TFTD value.   &lt;br /&gt;
   Unknown TFTD values (7 in total):&lt;br /&gt;
   [[#125|[125]]] [[#126|[126]]] [[#127|[127]]] [[#128|[128]]] [[#129|[129]]] [[#130|[130]]] [[#131|[131]]]&lt;br /&gt;
&lt;br /&gt;
4) Hobbes posted a savegame with a TON of different aliens in it [http://www.xcomufo.com/forums/index.php?showtopic=8591 here] (message 6). Interesting for testing. But note it was made with XCOMUTIL and there may(?) be concerns over vailidity of unit info - see [[Talk:UNITREF.DAT]].&lt;br /&gt;
&lt;br /&gt;
5) A [[HackerTools|Hex Workshop]] Structure Library for UNITREF.DAT created by Danial is [[UNITREF_DAT_HSL|here]].&lt;br /&gt;
&lt;br /&gt;
== For More Information ==&lt;br /&gt;
*[[SOLDIER.DAT]]&lt;br /&gt;
*[[Soldiers|Soldier Stats]]&lt;br /&gt;
*[[Experience]]&lt;br /&gt;
*[[HackerTools|Hex editing]]&lt;br /&gt;
&lt;br /&gt;
Return to [[Saved_Game_Files|Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=65998</id>
		<title>UNITREF.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=65998"/>
		<updated>2015-06-24T05:31:37Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 0x2b clarification*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [[Saved Game Files|save game file]] that has a record size of 124 bytes for UFO, or 132 for TFTD. Values are unsigned unless otherwise stated. Some bytes represent bitfields. There are 80 records (not all of them necessarily used) for a fixed file size of 9,920 bytes (or 10,560 for TFTD). It goes hand in hand with [[UNITPOS.DAT]].&lt;br /&gt;
&lt;br /&gt;
Comes in three flavours:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Initially created by the GeoScape engine before tactical battles. Stored in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder and contains info on all units that will be present in the coming mission (in an alive state - the deaths of aliens killed by exploding UFO power units isn&#039;t determined until [[Battlescape_Map_Generation#KABOOM.21.21|later]]). Unlike the other two versions, this only contains the bare minimum number of records required to store the units it details.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNITREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Created along with a [[Saved_Game_Files#Battlescape_Files|battlescape save]], contains the mid-mission state of the unit table.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF2.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Appears in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder at the end of combat. Used to determine which troopers/tanks survived, statistic gains via [[experience]], and which aliens need to be hauled off to the [[Alien Containment]] unit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values are presented according to byte offset ([[#0|0]] to [[#123|123]] (or [[#131|131]] for TFTD)) followed by the equivalent hex offset ([[#0x00|0x00]] to [[#0x7B|0x7B]] (or [[#0x83|0x83]] for TFTD)). Notes apply to both UFO and TFTD unless otherwise stated. Let us know what else you can find - refer to the [[#Notes|bottom of the page]] for those values that&#039;re unknown, or to the [[Talk:UNITREF.DAT|talk page]] for further ideas as to what they could be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Decimal)&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Hex)&lt;br /&gt;
!Usage&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x00&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x00&lt;br /&gt;
|Type of unit. Unit scream and movement sound effects are based on this and gender. Gender and flying abilities affect the sprites as well. Not turrets. Specifically: [[#53|[53]]] &amp;amp; [[#54|[54]]] (weapons in hands), [[#115|[115]]] (gender) and [[#120|[120]]] (other flags) affect the final screen image. If the unit is a large unit, this will also determine the appearance of the last three quarters of the unit. This does NOT affect: the flying ability of the unit, the soldier image in the inventory screen, or the special abilities for certain aliens.&lt;br /&gt;
      &amp;lt;b&amp;gt;UFO&amp;lt;/b&amp;gt;                                        &amp;lt;b&amp;gt;TFTD&amp;lt;/b&amp;gt;&lt;br /&gt;
   0: Male/female unarmored X-COM soldier     0: Male/female unarmored X-COM diver   &lt;br /&gt;
   1: Male/female personal armor soldier      1: Male/female plastic armor diver&lt;br /&gt;
   2: Power/flying suit soldier               2: Power/flying suit diver&lt;br /&gt;
   3: Tank                                    3: Tank&lt;br /&gt;
   4: Sectoid                                 4: Aquatoid&lt;br /&gt;
   5: Snakeman                                5: Gillman&lt;br /&gt;
   6: Ethereal                                6: Lobster Man&lt;br /&gt;
   7: Muton                                   7: Tasoth&lt;br /&gt;
   8: Floater                                 8: Calcinite&lt;br /&gt;
   9: Celatid                                 9: Deep One&lt;br /&gt;
  10: Silacoid                               0A: BioDrone&lt;br /&gt;
  11: Chryssalid                             0B: Tentaculat&lt;br /&gt;
  12: Reaper                                 0C: Triscene&lt;br /&gt;
  13: Sectopod                               0D: Hallucinoid&lt;br /&gt;
  14: Cyberdisc                              0E: Xarquid&lt;br /&gt;
  15: Male civilian                          0F: Male civilians&lt;br /&gt;
  16: Female civilian                        10: Female civilians&lt;br /&gt;
  17: Zombie                                 11: Zombie&lt;br /&gt;
 255: Unused                                255: Unused&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;If the corresponding [[UNITPOS.DAT]] record is unused, then the record is unused.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;1&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x01&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x01&lt;br /&gt;
|Inventory paper doll image. File &amp;quot;UFOGRAPH\MAN_&amp;quot;+(char)(value + 48)+&amp;quot;.SPK&amp;quot; will be used as the inventory sprite, unless the value is 0 or 1. In those cases, [[#115|[115]]] and [[#116|[116]]] are used to determine the picture.&lt;br /&gt;
 0: No armor.&lt;br /&gt;
 1: Personal armour.&lt;br /&gt;
 2: Power suit.&lt;br /&gt;
 3: Flying suit.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;2-5&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;2-5&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x02-0x05&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x02-0x05&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|PCK set]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;6-9&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;6-9&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x06-0x09&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x06-0x09&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|TAB index for the PCK data]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;10&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0A&lt;br /&gt;
|Unit facing. Does NOT control HWP turret direction; see [[#24|[24]]].&lt;br /&gt;
   0: North     (up right)&lt;br /&gt;
   1: Northeast (right)&lt;br /&gt;
   2: East      (down right)&lt;br /&gt;
   3: Southeast (down)&lt;br /&gt;
   4: South     (down left)&lt;br /&gt;
   5: Southwest (left)&lt;br /&gt;
   6: West      (up left)&lt;br /&gt;
   7: Northwest (up)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;11&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0B&lt;br /&gt;
|Movement type. When entering a given map location, each tile is checked to see the TU requirements accordingly. [[MCD]][39+[[#11|UnitRef[11]]]] is the offset used. Note: By default, this is 0 for ALL unit types.&lt;br /&gt;
   0: Walking&lt;br /&gt;
   1: Sliding&lt;br /&gt;
   2: Flying&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;12&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0C&lt;br /&gt;
|Current TUs.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;13&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0D&lt;br /&gt;
|Current Health. Health of 0 = Dead. Compare [[#42|[42]]], [[#120|[120]]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For my [[Talk:Bravery|Bravery experience point testing]], I killed 15 of 16 aliens by setting this to zero, and my soldiers to 0 Morale. When I loaded the savegame, the aliens were still &amp;quot;alive&amp;quot; (i.e., up), then all died when I ended this turn. So death is probably only checked when injury happens, and at end of turn... to truly kill them dead on the ground through savegame editing must take more. And arg - when they all died, my soldiers all went to 100 Morale! So I edited them back to 0 Morale. But guess what... then all the aliens died &#039;&#039;&#039;again&#039;&#039;&#039; at the end of &#039;&#039;&#039;next&#039;&#039;&#039; turn, even though they were all on the ground (I heard screams, and all soldiers&#039; Morale went to 100 again). What the heck? The aliens stayed down after that, though. --[[User:MikeTheRed|MikeTheRed]] 16:01, 3 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Update: [[UNITPOS.DAT]] offset 10 bit 2 should be used to kill a unit entirely dead. Thanks, NKF &amp;amp; BB - MTR&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;While the game kills characters when Health&amp;lt;=Fatal Wounds (__ dies message), XComUtil will recover them based if their health is greater than 0.  Haven&#039;t tested an unmodified game.  --[[User:Zaimoni|Zaimoni]] 11:52, 14 April 2007 (CDT)&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;14&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0E&lt;br /&gt;
|Current Stun level &#039;&#039;how much falloff of paralysis every turn? What determines it?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;15&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0F&lt;br /&gt;
|Current Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;16&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x10&lt;br /&gt;
|Current Reactions  &#039;&#039;NKF: affected by health percentage&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;17&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x11&lt;br /&gt;
|Strength&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;18&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x12&lt;br /&gt;
|Current Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;19&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x13&lt;br /&gt;
|Current Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;20&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x14&lt;br /&gt;
|Current Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;21&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x15&lt;br /&gt;
|Current Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;22&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x16&lt;br /&gt;
|Current Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;quot;Base&amp;quot; means the original (total) value (as carried forward from geoscape) - Also see Note 1 re: Base soldier stat values.&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;23&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x17&lt;br /&gt;
|Base Firing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;24&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x18&lt;br /&gt;
|Base Throwing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Tanks (turreted units?) always have 0 throwing accuracy. They use this for turret facing, relative to unit facing. 0 means it&#039;s facing forwards. Additional values are clockwise increments; see [[#10|[10]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;25&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x19&lt;br /&gt;
|Base TUs&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;26&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1A&lt;br /&gt;
|Base Health&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;27&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1B&lt;br /&gt;
|Base Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;28&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1C&lt;br /&gt;
|Base Reactions&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;These Base Armour values are used to show the starting armor value in the Attributes screen (so you can readily see if it&#039;s been damaged&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;29&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1D&lt;br /&gt;
|Base Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;30&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1E&lt;br /&gt;
|Base Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;31&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1F&lt;br /&gt;
|Base Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;32&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x20&lt;br /&gt;
|Base Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;33&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x21&lt;br /&gt;
|Base Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;34&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x22&lt;br /&gt;
|Supposedly this was going to be Health Recharge which would function like the Energy Recharge. Always 0 and ignored by game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;35&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x23&lt;br /&gt;
|Energy to recharge each turn. Equals &#039;&#039;&#039;recruit initial&#039;&#039;&#039; TUs/3 ([[SOLDIER.DAT]][43], &#039;&#039;&#039;not&#039;&#039;&#039; total base TUs). This is a signed byte. See [[Time Units]] and [[Energy#Usage|Energy Usage]]; also see [[#45|[45]]] (energy usage when walking/turning). &#039;&#039;BombBloke: Is this affected by damage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;36&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x24&lt;br /&gt;
|Supposedly this was going to be Armor Recharge which would function like the Energy Recharge. Always 0 and probably unused, but needs testing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;37&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x25&lt;br /&gt;
|Psi skill. Psi stats not displayed/usable until this is greater then 0.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;38&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x26&lt;br /&gt;
|Item to create when unit is unconscious/dead (index into obdata.dat).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;NKF:&amp;lt;/i&amp;gt; If you set this value to that of a usable item, the item that is created in place of the unconscious or dead soldier can be used like the ordinary item. Elerium pods, for example, can be recovered for 50 elerium each after the battle. Weapons can be used as you normally use them, etc.&lt;br /&gt;
&lt;br /&gt;
For unconscious &#039;units&#039;, the item will be treated as the unconscious body - it will retain the name of the unconscious unit when looked at via the inventory screen. Picking up and using the &#039;item&#039; will work, but when the unit wakes up, the &#039;item&#039; image in the soldier&#039;s hands is not cleared, even though the item no longer &#039;exists&#039; in the soldier&#039;s hands. Using this &#039;item&#039; will just crash the battlescape.&lt;br /&gt;
&lt;br /&gt;
Actually, I do not even want to think about what would happen if you &#039;prime&#039; a grenade/stunned body.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;39&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x27&lt;br /&gt;
|&amp;quot;Soldier value&amp;quot; a.k.a. victory points. You gain (or lose, as the case may be) score at the end of combat according to this value when the unit dies.&lt;br /&gt;
*For X-COM units: A soldier with 42 will be worth -42 points if killed. Note this doesn&#039;t seem to apply if the soldier is killed when unconscious. The soldier just vanishes.&lt;br /&gt;
*For aliens: A commander with 35 will give you +35 points if killed.&lt;br /&gt;
*This value is the same as [[SOLDIER.DAT]] bytes 15-16 (a Word) and equals: &lt;br /&gt;
    20 + Missions + Rank Bonus&lt;br /&gt;
    &lt;br /&gt;
    with [[Rank]] Bonus as follows: SGT +1, CPT +3, COL +6, CDR +10&lt;br /&gt;
Note that although this equation holds true, the value is not actually computed per se. Instead, 1 is added directly to it each mission, as is a rank-bonus delta if you advance (e.g. COL to CDR, delta +4). In other words, hacking the Missions or Rank fields does not affect this value.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;40&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x28&lt;br /&gt;
|Index into [[SOLDIER.DAT]], so game knows what to update. 255 = does not belong to anyone (i.e., it&#039;s not a soldier). &#039;&#039;NKF: This byte is critical for player controlled units. If this doesn&#039;t refer to anything, the unit ceases to exist at the end of the game. If it points to a valid soldier entry in soldier.dat, the soldier.dat entry will be updated.&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;41&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x29&lt;br /&gt;
|Animation frame counter for the unit. Used by eg [[Celatid]]s and [[Silacoid]]s. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;42&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2A&lt;br /&gt;
|Rank. Affects morale loss and interface icon (hull for tanks). Only X-COM troopers display rank icons.&lt;br /&gt;
    &amp;lt;u&amp;gt;X-COM&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Rookie   &#039;&#039;Civvies are 0 too&#039;&#039;&lt;br /&gt;
      1: Squaddie&lt;br /&gt;
      2: Sergeant&lt;br /&gt;
      3: Captain&lt;br /&gt;
      4: Colonel&lt;br /&gt;
      5: Commander&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Aliens&amp;lt;/u&amp;gt;&lt;br /&gt;
      1: Commander&lt;br /&gt;
      2: Leader&lt;br /&gt;
      3: Engineer&lt;br /&gt;
      4: Medic&lt;br /&gt;
      5: Navigator&lt;br /&gt;
      6: Soldier&lt;br /&gt;
      7: Terrorist&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Hull shape for X-COM tanks:&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Treaded&lt;br /&gt;
      1: Hover&lt;br /&gt;
&#039;&#039;I don&#039;t see 255 set for three dead mutons in a current game... [[#13|[13]]] (Health=0) seems to be the only reliable death indicator for them. Compare [[#120|[120]]]. -[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;43&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2B&lt;br /&gt;
|Called &amp;quot;deployment&amp;quot; with values of 0 or 1 (0=inside, 1=outside). When alien units are generated for a battle, there is a random chance for this byte to be set. That unit is a &amp;quot;scout&amp;quot; and can be assigned to one of the neutral spawn points on the map without the need to fill up all the alien exclusive points first. In other words with &amp;quot;1&amp;quot; alien unit is spawned at exact random node marked as &amp;quot;civilian/scout&amp;quot; ignoring actual rank of unit. As result - Commander can occasionally be spawned outside of the UFO craft (and ramble around UFO), not in the &amp;quot;contol room&amp;quot;, which has exclusive commander spawn node.&lt;br /&gt;
!&amp;lt;span id=&amp;quot;44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;44&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2C&lt;br /&gt;
|Alien aggression. The higher it is, the less likely an alien will take cover. Maximum of 2. 0=Cautious,1=Normal,2=Aggressive  &#039;&#039;MTR: This is true for aliens in Hobbes game, but soldiers have values from 4 to 254. Garbage? Delete this comment if so.&#039;&#039; This determines the amount of the unit&#039;s TUs that are devoted to shooting: 0=50%,1=60%,2=66%.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;45&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2D&lt;br /&gt;
|Used to calculate energy loss when walking or turning as: INT( TUs / 2&amp;lt;sup&amp;gt;[45]&amp;lt;/sup&amp;gt; ). See [[Energy#Usage]]; compare [[#35|[35]]] (energy recharge per turn). Set this byte to 4 to ensure no energy use whatsoever (maximum map [[Time Units#Time_Unit_Walking_Usage_Tables|tile TU cost]] is 12). &#039;&#039;In Hobbes game, many aliens are 0 and all soldiers are 1, but a dozen aliens have higher values ranging all the way up to 112! Garbage and/or the game doesn&#039;t care if they are garbage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;46&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2E&lt;br /&gt;
|HWP turret image. Only used (and only appears) if unit type [[#0|[0]]]=3 (X-COM tanks):&lt;br /&gt;
    0: Cannon&lt;br /&gt;
    1: Rocket&lt;br /&gt;
    2: Laser&lt;br /&gt;
    3: Plasma&lt;br /&gt;
    4: Blaster&lt;br /&gt;
    5,6: ? Blanks&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For non-tanks, this controls the inventory layout. &#039;&#039;Only&#039;&#039; 0 and 1 are valid. 0 is the standard layout seen on all soldiers. 1 is an alternate layout that may have been intended for custom tank equipment. Larger values only crash the game due to missing files. Also see [[#113|[113]]] and [[#117|[117]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;47&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2F&lt;br /&gt;
|This is a direct copy of offset[48] from the [[MCD]] record of the tile the unit is standing on. A signed byte.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;48&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x30&lt;br /&gt;
|Values for this byte always equal [[#52|[52]]] and are:&lt;br /&gt;
   2  (3x3 square; legacy 5 pixels):  Sectoid&lt;br /&gt;
   3  (5x5 square, corners removed; legacy 7 pixels):  Celatid, Chryssalid, Civvie,&lt;br /&gt;
      Ethereal, Floater, Muton, Snake, &#039;&#039;&#039;Soldier&#039;&#039;&#039;&lt;br /&gt;
   4  (7x7 octagon; legacy 9 pixels):  Cyberdisc, Hovertank, Reaper, Sectopod, Tank&lt;br /&gt;
   5 (9x9 square, Ls with 3-pixel legs removed; legacy 11 pixels):  Silacoid&lt;br /&gt;
Based on copious research by [[User:Bomb_Bloke|Bomb_Bloke]], [[User:Seb76|Seb76]], [[user:Zombie|Zombie]], and others, this has been found to be a LOF Template look-up for the shape of targets; Loftemps 2 to 5 define the &amp;quot;3D&amp;quot; shape of units relative to Line Of Fire as a cylinder, where 2 (Sectoid) is a thin cylinder and 5 (Silacoid) is very wide. The pixel width of each &amp;quot;silhoutte&amp;quot; that [[LOFTEMPS.DAT]] corresponds to has been added to the list above (see LOFTemps images 2-5). Tiles are 16 pixels wide in the X or Y direction (that&#039;s what this byte is about), and 24 pixels high (compare [[#49|[49]]]).&lt;br /&gt;
&lt;br /&gt;
This cylindrical shape is used in conjunction with height [[#49|[49]]] to define the silhouette that targets present to a shooter. Combine the pixel-width cross-section from Loftemps with height to find the cross-sectional area presented to shooters (sorted on increasing cross-section):&lt;br /&gt;
&lt;br /&gt;
                     LOF     LOF             Cross    Percent&lt;br /&gt;
                    Lookup  Width   Height  Section   of 384    Float   4x?&lt;br /&gt;
 Type               &#039;&#039;UR[48]  Pixels  UR[[#49|[49]]] Pxls X Ht  (16x24)   UR[[#51|[51]]]&#039;&#039;&lt;br /&gt;
 ----               ------  ------  ------ ---------  -------   ------  ---&lt;br /&gt;
 Sectoid               2       5      16       80      20.8%       -     -&lt;br /&gt;
 Celatid               3       7      12       84      21.9%       6     -&lt;br /&gt;
 Soldier (Kneeling)    3       7      14       98      25.5%       -     -&lt;br /&gt;
 Hovertank             4       9      12      108      28.1%       6    Yes&lt;br /&gt;
 Silacoid              5      11      10      110      28.6%       -     -&lt;br /&gt;
 Snakeman              3       7      18      126      32.8%       -     -&lt;br /&gt;
 Zombie                3       7      18      126      32.8%       -     -&lt;br /&gt;
 Ethereal              3       7      20      140      36.5%       -     -&lt;br /&gt;
 Cyberdisc             4       9      15      135      35.2%       2    Yes&lt;br /&gt;
 Chryssalid            3       7      21      147      38.3%       -     -&lt;br /&gt;
 Civilian              3       7      21      147      38.3%       2     -&lt;br /&gt;
 Floater               3       7      21      147      38.3%       2     -&lt;br /&gt;
 Muton                 3       7      21      147      38.3%       -     -&lt;br /&gt;
 Tank                  4       9      16      144      37.5%       -    Yes&lt;br /&gt;
 Soldier               3       7      22      154      40.1%       -     -&lt;br /&gt;
 Reaper                4       9      23      207      53.9%       -    Yes&lt;br /&gt;
 Sectopod              4       9      23      207      53.9%       -    Yes&lt;br /&gt;
Units take up an amount of the whole tile (as seen in cross-section by a shooter) as shown in the &amp;quot;Percent of 384&amp;quot; column. In reality, though, the [[Firing Accuracy|accuracy]] of shots makes this a more complex topic than the percents suggest. Also, dividing by 384 is an oversimplification, since it implies a directly rectangular shot (shooting right down the X or Y axis). While it&#039;s useful to see, keep in mind that this column only shows relative numbers.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;[[User:Zaimoni|Zaimoni]]: actual cross section depends on shot facing.  The table is close to correct for pure diagonal shots, so leaving alone for now.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The unit Float number ([[#51|[51]]], below) is shown simply for convenience. It does not enter into the cross-sectional computations. &amp;quot;4x&amp;quot; units actually consist of four units grouped in tight 2x2 formation (making their cross section effectively much larger then the percentage stated).&lt;br /&gt;
&lt;br /&gt;
Note that causing an X-Com soldier to kneel causes their cross section to fall by 36.36~% of that of when they are standing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;49&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x31&lt;br /&gt;
|[[height|Standing height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;50&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x32&lt;br /&gt;
|[[height|Kneeling height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;51&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x33&lt;br /&gt;
|Floating [[height]]. A unit &#039;floats&#039; this high above the ground, thus allowing shots to fly underneath. The highest point of a unit can be found by adding this to the units height stat. &amp;lt;i&amp;gt;Does this have an effect on explosive damage?&amp;lt;/i&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;52&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x34&lt;br /&gt;
|&amp;quot;Radius&amp;quot; of LOF Template. Always the same as [[#48|[48]]] in all known saved games. More info can be found at [[Talk:UNITREF.DAT#Offsets_0x30_.26_0x34|Talk:UNITREF.DAT#Offsets_0x30_&amp;amp;_0x34]] ([48] and [52]).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;53&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x35&lt;br /&gt;
|Image index for item in left hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;54&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x36&lt;br /&gt;
|Image index for item in right hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;NKF:&#039;&#039; If there is no item in the unit&#039;s hands, but one of the above two bytes are set, the &#039;image&#039; that represents the item will still be displayed in the battlescape. If these phantom items are clicked on, the game crashes. If the image is not the right type for the real item in hand, the ammo count doesn&#039;t get displayed. Otherwise, it&#039;ll work as normal.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;55&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x37&lt;br /&gt;
|[[Damage#Susceptible_to...|Damage Modifier]] Category&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed in the executable. A value of 1 indicates the first DM category, a value of 4 indicates the 4th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but I think there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Value&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
    &#039;&#039;&#039;0&#039;&#039;&#039;      Terrain and Items&lt;br /&gt;
    &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
    &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
    &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
    &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
    &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
    &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
    &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
    &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
    &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
   &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
   &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
   &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
   &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;56&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;56&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x38&lt;br /&gt;
|[[Melee Accuracy]] ([[SOLDIER.DAT]] bytes 50 (initial) &amp;amp; 60 (increase) added together)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;57&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;57&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x39&lt;br /&gt;
|[[Psionic Strength]]&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;58&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;58&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3A&lt;br /&gt;
|Current [[Morale]]. Base morale is hardcoded to 100.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;59&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;59&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3B&lt;br /&gt;
|[[Bravery]] = 110 - (10 * &#039;&#039;this value&#039;&#039;)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;60&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3C&lt;br /&gt;
|Panic mode. This takes effect at the start of the unit&#039;s next turn. Since it is cleared at that point, you&#039;ll never see it at anything other then 0 in the save files. You can manually change it to other values to force a specific panic attack on the next turn.&lt;br /&gt;
   0: None&lt;br /&gt;
   1: Freeze&lt;br /&gt;
   2: Running&lt;br /&gt;
   3: Berserk&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;61&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;61&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3D&lt;br /&gt;
|[[#62|[62]]] will increment by this amount whenever the unit moves.&lt;br /&gt;
   3: Sectiod                                    &#039;&#039;- Hobbes&#039;&#039;&lt;br /&gt;
   4: Soldiers, civs, and all other aliens (but Hobbes had no Large aliens)&lt;br /&gt;
  30: Tank/Laser&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;62&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;62&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3E&lt;br /&gt;
|Visibility via motion scanner. The bigger it is, the bigger the blip. Test this one out for values.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;63&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;63&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3F&lt;br /&gt;
|Number of [[Fatal Wounds]] to head.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;64&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;64&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x40&lt;br /&gt;
|Number of fatal wounds to torso.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;65&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;65&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x41&lt;br /&gt;
|Number of fatal wounds to right arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;66&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;66&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x42&lt;br /&gt;
|Number of fatal wounds to left arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;67&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;67&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x43&lt;br /&gt;
|Number of fatal wounds to right leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;68&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;68&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x44&lt;br /&gt;
|Number of fatal wounds to left leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;69-70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;69-70&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x45-0x46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x45-0x46&lt;br /&gt;
|Indexes into [[ROUTES.DAT]]. To start with, aliens will be located at the same position as the node indicated by byte 69.&lt;br /&gt;
:For patrol AI (no X-COM units sighted in turn 1, either X-COM or alien):&lt;br /&gt;
::Byte 69 is the index of the node of the start of the planned move.&lt;br /&gt;
::Byte 70 is the index of the node of the end of the planned move.&lt;br /&gt;
:Note that the move may be multi-turn, and byte 69 is not guaranteed to update during a multi-turn move.  I think it will if the alien ends its move on a node, however. -- Zaimoni&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;71&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x47&lt;br /&gt;
|Unit lighting: always 16 for XCom units, 0 for most aliens but 1 for cyberdisc. If greater than 1, it is set to 1 when unit inactive - see the [[Talk:UNITREF.DAT#Offset_0x47|Talk]] page.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;72&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x48&lt;br /&gt;
|The amount of [[Morale]] that has been restored using the [[Medi-Kit (EU)|Medkit&#039;s]] painkillers. The amount that &#039;&#039;can&#039;&#039; be restored is equal to the maximum health of the unit (index 26) minus their current health (index 13) further minus this.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;73&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x49&lt;br /&gt;
|Intelligence. Rated from 2 - 8. Indicates for how many turns the alien will know the location of spotted soldiers. &#039;&#039;Hey - why do humans have zero intelligence? :(&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;74&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4A&lt;br /&gt;
|AI Mode. Zaimoni found [http://www.strategycore.co.uk/forums/UFO-AI-patch-t8908.html&amp;amp;st=20&amp;amp;start=20 Here] that the values are 0:PATROL, 1:SNIPER, 2:ATTACKING, 3:ESCAPING, 4:GUARD, 5:Returning to UFO. 255 (-1) is also possible. Zaimoni tripped this by wounding a Floater in SNIPER mode; it returned fire, then was taken down by another soldier. Snap guess is that this is a &amp;quot;recalculate&amp;quot; marker.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;75&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4B&lt;br /&gt;
|Unknown. With that said, the only item remaining on my list is called &amp;quot;lightdirect&amp;quot; or direction of light for a unit (0=all around, 1=direction unit facing). Probably unused and always 0. Maybe it was for a hand-held light source, or a armor-mounted flashlight?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;76-77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;76-77&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4C-0x4D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4C-0x4D&lt;br /&gt;
|Mission count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]  &#039;&#039;MTR: Wonder why they bothered to put this in Unitref since this will never change &#039;&#039;&#039;during&#039;&#039;&#039; a mission; compare how soldier stats are actually read from SOLDIER (not UNITREF) on return to geoscape. Is Missions shown anywhere on the combatscape?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;78-79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;78-79&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4E-0x4F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4E-0x4F&lt;br /&gt;
|Kill count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]. Number of kills this unit has made for ALL missions, not just this one. This one &#039;&#039;&#039;can&#039;&#039;&#039; vary &amp;quot;unpredictably&amp;quot; and thus is the only byte known to directly carry forward into the geoscape / Soldier.Dat!&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;80&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;80&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x50&lt;br /&gt;
|[[Reactions]] experience counter, for number of reaction shots. It doesn&#039;t matter if they hit the target; reactions still count. &amp;lt;b&amp;gt;See Note 2 re: Experience counters.&amp;lt;/b&amp;gt; (Also note: Aliens do not use experience counters.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NKF:&#039;&#039; Where does death by fire (overexposure rather than incendiary shell impact) fit into the experience counters? It becomes a non-assigned kill, I guess, like death by wounds, or death by a grenade that hasn&#039;t got an owner?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;81&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x51&lt;br /&gt;
|[[Firing Accuracy]] experience counter, for number of hits on an enemy (lethal or not, grenades or bullets). Each Autoshot hit counts as 1, so you can get 3 hits from one Autoshot burst. Likewise, grenades and blaster bombs can hit multiple targets with one explosion. Also, if you miss the intended target but hit a different alien, it still counts. Finally, if your shot actually has zero [[Damage]], it does still count as a hit. (Not due to armor blockage; a pure roll of 0 coming out of the gun.) &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;82&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;82&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x52&lt;br /&gt;
|[[Melee Accuracy]] experience counter, for number of times stun rod has been used (not stun bombs).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;83&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x53&lt;br /&gt;
|[[Throwing Accuracy]] experience counter, for number of times unit has thrown any object.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;84&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;84&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x54&lt;br /&gt;
|&amp;lt;div id=&amp;quot;Psi_Skill_Experience_Counter&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;[[Psionic Skill]] experience counter, for number of psi attacks performed. 1 is added if attempt was unsuccessful, 3 if it was successful. Note: if this value goes over 255, all psi experience is lost. That&#039;s 85 successful psis (255/3). So be careful of marathon psi&#039;ing (a minimum of 43 turns at 2 psis/turn, 29 turns at 3/turn).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;85&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;85&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x55&lt;br /&gt;
|[[Bravery]] experience counter, for number of times unit has &#039;&#039;resisted&#039;&#039; panicking, despite Morale &amp;lt; 50.  Being mind-controlled, panicking, or going berserk does &#039;&#039;not&#039;&#039; increase this stat -- although Panic Unit attacks will reduce Morale to the point where panic checks will be performed by the game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;86-110&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;86-110&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x56-0x6E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x56-0x6E&lt;br /&gt;
|Unit&#039;s &amp;lt;b&amp;gt;Name&amp;lt;/b&amp;gt;. Standard string ended by null byte. The rest can hold garbage.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;111&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;111&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x6F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x6F&lt;br /&gt;
|Called &amp;quot;BigFire&amp;quot;. If true (value of 1) then the unit is currently firing a weapon. It reverts back to 0 afterwards - determines whether to render the gun and firing arm in the &amp;quot;pointing weapon&amp;quot; position, or whether the weapon is being held against the chest. If manually set to a value above 0, the unit will hold its weapon out until such time as it actually uses it.&lt;br /&gt;
&lt;br /&gt;
Note that this value is only used by units holding two-handed weapons. A unit holding for eg a pistol will &#039;&#039;always&#039;&#039; point the weapon, and uses a different arm sprite for the purposes of doing so (regardless of whether or not the weapon is being fired).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;112&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;112&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x70&lt;br /&gt;
|Called &amp;quot;Finished&amp;quot;. If true (value of 1) signifies that the unit finished AI actions for current turn.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;113&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;113&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x71&lt;br /&gt;
|If 1, then you can&#039;t use the inventory button and the unit will be immune to stun. Used for tanks. Mind controlled units don&#039;t use this but their button disables anyway.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;BombBloke:&#039;&#039; This is the only way to access tank inventories.&lt;br /&gt;
*Tank/Cannon has a normal inventory and uses man_1m0.spk.&lt;br /&gt;
*Tank/Rocket Launcher has a different layout and uses man_1m0.spk.&lt;br /&gt;
*Tank/Laser Cannon uses man_œ.spk, which doesn&#039;t exist normally. Providing this file still crashes.&lt;br /&gt;
*Hovertank/Plasma simply crashes.&lt;br /&gt;
*Hovertank/Launcher simply crashes.&lt;br /&gt;
&lt;br /&gt;
[[#1|[1]]] actually determines the inventory screen used, might be worth playing with that. [[#46|[46]]] determines the layout.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;114&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;114&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x72&lt;br /&gt;
|If not 0, then unit is on fire, and will burn for this amount of turns.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;115&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;115&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x73&lt;br /&gt;
|Gender: 0 = male, 1 = female.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;116&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;116&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x74&lt;br /&gt;
|Hair/skin colour (for inventory; all other units = 0):&lt;br /&gt;
   0: Blond caucasian&lt;br /&gt;
   1: Brunette caucasian&lt;br /&gt;
   2: Asian&lt;br /&gt;
   3: Black&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;117&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;117&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x75&lt;br /&gt;
|Turret weapon. Over-rides hand held weapon. Turret images are not centered; that would be impossible because they aren&#039;t all &#039;objects&#039; (e.g. Celatid). &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
                                                       F.A.  TUs        F.A.  TUs&lt;br /&gt;
   0: HWP cannon (bigobs[40])....................Aimed  90%  80%   Snap  60%  33%&lt;br /&gt;
   1: HWP rocket (bigobs[42])....................Aimed 115%  75%   Snap  55%  45%&lt;br /&gt;
   2: HWP laser (bigobs[54]).....................Aimed  85%  75%   Snap  50%  33%&lt;br /&gt;
   3: HWP plasma cannon (bigobs[43]).............Aimed 100%  60%   Snap  86%  30%&lt;br /&gt;
   4: HWP blaster (bigobs[43]) (looks like ordinary cannon?)......Aimed 120%  80%&lt;br /&gt;
   5: Celatid plasma cannon (bigobs[38]).........Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   6: Cyberdisc plasma cannon (bigobs[34]).......Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   7: Sectopod Laser* cannon (bigobs[34])as cyberdisk, above, plus Auto  50%  35%&lt;br /&gt;
  22: Invalid - Incredibly powerful armour piercing shell. Overpowering.&lt;br /&gt;
 255: Unused&lt;br /&gt;
Note: This item will take precendence over any item carried in the hand slots. It can be installed on non-tanks, but then the unit won&#039;t be able to use any carried weapons or items. This weapon is NOT affected by the kneeling modifier, but it is affected by the current unit&#039;s accuracy stat. Also note, this byte does NOT determine the turret image for HWPs in the battlescape.&lt;br /&gt;
&lt;br /&gt;
[*]The damage type for the Sectopod is indeed set to (3)laser in the executable! Graphical/sound effects of a turret weapon is set there as well, via a reference to a weapon in OBDATA.DAT (HWP Cannon=4=Heavy Cannon, Sectopod=34=Heavy Plasma) &#039;&#039;When I changed HWP Cannon to 2, it looked/sounded like rifle fire - Crus8r&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also see [[#46|[46]]], [[#113|[113]]], and [[#118|[118]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;118&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;118&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x76&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x76&lt;br /&gt;
|Ammo for [[#117|[117]]] turret weapon&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;119&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;119&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x77&lt;br /&gt;
|Movement related? Large unit related? Possible bitfield.&lt;br /&gt;
 &#039;&#039;MTR:&#039;&#039;&lt;br /&gt;
 00000000   0 Chryssalid(2), Civilian(9), Ethereal(2), Floater(2), Muton, &lt;br /&gt;
 00000001   1 Muton, PA Soldier(2)                   Sectoid(2), Silacoid(2), &lt;br /&gt;
 00000011   3 PA Soldier                            PA Soldier(2), Tank/Laser&lt;br /&gt;
 00000101   5 Snakeman&lt;br /&gt;
 00001010  10 Celatid             &#039;&#039;- Hobbes game - could have some garbage&#039;&#039;&lt;br /&gt;
 00001101  13 Muton, PA Soldier   &#039;&#039;  (parens) is count, if more than 1 unit&#039;&#039;&lt;br /&gt;
 00010011  19 Snakeman&lt;br /&gt;
 00100110  38 PA Soldier&lt;br /&gt;
 00101010  42 Muton(3)&lt;br /&gt;
 00110001  49 Muton&lt;br /&gt;
 00110010  50 PA Soldier&lt;br /&gt;
 00110101  53 Silacoid(2)&lt;br /&gt;
 00111011  59 Celatid&lt;br /&gt;
 00111111  63 Silacoid&lt;br /&gt;
 01001110  78 PA Soldier&lt;br /&gt;
 01100111 103 PA Soldier&lt;br /&gt;
 01111111 127 Muton&lt;br /&gt;
 10010000 144 Muton&lt;br /&gt;
 11000000 192 Celatid&lt;br /&gt;
 11111110 254 Muton&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;120&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;120&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x78&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x78&lt;br /&gt;
|Unit bit flags, mainly re: mobility. They do NOT affect the soldier in inventory screen: &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
 (  1) 1: 1 = Dead.  &#039;&#039;This was only set for 2 of 3 dead aliens in my current game.&#039;&#039;&lt;br /&gt;
                     &#039;&#039;[[#13|[13]]] (Health=0) is the most reliable indicator for me.&#039;&#039;&lt;br /&gt;
                     &#039;&#039;-[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
 (  2) 2: 1 = Unit can fly.&lt;br /&gt;
 (  4) 3: 1 = Unit is flying. (Toggles leg sprites for power armour.)&lt;br /&gt;
 (  8) 4: 1 = Has been to this unit in next unit loop. Or to put it another way, has the unit been selected this turn.&lt;br /&gt;
 ( 16) 5: 1 = Unit has been disabled for selection.&lt;br /&gt;
              (Stops the unit tab button from selecting this soldier.)&lt;br /&gt;
 ( 32) 6: 0 = Unit has left hand object selected, 1 = right hand object selected.&lt;br /&gt;
 ( 64) 7: 1 = Unit is kneeling.&lt;br /&gt;
 (128) 8: 1 = Unit is wearing power/flying suit. (Can&#039;t be stunned by smoke flag? &lt;br /&gt;
              Seems to work for fire, too.)&lt;br /&gt;
If a unit is carrying something in either hand, it is impossible to get him to appear as if he is carrying nothing - in the game, at least. If he is carrying nothing, bit 6 can flag (as though the unit was using it&#039;s right hand item). But maybe it&#039;s just the order of dropped items affecting this?&lt;br /&gt;
&lt;br /&gt;
Note: A unit is only considered as flying if it is not on the ground. For example, a hover tank is not always considered as flying.&lt;br /&gt;
&lt;br /&gt;
What if a hovertank is half on the ground, half in the air? What about a treaded tank, or large alien unit? What about units in lifts?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;121&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;121&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x79&lt;br /&gt;
|Possible Values: 0 or 16. All units in unitref.dat get a value of 0 except for the second unit in the list which gets 16. Doesn&#039;t matter if the second unit is a soldier, a tank, or an alien. It&#039;s always 16. Editing it to 0 doesn&#039;t crash the game or have any dire consequences. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;122&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;122&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7A&lt;br /&gt;
|Always 0?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;123&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;123&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7B&lt;br /&gt;
|Always 0?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;124&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;124&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7C&lt;br /&gt;
|TFTD ONLY - Appears to be a count as to which frame of bubbles the soldier is on.  Can be 0 to 16 (0x0F), most likely 125/7D is included with this.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;125&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;125&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7D&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;126&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;126&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7E&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;127&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;127&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7F&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;128&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;128&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x80&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x80&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;129&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;129&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x81&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;130&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;130&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x82&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x82&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;131&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;131&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x83&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
1) The original/base values for &amp;lt;b&amp;gt;soldier stats&amp;lt;/b&amp;gt; (offsets [[#23|[23]]]-[[#28|[28]]], etc.) correspond to the initial+increase bytes from [[SOLDIER.DAT|Soldier.Dat]] (bytes 43-62). Changes to these Unitref bytes are &amp;lt;i&amp;gt;lost&amp;lt;/i&amp;gt;  when the mission ends; instead, XCOM re-reads them from Soldier at that time. This makes sense because base soldier stats don&#039;t change &amp;lt;i&amp;gt;during&amp;lt;/i&amp;gt; a mission per se (although they might increase when the mission ends); in this way, the programmers didn&#039;t have to bother with separately storing and/or adding initial+increase during combat. (It&#039;s also why you don&#039;t see the initial+increase in the soldier stat display during combat, that you can see back at base.) On a practical note, if you are testing soldier stat increases versus experience counters, change the experience counters in Unitref, but change the soldier stats in Soldier. (IOW, it doesn&#039;t matter what the soldier stats are in the combat mission.)&lt;br /&gt;
&lt;br /&gt;
The Kill count (offset [[#78-79|[78-79]]]) is the only Unitref value I know of that is directly carried forward into the geoscape and Soldier.dat. However, some others do indirectly carry forward, for example: experience (offsets [[#80|[80]]]-[[#85|[85]]]) causes stat and rank increases, and decreased health (offset [[#26|[26]]] - offset [[#13|[13]]]) means hospital time. And, of course, death is permanent. Heh.&lt;br /&gt;
&lt;br /&gt;
2) &amp;lt;b&amp;gt;Experience counters&amp;lt;/b&amp;gt; (offsets [[#80|[80]]]-[[#85|[85]]]) determine the likelihood of soldier stat increases at the end of the combat mission, according to the formula for Primary Stats shown [[Experience#How_Experience_Points_Are_Applied|here]]. The Bravery counter (offset [[#85|[85]]]) affects Bravery as shown [[Bravery|here]].&lt;br /&gt;
&lt;br /&gt;
Also, if at least one of the experience counters (except Throws) has a count, your secondary stats will increase, as discussed [[Experience#Secondary_Stats|here]]. All you need is at least a 1 in offsets [[#80|[80]]]-[[#82|[82]]] or [[#84|[84]]]-[[#85|[85]]]; more than 1 and/or multiple counters has no additional effect.&lt;br /&gt;
&lt;br /&gt;
3) BombBloke&#039;s additional &amp;quot;To be Done&amp;quot; notes - can we cross some of these off yet?&lt;br /&gt;
&lt;br /&gt;
   Need to research:&lt;br /&gt;
   Stun recovery rate, does it exist?&lt;br /&gt;
   Hand to hand attacks&lt;br /&gt;
   &amp;lt;strike&amp;gt;Offset of weapon from unit image?&amp;lt;/strike&amp;gt; &lt;br /&gt;
   &#039;&#039;Based on unit height and nothing else. There may be values to determine what arm sprites to use,&#039;&#039;&lt;br /&gt;
   &#039;&#039;but I doubt it.&#039;&#039;&lt;br /&gt;
   Firing sprite offset? &lt;br /&gt;
   &#039;&#039;Probably just based on unit height and some hardcoded values in the executable.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Inventory lockout?&amp;lt;/strike&amp;gt; &#039;&#039;All mind controlled units are locked out.&#039;&#039;&lt;br /&gt;
   Kneel lockout? &lt;br /&gt;
   &#039;&#039;Probably the same as above, I seem to remember that using XcomUtil to &amp;quot;swap sides&amp;quot; would make it&#039;&#039;&lt;br /&gt;
   &#039;&#039;possible to kneel small alien units.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Aliens seen?&amp;lt;/strike&amp;gt; &#039;&#039;Not used in unitref.dat, only in unitpos.dat. -[[User:Zombie|Zombie]] 23:48, 29 September 2006 (PDT)&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Whether a unit slides/floats/hovers/rolls/walks (movement noise)?&amp;lt;/strike&amp;gt; &#039;&#039;Set according to unit type.&#039;&#039;&lt;br /&gt;
   What else? The more to look for, the easier it is...&lt;br /&gt;
   &lt;br /&gt;
   Know 111 values.&lt;br /&gt;
   Unknown values (13 in total):&lt;br /&gt;
   [[#34|[034 / 0x22]]] - Always 0?&lt;br /&gt;
   [[#36|[036 / 0x24]]] - Always 0?&lt;br /&gt;
   [[#43|[043 / 0x2B]]] - Set to 1 on occasion, usually 0.&lt;br /&gt;
   [[#52|[052 / 0x34]]] - Seems to be a mirror of 48 / 0x30, the LOFTemp index for the unit.&lt;br /&gt;
   [[#71|[071 / 0x47]]] - Appears to relate to lighting caused by the unit, [[Talk:UNITREF.DAT#Offset_0x47|discussion here]].&lt;br /&gt;
   [[#74|[074 / 0x4A]]] - Appears to relate to the AI-mode used by the unit, [[Talk:UNITREF.DAT#Offset_0x4A_.2874.29|discussion here]].&lt;br /&gt;
   [[#75|[075 / 0x4B]]] - Always 0?&lt;br /&gt;
   [[#112|[112 / 0x70]]] - Set to 1 for some aliens, 0 otherwise.&lt;br /&gt;
   [[#119|[119 / 0x77]]] - No idea, possible bitfield, could be anything.&lt;br /&gt;
   [[#120|[120 / 0x78]]] - Unit bit flags, mainly re: mobility. Only one bit not 100% identified.&lt;br /&gt;
   [[#121|[121 / 0x79]]] - Second unit gets a value of 16. Everyone else gets 0. No obvious purpose.&lt;br /&gt;
   [[#122|[122 / 0x7A]]] - Always 0?&lt;br /&gt;
   [[#123|[123 / 0x7B]]] - Always 0?&lt;br /&gt;
   &lt;br /&gt;
   Know 1 TFTD value.   &lt;br /&gt;
   Unknown TFTD values (7 in total):&lt;br /&gt;
   [[#125|[125]]] [[#126|[126]]] [[#127|[127]]] [[#128|[128]]] [[#129|[129]]] [[#130|[130]]] [[#131|[131]]]&lt;br /&gt;
&lt;br /&gt;
4) Hobbes posted a savegame with a TON of different aliens in it [http://www.xcomufo.com/forums/index.php?showtopic=8591 here] (message 6). Interesting for testing. But note it was made with XCOMUTIL and there may(?) be concerns over vailidity of unit info - see [[Talk:UNITREF.DAT]].&lt;br /&gt;
&lt;br /&gt;
5) A [[HackerTools|Hex Workshop]] Structure Library for UNITREF.DAT created by Danial is [[UNITREF_DAT_HSL|here]].&lt;br /&gt;
&lt;br /&gt;
== For More Information ==&lt;br /&gt;
*[[SOLDIER.DAT]]&lt;br /&gt;
*[[Soldiers|Soldier Stats]]&lt;br /&gt;
*[[Experience]]&lt;br /&gt;
*[[HackerTools|Hex editing]]&lt;br /&gt;
&lt;br /&gt;
Return to [[Saved_Game_Files|Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=65972</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=65972"/>
		<updated>2015-06-22T19:56:25Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Main screen 1.17i */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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&#039;s a referenced MCD (by some other MCDs, which will be shown at the right part of Status Bar).&lt;br /&gt;
You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;Tab&#039;&#039;/&#039;&#039;Shift+Tab&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You can change spacing between sprites, and margins in &#039;&#039;Edit-&amp;gt;Settings...&#039;&#039;. It will work for both export to and import from PNG, so pay attention, if you&#039;re using non-standard values. Also you can change number of sprites per row when exporting images.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Autoconfirm&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17i (2015-06-23) ([http://volutar.eu5.org/_mcdedit117i.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=65971</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=65971"/>
		<updated>2015-06-22T19:52:05Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 2015-06-23 v1.17i */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;Tab&#039;&#039;/&#039;&#039;Shift+Tab&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You can change spacing between sprites, and margins in &#039;&#039;Edit-&amp;gt;Settings...&#039;&#039;. It will work for both export to and import from PNG, so pay attention, if you&#039;re using non-standard values. Also you can change number of sprites per row when exporting images.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Autoconfirm&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17i (2015-06-23) ([http://volutar.eu5.org/_mcdedit117i.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=65970</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=65970"/>
		<updated>2015-06-22T19:48:19Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 2015-06-23 v1.17i */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-09 v1.17c====&lt;br /&gt;
* Added &amp;quot;Append MCD&amp;quot; (File menu) - chosing another MCD file to be added to the end of current (including PCK and all necessary reference values). MCD count shouldn&#039;t exceed 255.&lt;br /&gt;
* Added command line options, which override corresponding .lyt file values during the start (case sensitive):&lt;br /&gt;
  -custom_mcd [true/false, if it&#039;s custom MCD mode or not]&lt;br /&gt;
  -game_type [1/2]&lt;br /&gt;
  -pal_idx [0-4]&lt;br /&gt;
  -mcd_pref [full path to mcd folder]&lt;br /&gt;
  -selectedfilename [mcd/pck/tab filename without extension]&lt;br /&gt;
  -SelectMCD [selected mcd ID]&lt;br /&gt;
* Added special file (MCD_Saved.dat), which will receivereach saved file absolute path and filename (without extension).&lt;br /&gt;
* RMB click to MCD list doesn&#039;t selcet clicked MCD anymore.&lt;br /&gt;
* Added multiple MCD selection (shift, ctrl)&lt;br /&gt;
* Added delete/clear/copy/paste MCDs throughout selected.&lt;br /&gt;
* Paste MCDs works in two modes: 1. Only one MCD is selected during paste - it will override MCDs sequentially from the buffer; 2. Multiple MCDs are selected during paste (as targets) - it will run through selected MCDs and will override them from the buffer, if buffer run out of MCDs - it will start from first in the buffer (so if copy 1, and paste to 10 will clone it);&lt;br /&gt;
* When multiple MCDs are selected, it becomes possible to modify values of selected MCDs at once (works only for data values, no SCANG, sprite or LOFT). If values are different throughout the selection, it will show &amp;quot;mix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
** Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
====2015-02-18 v1.17e====&lt;br /&gt;
* Added aggregation of SCANG, PCK numbers (animation) and LOFTs for multiple selected MCDs, and multiple modification.&lt;br /&gt;
* When there&#039;s no multiple selected MCDs, it will paste MCD only for single selection (previously paste worked sequentially).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** More informative PCK deletion error.&lt;br /&gt;
** Fixed png import with untouched palette (they were still re-converted for first 16 columnts).&lt;br /&gt;
** Added copy/paste into/from clipboard of multiple PCKs&lt;br /&gt;
** Added export/import from PNG of multiple PCKs (the way similar to sheet - side by side, 10 in row)&lt;br /&gt;
&lt;br /&gt;
====2015-02-19 v1.17f====&lt;br /&gt;
* Added multiple MCDs adding to menu (1,5 and 15)&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCKs adding to menu (1,5 and 15)&lt;br /&gt;
&lt;br /&gt;
====2015-04-06 v1.17g====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Fixed RGBA png import.&lt;br /&gt;
** Fixed insert new PCK.&lt;br /&gt;
** Added &amp;quot;Settings&amp;quot; menu with PCK sheet margin/spacing options and number of sprites per row for export.&lt;br /&gt;
&lt;br /&gt;
====2015-06-21 v1.17h==== &lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* Adding/Deleting MCDs will change particular fields accordingly (Alt_MCD/Die_MCD fields), including consideration if it&#039;s a &amp;quot;door&amp;quot; field or not. Special characters are needed at the tail of particular field names to work properly.&lt;br /&gt;
* Informative warning message if you&#039;re trying to delete MCDs which are used in other MCDs (as Alt_MCD/Die_MCD).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** PasteMode is not going to be turned off in Draw mode until you start drawing.&lt;br /&gt;
** Hover color info and highlight cross now works correcty with overlay/underlay &amp;quot;pasted&amp;quot; fragment.&lt;br /&gt;
** Added tools to rotate (CW/CCW) + Flip (Horizontal/vertical) of selection or &amp;quot;pasted&amp;quot; fragment.&lt;br /&gt;
** Additional small fixes.&lt;br /&gt;
&lt;br /&gt;
====2015-06-23 v1.17i==== &lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* Alt_MCD/Die_MCD readjustment rules are changed - now it affects Alt_MCD only if it&#039;s a door, and Die_MCD only if it&#039;s not 0.&lt;br /&gt;
* Same rules are applied when &amp;quot;Append MCDs&amp;quot; happens (through File menu).&lt;br /&gt;
* Doesn&#039;t allow adding MCDs more than 256 (either through Add or Append or Insert).&lt;br /&gt;
* Fixed graying add/del/ins options for &amp;quot;vanilla&amp;quot; MCDsets (as it meant to be eariler) - now you can&#039;t accidentally change number of vanilla tiles.&lt;br /&gt;
* Showing in which MCDs selected one is used (as Alt/Die) at the right part of the Status Bar.&lt;br /&gt;
* Showing red dots at the &amp;quot;Used&amp;quot; MCDs (the ones which are better not to delete).&lt;br /&gt;
* Fixed wrong &amp;quot;using: MCDs&amp;quot; in warnings when deleting them.&lt;br /&gt;
* If Used MCDs are still deleted, the Using MCDs are getting wrong value replaced with even more wrong &amp;quot;255&amp;quot; (to make it easier to catch).&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=65946</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=65946"/>
		<updated>2015-06-21T18:38:35Z</updated>

		<summary type="html">&lt;p&gt;Volutar: minor update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-09 v1.17c====&lt;br /&gt;
* Added &amp;quot;Append MCD&amp;quot; (File menu) - chosing another MCD file to be added to the end of current (including PCK and all necessary reference values). MCD count shouldn&#039;t exceed 255.&lt;br /&gt;
* Added command line options, which override corresponding .lyt file values during the start (case sensitive):&lt;br /&gt;
  -custom_mcd [true/false, if it&#039;s custom MCD mode or not]&lt;br /&gt;
  -game_type [1/2]&lt;br /&gt;
  -pal_idx [0-4]&lt;br /&gt;
  -mcd_pref [full path to mcd folder]&lt;br /&gt;
  -selectedfilename [mcd/pck/tab filename without extension]&lt;br /&gt;
  -SelectMCD [selected mcd ID]&lt;br /&gt;
* Added special file (MCD_Saved.dat), which will receivereach saved file absolute path and filename (without extension).&lt;br /&gt;
* RMB click to MCD list doesn&#039;t selcet clicked MCD anymore.&lt;br /&gt;
* Added multiple MCD selection (shift, ctrl)&lt;br /&gt;
* Added delete/clear/copy/paste MCDs throughout selected.&lt;br /&gt;
* Paste MCDs works in two modes: 1. Only one MCD is selected during paste - it will override MCDs sequentially from the buffer; 2. Multiple MCDs are selected during paste (as targets) - it will run through selected MCDs and will override them from the buffer, if buffer run out of MCDs - it will start from first in the buffer (so if copy 1, and paste to 10 will clone it);&lt;br /&gt;
* When multiple MCDs are selected, it becomes possible to modify values of selected MCDs at once (works only for data values, no SCANG, sprite or LOFT). If values are different throughout the selection, it will show &amp;quot;mix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
** Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
====2015-02-18 v1.17e====&lt;br /&gt;
* Added aggregation of SCANG, PCK numbers (animation) and LOFTs for multiple selected MCDs, and multiple modification.&lt;br /&gt;
* When there&#039;s no multiple selected MCDs, it will paste MCD only for single selection (previously paste worked sequentially).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** More informative PCK deletion error.&lt;br /&gt;
** Fixed png import with untouched palette (they were still re-converted for first 16 columnts).&lt;br /&gt;
** Added copy/paste into/from clipboard of multiple PCKs&lt;br /&gt;
** Added export/import from PNG of multiple PCKs (the way similar to sheet - side by side, 10 in row)&lt;br /&gt;
&lt;br /&gt;
====2015-02-19 v1.17f====&lt;br /&gt;
* Added multiple MCDs adding to menu (1,5 and 15)&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCKs adding to menu (1,5 and 15)&lt;br /&gt;
&lt;br /&gt;
====2015-04-06 v1.17g====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Fixed RGBA png import.&lt;br /&gt;
** Fixed insert new PCK.&lt;br /&gt;
** Added &amp;quot;Settings&amp;quot; menu with PCK sheet margin/spacing options and number of sprites per row for export.&lt;br /&gt;
&lt;br /&gt;
====2015-06-21 v1.17h==== &lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* Adding/Deleting MCDs will change particular fields accordingly (Alt_MCD/Die_MCD fields), including consideration if it&#039;s a &amp;quot;door&amp;quot; field or not. Special characters are needed at the tail of particular field names to work properly.&lt;br /&gt;
* Informative warning message if you&#039;re trying to delete MCDs which are used in other MCDs (as Alt_MCD/Die_MCD).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** PasteMode is not going to be turned off in Draw mode until you start drawing.&lt;br /&gt;
** Hover color info and highlight cross now works correcty with overlay/underlay &amp;quot;pasted&amp;quot; fragment.&lt;br /&gt;
** Added tools to rotate (CW/CCW) + Flip (Horizontal/vertical) of selection or &amp;quot;pasted&amp;quot; fragment.&lt;br /&gt;
** Additional small fixes.&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCD&amp;diff=65944</id>
		<title>MCD</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCD&amp;diff=65944"/>
		<updated>2015-06-21T16:07:05Z</updated>

		<summary type="html">&lt;p&gt;Volutar: clarification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{tocright}}MCD (Map Control Data) files, which are stored in the [[TERRAIN]] folder, contain multiple 62-byte records that define the tiles that make up a given terrain. For example, BARN.MCD defines a number of terrain items such as walls, haybales, floors and ceilings, while DESERT.MCD defines things like sand (ground tiles), sand dunes, rocks, and cacti.&lt;br /&gt;
&lt;br /&gt;
Each MCD file is accompanied by a [[Image_Formats#PCK|PCK and a TAB file]] with the same filename. These contain the image data referenced by the MCD itself. The tiles within the MCD files are referenced by both the files in the [[MAPS|MAPS folder]] and [[MAP.DAT]], in order to create &amp;quot;map modules&amp;quot;; these are then grouped together at run-time to create randomly generated battlescapes.&lt;br /&gt;
&lt;br /&gt;
Often, more than one MCD file will be required to represent a given map. For example, farms are made using tiles from both the CULTIVAT (fields) and BARN (farmhouse) sets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot;&amp;gt;&lt;br /&gt;
==Usage==&lt;br /&gt;
At run-time, a collated MCD array is created from the smaller sets stored in this folder. In order, this is made up of:&lt;br /&gt;
&lt;br /&gt;
* BLANKS.MCD (two records, the first of which is the black tiles rendered outside of the &amp;quot;map boundaries&amp;quot;, and the second of which is the burnt dirt resulting from explosions).&lt;br /&gt;
* The set(s) corresponding to the terrain (for example, the MCD files corresponding to the desert or forest areas).&lt;br /&gt;
* The set corresponding to the X-COM dropship, if one is present on the map.&lt;br /&gt;
* The set(s) corresponding to the alien craft, if one is present on the map.&lt;br /&gt;
&lt;br /&gt;
This large table may never exceed 256 total entries (or the game will crash). For example, you can&#039;t have an X-COM and an alien craft present in an urban map; this will result in a &amp;quot;too many map-codes&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
The [[MAPS|associated map modules]] are also loaded into a [[MAP.DAT|single large map array]], with the tile indexes modified to account for the re-positioning caused by appending the MCD tables together. For example, a wall tile in the Supply Ship MCD file might be the second record, and that&#039;s what the map module file will index to (well, that plus 2, but see the [[MAPS]] page for more on that): However, after appending the Supply Ship MCD file to the end of the collated MCD array, that wall tile might now be index number two hundred!&lt;br /&gt;
&lt;br /&gt;
Likewise, any tile indexes within the collated MCD files themselves, or to the associated PCK sprites (which are &#039;&#039;also&#039;&#039; collated into a single array), need to be &amp;quot;updated&amp;quot; in the same way (tile indexes within the MCD structure are at offsets [[#44|44]] and [[#46|46]] of each record).&lt;br /&gt;
&lt;br /&gt;
Because the collated MCD array can be (mostly) recreated at any time, it is not written to the hard drive when the user saves the game mid-battle. This has a side effect of causing [[Known_Bugs#Door_jam|doors to stick open]], as offset [[#47|47]] won&#039;t be correctly tracked.&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Decimal)&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Hex)&lt;br /&gt;
!Usage&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0-7&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0-7&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x00-0x07&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x00-0x07&lt;br /&gt;
|Animation of the tile.&lt;br /&gt;
&lt;br /&gt;
The eight bytes refer to images on the PCK files which are used in a sequence (from the first byte to the last) to animate tiles. This animation is used by several tiles on both games, such as doors (see [[#46|[46]]]), bubbles on TFTD, blinking lifts, etc. If all eight frames are the same, it&#039;s a static tile.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;8-19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;8-19&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x08-0x13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x08-0x13&lt;br /&gt;
|Line Of Fire Template (LOFT) for the tile. 12 values, each references into [[LOFTEMPS.DAT]] file.&lt;br /&gt;
&lt;br /&gt;
Each LOFT record is a 16x16 grid; these are stacked one over the other, with mcd[8] being the bottom. Used to create a 3D map (16x16x12) of the tile, for LOS. For more info, see [[LOFTEMPS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;20-21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;20-21&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x14-0x15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x14-0x15&lt;br /&gt;
|Reference into [[SCANG.DAT]] file. Two-byte integer ([20] + [21] * 256 + 35 = offset). 4x4 bmp images for the top-down map; see [[SCANG.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;22-25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;22-25&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x16-0x19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x16-0x19&lt;br /&gt;
|Four byte value pointing to the RAM location of the [[Image_Formats#PCK|TAB index for the PCK data]] used by the terrain file. Only used at run-time.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;26-29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;26-29&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1A-0x1D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1A-0x1D&lt;br /&gt;
|Four byte value pointing to the RAM location of the [[Image_Formats#PCK|PCK set]] used by the terrain file. Only used at run-time.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;30&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1E&lt;br /&gt;
|Boolean: Is sliding door? See [[#46|[46]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;31&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1F&lt;br /&gt;
|Boolean: Blocks visibility of terrain? AKA LOS (Line Of Sight)&lt;br /&gt;
 0 = False = Doesn&#039;t block visibility.&lt;br /&gt;
 1 = True = Blocks visibility.&lt;br /&gt;
Visibility of units is blocked by voxels formed with [[LOFTEMPS.DAT]].&lt;br /&gt;
Note that floor tiles always block visibility of terrain, although their flag is 0, but it&#039;s ignored for floor tiles.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;32&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x20&lt;br /&gt;
|Boolean: Can&#039;t be stood on? For ground tiles: non-flying units fall through. &#039;&#039;Only two ground tiles have this set: BLANKS MCD id 0 and UFO1 MCD id 0&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;33&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x21&lt;br /&gt;
|Boolean: Is Wall? Used for Objects intended to act as Walls; used to make UFO, Skyranger, and Avenger outer &amp;quot;walls&amp;quot; that aren&#039;t otherwise possible as &amp;quot;real&amp;quot; North or West walls. If that sounds ambiguous, that&#039;s because no one&#039;s worked out what it actually does; whether an object can be walked on/through depends on it&#039;s TU cost ([[#39|[39]]]) and height ([[#48|[48]]]). Called &amp;quot;BigWall&amp;quot; in [[MapView]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;34&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x22&lt;br /&gt;
|Boolean: Is Grav lift? Up/down of lifts is determined by whether there is another one above or below in the .MAP.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;35&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x23&lt;br /&gt;
|Boolean: Is hinged door? See [[#46|[46]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;36&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x24&lt;br /&gt;
|Boolean: Blocks fire?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;37&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x25&lt;br /&gt;
|Boolean: Tile blocks smoke (or a &amp;quot;gas&amp;quot; type which was never implemented) from spreading. Used in smoke propagation routine.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;38&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x26&lt;br /&gt;
|Always 3. Defined as &amp;quot;printype&amp;quot;; 3=whole, 2=right side, 1=left side. Since this is always 3 the game prints the entire object, while the assumption is that values of 2 or 1 are possibly used for the map designer. But the actual game totally ignores this value. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;39&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x27&lt;br /&gt;
|Time units used to walk across the tile (255 means unpassable).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;40&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x28&lt;br /&gt;
|Time units used to slide across the tile (255 means unpassable).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;41&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x29&lt;br /&gt;
|Time units used to fly across the tile (255 means unpassable).&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|For [[#39|[39]]] to [[#41|[41]]], values range from 0 to 8, or are 255. There are only a few places where they are not all the same ([[#39|[39]]]=[[#40|[40]]]=[[#41|[41]]]):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;u&amp;gt;Walk&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;Slide&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;Fly&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;File&amp;lt;/u&amp;gt;    &amp;lt;u&amp;gt;Description&amp;lt;/u&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
   2   0    2   Avenger Middle ramp object&lt;br /&gt;
 &lt;br /&gt;
  255 255   4   Arctic  Water pools in ice (18 ground MCDs) &lt;br /&gt;
 &lt;br /&gt;
   2   2    0   U_Base  Death &#039;&#039;objects&#039;&#039; for large round containers in alien bases (four quadrants)...&lt;br /&gt;
                        thus, their remnants don&#039;t &#039;&#039;add&#039;&#039; TUs for fliers&lt;br /&gt;
 &lt;br /&gt;
   1   1    0   U_Base  Little green plant objects found on black &amp;quot;base garden&amp;quot; flooring&lt;br /&gt;
 &lt;br /&gt;
   2   2    0   Urbits  Two death objects (splinters on ground) for city&#039;s tall green picket fence &lt;br /&gt;
                        (one is a North-wall fence, the other is a West-wall fence)&lt;br /&gt;
&lt;br /&gt;
Which of the three movement types a given unit uses is determined by [[UNITREF.DAT#11|UnitRef[11]]]. Note that by default, ALL units are &amp;quot;walkers&amp;quot;.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;42&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2A&lt;br /&gt;
|Armor of tile.&lt;br /&gt;
&lt;br /&gt;
*Tile must take this amount of damage to be destroyed, at which point it changes to a tile set according to [[#44|[44]]].&lt;br /&gt;
*Terrain items do not &amp;quot;remember&amp;quot; damage (like units); terrain is either destroyed in a single blast/shot (if damage &amp;gt;= armor) or not.&lt;br /&gt;
*Some things are set to 255 to mean &amp;quot;indestructible&amp;quot; but actually, anything &amp;gt;100 is indestructible in a non-hacked game, and anything &amp;gt;127 (for explosives, 255/2) or &amp;gt;191 (firearms, 255x.75) cannot be destroyed, even in a hacked game (see [[Damage]] re: Damage to terrain).&lt;br /&gt;
*With explosions, all four terrain items in the tile are hit by the same strength, but firearm shots target only one of them.&lt;br /&gt;
*For a loopy exception to explosions being equally applied (due to erroneous data), see [[Explosions#Mile-High Madness|Mountain Madness]].&lt;br /&gt;
*&#039;&#039;[[User:NKF|NKF]]:&#039;&#039; I suppose you could make a gate out of this by creating two tiles, each easily destroyed, which change to the other when hit. One could be walked across, the other could not.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;43&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2B&lt;br /&gt;
|[[Explosions#HE Block|HE Blockage]]&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;44&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2C&lt;br /&gt;
|Tile becomes a tile of this type (i.e., this other MCD record in the same MCD file) when destroyed. Also known as the &#039;&#039;&#039;death tile&#039;&#039;&#039;. Also see [[#53|[53]]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If [44]=0, it means there is no death tile per se; it reverts to a &amp;quot;raw earth&amp;quot; (BLANKS[01]) tile if on ground, or nothing if in air. (It does not revert to the MCD id 0 record in the current collection.)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;45&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2D&lt;br /&gt;
|Flammability - the higher this is, the less likely the tile will be set on fire.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;46&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2E&lt;br /&gt;
|If the tile is a door ([[#30|[30]]] or [[#35|[35]]]), the tile will become this tile number when opened. Animation [0] (see [[#0-7|[0-7]]]) is shown until someone walks through the door, in which case it cycles through its animation stopping and holding Animation [7]. Then it will return to a closed door next turn.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;47&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2F&lt;br /&gt;
|Flags 1 for the &amp;quot;open&amp;quot; version of a sliding door if a door of that type was opened this turn (hence notifying the game that it needs to search the map for doors to close on the next). Because this value is only used at run-time, and the collated MCD array is not written to disk if the player saves the game, reloading while sliding doors are open will [[Known_Bugs#Door_jam|cause them to jam]] until another door of the same type is opened. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;48&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x30&lt;br /&gt;
|Signed value, usually negative; add this to the graphical Y offset of units or objects on this tile (adding a negative is the same as subtracting, and the lower the Y offset is, the higher the unit will appear on-screen). The value is relative to the level the tile is placed on, so it&#039;s usually 0 (meaning &amp;quot;at the same level&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
A unit may only step from one tile to another if the effective difference in tile heights are 8 or less. For example, ground level is at 0, while the lower segment of a staircase will typically have this set to -8 and the higher segment at -16. A soldier can step onto the lower segment from the ground, then onto the upper segment, then finally onto the next level above. He cannot step directly from the ground to the upper staircase, let alone to the next level, as it&#039;s too great a &amp;quot;jump&amp;quot; to perform in a single movement.&lt;br /&gt;
&lt;br /&gt;
The effective difference between levels on the map is 24.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;49&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x31&lt;br /&gt;
|Subtract this value from the graphical Y offset of the tile image (used for hills).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;50&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x32&lt;br /&gt;
|Received damage modifier type (taken from [[Damage#Damage_Modifiers|Damage modifier table]]) - Always 0. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;51&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x33&lt;br /&gt;
|Lightblock. Note that the actual game seems to ignore this value.&lt;br /&gt;
  0 Blocks no light.&lt;br /&gt;
 &#039;&#039;... up to ...&#039;&#039;&lt;br /&gt;
 10 Blocks all light.&lt;br /&gt;
Is apparently percentage based: 1=10%, 10=100%.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;52&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x34&lt;br /&gt;
|Footstep sound effect. Most likely an index to the .CAT file RAW wave &#039;&#039;-[http://www.strategycore.co.uk/forums/Map-Control-Data-MCD-long-Post-t1468.html BladeFireLight]&lt;br /&gt;
 0 Not used in XCOM (makes a metal sound if hacked); is used on TFTD for some objects&lt;br /&gt;
 1 Metal&lt;br /&gt;
 2 Normal (Grass, Wood, Dirt)&lt;br /&gt;
 3 Three mountain ground tiles, and some city apt. furniture objects that can&#039;t be &lt;br /&gt;
   walked on? (six furniture objects might&#039;ve been - but they&#039;re death tiles that&lt;br /&gt;
   nothing points to.) Uses same sound as 6 in DOS version.&lt;br /&gt;
 4 Pool of water (Not used in XCOM)&lt;br /&gt;
 5 Sand (Desert)&lt;br /&gt;
 6 Martian ground (DOS version), snow (CE version)&lt;br /&gt;
 7 Snow (only DOS version, Not used in XCOM, Arctic terrain actually uses 2)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;53&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x35&lt;br /&gt;
|Tile type:&lt;br /&gt;
 0 Floor&lt;br /&gt;
 1 West Wall&lt;br /&gt;
 2 North Wall&lt;br /&gt;
 3 Object&lt;br /&gt;
&lt;br /&gt;
In the map, there are four bytes per tile: One each for the floor, west wall, north wall and object. If one of those changes (eg is destroyed, or in the case of a door, opened), it is removed from the map and a new object is placed instead. This byte is used to work out which of the four map bytes should recieve the new object.&lt;br /&gt;
&lt;br /&gt;
For example, in the mountains, if you destroy the ground tile you get an object (tree stump). The new tile gets written into the fourth byte of the map record, even though the original tile that was destroyed belonged in the first byte. &lt;br /&gt;
&lt;br /&gt;
As for the potential for change in tile type when becoming death tile ([[#44|[44]]]): There are 22 instances of [[Explosions#Mile-High Madness|Mountain Madness]] (ground to object), 1 instance of North Wall becoming an object (XCOM1 northwall door becomes rubble), one MCD record with tile type of &#039;&#039;&#039;10&#039;&#039;&#039; (Barn 7 which looks like a North Wall and becomes northwall when killed; obviously a typo&#039;d Tile Type), and 31 total instances on 18 different tilesets where objects become ground upon dying (probably to &amp;quot;scorched earth&amp;quot;, but this was not checked).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;54&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x36&lt;br /&gt;
|Explosive type; [[#55|[55]]] must be &amp;gt;0:&lt;br /&gt;
 0 HE&lt;br /&gt;
 1 Smoke&lt;br /&gt;
&#039;&#039;Notes:&#039;&#039;&lt;br /&gt;
#To see explosive objects in XCOM, see [[Explosions#Explosive Map Objects]].&lt;br /&gt;
#Type 0 (HE) explosions follow the usual rules for [[explosions]] (average damage to units decreases by 10 per tile outward, etc.).&lt;br /&gt;
#Hackers: Type 0 (HE) terrain items with little or no armor ([[#42|[42]]]=0) are obliterated before exploding (i.e., they won&#039;t explode, no matter how high [[#55|[55]]] is). Probably also depends on whether it was a very big blast relative to the armor.&lt;br /&gt;
#Chain reactions are exceedingly difficult to set up (per Hobbes). Most of the time when you see e.g. the four sections of the Navigator&#039;s table explode, it&#039;s because you used explosives that actually set off each one individually. It has to do with a balance of, among other things, not obliterating the object (see previous point).&lt;br /&gt;
#Type 1 (Smoke) explosives are strange, and mainly only affect aliens - and very haphazardly at that. XCOM units are only very rarely affected; I could only get it to work if they were 1) unarmored, 2) on a diagonal, and 3) no other objects are &amp;quot;in the way&amp;quot; between the blast moving &amp;quot;over and up&amp;quot; or &amp;quot;up and over&amp;quot; to the diagonal (blast propagation never moves directly diagonally per se; see [[Explosions#Playing With Fire]]). &#039;&#039;-MTR&#039;&#039;&lt;br /&gt;
#Chain reactions are not possible with Type 1 (Smoke) explosive objects.&lt;br /&gt;
#Also, when dealing with smoke damage, remember that if there is already tons of smoke on the map (filling up the smoke table) such that no new smoke can appear, you might get unexpected results (or no effect). &#039;&#039;[[user:Hobbes|Hobbes]]:&#039;&#039; One strange thing that can happen when there&#039;s already too much smoke on the map and an object with [54]=1 explodes is that the alien dies and in the dying animation there&#039;s smoke on that square. &#039;&#039;Just in the dying animation, not after he&#039;s down? -MTR&#039;&#039; - &#039;&#039;I can&#039;t remember right now if the smoke remains afterward. Next time it happens I will check it [[User:Hobbes|Hobbes]] 12:00, 18 Nov 2005 (PST)&#039;&#039;&lt;br /&gt;
#There are no &amp;quot;naturally occurring&amp;quot; HE explosives tiles in UFO. All explosive objects are MCD[54]=1.&lt;br /&gt;
#The game show values of 0=not explosive, 1=normal (which I assume is HE), 2=gas (again, unused feature).&lt;br /&gt;
#TFTD uses both values for [54], 0 (more common, like the barrels on Port) and 1 (the Synomium device on Grunge/Artifact Site).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;55&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x37&lt;br /&gt;
|Strength of explosion when tile is destroyed.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;56&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;56&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x38&lt;br /&gt;
|Smoke blockage. This is set to 0 for all UFO tiles!&lt;br /&gt;
Technically called &amp;quot;gasblock&amp;quot; by the game. Supposedly it would block the gas type from spreading. Not sure if this is intended to be just smoke, gas or a combination of the two. Needs testing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;57&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;57&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x39&lt;br /&gt;
|Fuel. The amount of turns this tile will burn for.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;58&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;58&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3A&lt;br /&gt;
|Brightness of tile. Amount of light produced.&lt;br /&gt;
&lt;br /&gt;
11 MCDs produce light: 7 alien base objects (several pulsing fuel pods and several 4-part round &amp;quot;museum containers&amp;quot;), 2 XCOM base ground tiles, and 2 city objects (street lamp and large standing room lamp). See [[Night_Missions#Artificial_Lighting|Night Missions]] for pictures. Oddly, values range from 1 for the street lamp to 16 for the alien base museum containers, so lower values must be brighter. The [[Night Missions|distances]] of projected light have yet to be determined, but note that flares and personal lighting ignore vertical distance... at night, a soldier can see aliens on the ground exactly 9 tiles away, regardless of whether the soldier is at ground level or 4 levels high.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In practise, it seems if this is not zero then the tile will be fully illuminated regardless of the value. - [[User:Bomb Bloke|Bomb Bloke]] 06:48, 20 June 2008 (PDT)&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;59&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;59&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3B&lt;br /&gt;
|Special properties of tile. Determines what is salvaged at end of mission. Note that some are not actually used within their respective games:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;b&amp;gt;UFO&amp;lt;/b&amp;gt;                        &amp;lt;b&amp;gt;TFTD&amp;lt;/b&amp;gt;                         &amp;lt;b&amp;gt;TFTD (per MapView)&amp;lt;/b&amp;gt;&lt;br /&gt;
  0: &#039;&#039;No Special Properties&#039;&#039;   0: &#039;&#039;No Special Properties&#039;&#039;     0: &#039;&#039;No Special Properties&#039;&#039;&lt;br /&gt;
  1: Entry Point             1: Entry Point               1: Entry Point&lt;br /&gt;
  2: [[UFO Power Source]]        2: [[Ion-Beam Accelerators]]     2: [[Ion-Beam Accelerators]]&lt;br /&gt;
  3: [[UFO Navigation]]          3: [[Magnetic Navigation]]       3: &amp;quot;Destroy Objective&amp;quot;&lt;br /&gt;
  4: [[UFO Construction]]        4: [[Alien Sub Construction]]    4: [[Magnetic Navigation]]&lt;br /&gt;
  5: [[Alien Food]]              5: [[Alien Cryogenics]]          5: [[Alien Cryogenics]]&lt;br /&gt;
  6: [[Alien Reproduction]]      6: [[Alien Cloning]]             6: [[Alien Cloning]]&lt;br /&gt;
  7: [[Alien Entertainment]]     7: [[Alien Learning Arrays]]     7: [[Alien Learning Arrays]]&lt;br /&gt;
  8: [[Alien Surgery]]           8: [[Alien Implanter]]           8: [[Alien Implanter]]&lt;br /&gt;
  9: [[Examination Room]]        9: [[Examination Room (TFTD)|Examination Room]]          9: &amp;quot;Unknown9&amp;quot;&lt;br /&gt;
 10: [[Alien Alloys]]           10: [[Aqua Plastics]]            10: [[Aqua Plastics]]&lt;br /&gt;
 11: [[Alien Habitat]]          11: [[Alien Re-animation Zone]]  11: [[Examination Room (TFTD)|Examination Room]]&lt;br /&gt;
 12: Dead Tile              12: Dead Tile                12: Dead Tile&lt;br /&gt;
 13: Exit Point             13: Exit Point               13: Exit Point&lt;br /&gt;
 14: Alien Brain            14: T&#039;leth Power Cylinders   14: T&#039;leth Power Cylinders&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The images in the TFTD in-game UFOpedia do NOT match the tile-types you&#039;ll recover from the battlescape. For example, the [[Dreadnought]] has tiles which match the UFOpedia entries for the [[Magnetic Navigation]] systems - but they&#039;re really [[Alien Sub Construction]] units, or so your USO recovery team will tell you! Daishiva&#039;s [[MapView]] presents tiles according to the UFOpedia, hence the additional column.&lt;br /&gt;
* The &amp;quot;entry points&amp;quot; are where your troopers spawn at the start of the map. If you wish to safely abort, your solders must return to those tiles first.&lt;br /&gt;
* The &amp;quot;exit points&amp;quot; are where soldiers must be if you wish to proceed to the next stage of a [[Two Part Missions|two-part mission]] without killing all aliens (by aborting instead).&lt;br /&gt;
* The Brain and Power Cylinder tiles must be destroyed in the final mission, in order to win &#039;&#039;UFO:EU&#039;&#039; and &#039;&#039;TFTD&#039;&#039; respectively.&lt;br /&gt;
* In &#039;&#039;UFO:EU&#039;&#039;, [[Alien Reproduction]] and [[Alien Habitat]] tiles never appear. [[Alien Reproduction]] tiles do have a UFOpedia entry that can be accessed by hacking those units into your stores, but [[Alien Habitat]] tiles do not.&lt;br /&gt;
* In &#039;&#039;TFTD&#039;&#039;, [[Examination Room (TFTD)|Examination Room]] tiles never appear. They do have a UFOpedia entry that can be accessed by hacking those units into your stores, however. [[Alien Re-animation Zone]] tiles can be found naturally, but have no research entry.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;60&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3C&lt;br /&gt;
|Set to 1 for [[Base_Defence#Destruction_Of_Base_Facilities|some]] X-COM base tiles, 0 otherwise. At the end of the battle, the game tallies up the amount of these existing within each &amp;quot;module&amp;quot; of the base (the results are stored in [[MISSION2.DAT]], offsets 80-151) - if the end result for any given module is 0, [[Base_Defence#Destruction_Of_Base_Facilities|it may be destroyed]].&lt;br /&gt;
&lt;br /&gt;
If an alien patrols to a route node which has [[ROUTES.DAT#21|offset [21]]] flagged as anything other then 0, it will intentionally shoot at any tiles with &#039;&#039;this&#039;&#039; offset likewise flagged. If you&#039;re playing a CE version of UFO/TFTD the game will then crash immediately afterwards... either way, best not to let them go up the stairs to where these objects can be found.  ;) &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;61&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;61&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3D&lt;br /&gt;
|Unused. Almost half (560 of 1317) MCD records have widely varying values here, from 1 to 255 with no apparent pattern or preferred value. The remaining MCD records are 0. Called &amp;quot;VPs&amp;quot; by the game, this was supposed to be a victory point value for recovery/destruction. It&#039;s not actually used.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==List of MCD Files==&lt;br /&gt;
Here are the MCD files in Enemy Unknown and Terror From The Deep along with a list of the number of records in each one. Refer to [[TERRAIN]] for more info on their usage in-game (load orders etc):&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;10&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table {{StdCenterTable}} class=&amp;quot;sortable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;&amp;lt;b&amp;gt;X-COM MCD Files&amp;lt;/b&amp;gt;&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr {{StdDescTable_Heading}}&amp;gt;&amp;lt;th width=&amp;quot;100&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;File&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Terrain&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Records&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;avenger&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Avenger&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;59&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;barn&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Farm&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;29&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;blanks&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;All&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;brain&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Alien Base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;4&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;cultivat&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Farm&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;37&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;desert&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Desert&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;66&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;forest&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Forest&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;83&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;frniture&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;City&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;26&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;jungle&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Jungle&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;82&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;lightnin&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Lightning&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;mars&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Cydonia&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;36&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;mount&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Mountain&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;78&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;plane&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Skyranger&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;65&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;polar&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Polar&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;81&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;roads&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;City&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;23&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;ufo1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Small Scout&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;urban&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;City&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;112&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;urbits&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;City&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;25&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;u_base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Alien Base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;67&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;u_bits&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;UFOs&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;u_disec2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;UFOs&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;17&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;u_ext02&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;UFOs&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;34&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;u_oper2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;UFOs&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;u_pods&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;UFO/Alien Base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;11&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;u_wall02&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;UFO/Alien Base/Cydonia&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;47&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;xbase1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;X-COM Base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;97&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;xbase2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;X-COM Base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;62&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;table {{StdCenterTable}} class=&amp;quot;sortable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;&amp;lt;b&amp;gt;TFTD MCD Files&amp;lt;/b&amp;gt;&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr {{StdDescTable_Heading}}&amp;gt;&amp;lt;th width=&amp;quot;100&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;File&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Terrain&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Records&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;asunk&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Sunken Galleon&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;atlantis&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Atlantis&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;77&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;barracud&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Barracuda&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;46&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;blanks&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;All&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;cargo1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Cargo Ship&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;103&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;cargo2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Cargo Ship&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;13&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;cargo3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Cargo Ship&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;6&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;coral&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Coral&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;28&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;crypt1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Crypt&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;45&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;crypt2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Crypt&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;49&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;crypt3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Crypt&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;12&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;crypt4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Crypt&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;7&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;debris&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Seabed&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;deckc&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Liner Ship (Top)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;18&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;entry&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Entry&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;12&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;grunge1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Artifact Site&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;38&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;grunge2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Artifact Site&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;grunge3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Artifact Site&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;grunge4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Artifact Site&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;37&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;hammer&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Hammerhead&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;44&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;island1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Island&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;island2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Island&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;island3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Island&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;35&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;leviath&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Leviathan&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;47&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;linera&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Liner Ship&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;99&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;linerb&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Liner Ship&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;24&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;linerc&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Liner Ship&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;40&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;linerd&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Liner Ship&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;23&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;manta&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Manta&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;44&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;msunk1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Sunken Ship&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;msunk2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Sunken Ship&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;29&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;mu&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Mu&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;80&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;organic1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Alien Base/Level/Entry&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;96&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;organic2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Alien Base/Level&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;organic3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Alien Base/Level&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;4&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;pipes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Pipes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;55&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;planes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Sunken Plane&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;79&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;port01&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Port&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;95&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;port02&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Port&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;78&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;psynom&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Alien Base/Level&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;pyramid&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Artifact&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;24&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;rocks&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Artifact/Seabed/Galleon&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;sand&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;several&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;sea&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;several&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;18&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;triton&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Triton&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;46&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;uext1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;?&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;4&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;uext2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;USO/Entry&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;uext3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;USO/Entry&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;25&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;ufobits&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;several&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;uint1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;USO&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;41&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;uint2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;USO&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;11&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;uint3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;USO&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;14&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;volc&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Volcanic&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;80&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;weeds&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Artifact/Coral/Seabed&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;xbases1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;X-COM Base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;87&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;xbases2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;X-COM Base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;xbases3&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;X-COM Base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;37&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;xbases4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;X-COM Base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;43&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;xbases5&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;X-COM Base&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;42&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;xbits&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Cargo Ship&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;39&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Information==&lt;br /&gt;
&lt;br /&gt;
===MikeTheRed&#039;s MCD Database===&lt;br /&gt;
An Access 2000 copy of all MCD data is [[Media:XcomMCD.zip|here]]. It&#039;s from X-COM DOS 1.4, but AFAIK, all X-COM versions use the same data (even down to the buggy [[Explosions#Mile-High_Madness|Mile-High Madness]] MCD record). You will need to use this wiki page to understand it; I did not name the fields. They&#039;re just called by their offset address (see above). This Access database can be readily exported to Excel if you want. Or contact me. There are also a few files giving overall stats; the &amp;quot;Exclude&amp;quot; field for tblFileTypes only means, I excluded them for most counts I&#039;ve made. There are also a few queries that might or might not be helpful.&lt;br /&gt;
&lt;br /&gt;
===BladeFireLight&#039;s MCD Info===&lt;br /&gt;
Another in-depth look at MCD (and more) can be found on [http://www.strategycore.co.uk/forums/lofiversion/index.php?t1468.html this] message by BladeFireLight. His post also contains a [http://www.HexWorkshop.com HexWorkshop] template for viewing MCD files in a logical manner.&lt;br /&gt;
&lt;br /&gt;
===MCD Editor===&lt;br /&gt;
Koralt&#039;s MCDEdit can view or modify MCD files. Find it here: [http://mypage.bluewin.ch/xcom/mcdedit.zip mcdedit.zip]. To see a screencap, scroll to the very bottom of BladeFireLight&#039;s MCD posting (above). MCDEdit needs [http://mypage.bluewin.ch/xcom/vbrun200.zip vbrun200] to run!&lt;br /&gt;
&lt;br /&gt;
There&#039;s also [[MCDEdit|MCDEdit made by volutar]]. It doesn&#039;t need of any extra library and works in windows x64.&lt;br /&gt;
&lt;br /&gt;
===MapView===&lt;br /&gt;
DaiShiva has an excellent utility called [http://www.daishiva.com/phpBB2/generic.php?page=progLinks.shtml MapView] for viewing or editing maps. However, it does not allow editing of MCD terrain items per se, AFAIK; just moving/placement of them. Caution: You must install the extensive Microsoft .NET platform to use MapView; see DaiShiva&#039;s site.&lt;br /&gt;
&lt;br /&gt;
===BombBloke&#039;s Hacked Desert Terrain===&lt;br /&gt;
[[User:Bomb Bloke|Bomb Bloke]] has a numerical (ground) tileset which makes weapon damage blast testing easy as pie. It also has a little applet that lets you edit MCD variables Armor [[#42|[42]]], HE Block [[#43|[43]]], and Explosion Strength [[#55|[55]]] (but not type, [[#55|[54]]]), and it includes all four types of terrain item. Find his hacked terrain &lt;br /&gt;
[http://www.strategycore.co.uk/forums/index.php?showtopic=746&amp;amp;st=195&amp;amp;# here] or bundled with a savegame [http://www.xcomufo.com/forums/index.php?showtopic=8701&amp;amp;st=114&amp;amp;# here]. To see a screencap of the tiles in action, see [http://www.xcomufo.com/forums/index.php?showtopic=8701&amp;amp;st=112&amp;amp;# this] message.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Files]]&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=SMOKREF.DAT&amp;diff=65943</id>
		<title>SMOKREF.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=SMOKREF.DAT&amp;diff=65943"/>
		<updated>2015-06-21T16:00:24Z</updated>

		<summary type="html">&lt;p&gt;Volutar: Field 8 is never &amp;quot;4&amp;quot;. if (animation_frame&amp;gt;3) animation_frame-=4;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;SMOKEREF.DAT&#039;&#039;&#039; contains 400 records of 9 values of one byte each for a total of 3600 bytes.&lt;br /&gt;
&lt;br /&gt;
There are a total of 12 sprites available for displaying smoke. Any given patch will animate through 4 consecutive sprites. The first sprite is (int)(smokeref[3] / 6 + 8) in [[SMOKE.PCK]].&lt;br /&gt;
&lt;br /&gt;
That is to say, if the smoke is due to last for less then six turns, smoke sprites 0 to 3 will be used. If the smoke is due to last less the twelve but more then five turns, sprites 1 to 4 will be used, and so forth. &lt;br /&gt;
&lt;br /&gt;
This allows for nine different densities of &#039;&#039;displayable&#039;&#039; smoke. If the smoke is due to last fifty four or more turns, however, then [[rank]] badges will be included in the smoke animation. Values higher still will include bullet animations.&lt;br /&gt;
&lt;br /&gt;
Smoke hinders vision according to a similar formula - (int)(smokeref[3] / 3). That is to say, take a cloud&#039;s &amp;quot;time to live&amp;quot;, divide that by three and round the result down: This tells you how many tiles it chops off your effective range. &lt;br /&gt;
&lt;br /&gt;
For example, say there are ten clouds with a TTL of 1 directly between you and your target. In this scenario, they won&#039;t affect your vision at all (1/3 rounded down = 0). But if they each have a TTL of 8, they&#039;ll each require you to move closer by two tiles (8/3 rounded down = 2) - removing 20 tiles from your visibility range!&lt;br /&gt;
&lt;br /&gt;
Because the formula for what you see on the screen doesn&#039;t match the formula for how smoke obscures vision, it&#039;s impossible to tell a cloud&#039;s effect just by looking at it. For example, a cloud with a TTL of 7 will look the same as a cloud with a TTL of 10 - But the first cloud will only remove two tiles from your vision, whereas the second removes three.&lt;br /&gt;
&lt;br /&gt;
Smoke clouds will drift around the battlescape and merge with others (effectively making them denser), though the rules for how are currently unknown. Summed up simply this means that smoke grenades are most likely more effective a few turns after they actually go off.&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
* &#039;&#039;&#039;0:&#039;&#039;&#039; Y position of smoke/fire.&lt;br /&gt;
* &#039;&#039;&#039;1:&#039;&#039;&#039; X position of smoke/fire.&lt;br /&gt;
* &#039;&#039;&#039;2:&#039;&#039;&#039; Z position of smoke/fire.&lt;br /&gt;
* &#039;&#039;&#039;3:&#039;&#039;&#039; Time smoke will last (also used as density). AKA &amp;quot;Intensity&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;4:&#039;&#039;&#039; Time fire will last. AKA &amp;quot;Age&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;5:&#039;&#039;&#039; Number of smoke patches overlapped (used only in runtime). Called &amp;quot;justspread&amp;quot;; 0=hasn&#039;t spread recently otherwise intensity of new spread.&lt;br /&gt;
* &#039;&#039;&#039;6:&#039;&#039;&#039; Fire or smoke? &lt;br /&gt;
** 0 Empty&lt;br /&gt;
** 1 Fire&lt;br /&gt;
** 2 Smoke&lt;br /&gt;
** 3-6 Gas (probably unused)&lt;br /&gt;
* &#039;&#039;&#039;7:&#039;&#039;&#039; Visibility flag. Note that smoke still won&#039;t be rendered unless the tile it&#039;s in is also visible.&lt;br /&gt;
* &#039;&#039;&#039;8:&#039;&#039;&#039; Animation frame offset. Set at random, to break tile pattern in cloud of smoke. Ranges from 0 to 3.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
* [[Saved_Game_Files#Battlescape_Files|Battlescape Files]]&lt;br /&gt;
* [[Smoke and Fire]]&lt;br /&gt;
* [[Smoke Grenade]]&lt;br /&gt;
* [[SMOKBIT.DAT]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Files]]&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=65942</id>
		<title>UNITREF.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=UNITREF.DAT&amp;diff=65942"/>
		<updated>2015-06-21T15:52:39Z</updated>

		<summary type="html">&lt;p&gt;Volutar: clarification on 0x24&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [[Saved Game Files|save game file]] that has a record size of 124 bytes for UFO, or 132 for TFTD. Values are unsigned unless otherwise stated. Some bytes represent bitfields. There are 80 records (not all of them necessarily used) for a fixed file size of 9,920 bytes (or 10,560 for TFTD). It goes hand in hand with [[UNITPOS.DAT]].&lt;br /&gt;
&lt;br /&gt;
Comes in three flavours:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Initially created by the GeoScape engine before tactical battles. Stored in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder and contains info on all units that will be present in the coming mission (in an alive state - the deaths of aliens killed by exploding UFO power units isn&#039;t determined until [[Battlescape_Map_Generation#KABOOM.21.21|later]]). Unlike the other two versions, this only contains the bare minimum number of records required to store the units it details.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNITREF.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Created along with a [[Saved_Game_Files#Battlescape_Files|battlescape save]], contains the mid-mission state of the unit table.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;UNIREF2.DAT&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Appears in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder at the end of combat. Used to determine which troopers/tanks survived, statistic gains via [[experience]], and which aliens need to be hauled off to the [[Alien Containment]] unit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values are presented according to byte offset ([[#0|0]] to [[#123|123]] (or [[#131|131]] for TFTD)) followed by the equivalent hex offset ([[#0x00|0x00]] to [[#0x7B|0x7B]] (or [[#0x83|0x83]] for TFTD)). Notes apply to both UFO and TFTD unless otherwise stated. Let us know what else you can find - refer to the [[#Notes|bottom of the page]] for those values that&#039;re unknown, or to the [[Talk:UNITREF.DAT|talk page]] for further ideas as to what they could be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Decimal)&lt;br /&gt;
!Offset&amp;lt;br&amp;gt;(Hex)&lt;br /&gt;
!Usage&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x00&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x00&lt;br /&gt;
|Type of unit. Unit scream and movement sound effects are based on this and gender. Gender and flying abilities affect the sprites as well. Not turrets. Specifically: [[#53|[53]]] &amp;amp; [[#54|[54]]] (weapons in hands), [[#115|[115]]] (gender) and [[#120|[120]]] (other flags) affect the final screen image. If the unit is a large unit, this will also determine the appearance of the last three quarters of the unit. This does NOT affect: the flying ability of the unit, the soldier image in the inventory screen, or the special abilities for certain aliens.&lt;br /&gt;
      &amp;lt;b&amp;gt;UFO&amp;lt;/b&amp;gt;                                        &amp;lt;b&amp;gt;TFTD&amp;lt;/b&amp;gt;&lt;br /&gt;
   0: Male/female unarmored X-COM soldier     0: Male/female unarmored X-COM diver   &lt;br /&gt;
   1: Male/female personal armor soldier      1: Male/female plastic armor diver&lt;br /&gt;
   2: Power/flying suit soldier               2: Power/flying suit diver&lt;br /&gt;
   3: Tank                                    3: Tank&lt;br /&gt;
   4: Sectoid                                 4: Aquatoid&lt;br /&gt;
   5: Snakeman                                5: Gillman&lt;br /&gt;
   6: Ethereal                                6: Lobster Man&lt;br /&gt;
   7: Muton                                   7: Tasoth&lt;br /&gt;
   8: Floater                                 8: Calcinite&lt;br /&gt;
   9: Celatid                                 9: Deep One&lt;br /&gt;
  10: Silacoid                               0A: BioDrone&lt;br /&gt;
  11: Chryssalid                             0B: Tentaculat&lt;br /&gt;
  12: Reaper                                 0C: Triscene&lt;br /&gt;
  13: Sectopod                               0D: Hallucinoid&lt;br /&gt;
  14: Cyberdisc                              0E: Xarquid&lt;br /&gt;
  15: Male civilian                          0F: Male civilians&lt;br /&gt;
  16: Female civilian                        10: Female civilians&lt;br /&gt;
  17: Zombie                                 11: Zombie&lt;br /&gt;
 255: Unused                                255: Unused&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;If the corresponding [[UNITPOS.DAT]] record is unused, then the record is unused.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;1&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x01&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x01&lt;br /&gt;
|Inventory paper doll image. File &amp;quot;UFOGRAPH\MAN_&amp;quot;+(char)(value + 48)+&amp;quot;.SPK&amp;quot; will be used as the inventory sprite, unless the value is 0 or 1. In those cases, [[#115|[115]]] and [[#116|[116]]] are used to determine the picture.&lt;br /&gt;
 0: No armor.&lt;br /&gt;
 1: Personal armour.&lt;br /&gt;
 2: Power suit.&lt;br /&gt;
 3: Flying suit.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;2-5&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;2-5&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x02-0x05&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x02-0x05&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|PCK set]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;6-9&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;6-9&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x06-0x09&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x06-0x09&lt;br /&gt;
|Four byte value pointing to RAM location of the [[Image_Formats#PCK|TAB index for the PCK data]] used by the unit. Re-determined when the save game is loaded.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;10&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0A&lt;br /&gt;
|Unit facing. Does NOT control HWP turret direction; see [[#24|[24]]].&lt;br /&gt;
   0: North     (up right)&lt;br /&gt;
   1: Northeast (right)&lt;br /&gt;
   2: East      (down right)&lt;br /&gt;
   3: Southeast (down)&lt;br /&gt;
   4: South     (down left)&lt;br /&gt;
   5: Southwest (left)&lt;br /&gt;
   6: West      (up left)&lt;br /&gt;
   7: Northwest (up)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;11&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0B&lt;br /&gt;
|Movement type. When entering a given map location, each tile is checked to see the TU requirements accordingly. [[MCD]][39+[[#11|UnitRef[11]]]] is the offset used. Note: By default, this is 0 for ALL unit types.&lt;br /&gt;
   0: Walking&lt;br /&gt;
   1: Sliding&lt;br /&gt;
   2: Flying&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;12&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0C&lt;br /&gt;
|Current TUs.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;13&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0D&lt;br /&gt;
|Current Health. Health of 0 = Dead. Compare [[#42|[42]]], [[#120|[120]]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For my [[Talk:Bravery|Bravery experience point testing]], I killed 15 of 16 aliens by setting this to zero, and my soldiers to 0 Morale. When I loaded the savegame, the aliens were still &amp;quot;alive&amp;quot; (i.e., up), then all died when I ended this turn. So death is probably only checked when injury happens, and at end of turn... to truly kill them dead on the ground through savegame editing must take more. And arg - when they all died, my soldiers all went to 100 Morale! So I edited them back to 0 Morale. But guess what... then all the aliens died &#039;&#039;&#039;again&#039;&#039;&#039; at the end of &#039;&#039;&#039;next&#039;&#039;&#039; turn, even though they were all on the ground (I heard screams, and all soldiers&#039; Morale went to 100 again). What the heck? The aliens stayed down after that, though. --[[User:MikeTheRed|MikeTheRed]] 16:01, 3 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Update: [[UNITPOS.DAT]] offset 10 bit 2 should be used to kill a unit entirely dead. Thanks, NKF &amp;amp; BB - MTR&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;While the game kills characters when Health&amp;lt;=Fatal Wounds (__ dies message), XComUtil will recover them based if their health is greater than 0.  Haven&#039;t tested an unmodified game.  --[[User:Zaimoni|Zaimoni]] 11:52, 14 April 2007 (CDT)&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;14&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0E&lt;br /&gt;
|Current Stun level &#039;&#039;how much falloff of paralysis every turn? What determines it?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;15&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x0F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x0F&lt;br /&gt;
|Current Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;16&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x10&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x10&lt;br /&gt;
|Current Reactions  &#039;&#039;NKF: affected by health percentage&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;17&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x11&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x11&lt;br /&gt;
|Strength&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;18&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x12&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x12&lt;br /&gt;
|Current Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;19&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x13&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x13&lt;br /&gt;
|Current Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;20&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x14&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x14&lt;br /&gt;
|Current Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;21&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x15&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x15&lt;br /&gt;
|Current Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;22&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x16&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x16&lt;br /&gt;
|Current Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;quot;Base&amp;quot; means the original (total) value (as carried forward from geoscape) - Also see Note 1 re: Base soldier stat values.&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;23&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x17&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x17&lt;br /&gt;
|Base Firing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;24&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x18&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x18&lt;br /&gt;
|Base Throwing accuracy. Current value = this * [[#13|[13]]]/[[#26|[26]]] (percent health)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Tanks (turreted units?) always have 0 throwing accuracy. They use this for turret facing, relative to unit facing. 0 means it&#039;s facing forwards. Additional values are clockwise increments; see [[#10|[10]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;25&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x19&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x19&lt;br /&gt;
|Base TUs&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;26&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1A&lt;br /&gt;
|Base Health&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;27&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1B&lt;br /&gt;
|Base Energy&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;28&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1C&lt;br /&gt;
|Base Reactions&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;These Base Armour values are used to show the starting armor value in the Attributes screen (so you can readily see if it&#039;s been damaged&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;29&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1D&lt;br /&gt;
|Base Front Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;30&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1E&lt;br /&gt;
|Base Left Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;31&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x1F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x1F&lt;br /&gt;
|Base Right Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;32&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x20&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x20&lt;br /&gt;
|Base Rear Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;33&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x21&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x21&lt;br /&gt;
|Base Under Armour&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;34&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x22&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x22&lt;br /&gt;
|Supposedly this was going to be Health Recharge which would function like the Energy Recharge. Always 0 and ignored by game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;35&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x23&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x23&lt;br /&gt;
|Energy to recharge each turn. Equals &#039;&#039;&#039;recruit initial&#039;&#039;&#039; TUs/3 ([[SOLDIER.DAT]][43], &#039;&#039;&#039;not&#039;&#039;&#039; total base TUs). This is a signed byte. See [[Time Units]] and [[Energy#Usage|Energy Usage]]; also see [[#45|[45]]] (energy usage when walking/turning). &#039;&#039;BombBloke: Is this affected by damage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;36&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x24&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x24&lt;br /&gt;
|Supposedly this was going to be Armor Recharge which would function like the Energy Recharge. Always 0 and probably unused, but needs testing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;37&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x25&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x25&lt;br /&gt;
|Psi skill. Psi stats not displayed/usable until this is greater then 0.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;38&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x26&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x26&lt;br /&gt;
|Item to create when unit is unconscious/dead (index into obdata.dat).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;NKF:&amp;lt;/i&amp;gt; If you set this value to that of a usable item, the item that is created in place of the unconscious or dead soldier can be used like the ordinary item. Elerium pods, for example, can be recovered for 50 elerium each after the battle. Weapons can be used as you normally use them, etc.&lt;br /&gt;
&lt;br /&gt;
For unconscious &#039;units&#039;, the item will be treated as the unconscious body - it will retain the name of the unconscious unit when looked at via the inventory screen. Picking up and using the &#039;item&#039; will work, but when the unit wakes up, the &#039;item&#039; image in the soldier&#039;s hands is not cleared, even though the item no longer &#039;exists&#039; in the soldier&#039;s hands. Using this &#039;item&#039; will just crash the battlescape.&lt;br /&gt;
&lt;br /&gt;
Actually, I do not even want to think about what would happen if you &#039;prime&#039; a grenade/stunned body.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;39&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x27&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x27&lt;br /&gt;
|&amp;quot;Soldier value&amp;quot; a.k.a. victory points. You gain (or lose, as the case may be) score at the end of combat according to this value when the unit dies.&lt;br /&gt;
*For X-COM units: A soldier with 42 will be worth -42 points if killed. Note this doesn&#039;t seem to apply if the soldier is killed when unconscious. The soldier just vanishes.&lt;br /&gt;
*For aliens: A commander with 35 will give you +35 points if killed.&lt;br /&gt;
*This value is the same as [[SOLDIER.DAT]] bytes 15-16 (a Word) and equals: &lt;br /&gt;
    20 + Missions + Rank Bonus&lt;br /&gt;
    &lt;br /&gt;
    with [[Rank]] Bonus as follows: SGT +1, CPT +3, COL +6, CDR +10&lt;br /&gt;
Note that although this equation holds true, the value is not actually computed per se. Instead, 1 is added directly to it each mission, as is a rank-bonus delta if you advance (e.g. COL to CDR, delta +4). In other words, hacking the Missions or Rank fields does not affect this value.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;40&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x28&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x28&lt;br /&gt;
|Index into [[SOLDIER.DAT]], so game knows what to update. 255 = does not belong to anyone (i.e., it&#039;s not a soldier). &#039;&#039;NKF: This byte is critical for player controlled units. If this doesn&#039;t refer to anything, the unit ceases to exist at the end of the game. If it points to a valid soldier entry in soldier.dat, the soldier.dat entry will be updated.&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;41&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x29&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x29&lt;br /&gt;
|Animation frame counter for the unit. Used by eg [[Celatid]]s and [[Silacoid]]s. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;42&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2A&lt;br /&gt;
|Rank. Affects morale loss and interface icon (hull for tanks). Only X-COM troopers display rank icons.&lt;br /&gt;
    &amp;lt;u&amp;gt;X-COM&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Rookie   &#039;&#039;Civvies are 0 too&#039;&#039;&lt;br /&gt;
      1: Squaddie&lt;br /&gt;
      2: Sergeant&lt;br /&gt;
      3: Captain&lt;br /&gt;
      4: Colonel&lt;br /&gt;
      5: Commander&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Aliens&amp;lt;/u&amp;gt;&lt;br /&gt;
      1: Commander&lt;br /&gt;
      2: Leader&lt;br /&gt;
      3: Engineer&lt;br /&gt;
      4: Medic&lt;br /&gt;
      5: Navigator&lt;br /&gt;
      6: Soldier&lt;br /&gt;
      7: Terrorist&lt;br /&gt;
    255: Dead/unused&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;u&amp;gt;Hull shape for X-COM tanks:&amp;lt;/u&amp;gt;&lt;br /&gt;
      0: Treaded&lt;br /&gt;
      1: Hover&lt;br /&gt;
&#039;&#039;I don&#039;t see 255 set for three dead mutons in a current game... [[#13|[13]]] (Health=0) seems to be the only reliable death indicator for them. Compare [[#120|[120]]]. -[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;43&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2B&lt;br /&gt;
|0 or 1. &#039;&#039;When alien units are generated for a battle, there is a random chance for this byte to be set. That unit is a &amp;quot;scout&amp;quot; and can be assigned to one of the neutral spawn points on the map without the need to fill up all the alien exclusive points first.-[[User:Morgan525|Tycho]] ([[User talk:Morgan525|talk]])&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;44&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2C&lt;br /&gt;
|Alien aggression. The higher it is, the less likely an alien will take cover. Maximum of 2. 0=Cautious,1=Normal,2=Aggressive  &#039;&#039;MTR: This is true for aliens in Hobbes game, but soldiers have values from 4 to 254. Garbage? Delete this comment if so.&#039;&#039; This determines the amount of the unit&#039;s TUs that are devoted to shooting: 0=50%,1=60%,2=66%.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;45&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2D&lt;br /&gt;
|Used to calculate energy loss when walking or turning as: INT( TUs / 2&amp;lt;sup&amp;gt;[45]&amp;lt;/sup&amp;gt; ). See [[Energy#Usage]]; compare [[#35|[35]]] (energy recharge per turn). Set this byte to 4 to ensure no energy use whatsoever (maximum map [[Time Units#Time_Unit_Walking_Usage_Tables|tile TU cost]] is 12). &#039;&#039;In Hobbes game, many aliens are 0 and all soldiers are 1, but a dozen aliens have higher values ranging all the way up to 112! Garbage and/or the game doesn&#039;t care if they are garbage?&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;46&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2E&lt;br /&gt;
|HWP turret image. Only used (and only appears) if unit type [[#0|[0]]]=3 (X-COM tanks):&lt;br /&gt;
    0: Cannon&lt;br /&gt;
    1: Rocket&lt;br /&gt;
    2: Laser&lt;br /&gt;
    3: Plasma&lt;br /&gt;
    4: Blaster&lt;br /&gt;
    5,6: ? Blanks&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For non-tanks, this controls the inventory layout. &#039;&#039;Only&#039;&#039; 0 and 1 are valid. 0 is the standard layout seen on all soldiers. 1 is an alternate layout that may have been intended for custom tank equipment. Larger values only crash the game due to missing files. Also see [[#113|[113]]] and [[#117|[117]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;47&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x2F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x2F&lt;br /&gt;
|This is a direct copy of offset[48] from the [[MCD]] record of the tile the unit is standing on. A signed byte.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;48&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x30&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x30&lt;br /&gt;
|Values for this byte always equal [[#52|[52]]] and are:&lt;br /&gt;
   2  (3x3 square; legacy 5 pixels):  Sectoid&lt;br /&gt;
   3  (5x5 square, corners removed; legacy 7 pixels):  Celatid, Chryssalid, Civvie,&lt;br /&gt;
      Ethereal, Floater, Muton, Snake, &#039;&#039;&#039;Soldier&#039;&#039;&#039;&lt;br /&gt;
   4  (7x7 octagon; legacy 9 pixels):  Cyberdisc, Hovertank, Reaper, Sectopod, Tank&lt;br /&gt;
   5 (9x9 square, Ls with 3-pixel legs removed; legacy 11 pixels):  Silacoid&lt;br /&gt;
Based on copious research by [[User:Bomb_Bloke|Bomb_Bloke]], [[User:Seb76|Seb76]], [[user:Zombie|Zombie]], and others, this has been found to be a LOF Template look-up for the shape of targets; Loftemps 2 to 5 define the &amp;quot;3D&amp;quot; shape of units relative to Line Of Fire as a cylinder, where 2 (Sectoid) is a thin cylinder and 5 (Silacoid) is very wide. The pixel width of each &amp;quot;silhoutte&amp;quot; that [[LOFTEMPS.DAT]] corresponds to has been added to the list above (see LOFTemps images 2-5). Tiles are 16 pixels wide in the X or Y direction (that&#039;s what this byte is about), and 24 pixels high (compare [[#49|[49]]]).&lt;br /&gt;
&lt;br /&gt;
This cylindrical shape is used in conjunction with height [[#49|[49]]] to define the silhouette that targets present to a shooter. Combine the pixel-width cross-section from Loftemps with height to find the cross-sectional area presented to shooters (sorted on increasing cross-section):&lt;br /&gt;
&lt;br /&gt;
                     LOF     LOF             Cross    Percent&lt;br /&gt;
                    Lookup  Width   Height  Section   of 384    Float   4x?&lt;br /&gt;
 Type               &#039;&#039;UR[48]  Pixels  UR[[#49|[49]]] Pxls X Ht  (16x24)   UR[[#51|[51]]]&#039;&#039;&lt;br /&gt;
 ----               ------  ------  ------ ---------  -------   ------  ---&lt;br /&gt;
 Sectoid               2       5      16       80      20.8%       -     -&lt;br /&gt;
 Celatid               3       7      12       84      21.9%       6     -&lt;br /&gt;
 Soldier (Kneeling)    3       7      14       98      25.5%       -     -&lt;br /&gt;
 Hovertank             4       9      12      108      28.1%       6    Yes&lt;br /&gt;
 Silacoid              5      11      10      110      28.6%       -     -&lt;br /&gt;
 Snakeman              3       7      18      126      32.8%       -     -&lt;br /&gt;
 Zombie                3       7      18      126      32.8%       -     -&lt;br /&gt;
 Ethereal              3       7      20      140      36.5%       -     -&lt;br /&gt;
 Cyberdisc             4       9      15      135      35.2%       2    Yes&lt;br /&gt;
 Chryssalid            3       7      21      147      38.3%       -     -&lt;br /&gt;
 Civilian              3       7      21      147      38.3%       2     -&lt;br /&gt;
 Floater               3       7      21      147      38.3%       2     -&lt;br /&gt;
 Muton                 3       7      21      147      38.3%       -     -&lt;br /&gt;
 Tank                  4       9      16      144      37.5%       -    Yes&lt;br /&gt;
 Soldier               3       7      22      154      40.1%       -     -&lt;br /&gt;
 Reaper                4       9      23      207      53.9%       -    Yes&lt;br /&gt;
 Sectopod              4       9      23      207      53.9%       -    Yes&lt;br /&gt;
Units take up an amount of the whole tile (as seen in cross-section by a shooter) as shown in the &amp;quot;Percent of 384&amp;quot; column. In reality, though, the [[Firing Accuracy|accuracy]] of shots makes this a more complex topic than the percents suggest. Also, dividing by 384 is an oversimplification, since it implies a directly rectangular shot (shooting right down the X or Y axis). While it&#039;s useful to see, keep in mind that this column only shows relative numbers.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;[[User:Zaimoni|Zaimoni]]: actual cross section depends on shot facing.  The table is close to correct for pure diagonal shots, so leaving alone for now.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The unit Float number ([[#51|[51]]], below) is shown simply for convenience. It does not enter into the cross-sectional computations. &amp;quot;4x&amp;quot; units actually consist of four units grouped in tight 2x2 formation (making their cross section effectively much larger then the percentage stated).&lt;br /&gt;
&lt;br /&gt;
Note that causing an X-Com soldier to kneel causes their cross section to fall by 36.36~% of that of when they are standing.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;49&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x31&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x31&lt;br /&gt;
|[[height|Standing height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;50&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x32&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x32&lt;br /&gt;
|[[height|Kneeling height]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;51&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x33&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x33&lt;br /&gt;
|Floating [[height]]. A unit &#039;floats&#039; this high above the ground, thus allowing shots to fly underneath. The highest point of a unit can be found by adding this to the units height stat. &amp;lt;i&amp;gt;Does this have an effect on explosive damage?&amp;lt;/i&amp;gt;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;52&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x34&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x34&lt;br /&gt;
|&amp;quot;Radius&amp;quot; of LOF Template. Always the same as [[#48|[48]]] in all known saved games. More info can be found at [[Talk:UNITREF.DAT#Offsets_0x30_.26_0x34|Talk:UNITREF.DAT#Offsets_0x30_&amp;amp;_0x34]] ([48] and [52]).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;53&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x35&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x35&lt;br /&gt;
|Image index for item in left hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;54&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x36&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x36&lt;br /&gt;
|Image index for item in right hand. 255 for none. Indexes into [[OBDATA.DAT]], not [[OBPOS.DAT]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&#039;&#039;NKF:&#039;&#039; If there is no item in the unit&#039;s hands, but one of the above two bytes are set, the &#039;image&#039; that represents the item will still be displayed in the battlescape. If these phantom items are clicked on, the game crashes. If the image is not the right type for the real item in hand, the ammo count doesn&#039;t get displayed. Otherwise, it&#039;ll work as normal.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;55&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x37&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x37&lt;br /&gt;
|[[Damage#Susceptible_to...|Damage Modifier]] Category&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed in the executable. A value of 1 indicates the first DM category, a value of 4 indicates the 4th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but I think there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Value&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
    &#039;&#039;&#039;0&#039;&#039;&#039;      Terrain and Items&lt;br /&gt;
    &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
    &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
    &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
    &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
    &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
    &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
    &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
    &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
    &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
   &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
   &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
   &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
   &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;56&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;56&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x38&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x38&lt;br /&gt;
|[[Melee Accuracy]] ([[SOLDIER.DAT]] bytes 50 (initial) &amp;amp; 60 (increase) added together)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;57&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;57&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x39&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x39&lt;br /&gt;
|[[Psionic Strength]]&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;58&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;58&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3A&lt;br /&gt;
|Current [[Morale]]. Base morale is hardcoded to 100.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;59&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;59&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3B&lt;br /&gt;
|[[Bravery]] = 110 - (10 * &#039;&#039;this value&#039;&#039;)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;60&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3C&lt;br /&gt;
|Panic mode. This takes effect at the start of the unit&#039;s next turn. Since it is cleared at that point, you&#039;ll never see it at anything other then 0 in the save files. You can manually change it to other values to force a specific panic attack on the next turn.&lt;br /&gt;
   0: None&lt;br /&gt;
   1: Freeze&lt;br /&gt;
   2: Running&lt;br /&gt;
   3: Berserk&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;61&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;61&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3D&lt;br /&gt;
|[[#62|[62]]] will increment by this amount whenever the unit moves.&lt;br /&gt;
   3: Sectiod                                    &#039;&#039;- Hobbes&#039;&#039;&lt;br /&gt;
   4: Soldiers, civs, and all other aliens (but Hobbes had no Large aliens)&lt;br /&gt;
  30: Tank/Laser&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;62&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;62&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3E&lt;br /&gt;
|Visibility via motion scanner. The bigger it is, the bigger the blip. Test this one out for values.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;63&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;63&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x3F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x3F&lt;br /&gt;
|Number of [[Fatal Wounds]] to head.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;64&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;64&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x40&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x40&lt;br /&gt;
|Number of fatal wounds to torso.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;65&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;65&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x41&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x41&lt;br /&gt;
|Number of fatal wounds to right arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;66&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;66&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x42&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x42&lt;br /&gt;
|Number of fatal wounds to left arm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;67&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;67&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x43&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x43&lt;br /&gt;
|Number of fatal wounds to right leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;68&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;68&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x44&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x44&lt;br /&gt;
|Number of fatal wounds to left leg.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;69-70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;69-70&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x45-0x46&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x45-0x46&lt;br /&gt;
|Indexes into [[ROUTES.DAT]]. To start with, aliens will be located at the same position as the node indicated by byte 69.&lt;br /&gt;
:For patrol AI (no X-COM units sighted in turn 1, either X-COM or alien):&lt;br /&gt;
::Byte 69 is the index of the node of the start of the planned move.&lt;br /&gt;
::Byte 70 is the index of the node of the end of the planned move.&lt;br /&gt;
:Note that the move may be multi-turn, and byte 69 is not guaranteed to update during a multi-turn move.  I think it will if the alien ends its move on a node, however. -- Zaimoni&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;71&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x47&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x47&lt;br /&gt;
|Unit lighting: always 16 for XCom units, 0 for most aliens but 1 for cyberdisc. If greater than 1, it is set to 1 when unit inactive - see the [[Talk:UNITREF.DAT#Offset_0x47|Talk]] page.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;72&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x48&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x48&lt;br /&gt;
|The amount of [[Morale]] that has been restored using the [[Medi-Kit (EU)|Medkit&#039;s]] painkillers. The amount that &#039;&#039;can&#039;&#039; be restored is equal to the maximum health of the unit (index 26) minus their current health (index 13) further minus this.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;73&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x49&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x49&lt;br /&gt;
|Intelligence. Rated from 2 - 8. Indicates for how many turns the alien will know the location of spotted soldiers. &#039;&#039;Hey - why do humans have zero intelligence? :(&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;74&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4A&lt;br /&gt;
|AI Mode. Zaimoni found [http://www.strategycore.co.uk/forums/UFO-AI-patch-t8908.html&amp;amp;st=20&amp;amp;start=20 Here] that the values are 0:PATROL, 1:SNIPER, 2:ATTACKING, 3:ESCAPING, 4:GUARD, 5:Returning to UFO. 255 (-1) is also possible. Zaimoni tripped this by wounding a Floater in SNIPER mode; it returned fire, then was taken down by another soldier. Snap guess is that this is a &amp;quot;recalculate&amp;quot; marker.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;75&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4B&lt;br /&gt;
|Always 0?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;76-77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;76-77&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4C-0x4D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4C-0x4D&lt;br /&gt;
|Mission count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]  &#039;&#039;MTR: Wonder why they bothered to put this in Unitref since this will never change &#039;&#039;&#039;during&#039;&#039;&#039; a mission; compare how soldier stats are actually read from SOLDIER (not UNITREF) on return to geoscape. Is Missions shown anywhere on the combatscape?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;78-79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;78-79&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x4E-0x4F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x4E-0x4F&lt;br /&gt;
|Kill count. Signed integer (low byte, high byte) also found in [[SOLDIER.DAT]]. Number of kills this unit has made for ALL missions, not just this one. This one &#039;&#039;&#039;can&#039;&#039;&#039; vary &amp;quot;unpredictably&amp;quot; and thus is the only byte known to directly carry forward into the geoscape / Soldier.Dat!&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;80&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;80&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x50&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x50&lt;br /&gt;
|[[Reactions]] experience counter, for number of reaction shots. It doesn&#039;t matter if they hit the target; reactions still count. &amp;lt;b&amp;gt;See Note 2 re: Experience counters.&amp;lt;/b&amp;gt; (Also note: Aliens do not use experience counters.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NKF:&#039;&#039; Where does death by fire (overexposure rather than incendiary shell impact) fit into the experience counters? It becomes a non-assigned kill, I guess, like death by wounds, or death by a grenade that hasn&#039;t got an owner?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;81&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x51&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x51&lt;br /&gt;
|[[Firing Accuracy]] experience counter, for number of hits on an enemy (lethal or not, grenades or bullets). Each Autoshot hit counts as 1, so you can get 3 hits from one Autoshot burst. Likewise, grenades and blaster bombs can hit multiple targets with one explosion. Also, if you miss the intended target but hit a different alien, it still counts. Finally, if your shot actually has zero [[Damage]], it does still count as a hit. (Not due to armor blockage; a pure roll of 0 coming out of the gun.) &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;82&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;82&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x52&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x52&lt;br /&gt;
|[[Melee Accuracy]] experience counter, for number of times stun rod has been used (not stun bombs).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;83&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x53&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x53&lt;br /&gt;
|[[Throwing Accuracy]] experience counter, for number of times unit has thrown any object.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;84&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;84&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x54&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x54&lt;br /&gt;
|&amp;lt;div id=&amp;quot;Psi_Skill_Experience_Counter&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;[[Psionic Skill]] experience counter, for number of psi attacks performed. 1 is added if attempt was unsuccessful, 3 if it was successful. Note: if this value goes over 255, all psi experience is lost. That&#039;s 85 successful psis (255/3). So be careful of marathon psi&#039;ing (a minimum of 43 turns at 2 psis/turn, 29 turns at 3/turn).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;85&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;85&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x55&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x55&lt;br /&gt;
|[[Bravery]] experience counter, for number of times unit has &#039;&#039;resisted&#039;&#039; panicking, despite Morale &amp;lt; 50.  Being mind-controlled, panicking, or going berserk does &#039;&#039;not&#039;&#039; increase this stat -- although Panic Unit attacks will reduce Morale to the point where panic checks will be performed by the game.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;86-110&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;86-110&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x56-0x6E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x56-0x6E&lt;br /&gt;
|Unit&#039;s &amp;lt;b&amp;gt;Name&amp;lt;/b&amp;gt;. Standard string ended by null byte. The rest can hold garbage.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;111&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;111&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x6F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x6F&lt;br /&gt;
|Called &amp;quot;BigFire&amp;quot;. If true (value of 1) then the unit is currently firing a weapon. It reverts back to 0 afterwards - determines whether to render the gun and firing arm in the &amp;quot;pointing weapon&amp;quot; position, or whether the weapon is being held against the chest. If manually set to a value above 0, the unit will hold its weapon out until such time as it actually uses it.&lt;br /&gt;
&lt;br /&gt;
Note that this value is only used by units holding two-handed weapons. A unit holding for eg a pistol will &#039;&#039;always&#039;&#039; point the weapon, and uses a different arm sprite for the purposes of doing so (regardless of whether or not the weapon is being fired).&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;112&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;112&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x70&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x70&lt;br /&gt;
|Called &amp;quot;Finished&amp;quot;. If true (value of 1) signifies that the unit finished AI actions for current turn.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;113&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;113&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x71&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x71&lt;br /&gt;
|If 1, then you can&#039;t use the inventory button and the unit will be immune to stun. Used for tanks. Mind controlled units don&#039;t use this but their button disables anyway.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;BombBloke:&#039;&#039; This is the only way to access tank inventories.&lt;br /&gt;
*Tank/Cannon has a normal inventory and uses man_1m0.spk.&lt;br /&gt;
*Tank/Rocket Launcher has a different layout and uses man_1m0.spk.&lt;br /&gt;
*Tank/Laser Cannon uses man_œ.spk, which doesn&#039;t exist normally. Providing this file still crashes.&lt;br /&gt;
*Hovertank/Plasma simply crashes.&lt;br /&gt;
*Hovertank/Launcher simply crashes.&lt;br /&gt;
&lt;br /&gt;
[[#1|[1]]] actually determines the inventory screen used, might be worth playing with that. [[#46|[46]]] determines the layout.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;114&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;114&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x72&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x72&lt;br /&gt;
|If not 0, then unit is on fire, and will burn for this amount of turns.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;115&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;115&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x73&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x73&lt;br /&gt;
|Gender: 0 = male, 1 = female.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;116&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;116&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x74&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x74&lt;br /&gt;
|Hair/skin colour (for inventory; all other units = 0):&lt;br /&gt;
   0: Blond caucasian&lt;br /&gt;
   1: Brunette caucasian&lt;br /&gt;
   2: Asian&lt;br /&gt;
   3: Black&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;117&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;117&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x75&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x75&lt;br /&gt;
|Turret weapon. Over-rides hand held weapon. Turret images are not centered; that would be impossible because they aren&#039;t all &#039;objects&#039; (e.g. Celatid). &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
                                                       F.A.  TUs        F.A.  TUs&lt;br /&gt;
   0: HWP cannon (bigobs[40])....................Aimed  90%  80%   Snap  60%  33%&lt;br /&gt;
   1: HWP rocket (bigobs[42])....................Aimed 115%  75%   Snap  55%  45%&lt;br /&gt;
   2: HWP laser (bigobs[54]).....................Aimed  85%  75%   Snap  50%  33%&lt;br /&gt;
   3: HWP plasma cannon (bigobs[43]).............Aimed 100%  60%   Snap  86%  30%&lt;br /&gt;
   4: HWP blaster (bigobs[43]) (looks like ordinary cannon?)......Aimed 120%  80%&lt;br /&gt;
   5: Celatid plasma cannon (bigobs[38]).........Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   6: Cyberdisc plasma cannon (bigobs[34]).......Aimed 110%  60%   Snap  75%  30%&lt;br /&gt;
   7: Sectopod Laser* cannon (bigobs[34])as cyberdisk, above, plus Auto  50%  35%&lt;br /&gt;
  22: Invalid - Incredibly powerful armour piercing shell. Overpowering.&lt;br /&gt;
 255: Unused&lt;br /&gt;
Note: This item will take precendence over any item carried in the hand slots. It can be installed on non-tanks, but then the unit won&#039;t be able to use any carried weapons or items. This weapon is NOT affected by the kneeling modifier, but it is affected by the current unit&#039;s accuracy stat. Also note, this byte does NOT determine the turret image for HWPs in the battlescape.&lt;br /&gt;
&lt;br /&gt;
[*]The damage type for the Sectopod is indeed set to (3)laser in the executable! Graphical/sound effects of a turret weapon is set there as well, via a reference to a weapon in OBDATA.DAT (HWP Cannon=4=Heavy Cannon, Sectopod=34=Heavy Plasma) &#039;&#039;When I changed HWP Cannon to 2, it looked/sounded like rifle fire - Crus8r&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also see [[#46|[46]]], [[#113|[113]]], and [[#118|[118]]].&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;118&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;118&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x76&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x76&lt;br /&gt;
|Ammo for [[#117|[117]]] turret weapon&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;119&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;119&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x77&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x77&lt;br /&gt;
|Movement related? Large unit related? Possible bitfield.&lt;br /&gt;
 &#039;&#039;MTR:&#039;&#039;&lt;br /&gt;
 00000000   0 Chryssalid(2), Civilian(9), Ethereal(2), Floater(2), Muton, &lt;br /&gt;
 00000001   1 Muton, PA Soldier(2)                   Sectoid(2), Silacoid(2), &lt;br /&gt;
 00000011   3 PA Soldier                            PA Soldier(2), Tank/Laser&lt;br /&gt;
 00000101   5 Snakeman&lt;br /&gt;
 00001010  10 Celatid             &#039;&#039;- Hobbes game - could have some garbage&#039;&#039;&lt;br /&gt;
 00001101  13 Muton, PA Soldier   &#039;&#039;  (parens) is count, if more than 1 unit&#039;&#039;&lt;br /&gt;
 00010011  19 Snakeman&lt;br /&gt;
 00100110  38 PA Soldier&lt;br /&gt;
 00101010  42 Muton(3)&lt;br /&gt;
 00110001  49 Muton&lt;br /&gt;
 00110010  50 PA Soldier&lt;br /&gt;
 00110101  53 Silacoid(2)&lt;br /&gt;
 00111011  59 Celatid&lt;br /&gt;
 00111111  63 Silacoid&lt;br /&gt;
 01001110  78 PA Soldier&lt;br /&gt;
 01100111 103 PA Soldier&lt;br /&gt;
 01111111 127 Muton&lt;br /&gt;
 10010000 144 Muton&lt;br /&gt;
 11000000 192 Celatid&lt;br /&gt;
 11111110 254 Muton&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;120&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;120&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x78&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x78&lt;br /&gt;
|Unit bit flags, mainly re: mobility. They do NOT affect the soldier in inventory screen: &#039;&#039;(Mix of notes by BB and NKF)&#039;&#039;&lt;br /&gt;
 (  1) 1: 1 = Dead.  &#039;&#039;This was only set for 2 of 3 dead aliens in my current game.&#039;&#039;&lt;br /&gt;
                     &#039;&#039;[[#13|[13]]] (Health=0) is the most reliable indicator for me.&#039;&#039;&lt;br /&gt;
                     &#039;&#039;-[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
 (  2) 2: 1 = Unit can fly.&lt;br /&gt;
 (  4) 3: 1 = Unit is flying. (Toggles leg sprites for power armour.)&lt;br /&gt;
 (  8) 4: 1 = Has been to this unit in next unit loop. Or to put it another way, has the unit been selected this turn.&lt;br /&gt;
 ( 16) 5: 1 = Unit has been disabled for selection.&lt;br /&gt;
              (Stops the unit tab button from selecting this soldier.)&lt;br /&gt;
 ( 32) 6: 0 = Unit has left hand object selected, 1 = right hand object selected.&lt;br /&gt;
 ( 64) 7: 1 = Unit is kneeling.&lt;br /&gt;
 (128) 8: 1 = Unit is wearing power/flying suit. (Can&#039;t be stunned by smoke flag? &lt;br /&gt;
              Seems to work for fire, too.)&lt;br /&gt;
If a unit is carrying something in either hand, it is impossible to get him to appear as if he is carrying nothing - in the game, at least. If he is carrying nothing, bit 6 can flag (as though the unit was using it&#039;s right hand item). But maybe it&#039;s just the order of dropped items affecting this?&lt;br /&gt;
&lt;br /&gt;
Note: A unit is only considered as flying if it is not on the ground. For example, a hover tank is not always considered as flying.&lt;br /&gt;
&lt;br /&gt;
What if a hovertank is half on the ground, half in the air? What about a treaded tank, or large alien unit? What about units in lifts?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;121&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;121&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x79&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x79&lt;br /&gt;
|Possible Values: 0 or 16. All units in unitref.dat get a value of 0 except for the second unit in the list which gets 16. Doesn&#039;t matter if the second unit is a soldier, a tank, or an alien. It&#039;s always 16. Editing it to 0 doesn&#039;t crash the game or have any dire consequences. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;122&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;122&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7A&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7A&lt;br /&gt;
|Always 0?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;123&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;123&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7B&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7B&lt;br /&gt;
|Always 0?&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;124&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;124&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7C&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7C&lt;br /&gt;
|TFTD ONLY - Appears to be a count as to which frame of bubbles the soldier is on.  Can be 0 to 16 (0x0F), most likely 125/7D is included with this.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;125&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;125&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7D&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7D&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;126&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;126&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7E&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7E&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;127&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;127&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x7F&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x7F&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;128&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;128&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x80&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x80&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;129&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;129&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x81&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x81&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;130&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;130&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x82&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x82&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!&amp;lt;span id=&amp;quot;131&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;131&lt;br /&gt;
!&amp;lt;span id=&amp;quot;0x83&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;0x83&lt;br /&gt;
|TFTD ONLY, unknown.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
1) The original/base values for &amp;lt;b&amp;gt;soldier stats&amp;lt;/b&amp;gt; (offsets [[#23|[23]]]-[[#28|[28]]], etc.) correspond to the initial+increase bytes from [[SOLDIER.DAT|Soldier.Dat]] (bytes 43-62). Changes to these Unitref bytes are &amp;lt;i&amp;gt;lost&amp;lt;/i&amp;gt;  when the mission ends; instead, XCOM re-reads them from Soldier at that time. This makes sense because base soldier stats don&#039;t change &amp;lt;i&amp;gt;during&amp;lt;/i&amp;gt; a mission per se (although they might increase when the mission ends); in this way, the programmers didn&#039;t have to bother with separately storing and/or adding initial+increase during combat. (It&#039;s also why you don&#039;t see the initial+increase in the soldier stat display during combat, that you can see back at base.) On a practical note, if you are testing soldier stat increases versus experience counters, change the experience counters in Unitref, but change the soldier stats in Soldier. (IOW, it doesn&#039;t matter what the soldier stats are in the combat mission.)&lt;br /&gt;
&lt;br /&gt;
The Kill count (offset [[#78-79|[78-79]]]) is the only Unitref value I know of that is directly carried forward into the geoscape and Soldier.dat. However, some others do indirectly carry forward, for example: experience (offsets [[#80|[80]]]-[[#85|[85]]]) causes stat and rank increases, and decreased health (offset [[#26|[26]]] - offset [[#13|[13]]]) means hospital time. And, of course, death is permanent. Heh.&lt;br /&gt;
&lt;br /&gt;
2) &amp;lt;b&amp;gt;Experience counters&amp;lt;/b&amp;gt; (offsets [[#80|[80]]]-[[#85|[85]]]) determine the likelihood of soldier stat increases at the end of the combat mission, according to the formula for Primary Stats shown [[Experience#How_Experience_Points_Are_Applied|here]]. The Bravery counter (offset [[#85|[85]]]) affects Bravery as shown [[Bravery|here]].&lt;br /&gt;
&lt;br /&gt;
Also, if at least one of the experience counters (except Throws) has a count, your secondary stats will increase, as discussed [[Experience#Secondary_Stats|here]]. All you need is at least a 1 in offsets [[#80|[80]]]-[[#82|[82]]] or [[#84|[84]]]-[[#85|[85]]]; more than 1 and/or multiple counters has no additional effect.&lt;br /&gt;
&lt;br /&gt;
3) BombBloke&#039;s additional &amp;quot;To be Done&amp;quot; notes - can we cross some of these off yet?&lt;br /&gt;
&lt;br /&gt;
   Need to research:&lt;br /&gt;
   Stun recovery rate, does it exist?&lt;br /&gt;
   Hand to hand attacks&lt;br /&gt;
   &amp;lt;strike&amp;gt;Offset of weapon from unit image?&amp;lt;/strike&amp;gt; &lt;br /&gt;
   &#039;&#039;Based on unit height and nothing else. There may be values to determine what arm sprites to use,&#039;&#039;&lt;br /&gt;
   &#039;&#039;but I doubt it.&#039;&#039;&lt;br /&gt;
   Firing sprite offset? &lt;br /&gt;
   &#039;&#039;Probably just based on unit height and some hardcoded values in the executable.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Inventory lockout?&amp;lt;/strike&amp;gt; &#039;&#039;All mind controlled units are locked out.&#039;&#039;&lt;br /&gt;
   Kneel lockout? &lt;br /&gt;
   &#039;&#039;Probably the same as above, I seem to remember that using XcomUtil to &amp;quot;swap sides&amp;quot; would make it&#039;&#039;&lt;br /&gt;
   &#039;&#039;possible to kneel small alien units.&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Aliens seen?&amp;lt;/strike&amp;gt; &#039;&#039;Not used in unitref.dat, only in unitpos.dat. -[[User:Zombie|Zombie]] 23:48, 29 September 2006 (PDT)&#039;&#039;&lt;br /&gt;
   &amp;lt;strike&amp;gt;Whether a unit slides/floats/hovers/rolls/walks (movement noise)?&amp;lt;/strike&amp;gt; &#039;&#039;Set according to unit type.&#039;&#039;&lt;br /&gt;
   What else? The more to look for, the easier it is...&lt;br /&gt;
   &lt;br /&gt;
   Know 111 values.&lt;br /&gt;
   Unknown values (13 in total):&lt;br /&gt;
   [[#34|[034 / 0x22]]] - Always 0?&lt;br /&gt;
   [[#36|[036 / 0x24]]] - Always 0?&lt;br /&gt;
   [[#43|[043 / 0x2B]]] - Set to 1 on occasion, usually 0.&lt;br /&gt;
   [[#52|[052 / 0x34]]] - Seems to be a mirror of 48 / 0x30, the LOFTemp index for the unit.&lt;br /&gt;
   [[#71|[071 / 0x47]]] - Appears to relate to lighting caused by the unit, [[Talk:UNITREF.DAT#Offset_0x47|discussion here]].&lt;br /&gt;
   [[#74|[074 / 0x4A]]] - Appears to relate to the AI-mode used by the unit, [[Talk:UNITREF.DAT#Offset_0x4A_.2874.29|discussion here]].&lt;br /&gt;
   [[#75|[075 / 0x4B]]] - Always 0?&lt;br /&gt;
   [[#112|[112 / 0x70]]] - Set to 1 for some aliens, 0 otherwise.&lt;br /&gt;
   [[#119|[119 / 0x77]]] - No idea, possible bitfield, could be anything.&lt;br /&gt;
   [[#120|[120 / 0x78]]] - Unit bit flags, mainly re: mobility. Only one bit not 100% identified.&lt;br /&gt;
   [[#121|[121 / 0x79]]] - Second unit gets a value of 16. Everyone else gets 0. No obvious purpose.&lt;br /&gt;
   [[#122|[122 / 0x7A]]] - Always 0?&lt;br /&gt;
   [[#123|[123 / 0x7B]]] - Always 0?&lt;br /&gt;
   &lt;br /&gt;
   Know 1 TFTD value.   &lt;br /&gt;
   Unknown TFTD values (7 in total):&lt;br /&gt;
   [[#125|[125]]] [[#126|[126]]] [[#127|[127]]] [[#128|[128]]] [[#129|[129]]] [[#130|[130]]] [[#131|[131]]]&lt;br /&gt;
&lt;br /&gt;
4) Hobbes posted a savegame with a TON of different aliens in it [http://www.xcomufo.com/forums/index.php?showtopic=8591 here] (message 6). Interesting for testing. But note it was made with XCOMUTIL and there may(?) be concerns over vailidity of unit info - see [[Talk:UNITREF.DAT]].&lt;br /&gt;
&lt;br /&gt;
5) A [[HackerTools|Hex Workshop]] Structure Library for UNITREF.DAT created by Danial is [[UNITREF_DAT_HSL|here]].&lt;br /&gt;
&lt;br /&gt;
== For More Information ==&lt;br /&gt;
*[[SOLDIER.DAT]]&lt;br /&gt;
*[[Soldiers|Soldier Stats]]&lt;br /&gt;
*[[Experience]]&lt;br /&gt;
*[[HackerTools|Hex editing]]&lt;br /&gt;
&lt;br /&gt;
Return to [[Saved_Game_Files|Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=65941</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=65941"/>
		<updated>2015-06-21T14:58:49Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 2015-06-21 v1.17h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-09 v1.17c====&lt;br /&gt;
* Added &amp;quot;Append MCD&amp;quot; (File menu) - chosing another MCD file to be added to the end of current (including PCK and all necessary reference values). MCD count shouldn&#039;t exceed 255.&lt;br /&gt;
* Added command line options, which override corresponding .lyt file values during the start (case sensitive):&lt;br /&gt;
  -custom_mcd [true/false, if it&#039;s custom MCD mode or not]&lt;br /&gt;
  -game_type [1/2]&lt;br /&gt;
  -pal_idx [0-4]&lt;br /&gt;
  -mcd_pref [full path to mcd folder]&lt;br /&gt;
  -selectedfilename [mcd/pck/tab filename without extension]&lt;br /&gt;
  -SelectMCD [selected mcd ID]&lt;br /&gt;
* Added special file (MCD_Saved.dat), which will receivereach saved file absolute path and filename (without extension).&lt;br /&gt;
* RMB click to MCD list doesn&#039;t selcet clicked MCD anymore.&lt;br /&gt;
* Added multiple MCD selection (shift, ctrl)&lt;br /&gt;
* Added delete/clear/copy/paste MCDs throughout selected.&lt;br /&gt;
* Paste MCDs works in two modes: 1. Only one MCD is selected during paste - it will override MCDs sequentially from the buffer; 2. Multiple MCDs are selected during paste (as targets) - it will run through selected MCDs and will override them from the buffer, if buffer run out of MCDs - it will start from first in the buffer (so if copy 1, and paste to 10 will clone it);&lt;br /&gt;
* When multiple MCDs are selected, it becomes possible to modify values of selected MCDs at once (works only for data values, no SCANG, sprite or LOFT). If values are different throughout the selection, it will show &amp;quot;mix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
** Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
====2015-02-18 v1.17e====&lt;br /&gt;
* Added aggregation of SCANG, PCK numbers (animation) and LOFTs for multiple selected MCDs, and multiple modification.&lt;br /&gt;
* When there&#039;s no multiple selected MCDs, it will paste MCD only for single selection (previously paste worked sequentially).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** More informative PCK deletion error.&lt;br /&gt;
** Fixed png import with untouched palette (they were still re-converted for first 16 columnts).&lt;br /&gt;
** Added copy/paste into/from clipboard of multiple PCKs&lt;br /&gt;
** Added export/import from PNG of multiple PCKs (the way similar to sheet - side by side, 10 in row)&lt;br /&gt;
&lt;br /&gt;
====2015-02-19 v1.17f====&lt;br /&gt;
* Added multiple MCDs adding to menu (1,5 and 15)&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
* Added multiple PCKs adding to menu (1,5 and 15)&lt;br /&gt;
&lt;br /&gt;
====2015-04-06 v1.17g====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
* Fixed RGBA png import.&lt;br /&gt;
* Fixed insert new PCK.&lt;br /&gt;
* Added &amp;quot;Settings&amp;quot; menu with PCK sheet margin/spacing options and number of sprites per row for export.&lt;br /&gt;
&lt;br /&gt;
====2015-06-21 v1.17h==== &lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* Adding/Deleting MCDs will change particular fields accordingly (Alt_MCD/Die_MCD fields), including consideration if it&#039;s a &amp;quot;door&amp;quot; field or not. Special characters are needed at the tail of particular field names to work properly.&lt;br /&gt;
* Informative warning message if you&#039;re trying to delete MCDs which are used in other MCDs (as Alt_MCD/Die_MCD).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** PasteMode is not going to be turned off in Draw mode until you start drawing.&lt;br /&gt;
** Hover color info and highlight cross now works correcty with overlay/underlay &amp;quot;pasted&amp;quot; fragment.&lt;br /&gt;
** Added tools to rotate (CW/CCW) + Flip (Horizontal/vertical) of selection or &amp;quot;pasted&amp;quot; fragment.&lt;br /&gt;
** Additional small fixes.&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=65940</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=65940"/>
		<updated>2015-06-21T14:53:07Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 1.17h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;Tab&#039;&#039;/&#039;&#039;Shift+Tab&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You can change spacing between sprites, and margins in &#039;&#039;Edit-&amp;gt;Settings...&#039;&#039;. It will work for both export to and import from PNG, so pay attention, if you&#039;re using non-standard values. Also you can change number of sprites per row when exporting images.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Autoconfirm&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17h (2015-06-21) ([http://volutar.eu5.org/_mcdedit117h.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=File:Mcdedit_pckedit.png&amp;diff=65939</id>
		<title>File:Mcdedit pckedit.png</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=File:Mcdedit_pckedit.png&amp;diff=65939"/>
		<updated>2015-06-21T14:43:44Z</updated>

		<summary type="html">&lt;p&gt;Volutar: Volutar uploaded a new version of &amp;amp;quot;File:Mcdedit pckedit.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PCK Editor&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=65908</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=65908"/>
		<updated>2015-06-20T08:12:38Z</updated>

		<summary type="html">&lt;p&gt;Volutar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-09 v1.17c====&lt;br /&gt;
* Added &amp;quot;Append MCD&amp;quot; (File menu) - chosing another MCD file to be added to the end of current (including PCK and all necessary reference values). MCD count shouldn&#039;t exceed 255.&lt;br /&gt;
* Added command line options, which override corresponding .lyt file values during the start (case sensitive):&lt;br /&gt;
  -custom_mcd [true/false, if it&#039;s custom MCD mode or not]&lt;br /&gt;
  -game_type [1/2]&lt;br /&gt;
  -pal_idx [0-4]&lt;br /&gt;
  -mcd_pref [full path to mcd folder]&lt;br /&gt;
  -selectedfilename [mcd/pck/tab filename without extension]&lt;br /&gt;
  -SelectMCD [selected mcd ID]&lt;br /&gt;
* Added special file (MCD_Saved.dat), which will receivereach saved file absolute path and filename (without extension).&lt;br /&gt;
* RMB click to MCD list doesn&#039;t selcet clicked MCD anymore.&lt;br /&gt;
* Added multiple MCD selection (shift, ctrl)&lt;br /&gt;
* Added delete/clear/copy/paste MCDs throughout selected.&lt;br /&gt;
* Paste MCDs works in two modes: 1. Only one MCD is selected during paste - it will override MCDs sequentially from the buffer; 2. Multiple MCDs are selected during paste (as targets) - it will run through selected MCDs and will override them from the buffer, if buffer run out of MCDs - it will start from first in the buffer (so if copy 1, and paste to 10 will clone it);&lt;br /&gt;
* When multiple MCDs are selected, it becomes possible to modify values of selected MCDs at once (works only for data values, no SCANG, sprite or LOFT). If values are different throughout the selection, it will show &amp;quot;mix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
** Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
====2015-02-18 v1.17e====&lt;br /&gt;
* Added aggregation of SCANG, PCK numbers (animation) and LOFTs for multiple selected MCDs, and multiple modification.&lt;br /&gt;
* When there&#039;s no multiple selected MCDs, it will paste MCD only for single selection (previously paste worked sequentially).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** More informative PCK deletion error.&lt;br /&gt;
** Fixed png import with untouched palette (they were still re-converted for first 16 columnts).&lt;br /&gt;
** Added copy/paste into/from clipboard of multiple PCKs&lt;br /&gt;
** Added export/import from PNG of multiple PCKs (the way similar to sheet - side by side, 10 in row)&lt;br /&gt;
&lt;br /&gt;
====2015-02-19 v1.17f====&lt;br /&gt;
* Added multiple MCDs adding to menu (1,5 and 15)&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
* Added multiple PCKs adding to menu (1,5 and 15)&lt;br /&gt;
&lt;br /&gt;
====2015-04-06 v1.17g====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
* Fixed RGBA png import.&lt;br /&gt;
* Fixed insert new PCK.&lt;br /&gt;
* Added &amp;quot;Settings&amp;quot; menu with PCK sheet margin/spacing options and number of sprites per row for export.&lt;br /&gt;
&lt;br /&gt;
====2015-xx-xx v1.17h (upcoming) ==== &lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* Adding/Deleting MCDs will change particular fields accordingly (Alt_MCD/Die_MCD), including consideration if it&#039;s a &amp;quot;door&amp;quot; field or not.&lt;br /&gt;
* Informative warning message if you&#039;re trying to delete MCDs which are used in other MCDs (as Alt_MCD/Die_MCD).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** PasteMode is not going to be turned off in Draw mode until you start drawing.&lt;br /&gt;
** Hover color info and highlight cross now works correcty with overlay/underlay &amp;quot;pastemode&amp;quot; fragment.&lt;br /&gt;
** (?) Rotate (90/180/270)/Flip(hor/ver) selection or &amp;quot;pastemode&amp;quot; fragment (through the Edit/RMB menu).&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=65907</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=65907"/>
		<updated>2015-06-20T08:11:45Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* announce of upcoming v1.17h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-09 v1.17c====&lt;br /&gt;
* Added &amp;quot;Append MCD&amp;quot; (File menu) - chosing another MCD file to be added to the end of current (including PCK and all necessary reference values). MCD count shouldn&#039;t exceed 255.&lt;br /&gt;
* Added command line options, which override corresponding .lyt file values during the start (case sensitive):&lt;br /&gt;
  -custom_mcd [true/false, if it&#039;s custom MCD mode or not]&lt;br /&gt;
  -game_type [1/2]&lt;br /&gt;
  -pal_idx [0-4]&lt;br /&gt;
  -mcd_pref [full path to mcd folder]&lt;br /&gt;
  -selectedfilename [mcd/pck/tab filename without extension]&lt;br /&gt;
  -SelectMCD [selected mcd ID]&lt;br /&gt;
* Added special file (MCD_Saved.dat), which will receivereach saved file absolute path and filename (without extension).&lt;br /&gt;
* RMB click to MCD list doesn&#039;t selcet clicked MCD anymore.&lt;br /&gt;
* Added multiple MCD selection (shift, ctrl)&lt;br /&gt;
* Added delete/clear/copy/paste MCDs throughout selected.&lt;br /&gt;
* Paste MCDs works in two modes: 1. Only one MCD is selected during paste - it will override MCDs sequentially from the buffer; 2. Multiple MCDs are selected during paste (as targets) - it will run through selected MCDs and will override them from the buffer, if buffer run out of MCDs - it will start from first in the buffer (so if copy 1, and paste to 10 will clone it);&lt;br /&gt;
* When multiple MCDs are selected, it becomes possible to modify values of selected MCDs at once (works only for data values, no SCANG, sprite or LOFT). If values are different throughout the selection, it will show &amp;quot;mix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
** Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
====2015-02-18 v1.17e====&lt;br /&gt;
* Added aggregation of SCANG, PCK numbers (animation) and LOFTs for multiple selected MCDs, and multiple modification.&lt;br /&gt;
* When there&#039;s no multiple selected MCDs, it will paste MCD only for single selection (previously paste worked sequentially).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** More informative PCK deletion error.&lt;br /&gt;
** Fixed png import with untouched palette (they were still re-converted for first 16 columnts).&lt;br /&gt;
** Added copy/paste into/from clipboard of multiple PCKs&lt;br /&gt;
** Added export/import from PNG of multiple PCKs (the way similar to sheet - side by side, 10 in row)&lt;br /&gt;
&lt;br /&gt;
====2015-02-19 v1.17f====&lt;br /&gt;
* Added multiple MCDs adding to menu (1,5 and 15)&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
* Added multiple PCKs adding to menu (1,5 and 15)&lt;br /&gt;
&lt;br /&gt;
====2015-04-06 v1.17g====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
* Fixed RGBA png import.&lt;br /&gt;
* Fixed insert new PCK.&lt;br /&gt;
* Added &amp;quot;Settings&amp;quot; menu with PCK sheet margin/spacing options and number of sprites per row for export.&lt;br /&gt;
&lt;br /&gt;
====2015-xx-xx v1.17h==== (upcoming)&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* Adding/Deleting MCDs will change particular fields accordingly (Alt_MCD/Die_MCD), including consideration if it&#039;s a &amp;quot;door&amp;quot; field or not.&lt;br /&gt;
* Informative warning message if you&#039;re trying to delete MCDs which are used in other MCDs (as Alt_MCD/Die_MCD).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** PasteMode is not going to be turned off in Draw mode until you start drawing.&lt;br /&gt;
** Hover color info and highlight cross now works correcty with overlay/underlay &amp;quot;pastemode&amp;quot; fragment.&lt;br /&gt;
** (?) Rotate (90/180/270)/Flip(hor/ver) selection or &amp;quot;pastemode&amp;quot; fragment (through the Edit/RMB menu).&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCD&amp;diff=65903</id>
		<title>Talk:MCD</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCD&amp;diff=65903"/>
		<updated>2015-06-20T07:47:21Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Offset 38 (0x26) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;52: Footstep sound effect.&lt;br /&gt;
&lt;br /&gt;
I didn&#039;t log in because I don&#039;t have an account... yet. I looks like I was wrong on the arctic terrain, I thought it uses sand effect, but I checked it&#039;s actually normal (2).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I&#039;ve started writing a section on Terrain/Map Editing and the technical portion (the structure of the MCD files and so on) has been already presented here. Should I add the Terrain Editing material to this page or start a new one? [[User:Hobbes|Hobbes]] 19:39, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I am wondering if we might not have a major restructuring of all this stuff. Instead of first &amp;quot;Under the Hood&amp;quot;, then &amp;quot;Game File Analysis&amp;quot;, and then on yet another link, &amp;quot;Saved Games&amp;quot;... I think these parts warrant enough attention (at least by many wiki regulars) that they have their own link off the main page, and then something like this structure:&lt;br /&gt;
&lt;br /&gt;
  Overviews&lt;br /&gt;
  (right here goes overviews of everything, then:)&lt;br /&gt;
    Main Programs And Data&lt;br /&gt;
    Savegame Files&lt;br /&gt;
  Specific Directories And Files&lt;br /&gt;
    Main Programs And Data&lt;br /&gt;
    Savegame Files&lt;br /&gt;
&lt;br /&gt;
Something like that... ANY suggestions welcome, but I think it&#039;s time to revamp the lot of it to show it&#039;s importance to many regulars, and leave places for overviews versus specific things.&lt;br /&gt;
&lt;br /&gt;
Edit: To answer you more specifically, Hobbes: Choose your place; a general place is fine for me. I think we should overhaul the whole structure. I think it&#039;s grown past its original little pecks and nibbles.&lt;br /&gt;
&lt;br /&gt;
What do the rest of you think? ---[[User:MikeTheRed|MikeTheRed]] 19:58, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Sounds spiffy. --[[User:Danial|Danial]] 20:01, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yup, I was planning on doing something like that later on... We&#039;ll have to do it a few times as we introduce more pages, in order to keep everything easy to find.&lt;br /&gt;
&lt;br /&gt;
--[[User:Bomb Bloke|Bomb Bloke]] 20:59, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
== Offsets 22-29 / 0x16-0x1D ==&lt;br /&gt;
&lt;br /&gt;
They seem to be the same as 2-9 bytes of UnitRef table. After MCD loading they are filled with pointers to appropriate pck/tab.&lt;br /&gt;
&lt;br /&gt;
  v60 = &amp;amp;a_mcd_data[result];&lt;br /&gt;
  v60-&amp;gt;field_1A_pck = a_TileSet_Catalog[v_BF_Tileset_Cnt].pck;&lt;br /&gt;
  v60-&amp;gt;field_16_tab = a_TileSet_Catalog[v_BF_Tileset_Cnt].tab;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve found this the same way as for unit pck/tab pointers.&lt;br /&gt;
--[[User:Volutar|Volutar]] 14:27, 21 February 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
== Offset 47 / 0x2F ==&lt;br /&gt;
&lt;br /&gt;
It is set to 1 when the MCD data is used as an opened door tile type. It is only set at runtime when a door is opened. Since MCD data is not saved, this explains the door jam bug that makes the doors stay opened when you reload. You can test that on the medium scout ship: if you open the door to the central reactor room and save/reload, the door will stay stuck. If you now open a door of the same type (and same orientation) and end the turn, the door to the reactor chamber will be closed again on the next turn. [[User:Seb76|Seb76]] 14:18, 13 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Offset 51 / 0x33 ==&lt;br /&gt;
&lt;br /&gt;
Who said this is LIGHT block?&lt;br /&gt;
Game uses this field in calculations of explosion wave permeability, so it apparently should be called &amp;quot;explosion block&amp;quot;&lt;br /&gt;
Function at address .text:00417F40 refers to this field and to the table (dimensions is 11x17: 11 block values for 17 levels of intensity) at .data:0046C45C. This function is used for calculation of how much explosion will come from x/y/z to its neighbour x1/y1.&lt;br /&gt;
--[[User:Volutar|Volutar]] 14:28, 15 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
It&#039;s not that easy as it meets the eye. This function (using field 51) works only for second chained explosion. It doesn&#039;t create lot of smoke comparing to original and first chained explosions...&lt;br /&gt;
&lt;br /&gt;
Does anyone have particular observation of such &#039;&#039;non standard&#039;&#039; explosions behaviour?&lt;br /&gt;
--[[User:Volutar|Volutar]] 05:55, 16 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
This field indeed was ment to be used for lighing calculation (they were using same function for explosion field calculation and for lighting). But they calceled use of this function for light blocking, I dont know why, maybe its results wasn&#039;t very good. Still they&#039;ve left this &amp;quot;lighting&amp;quot; function and it is used after first chained explosion (original, chained1,(enabling!), chained2, chained3, etc). Results are quite unpredictable, since intensivity more than 16 cause getting out of bounds. If you manage to get to this second chained explosion you may notice it looks weird.&lt;br /&gt;
 &lt;br /&gt;
 void DoExplosion(x,y,z,intens,radius)&lt;br /&gt;
 {&lt;br /&gt;
   isExplosion=1;&lt;br /&gt;
   ClearChainedExplBuffer();&lt;br /&gt;
   CalcExplosionLightMap(x,y,z,intense,radius); //&amp;lt;--- depending on isExplosion it calculates damage field or lighting&lt;br /&gt;
   ApplyExplosionDamage(); //&amp;lt;--- adds chained, if something with flag &amp;quot;HE&amp;quot; got exploded&lt;br /&gt;
   while(!ChainedExplosionsEOF())&lt;br /&gt;
   { &lt;br /&gt;
     GetNextChainedExplosion(&amp;amp;x,&amp;amp;y,&amp;amp;z,&amp;amp;intense,&amp;amp;radius)&lt;br /&gt;
     CalcExplosionLightMap(x,y,z,intense,radius);&lt;br /&gt;
     ApplyExplosionDamage(); &lt;br /&gt;
     isExplosion=0; /// &amp;lt;--- WHY??? Obviously a bug&lt;br /&gt;
   }&lt;br /&gt;
   isExplosion=0;&lt;br /&gt;
 }&lt;br /&gt;
BTW, there are only 50 chained explosions possible, 51th won&#039;t explode.&lt;br /&gt;
--[[User:Volutar|Volutar]] 06:41, 16 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
== MCDedit ==&lt;br /&gt;
&lt;br /&gt;
Urgh. MCDedit and support files are gone. Anyone want to put it somewhere more ... permanent? Strategycore files section, for example?&lt;br /&gt;
[[User:Knan|Knan]] 21:25, 13 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
:It&#039;s been in StrategyCore&#039;s files section for &amp;lt;b&amp;gt;years&amp;lt;/b&amp;gt; now. [http://www.strategycore.co.uk/files/index.php?dlid=415 Clicky]. :) --[[User:Zombie|Zombie]] 21:52, 13 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
::Right. Only went looking in the Editors section, Maps didn&#039;t register on the radar. --[[User:Knan|Knan]] 17:47, 14 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Ground with TUs = 0 ==&lt;br /&gt;
&lt;br /&gt;
There are at least 2 ground tiles which consumes 0 TUs to walk through them.&lt;br /&gt;
Interesting thing, that pathfinder deny walk directly on them, you can only walk &#039;&#039;through&#039;&#039;.&lt;br /&gt;
These are 6 and 7 tiles in U_BITS tileset.&lt;br /&gt;
--[[User:Volutar|Volutar]] 08:02, 12 October 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Offset 38 (0x26) ==&lt;br /&gt;
&lt;br /&gt;
  Zombie: Defined as &amp;quot;printype&amp;quot;; 3=whole, 2=right side, 1=left side.&lt;br /&gt;
  Since this is always 3 the game prints the entire object, while the assumption is that&lt;br /&gt;
  values of 2 or 1 are possibly used for the map designer.&lt;br /&gt;
&lt;br /&gt;
Where is it &amp;quot;defined&amp;quot;? It&#039;s not used in the game code AT ALL. There is no check whether it 3,2 or 1.&lt;br /&gt;
What map designer do you mean?&lt;br /&gt;
&lt;br /&gt;
I seems to me as just a fantasy.&lt;br /&gt;
--[[User:Volutar|Volutar]] ([[User talk:Volutar|talk]]) 10:34, 19 June 2015 (EDT)&lt;br /&gt;
&lt;br /&gt;
:Before you accuse me of being delusional or making stuff up, consider that I am working directly off of dev comments from part of the ACTUAL C code from UFO which I received recently. It&#039;s commented in there plain as day. Whether it is actually used in-game anymore is not a earth shattering concern - providing explanations to the remaining unknowns is what I&#039;m after. The burden of proof lies in testing or code digging to see if it is used or not. (You are more than welcome to provide any additional information you can find out). And before this discussion degrades into a &amp;quot;but you only have it, I can&#039;t trust you unless I can see it myself&amp;quot; issue, no, you may not get the C code until I can get it cleared through 2K/Firaxis. --[[User:Zombie|Zombie]] ([[User talk:Zombie|talk]]) 01:08, 20 June 2015 (EDT)&lt;br /&gt;
:: I wasn&#039;t going to accuse you, it&#039;s just... this info is too &amp;quot;out of nowhere&amp;quot; tho _pretty_ detailed, that I suspected it might be the real game source (if I remember correctly they claimed it was simply &amp;quot;lost&amp;quot;). My sources are just reversed exes, tho I tried to dig up through everything I could. Of course they don&#039;t contain any comments or var names to figure out something about structure members which actually were &amp;quot;optimized&amp;quot; and thrown away from EXE as not used. Of course initially they must be having some purpose devs quitted eventually. And of course I trust you. Partial tile rendering COULD be used for some volumetric tiles like wheat, and for some reason that concept was rejected. But structure member remains. --[[User:Volutar|Volutar]] ([[User talk:Volutar|talk]]) 03:45, 20 June 2015 (EDT)&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCD&amp;diff=65902</id>
		<title>Talk:MCD</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCD&amp;diff=65902"/>
		<updated>2015-06-20T07:46:24Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Offset 38 (0x26) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;52: Footstep sound effect.&lt;br /&gt;
&lt;br /&gt;
I didn&#039;t log in because I don&#039;t have an account... yet. I looks like I was wrong on the arctic terrain, I thought it uses sand effect, but I checked it&#039;s actually normal (2).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I&#039;ve started writing a section on Terrain/Map Editing and the technical portion (the structure of the MCD files and so on) has been already presented here. Should I add the Terrain Editing material to this page or start a new one? [[User:Hobbes|Hobbes]] 19:39, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I am wondering if we might not have a major restructuring of all this stuff. Instead of first &amp;quot;Under the Hood&amp;quot;, then &amp;quot;Game File Analysis&amp;quot;, and then on yet another link, &amp;quot;Saved Games&amp;quot;... I think these parts warrant enough attention (at least by many wiki regulars) that they have their own link off the main page, and then something like this structure:&lt;br /&gt;
&lt;br /&gt;
  Overviews&lt;br /&gt;
  (right here goes overviews of everything, then:)&lt;br /&gt;
    Main Programs And Data&lt;br /&gt;
    Savegame Files&lt;br /&gt;
  Specific Directories And Files&lt;br /&gt;
    Main Programs And Data&lt;br /&gt;
    Savegame Files&lt;br /&gt;
&lt;br /&gt;
Something like that... ANY suggestions welcome, but I think it&#039;s time to revamp the lot of it to show it&#039;s importance to many regulars, and leave places for overviews versus specific things.&lt;br /&gt;
&lt;br /&gt;
Edit: To answer you more specifically, Hobbes: Choose your place; a general place is fine for me. I think we should overhaul the whole structure. I think it&#039;s grown past its original little pecks and nibbles.&lt;br /&gt;
&lt;br /&gt;
What do the rest of you think? ---[[User:MikeTheRed|MikeTheRed]] 19:58, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Sounds spiffy. --[[User:Danial|Danial]] 20:01, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yup, I was planning on doing something like that later on... We&#039;ll have to do it a few times as we introduce more pages, in order to keep everything easy to find.&lt;br /&gt;
&lt;br /&gt;
--[[User:Bomb Bloke|Bomb Bloke]] 20:59, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
== Offsets 22-29 / 0x16-0x1D ==&lt;br /&gt;
&lt;br /&gt;
They seem to be the same as 2-9 bytes of UnitRef table. After MCD loading they are filled with pointers to appropriate pck/tab.&lt;br /&gt;
&lt;br /&gt;
  v60 = &amp;amp;a_mcd_data[result];&lt;br /&gt;
  v60-&amp;gt;field_1A_pck = a_TileSet_Catalog[v_BF_Tileset_Cnt].pck;&lt;br /&gt;
  v60-&amp;gt;field_16_tab = a_TileSet_Catalog[v_BF_Tileset_Cnt].tab;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve found this the same way as for unit pck/tab pointers.&lt;br /&gt;
--[[User:Volutar|Volutar]] 14:27, 21 February 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
== Offset 47 / 0x2F ==&lt;br /&gt;
&lt;br /&gt;
It is set to 1 when the MCD data is used as an opened door tile type. It is only set at runtime when a door is opened. Since MCD data is not saved, this explains the door jam bug that makes the doors stay opened when you reload. You can test that on the medium scout ship: if you open the door to the central reactor room and save/reload, the door will stay stuck. If you now open a door of the same type (and same orientation) and end the turn, the door to the reactor chamber will be closed again on the next turn. [[User:Seb76|Seb76]] 14:18, 13 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Offset 51 / 0x33 ==&lt;br /&gt;
&lt;br /&gt;
Who said this is LIGHT block?&lt;br /&gt;
Game uses this field in calculations of explosion wave permeability, so it apparently should be called &amp;quot;explosion block&amp;quot;&lt;br /&gt;
Function at address .text:00417F40 refers to this field and to the table (dimensions is 11x17: 11 block values for 17 levels of intensity) at .data:0046C45C. This function is used for calculation of how much explosion will come from x/y/z to its neighbour x1/y1.&lt;br /&gt;
--[[User:Volutar|Volutar]] 14:28, 15 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
It&#039;s not that easy as it meets the eye. This function (using field 51) works only for second chained explosion. It doesn&#039;t create lot of smoke comparing to original and first chained explosions...&lt;br /&gt;
&lt;br /&gt;
Does anyone have particular observation of such &#039;&#039;non standard&#039;&#039; explosions behaviour?&lt;br /&gt;
--[[User:Volutar|Volutar]] 05:55, 16 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
This field indeed was ment to be used for lighing calculation (they were using same function for explosion field calculation and for lighting). But they calceled use of this function for light blocking, I dont know why, maybe its results wasn&#039;t very good. Still they&#039;ve left this &amp;quot;lighting&amp;quot; function and it is used after first chained explosion (original, chained1,(enabling!), chained2, chained3, etc). Results are quite unpredictable, since intensivity more than 16 cause getting out of bounds. If you manage to get to this second chained explosion you may notice it looks weird.&lt;br /&gt;
 &lt;br /&gt;
 void DoExplosion(x,y,z,intens,radius)&lt;br /&gt;
 {&lt;br /&gt;
   isExplosion=1;&lt;br /&gt;
   ClearChainedExplBuffer();&lt;br /&gt;
   CalcExplosionLightMap(x,y,z,intense,radius); //&amp;lt;--- depending on isExplosion it calculates damage field or lighting&lt;br /&gt;
   ApplyExplosionDamage(); //&amp;lt;--- adds chained, if something with flag &amp;quot;HE&amp;quot; got exploded&lt;br /&gt;
   while(!ChainedExplosionsEOF())&lt;br /&gt;
   { &lt;br /&gt;
     GetNextChainedExplosion(&amp;amp;x,&amp;amp;y,&amp;amp;z,&amp;amp;intense,&amp;amp;radius)&lt;br /&gt;
     CalcExplosionLightMap(x,y,z,intense,radius);&lt;br /&gt;
     ApplyExplosionDamage(); &lt;br /&gt;
     isExplosion=0; /// &amp;lt;--- WHY??? Obviously a bug&lt;br /&gt;
   }&lt;br /&gt;
   isExplosion=0;&lt;br /&gt;
 }&lt;br /&gt;
BTW, there are only 50 chained explosions possible, 51th won&#039;t explode.&lt;br /&gt;
--[[User:Volutar|Volutar]] 06:41, 16 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
== MCDedit ==&lt;br /&gt;
&lt;br /&gt;
Urgh. MCDedit and support files are gone. Anyone want to put it somewhere more ... permanent? Strategycore files section, for example?&lt;br /&gt;
[[User:Knan|Knan]] 21:25, 13 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
:It&#039;s been in StrategyCore&#039;s files section for &amp;lt;b&amp;gt;years&amp;lt;/b&amp;gt; now. [http://www.strategycore.co.uk/files/index.php?dlid=415 Clicky]. :) --[[User:Zombie|Zombie]] 21:52, 13 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
::Right. Only went looking in the Editors section, Maps didn&#039;t register on the radar. --[[User:Knan|Knan]] 17:47, 14 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Ground with TUs = 0 ==&lt;br /&gt;
&lt;br /&gt;
There are at least 2 ground tiles which consumes 0 TUs to walk through them.&lt;br /&gt;
Interesting thing, that pathfinder deny walk directly on them, you can only walk &#039;&#039;through&#039;&#039;.&lt;br /&gt;
These are 6 and 7 tiles in U_BITS tileset.&lt;br /&gt;
--[[User:Volutar|Volutar]] 08:02, 12 October 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Offset 38 (0x26) ==&lt;br /&gt;
&lt;br /&gt;
  Zombie: Defined as &amp;quot;printype&amp;quot;; 3=whole, 2=right side, 1=left side.&lt;br /&gt;
  Since this is always 3 the game prints the entire object, while the assumption is that&lt;br /&gt;
  values of 2 or 1 are possibly used for the map designer.&lt;br /&gt;
&lt;br /&gt;
Where is it &amp;quot;defined&amp;quot;? It&#039;s not used in the game code AT ALL. There is no check whether it 3,2 or 1.&lt;br /&gt;
What map designer do you mean?&lt;br /&gt;
&lt;br /&gt;
I seems to me as just a fantasy.&lt;br /&gt;
--[[User:Volutar|Volutar]] ([[User talk:Volutar|talk]]) 10:34, 19 June 2015 (EDT)&lt;br /&gt;
&lt;br /&gt;
:Before you accuse me of being delusional or making stuff up, consider that I am working directly off of dev comments from part of the ACTUAL C code from UFO which I received recently. It&#039;s commented in there plain as day. Whether it is actually used in-game anymore is not a earth shattering concern - providing explanations to the remaining unknowns is what I&#039;m after. The burden of proof lies in testing or code digging to see if it is used or not. (You are more than welcome to provide any additional information you can find out). And before this discussion degrades into a &amp;quot;but you only have it, I can&#039;t trust you unless I can see it myself&amp;quot; issue, no, you may not get the C code until I can get it cleared through 2K/Firaxis. --[[User:Zombie|Zombie]] ([[User talk:Zombie|talk]]) 01:08, 20 June 2015 (EDT)&lt;br /&gt;
:: I wasn&#039;t going to accuse you, it&#039;s just... this info is too &amp;quot;out of nowhere&amp;quot; tho _pretty_ detailed, that I suspected it might be the real game source (if I remember correctly they claimed it was simply &amp;quot;lost&amp;quot;). My sources are just reversed exes, tho I tried to dig up through everything I could. Of course they don&#039;t contain any comments or var names to figure out something about structure members which actually was &amp;quot;optimized&amp;quot; and thrown away from EXE as not used. Of course initially they must be having some purpose devs quitted eventually. And of course I trust you. Partial tile rendering COULD be used for some volumetric tiles like wheat, and for some reason that concept was rejected. But structure member remains. --[[User:Volutar|Volutar]] ([[User talk:Volutar|talk]]) 03:45, 20 June 2015 (EDT)&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCD&amp;diff=65901</id>
		<title>Talk:MCD</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCD&amp;diff=65901"/>
		<updated>2015-06-20T07:45:58Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Offset 38 (0x26) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;52: Footstep sound effect.&lt;br /&gt;
&lt;br /&gt;
I didn&#039;t log in because I don&#039;t have an account... yet. I looks like I was wrong on the arctic terrain, I thought it uses sand effect, but I checked it&#039;s actually normal (2).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I&#039;ve started writing a section on Terrain/Map Editing and the technical portion (the structure of the MCD files and so on) has been already presented here. Should I add the Terrain Editing material to this page or start a new one? [[User:Hobbes|Hobbes]] 19:39, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I am wondering if we might not have a major restructuring of all this stuff. Instead of first &amp;quot;Under the Hood&amp;quot;, then &amp;quot;Game File Analysis&amp;quot;, and then on yet another link, &amp;quot;Saved Games&amp;quot;... I think these parts warrant enough attention (at least by many wiki regulars) that they have their own link off the main page, and then something like this structure:&lt;br /&gt;
&lt;br /&gt;
  Overviews&lt;br /&gt;
  (right here goes overviews of everything, then:)&lt;br /&gt;
    Main Programs And Data&lt;br /&gt;
    Savegame Files&lt;br /&gt;
  Specific Directories And Files&lt;br /&gt;
    Main Programs And Data&lt;br /&gt;
    Savegame Files&lt;br /&gt;
&lt;br /&gt;
Something like that... ANY suggestions welcome, but I think it&#039;s time to revamp the lot of it to show it&#039;s importance to many regulars, and leave places for overviews versus specific things.&lt;br /&gt;
&lt;br /&gt;
Edit: To answer you more specifically, Hobbes: Choose your place; a general place is fine for me. I think we should overhaul the whole structure. I think it&#039;s grown past its original little pecks and nibbles.&lt;br /&gt;
&lt;br /&gt;
What do the rest of you think? ---[[User:MikeTheRed|MikeTheRed]] 19:58, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Sounds spiffy. --[[User:Danial|Danial]] 20:01, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yup, I was planning on doing something like that later on... We&#039;ll have to do it a few times as we introduce more pages, in order to keep everything easy to find.&lt;br /&gt;
&lt;br /&gt;
--[[User:Bomb Bloke|Bomb Bloke]] 20:59, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
== Offsets 22-29 / 0x16-0x1D ==&lt;br /&gt;
&lt;br /&gt;
They seem to be the same as 2-9 bytes of UnitRef table. After MCD loading they are filled with pointers to appropriate pck/tab.&lt;br /&gt;
&lt;br /&gt;
  v60 = &amp;amp;a_mcd_data[result];&lt;br /&gt;
  v60-&amp;gt;field_1A_pck = a_TileSet_Catalog[v_BF_Tileset_Cnt].pck;&lt;br /&gt;
  v60-&amp;gt;field_16_tab = a_TileSet_Catalog[v_BF_Tileset_Cnt].tab;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve found this the same way as for unit pck/tab pointers.&lt;br /&gt;
--[[User:Volutar|Volutar]] 14:27, 21 February 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
== Offset 47 / 0x2F ==&lt;br /&gt;
&lt;br /&gt;
It is set to 1 when the MCD data is used as an opened door tile type. It is only set at runtime when a door is opened. Since MCD data is not saved, this explains the door jam bug that makes the doors stay opened when you reload. You can test that on the medium scout ship: if you open the door to the central reactor room and save/reload, the door will stay stuck. If you now open a door of the same type (and same orientation) and end the turn, the door to the reactor chamber will be closed again on the next turn. [[User:Seb76|Seb76]] 14:18, 13 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Offset 51 / 0x33 ==&lt;br /&gt;
&lt;br /&gt;
Who said this is LIGHT block?&lt;br /&gt;
Game uses this field in calculations of explosion wave permeability, so it apparently should be called &amp;quot;explosion block&amp;quot;&lt;br /&gt;
Function at address .text:00417F40 refers to this field and to the table (dimensions is 11x17: 11 block values for 17 levels of intensity) at .data:0046C45C. This function is used for calculation of how much explosion will come from x/y/z to its neighbour x1/y1.&lt;br /&gt;
--[[User:Volutar|Volutar]] 14:28, 15 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
It&#039;s not that easy as it meets the eye. This function (using field 51) works only for second chained explosion. It doesn&#039;t create lot of smoke comparing to original and first chained explosions...&lt;br /&gt;
&lt;br /&gt;
Does anyone have particular observation of such &#039;&#039;non standard&#039;&#039; explosions behaviour?&lt;br /&gt;
--[[User:Volutar|Volutar]] 05:55, 16 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
This field indeed was ment to be used for lighing calculation (they were using same function for explosion field calculation and for lighting). But they calceled use of this function for light blocking, I dont know why, maybe its results wasn&#039;t very good. Still they&#039;ve left this &amp;quot;lighting&amp;quot; function and it is used after first chained explosion (original, chained1,(enabling!), chained2, chained3, etc). Results are quite unpredictable, since intensivity more than 16 cause getting out of bounds. If you manage to get to this second chained explosion you may notice it looks weird.&lt;br /&gt;
 &lt;br /&gt;
 void DoExplosion(x,y,z,intens,radius)&lt;br /&gt;
 {&lt;br /&gt;
   isExplosion=1;&lt;br /&gt;
   ClearChainedExplBuffer();&lt;br /&gt;
   CalcExplosionLightMap(x,y,z,intense,radius); //&amp;lt;--- depending on isExplosion it calculates damage field or lighting&lt;br /&gt;
   ApplyExplosionDamage(); //&amp;lt;--- adds chained, if something with flag &amp;quot;HE&amp;quot; got exploded&lt;br /&gt;
   while(!ChainedExplosionsEOF())&lt;br /&gt;
   { &lt;br /&gt;
     GetNextChainedExplosion(&amp;amp;x,&amp;amp;y,&amp;amp;z,&amp;amp;intense,&amp;amp;radius)&lt;br /&gt;
     CalcExplosionLightMap(x,y,z,intense,radius);&lt;br /&gt;
     ApplyExplosionDamage(); &lt;br /&gt;
     isExplosion=0; /// &amp;lt;--- WHY??? Obviously a bug&lt;br /&gt;
   }&lt;br /&gt;
   isExplosion=0;&lt;br /&gt;
 }&lt;br /&gt;
BTW, there are only 50 chained explosions possible, 51th won&#039;t explode.&lt;br /&gt;
--[[User:Volutar|Volutar]] 06:41, 16 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
== MCDedit ==&lt;br /&gt;
&lt;br /&gt;
Urgh. MCDedit and support files are gone. Anyone want to put it somewhere more ... permanent? Strategycore files section, for example?&lt;br /&gt;
[[User:Knan|Knan]] 21:25, 13 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
:It&#039;s been in StrategyCore&#039;s files section for &amp;lt;b&amp;gt;years&amp;lt;/b&amp;gt; now. [http://www.strategycore.co.uk/files/index.php?dlid=415 Clicky]. :) --[[User:Zombie|Zombie]] 21:52, 13 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
::Right. Only went looking in the Editors section, Maps didn&#039;t register on the radar. --[[User:Knan|Knan]] 17:47, 14 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Ground with TUs = 0 ==&lt;br /&gt;
&lt;br /&gt;
There are at least 2 ground tiles which consumes 0 TUs to walk through them.&lt;br /&gt;
Interesting thing, that pathfinder deny walk directly on them, you can only walk &#039;&#039;through&#039;&#039;.&lt;br /&gt;
These are 6 and 7 tiles in U_BITS tileset.&lt;br /&gt;
--[[User:Volutar|Volutar]] 08:02, 12 October 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Offset 38 (0x26) ==&lt;br /&gt;
&lt;br /&gt;
  Zombie: Defined as &amp;quot;printype&amp;quot;; 3=whole, 2=right side, 1=left side.&lt;br /&gt;
  Since this is always 3 the game prints the entire object, while the assumption is that&lt;br /&gt;
  values of 2 or 1 are possibly used for the map designer.&lt;br /&gt;
&lt;br /&gt;
Where is it &amp;quot;defined&amp;quot;? It&#039;s not used in the game code AT ALL. There is no check whether it 3,2 or 1.&lt;br /&gt;
What map designer do you mean?&lt;br /&gt;
&lt;br /&gt;
I seems to me as just a fantasy.&lt;br /&gt;
--[[User:Volutar|Volutar]] ([[User talk:Volutar|talk]]) 10:34, 19 June 2015 (EDT)&lt;br /&gt;
&lt;br /&gt;
:Before you accuse me of being delusional or making stuff up, consider that I am working directly off of dev comments from part of the ACTUAL C code from UFO which I received recently. It&#039;s commented in there plain as day. Whether it is actually used in-game anymore is not a earth shattering concern - providing explanations to the remaining unknowns is what I&#039;m after. The burden of proof lies in testing or code digging to see if it is used or not. (You are more than welcome to provide any additional information you can find out). And before this discussion degrades into a &amp;quot;but you only have it, I can&#039;t trust you unless I can see it myself&amp;quot; issue, no, you may not get the C code until I can get it cleared through 2K/Firaxis. --[[User:Zombie|Zombie]] ([[User talk:Zombie|talk]]) 01:08, 20 June 2015 (EDT)&lt;br /&gt;
:: I wasn&#039;t going to accuse you, it&#039;s just... this info is too &amp;quot;out of nowhere&amp;quot; tho _pretty_ detailed, that I suspected it might be the real game source (if I remember correctly they claimed it was simply &amp;quot;lost&amp;quot;). My sources are just reversed exes, tho I tried to dig up through everything I could. Of course they don&#039;t contain any comments or var names to figure out something about structure members which actually was &amp;quot;optimized&amp;quot; and thrown away from EXE as not used. Of course initially they must be having some purpose devs quitted eventually. And of course I trust you. Partial tile rendering COULD be used for some volumetric tiles like wheat, and for some reason that concept was rejected. But structure member remains.&lt;br /&gt;
--[[User:Volutar|Volutar]] ([[User talk:Volutar|talk]]) 03:45, 20 June 2015 (EDT)&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCD&amp;diff=65885</id>
		<title>Talk:MCD</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCD&amp;diff=65885"/>
		<updated>2015-06-19T14:34:13Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Offset 38 (0x26) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;52: Footstep sound effect.&lt;br /&gt;
&lt;br /&gt;
I didn&#039;t log in because I don&#039;t have an account... yet. I looks like I was wrong on the arctic terrain, I thought it uses sand effect, but I checked it&#039;s actually normal (2).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I&#039;ve started writing a section on Terrain/Map Editing and the technical portion (the structure of the MCD files and so on) has been already presented here. Should I add the Terrain Editing material to this page or start a new one? [[User:Hobbes|Hobbes]] 19:39, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I am wondering if we might not have a major restructuring of all this stuff. Instead of first &amp;quot;Under the Hood&amp;quot;, then &amp;quot;Game File Analysis&amp;quot;, and then on yet another link, &amp;quot;Saved Games&amp;quot;... I think these parts warrant enough attention (at least by many wiki regulars) that they have their own link off the main page, and then something like this structure:&lt;br /&gt;
&lt;br /&gt;
  Overviews&lt;br /&gt;
  (right here goes overviews of everything, then:)&lt;br /&gt;
    Main Programs And Data&lt;br /&gt;
    Savegame Files&lt;br /&gt;
  Specific Directories And Files&lt;br /&gt;
    Main Programs And Data&lt;br /&gt;
    Savegame Files&lt;br /&gt;
&lt;br /&gt;
Something like that... ANY suggestions welcome, but I think it&#039;s time to revamp the lot of it to show it&#039;s importance to many regulars, and leave places for overviews versus specific things.&lt;br /&gt;
&lt;br /&gt;
Edit: To answer you more specifically, Hobbes: Choose your place; a general place is fine for me. I think we should overhaul the whole structure. I think it&#039;s grown past its original little pecks and nibbles.&lt;br /&gt;
&lt;br /&gt;
What do the rest of you think? ---[[User:MikeTheRed|MikeTheRed]] 19:58, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Sounds spiffy. --[[User:Danial|Danial]] 20:01, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yup, I was planning on doing something like that later on... We&#039;ll have to do it a few times as we introduce more pages, in order to keep everything easy to find.&lt;br /&gt;
&lt;br /&gt;
--[[User:Bomb Bloke|Bomb Bloke]] 20:59, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
== Offsets 22-29 / 0x16-0x1D ==&lt;br /&gt;
&lt;br /&gt;
They seem to be the same as 2-9 bytes of UnitRef table. After MCD loading they are filled with pointers to appropriate pck/tab.&lt;br /&gt;
&lt;br /&gt;
  v60 = &amp;amp;a_mcd_data[result];&lt;br /&gt;
  v60-&amp;gt;field_1A_pck = a_TileSet_Catalog[v_BF_Tileset_Cnt].pck;&lt;br /&gt;
  v60-&amp;gt;field_16_tab = a_TileSet_Catalog[v_BF_Tileset_Cnt].tab;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve found this the same way as for unit pck/tab pointers.&lt;br /&gt;
--[[User:Volutar|Volutar]] 14:27, 21 February 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
== Offset 47 / 0x2F ==&lt;br /&gt;
&lt;br /&gt;
It is set to 1 when the MCD data is used as an opened door tile type. It is only set at runtime when a door is opened. Since MCD data is not saved, this explains the door jam bug that makes the doors stay opened when you reload. You can test that on the medium scout ship: if you open the door to the central reactor room and save/reload, the door will stay stuck. If you now open a door of the same type (and same orientation) and end the turn, the door to the reactor chamber will be closed again on the next turn. [[User:Seb76|Seb76]] 14:18, 13 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Offset 51 / 0x33 ==&lt;br /&gt;
&lt;br /&gt;
Who said this is LIGHT block?&lt;br /&gt;
Game uses this field in calculations of explosion wave permeability, so it apparently should be called &amp;quot;explosion block&amp;quot;&lt;br /&gt;
Function at address .text:00417F40 refers to this field and to the table (dimensions is 11x17: 11 block values for 17 levels of intensity) at .data:0046C45C. This function is used for calculation of how much explosion will come from x/y/z to its neighbour x1/y1.&lt;br /&gt;
--[[User:Volutar|Volutar]] 14:28, 15 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
It&#039;s not that easy as it meets the eye. This function (using field 51) works only for second chained explosion. It doesn&#039;t create lot of smoke comparing to original and first chained explosions...&lt;br /&gt;
&lt;br /&gt;
Does anyone have particular observation of such &#039;&#039;non standard&#039;&#039; explosions behaviour?&lt;br /&gt;
--[[User:Volutar|Volutar]] 05:55, 16 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
This field indeed was ment to be used for lighing calculation (they were using same function for explosion field calculation and for lighting). But they calceled use of this function for light blocking, I dont know why, maybe its results wasn&#039;t very good. Still they&#039;ve left this &amp;quot;lighting&amp;quot; function and it is used after first chained explosion (original, chained1,(enabling!), chained2, chained3, etc). Results are quite unpredictable, since intensivity more than 16 cause getting out of bounds. If you manage to get to this second chained explosion you may notice it looks weird.&lt;br /&gt;
 &lt;br /&gt;
 void DoExplosion(x,y,z,intens,radius)&lt;br /&gt;
 {&lt;br /&gt;
   isExplosion=1;&lt;br /&gt;
   ClearChainedExplBuffer();&lt;br /&gt;
   CalcExplosionLightMap(x,y,z,intense,radius); //&amp;lt;--- depending on isExplosion it calculates damage field or lighting&lt;br /&gt;
   ApplyExplosionDamage(); //&amp;lt;--- adds chained, if something with flag &amp;quot;HE&amp;quot; got exploded&lt;br /&gt;
   while(!ChainedExplosionsEOF())&lt;br /&gt;
   { &lt;br /&gt;
     GetNextChainedExplosion(&amp;amp;x,&amp;amp;y,&amp;amp;z,&amp;amp;intense,&amp;amp;radius)&lt;br /&gt;
     CalcExplosionLightMap(x,y,z,intense,radius);&lt;br /&gt;
     ApplyExplosionDamage(); &lt;br /&gt;
     isExplosion=0; /// &amp;lt;--- WHY??? Obviously a bug&lt;br /&gt;
   }&lt;br /&gt;
   isExplosion=0;&lt;br /&gt;
 }&lt;br /&gt;
BTW, there are only 50 chained explosions possible, 51th won&#039;t explode.&lt;br /&gt;
--[[User:Volutar|Volutar]] 06:41, 16 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
== MCDedit ==&lt;br /&gt;
&lt;br /&gt;
Urgh. MCDedit and support files are gone. Anyone want to put it somewhere more ... permanent? Strategycore files section, for example?&lt;br /&gt;
[[User:Knan|Knan]] 21:25, 13 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
:It&#039;s been in StrategyCore&#039;s files section for &amp;lt;b&amp;gt;years&amp;lt;/b&amp;gt; now. [http://www.strategycore.co.uk/files/index.php?dlid=415 Clicky]. :) --[[User:Zombie|Zombie]] 21:52, 13 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
::Right. Only went looking in the Editors section, Maps didn&#039;t register on the radar. --[[User:Knan|Knan]] 17:47, 14 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Ground with TUs = 0 ==&lt;br /&gt;
&lt;br /&gt;
There are at least 2 ground tiles which consumes 0 TUs to walk through them.&lt;br /&gt;
Interesting thing, that pathfinder deny walk directly on them, you can only walk &#039;&#039;through&#039;&#039;.&lt;br /&gt;
These are 6 and 7 tiles in U_BITS tileset.&lt;br /&gt;
--[[User:Volutar|Volutar]] 08:02, 12 October 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Offset 38 (0x26) ==&lt;br /&gt;
&lt;br /&gt;
  Zombie: Defined as &amp;quot;printype&amp;quot;; 3=whole, 2=right side, 1=left side.&lt;br /&gt;
  Since this is always 3 the game prints the entire object, while the assumption is that&lt;br /&gt;
  values of 2 or 1 are possibly used for the map designer.&lt;br /&gt;
&lt;br /&gt;
Where is it &amp;quot;defined&amp;quot;? It&#039;s not used in the game code AT ALL. There is no check whether it 3,2 or 1.&lt;br /&gt;
What map designer do you mean?&lt;br /&gt;
&lt;br /&gt;
I seems to me as just a fantasy.&lt;br /&gt;
--[[User:Volutar|Volutar]] ([[User talk:Volutar|talk]]) 10:34, 19 June 2015 (EDT)&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCD&amp;diff=65884</id>
		<title>Talk:MCD</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCD&amp;diff=65884"/>
		<updated>2015-06-19T14:33:55Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Offset 38 (0x26) */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;52: Footstep sound effect.&lt;br /&gt;
&lt;br /&gt;
I didn&#039;t log in because I don&#039;t have an account... yet. I looks like I was wrong on the arctic terrain, I thought it uses sand effect, but I checked it&#039;s actually normal (2).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I&#039;ve started writing a section on Terrain/Map Editing and the technical portion (the structure of the MCD files and so on) has been already presented here. Should I add the Terrain Editing material to this page or start a new one? [[User:Hobbes|Hobbes]] 19:39, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I am wondering if we might not have a major restructuring of all this stuff. Instead of first &amp;quot;Under the Hood&amp;quot;, then &amp;quot;Game File Analysis&amp;quot;, and then on yet another link, &amp;quot;Saved Games&amp;quot;... I think these parts warrant enough attention (at least by many wiki regulars) that they have their own link off the main page, and then something like this structure:&lt;br /&gt;
&lt;br /&gt;
  Overviews&lt;br /&gt;
  (right here goes overviews of everything, then:)&lt;br /&gt;
    Main Programs And Data&lt;br /&gt;
    Savegame Files&lt;br /&gt;
  Specific Directories And Files&lt;br /&gt;
    Main Programs And Data&lt;br /&gt;
    Savegame Files&lt;br /&gt;
&lt;br /&gt;
Something like that... ANY suggestions welcome, but I think it&#039;s time to revamp the lot of it to show it&#039;s importance to many regulars, and leave places for overviews versus specific things.&lt;br /&gt;
&lt;br /&gt;
Edit: To answer you more specifically, Hobbes: Choose your place; a general place is fine for me. I think we should overhaul the whole structure. I think it&#039;s grown past its original little pecks and nibbles.&lt;br /&gt;
&lt;br /&gt;
What do the rest of you think? ---[[User:MikeTheRed|MikeTheRed]] 19:58, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Sounds spiffy. --[[User:Danial|Danial]] 20:01, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yup, I was planning on doing something like that later on... We&#039;ll have to do it a few times as we introduce more pages, in order to keep everything easy to find.&lt;br /&gt;
&lt;br /&gt;
--[[User:Bomb Bloke|Bomb Bloke]] 20:59, 18 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
== Offsets 22-29 / 0x16-0x1D ==&lt;br /&gt;
&lt;br /&gt;
They seem to be the same as 2-9 bytes of UnitRef table. After MCD loading they are filled with pointers to appropriate pck/tab.&lt;br /&gt;
&lt;br /&gt;
  v60 = &amp;amp;a_mcd_data[result];&lt;br /&gt;
  v60-&amp;gt;field_1A_pck = a_TileSet_Catalog[v_BF_Tileset_Cnt].pck;&lt;br /&gt;
  v60-&amp;gt;field_16_tab = a_TileSet_Catalog[v_BF_Tileset_Cnt].tab;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve found this the same way as for unit pck/tab pointers.&lt;br /&gt;
--[[User:Volutar|Volutar]] 14:27, 21 February 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
== Offset 47 / 0x2F ==&lt;br /&gt;
&lt;br /&gt;
It is set to 1 when the MCD data is used as an opened door tile type. It is only set at runtime when a door is opened. Since MCD data is not saved, this explains the door jam bug that makes the doors stay opened when you reload. You can test that on the medium scout ship: if you open the door to the central reactor room and save/reload, the door will stay stuck. If you now open a door of the same type (and same orientation) and end the turn, the door to the reactor chamber will be closed again on the next turn. [[User:Seb76|Seb76]] 14:18, 13 December 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Offset 51 / 0x33 ==&lt;br /&gt;
&lt;br /&gt;
Who said this is LIGHT block?&lt;br /&gt;
Game uses this field in calculations of explosion wave permeability, so it apparently should be called &amp;quot;explosion block&amp;quot;&lt;br /&gt;
Function at address .text:00417F40 refers to this field and to the table (dimensions is 11x17: 11 block values for 17 levels of intensity) at .data:0046C45C. This function is used for calculation of how much explosion will come from x/y/z to its neighbour x1/y1.&lt;br /&gt;
--[[User:Volutar|Volutar]] 14:28, 15 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
It&#039;s not that easy as it meets the eye. This function (using field 51) works only for second chained explosion. It doesn&#039;t create lot of smoke comparing to original and first chained explosions...&lt;br /&gt;
&lt;br /&gt;
Does anyone have particular observation of such &#039;&#039;non standard&#039;&#039; explosions behaviour?&lt;br /&gt;
--[[User:Volutar|Volutar]] 05:55, 16 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
This field indeed was ment to be used for lighing calculation (they were using same function for explosion field calculation and for lighting). But they calceled use of this function for light blocking, I dont know why, maybe its results wasn&#039;t very good. Still they&#039;ve left this &amp;quot;lighting&amp;quot; function and it is used after first chained explosion (original, chained1,(enabling!), chained2, chained3, etc). Results are quite unpredictable, since intensivity more than 16 cause getting out of bounds. If you manage to get to this second chained explosion you may notice it looks weird.&lt;br /&gt;
 &lt;br /&gt;
 void DoExplosion(x,y,z,intens,radius)&lt;br /&gt;
 {&lt;br /&gt;
   isExplosion=1;&lt;br /&gt;
   ClearChainedExplBuffer();&lt;br /&gt;
   CalcExplosionLightMap(x,y,z,intense,radius); //&amp;lt;--- depending on isExplosion it calculates damage field or lighting&lt;br /&gt;
   ApplyExplosionDamage(); //&amp;lt;--- adds chained, if something with flag &amp;quot;HE&amp;quot; got exploded&lt;br /&gt;
   while(!ChainedExplosionsEOF())&lt;br /&gt;
   { &lt;br /&gt;
     GetNextChainedExplosion(&amp;amp;x,&amp;amp;y,&amp;amp;z,&amp;amp;intense,&amp;amp;radius)&lt;br /&gt;
     CalcExplosionLightMap(x,y,z,intense,radius);&lt;br /&gt;
     ApplyExplosionDamage(); &lt;br /&gt;
     isExplosion=0; /// &amp;lt;--- WHY??? Obviously a bug&lt;br /&gt;
   }&lt;br /&gt;
   isExplosion=0;&lt;br /&gt;
 }&lt;br /&gt;
BTW, there are only 50 chained explosions possible, 51th won&#039;t explode.&lt;br /&gt;
--[[User:Volutar|Volutar]] 06:41, 16 April 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
== MCDedit ==&lt;br /&gt;
&lt;br /&gt;
Urgh. MCDedit and support files are gone. Anyone want to put it somewhere more ... permanent? Strategycore files section, for example?&lt;br /&gt;
[[User:Knan|Knan]] 21:25, 13 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
:It&#039;s been in StrategyCore&#039;s files section for &amp;lt;b&amp;gt;years&amp;lt;/b&amp;gt; now. [http://www.strategycore.co.uk/files/index.php?dlid=415 Clicky]. :) --[[User:Zombie|Zombie]] 21:52, 13 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
::Right. Only went looking in the Editors section, Maps didn&#039;t register on the radar. --[[User:Knan|Knan]] 17:47, 14 March 2009 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Ground with TUs = 0 ==&lt;br /&gt;
&lt;br /&gt;
There are at least 2 ground tiles which consumes 0 TUs to walk through them.&lt;br /&gt;
Interesting thing, that pathfinder deny walk directly on them, you can only walk &#039;&#039;through&#039;&#039;.&lt;br /&gt;
These are 6 and 7 tiles in U_BITS tileset.&lt;br /&gt;
--[[User:Volutar|Volutar]] 08:02, 12 October 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Offset 38 (0x26) ==&lt;br /&gt;
&lt;br /&gt;
  Zombie: Defined as &amp;quot;printype&amp;quot;; 3=whole, 2=right side, 1=left side.&lt;br /&gt;
  Since this is always 3 the game prints the entire object, while the assumption is that&lt;br /&gt;
  values of 2 or 1 are possibly used for the map designer.&lt;br /&gt;
&lt;br /&gt;
Where is it &amp;quot;defined&amp;quot;? It&#039;s not used in the game code AT ALL. There is no check whether it 3,2 or 1.&lt;br /&gt;
What map designer do you mean?&lt;br /&gt;
&lt;br /&gt;
I seems to me as just a fantasy.&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63849</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63849"/>
		<updated>2015-04-06T07:12:02Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* PCK editor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;Tab&#039;&#039;/&#039;&#039;Shift+Tab&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You can change spacing between sprites, and margins in &#039;&#039;Edit-&amp;gt;Settings...&#039;&#039;. It will work for both export to and import from PNG, so pay attention, if you&#039;re using non-standard values. Also you can change number of sprites per row when exporting images.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17g (2015-04-06) ([http://volutar.eu5.org/_mcdedit117g.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=63848</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=63848"/>
		<updated>2015-04-06T07:10:57Z</updated>

		<summary type="html">&lt;p&gt;Volutar: 1.17g&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-09 v1.17c====&lt;br /&gt;
* Added &amp;quot;Append MCD&amp;quot; (File menu) - chosing another MCD file to be added to the end of current (including PCK and all necessary reference values). MCD count shouldn&#039;t exceed 255.&lt;br /&gt;
* Added command line options, which override corresponding .lyt file values during the start (case sensitive):&lt;br /&gt;
  -custom_mcd [true/false, if it&#039;s custom MCD mode or not]&lt;br /&gt;
  -game_type [1/2]&lt;br /&gt;
  -pal_idx [0-4]&lt;br /&gt;
  -mcd_pref [full path to mcd folder]&lt;br /&gt;
  -selectedfilename [mcd/pck/tab filename without extension]&lt;br /&gt;
  -SelectMCD [selected mcd ID]&lt;br /&gt;
* Added special file (MCD_Saved.dat), which will receivereach saved file absolute path and filename (without extension).&lt;br /&gt;
* RMB click to MCD list doesn&#039;t selcet clicked MCD anymore.&lt;br /&gt;
* Added multiple MCD selection (shift, ctrl)&lt;br /&gt;
* Added delete/clear/copy/paste MCDs throughout selected.&lt;br /&gt;
* Paste MCDs works in two modes: 1. Only one MCD is selected during paste - it will override MCDs sequentially from the buffer; 2. Multiple MCDs are selected during paste (as targets) - it will run through selected MCDs and will override them from the buffer, if buffer run out of MCDs - it will start from first in the buffer (so if copy 1, and paste to 10 will clone it);&lt;br /&gt;
* When multiple MCDs are selected, it becomes possible to modify values of selected MCDs at once (works only for data values, no SCANG, sprite or LOFT). If values are different throughout the selection, it will show &amp;quot;mix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
** Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
====2015-02-18 v1.17e====&lt;br /&gt;
* Added aggregation of SCANG, PCK numbers (animation) and LOFTs for multiple selected MCDs, and multiple modification.&lt;br /&gt;
* When there&#039;s no multiple selected MCDs, it will paste MCD only for single selection (previously paste worked sequentially).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** More informative PCK deletion error.&lt;br /&gt;
** Fixed png import with untouched palette (they were still re-converted for first 16 columnts).&lt;br /&gt;
** Added copy/paste into/from clipboard of multiple PCKs&lt;br /&gt;
** Added export/import from PNG of multiple PCKs (the way similar to sheet - side by side, 10 in row)&lt;br /&gt;
&lt;br /&gt;
====2015-02-19 v1.17f====&lt;br /&gt;
* Added multiple MCDs adding to menu (1,5 and 15)&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
* Added multiple PCKs adding to menu (1,5 and 15)&lt;br /&gt;
&lt;br /&gt;
====2015-02-19 v1.17g====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
* Fixed RGBA png import.&lt;br /&gt;
* Fixed insert new PCK.&lt;br /&gt;
* Added &amp;quot;Settings&amp;quot; menu with PCK sheet margin/spacing options and number of sprites per row for export.&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63847</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63847"/>
		<updated>2015-04-06T07:08:04Z</updated>

		<summary type="html">&lt;p&gt;Volutar: 1.17g&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;Tab&#039;&#039;/&#039;&#039;Shift+Tab&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
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.&lt;br /&gt;
You can change spacing between sprites, and margins in &#039;&#039;Edit-&amp;gt;Settings...&#039;&#039;. It will work for both export to and import from PNG, so pay attention, if you&#039;re using non-standard values.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17g (2015-04-06) ([http://volutar.eu5.org/_mcdedit117g.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63834</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63834"/>
		<updated>2015-04-04T17:18:21Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;Tab&#039;&#039;/&#039;&#039;Shift+Tab&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Selected PCKs are exported as PNG image with sprites of 32x40 pixels size, placed side by side, 10 in row. PNG is saved as 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17f (2015-04-04) ([http://volutar.eu5.org/_mcdedit117f.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:%D0%98%D0%BD%D0%BE%D0%BF%D0%BB%D0%B0%D0%BD%D0%B5%D1%82%D0%BD%D1%8B%D0%B5_%D1%84%D0%BE%D1%80%D0%BC%D1%8B_%D0%B6%D0%B8%D0%B7%D0%BD%D0%B8_(TFTD)&amp;diff=63454</id>
		<title>Talk:Инопланетные формы жизни (TFTD)</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:%D0%98%D0%BD%D0%BE%D0%BF%D0%BB%D0%B0%D0%BD%D0%B5%D1%82%D0%BD%D1%8B%D0%B5_%D1%84%D0%BE%D1%80%D0%BC%D1%8B_%D0%B6%D0%B8%D0%B7%D0%BD%D0%B8_(TFTD)&amp;diff=63454"/>
		<updated>2015-03-10T16:36:54Z</updated>

		<summary type="html">&lt;p&gt;Volutar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Имена пришельцев ==&lt;br /&gt;
&lt;br /&gt;
Насчет переводов имен пришельцев:&lt;br /&gt;
* «Аквалангист», на мой взгляд, точнее и более по-русски звучит, чем «акватоид» (хотя можно оставить для сходства с сектоидом, который выглядит похоже);&lt;br /&gt;
* «Джиллмен» и «Лобстермен» точно ли лучше использовать в транскрипции, не переводя как «человек-...»?&lt;br /&gt;
* «Тасот» — в оригинальном названии в конце там есть «h», то есть «тасотх».&lt;br /&gt;
* «Калкинит» — может тогда «Кальцинит»? Имхо красивее звучит.&lt;br /&gt;
* «Галлусиноид» — опять же, предлагаю «ц» вместо «с».&lt;br /&gt;
* «Тентакулат» — вариант с переводом как «Тентакль» (щупальце) не более красив? Пока непонятно, кто это такой.&lt;br /&gt;
* «Трискен» — предлагаю Трисцен или Трисцин согласно комментариям на форуме.&lt;br /&gt;
* «Зарквид» — точно так правильнее? По-английски он кажется Ксарквид тогда. --[[User:Farpost|Farpost]] 07:42, 9 August 2010 (EDT)&lt;br /&gt;
:Каждый раз спотыкаюсь о &amp;quot;Зарквида&amp;quot; и каждый раз откладываю &amp;quot;на потом&amp;quot;.. Я все же за то, чтобы оставить оригинальное звучание названия, т.е. &amp;quot;Ксарквид&amp;quot; --[[User:Ufo.mesh|ufo.mesh]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Те, кто играли в русскую версию TFTD, привыкли именно к таким названиям. На мой взгляд, в игре названия рас не переводили, а записали транскрипцию русскими буквами, т.е. так, как это произносится в английском.&lt;br /&gt;
Предлагаю по всем названиям рас, оружия, кораблей отталкиваться от их названий в русских версиях игр. --[[User:Keloraen|Keloraen]]&lt;br /&gt;
&lt;br /&gt;
:: Tasoth — в русском языке нет звука th (ð). Пусть уж лучше будет тасот.&lt;br /&gt;
:: Аквалангист — выбивается из общего ряда.&lt;br /&gt;
:: С Кальцинитом, трисценом и ксаргвидом я согласен, так звучит гораздо лучше. Ну и конечно галлюциноид. --[[User:Kildor|Kildor]] 01:44, 10 August 2010 (EDT)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; С Кальцинитом, трисценом и ксаргвидом я согласен, так звучит гораздо лучше. Ну и конечно галлюциноид.&lt;br /&gt;
Буква &amp;quot;с&amp;quot; в английском может означать &amp;quot;к&amp;quot; и &amp;quot;с&amp;quot;, но не &amp;quot;ц&amp;quot;. Думаю, мы переводим не из соображений благозвучности, а исходя из правильного произношения.&lt;br /&gt;
:Если не ошибаюсь, то &amp;quot;Triscen&amp;quot; читается как &amp;quot;Триссен&amp;quot;, но вторая &amp;quot;с&amp;quot; как бы немного иначе звучит. Но мне почему-то ближе все-таки &amp;quot;Трисцен&amp;quot;. Да, иногда &amp;quot;с&amp;quot; читается как &amp;quot;к&amp;quot; (Cthulhu, например), но не в этом случае. --[[User:Ufo.mesh|ufo.mesh]]&lt;br /&gt;
И, если не ошибаюсь, нечто подобное со словами, начинающимися на &amp;quot;Х&amp;quot;, которая &amp;quot;кс&amp;quot;. Такие слова принято переводить, заменяя &amp;quot;кс&amp;quot; на &amp;quot;з&amp;quot;. Вспомните Xena=Зена, поэтому Xarquid=Зарквид. --[[User:Keloraen|Keloraen]]&lt;br /&gt;
:Что такое Зена? А как же &amp;quot;ксенофобия&amp;quot;, &amp;quot;ксерокс&amp;quot;? --[[User:Ufo.mesh|ufo.mesh]]&lt;br /&gt;
&lt;br /&gt;
Гм. Слово «Кальцинит», на мой взгляд, происходит от названия кальций, который по-английски как раз «Calcium».&lt;br /&gt;
&lt;br /&gt;
Трисцен — динозавр, можно перевести по аналогии, как на форуме писали, «Цератопсиды» — англ. «Ceratopsidae», то есть опять же «ц».&lt;br /&gt;
&lt;br /&gt;
Ну и по медузе: «Hallucination» — «Галлюцинация», здесь можно сделать также — Галлюционоид.&lt;br /&gt;
&lt;br /&gt;
Тентакулата не лучше ли тогда перевести как «Тентакль» или «Щупальце»? Слово Тентакулат явно происходит от него.&lt;br /&gt;
&lt;br /&gt;
А чем из общего ряда выбивается аквалангист? По смыслу вроде соответствует, разве что может быть путаница с аквалангистами X-Com. --[[User:Farpost|Farpost]]&lt;br /&gt;
&lt;br /&gt;
У тентакулята не одно щупальце, каждое из которых по отдельности называется «тентакля». Владеет тентаклями тентакулят, все логично :) . --[[User:-=Troll=-|-=Troll=-]] 14:24, 10 August 2010 (EDT)&lt;br /&gt;
&lt;br /&gt;
Всуну свои 2 копейки.&lt;br /&gt;
Во-первых изначальный досовский перевод не может считаться эталоном. Во-вторых, &amp;quot;уфопедия&amp;quot; как таковая - сборник наукоподобных знаний, соответственно названия должны транслитирироваться по-латыни (если не переводится): Акватоид, Гиллмен, Тасот, Кальцинит, Галлюциноид, Тентаклит, Трисцен, Ксарквид.--[[User:Volutar|Volutar]] ([[User talk:Volutar|talk]]) 12:36, 10 March 2015 (EDT)&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:%D0%98%D0%BD%D0%BE%D0%BF%D0%BB%D0%B0%D0%BD%D0%B5%D1%82%D0%BD%D1%8B%D0%B5_%D1%84%D0%BE%D1%80%D0%BC%D1%8B_%D0%B6%D0%B8%D0%B7%D0%BD%D0%B8_(TFTD)&amp;diff=63453</id>
		<title>Talk:Инопланетные формы жизни (TFTD)</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:%D0%98%D0%BD%D0%BE%D0%BF%D0%BB%D0%B0%D0%BD%D0%B5%D1%82%D0%BD%D1%8B%D0%B5_%D1%84%D0%BE%D1%80%D0%BC%D1%8B_%D0%B6%D0%B8%D0%B7%D0%BD%D0%B8_(TFTD)&amp;diff=63453"/>
		<updated>2015-03-10T16:36:39Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Имена пришельцев */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Имена пришельцев ==&lt;br /&gt;
&lt;br /&gt;
Насчет переводов имен пришельцев:&lt;br /&gt;
* «Аквалангист», на мой взгляд, точнее и более по-русски звучит, чем «акватоид» (хотя можно оставить для сходства с сектоидом, который выглядит похоже);&lt;br /&gt;
* «Джиллмен» и «Лобстермен» точно ли лучше использовать в транскрипции, не переводя как «человек-...»?&lt;br /&gt;
* «Тасот» — в оригинальном названии в конце там есть «h», то есть «тасотх».&lt;br /&gt;
* «Калкинит» — может тогда «Кальцинит»? Имхо красивее звучит.&lt;br /&gt;
* «Галлусиноид» — опять же, предлагаю «ц» вместо «с».&lt;br /&gt;
* «Тентакулат» — вариант с переводом как «Тентакль» (щупальце) не более красив? Пока непонятно, кто это такой.&lt;br /&gt;
* «Трискен» — предлагаю Трисцен или Трисцин согласно комментариям на форуме.&lt;br /&gt;
* «Зарквид» — точно так правильнее? По-английски он кажется Ксарквид тогда. --[[User:Farpost|Farpost]] 07:42, 9 August 2010 (EDT)&lt;br /&gt;
:Каждый раз спотыкаюсь о &amp;quot;Зарквида&amp;quot; и каждый раз откладываю &amp;quot;на потом&amp;quot;.. Я все же за то, чтобы оставить оригинальное звучание названия, т.е. &amp;quot;Ксарквид&amp;quot; --[[User:Ufo.mesh|ufo.mesh]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Те, кто играли в русскую версию TFTD, привыкли именно к таким названиям. На мой взгляд, в игре названия рас не переводили, а записали транскрипцию русскими буквами, т.е. так, как это произносится в английском.&lt;br /&gt;
Предлагаю по всем названиям рас, оружия, кораблей отталкиваться от их названий в русских версиях игр. --[[User:Keloraen|Keloraen]]&lt;br /&gt;
&lt;br /&gt;
:: Tasoth — в русском языке нет звука th (ð). Пусть уж лучше будет тасот.&lt;br /&gt;
:: Аквалангист — выбивается из общего ряда.&lt;br /&gt;
:: С Кальцинитом, трисценом и ксаргвидом я согласен, так звучит гораздо лучше. Ну и конечно галлюциноид. --[[User:Kildor|Kildor]] 01:44, 10 August 2010 (EDT)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; С Кальцинитом, трисценом и ксаргвидом я согласен, так звучит гораздо лучше. Ну и конечно галлюциноид.&lt;br /&gt;
Буква &amp;quot;с&amp;quot; в английском может означать &amp;quot;к&amp;quot; и &amp;quot;с&amp;quot;, но не &amp;quot;ц&amp;quot;. Думаю, мы переводим не из соображений благозвучности, а исходя из правильного произношения.&lt;br /&gt;
:Если не ошибаюсь, то &amp;quot;Triscen&amp;quot; читается как &amp;quot;Триссен&amp;quot;, но вторая &amp;quot;с&amp;quot; как бы немного иначе звучит. Но мне почему-то ближе все-таки &amp;quot;Трисцен&amp;quot;. Да, иногда &amp;quot;с&amp;quot; читается как &amp;quot;к&amp;quot; (Cthulhu, например), но не в этом случае. --[[User:Ufo.mesh|ufo.mesh]]&lt;br /&gt;
И, если не ошибаюсь, нечто подобное со словами, начинающимися на &amp;quot;Х&amp;quot;, которая &amp;quot;кс&amp;quot;. Такие слова принято переводить, заменяя &amp;quot;кс&amp;quot; на &amp;quot;з&amp;quot;. Вспомните Xena=Зена, поэтому Xarquid=Зарквид. --[[User:Keloraen|Keloraen]]&lt;br /&gt;
:Что такое Зена? А как же &amp;quot;ксенофобия&amp;quot;, &amp;quot;ксерокс&amp;quot;? --[[User:Ufo.mesh|ufo.mesh]]&lt;br /&gt;
&lt;br /&gt;
Гм. Слово «Кальцинит», на мой взгляд, происходит от названия кальций, который по-английски как раз «Calcium».&lt;br /&gt;
&lt;br /&gt;
Трисцен — динозавр, можно перевести по аналогии, как на форуме писали, «Цератопсиды» — англ. «Ceratopsidae», то есть опять же «ц».&lt;br /&gt;
&lt;br /&gt;
Ну и по медузе: «Hallucination» — «Галлюцинация», здесь можно сделать также — Галлюционоид.&lt;br /&gt;
&lt;br /&gt;
Тентакулата не лучше ли тогда перевести как «Тентакль» или «Щупальце»? Слово Тентакулат явно происходит от него.&lt;br /&gt;
&lt;br /&gt;
А чем из общего ряда выбивается аквалангист? По смыслу вроде соответствует, разве что может быть путаница с аквалангистами X-Com. --[[User:Farpost|Farpost]]&lt;br /&gt;
&lt;br /&gt;
У тентакулята не одно щупальце, каждое из которых по отдельности называется «тентакля». Владеет тентаклями тентакулят, все логично :) . --[[User:-=Troll=-|-=Troll=-]] 14:24, 10 August 2010 (EDT)&lt;br /&gt;
&lt;br /&gt;
Всуну свои 2 копейки.&lt;br /&gt;
Во-первых изначальный досовский перевод не может считаться эталоном. Во-вторых, &amp;quot;уфопедия&amp;quot; как таковая - сборник наукоподобных знаний, соответственно названия должны транслитирироваться по-латыни (если не переводится): Акватоид, Гиллмен, Тасот, Кальцинит, Галлюциноид, Тентаклит, Трисцен, Ксарквид.&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63087</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63087"/>
		<updated>2015-02-24T19:02:34Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;Tab&#039;&#039;/&#039;&#039;Shift+Tab&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Selected PCKs are exported as PNG image with sprites of 32x40 pixels size, placed side by side, 10 in row. PNG is saved as 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17f (2015-02-24) ([http://volutar.eu5.org/_mcdedit117f.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63086</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63086"/>
		<updated>2015-02-24T19:02:15Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;Tab&#039;&#039;/&#039;&#039;Shift+Tab&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Selected PCKs are exported as PNG image with sprites of 32x40 pixels size, placed side by side, 10 in row. PNG is saved as 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17f (2015-02-14) ([http://volutar.eu5.org/_mcdedit117f.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=SOUND&amp;diff=63004</id>
		<title>SOUND</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=SOUND&amp;diff=63004"/>
		<updated>2015-02-19T18:29:33Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* SAMPLE2.CAT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This directory contains all the sound effects and music.&lt;br /&gt;
&lt;br /&gt;
There are three different versions of UFO sound engine:&lt;br /&gt;
* DOS, before 1.4 patch&lt;br /&gt;
* DOS, after 1.4 patch&lt;br /&gt;
* CE&lt;br /&gt;
&lt;br /&gt;
==Music files==&lt;br /&gt;
&lt;br /&gt;
Music for different soundcards is stored in following files:&lt;br /&gt;
* DOS 1.2 - for some reason music for intro is stored in separate file&lt;br /&gt;
** ADLIB.CAT, AINTRO.CAT - AdLib and Soundblaster&lt;br /&gt;
** ROLAND.CAT, RINTRO.CAT - Roland&lt;br /&gt;
* DOS 1.4&lt;br /&gt;
** ADLIB.CAT&lt;br /&gt;
** GM.CAT - General Midi&lt;br /&gt;
** DRIVERS.CAT - not exactly music file. It contains various com files for different soundcards. The appropriate files are extracted by setup, and then wrapped in sndstart.exe/sndend.exe called from main bat file.&lt;br /&gt;
* CE - these are just midi files, one for each music sequence&lt;br /&gt;
&lt;br /&gt;
==Sound files==&lt;br /&gt;
The sound effects files are:&lt;br /&gt;
* DOS 1.2&lt;br /&gt;
** INTRO.CAT - intro&lt;br /&gt;
** SOUND1.CAT - battlescape&lt;br /&gt;
** SOUND2.CAT - geoscape&lt;br /&gt;
* DOS 1.4&lt;br /&gt;
** SAMPLE.CAT - geoscape&lt;br /&gt;
** SAMPLE2.CAT - battlescape&lt;br /&gt;
** SAMPLE3.CAT - intro&lt;br /&gt;
* CE - uses same files as 1.4. However, no sound is played in intro, only music.&lt;br /&gt;
&lt;br /&gt;
==Differences between versions==&lt;br /&gt;
The main difference versions is quality.&lt;br /&gt;
* 1.2: 8000 Hz, 6 bit.&lt;br /&gt;
* 1.4: 11025 Hz, 8 bit.&lt;br /&gt;
* CE: same as 1.4, but it will play .wav files correctly with higher sampling rate hacked into game. - &#039;&#039;Is that what was intended to be said here? - [[User:Phoenix|Phoenix]]&#039;&#039; - &#039;&#039; The files in CE (and 1.4) contain actual waves with headers. CE does not have fixed quality setting, but uses data from those headers. - [[User:Quantifier|Quantifier]]&lt;br /&gt;
&lt;br /&gt;
The other difference are completely new files. Patch leaves old files, but they are no longer used. Most effects sound the same, but some, especially alien death screams have been changed.&lt;br /&gt;
&lt;br /&gt;
==SAMPLE2.CAT==&lt;br /&gt;
&lt;br /&gt;
This following is a list of the sounds as they are arranged in SAMPLE2.CAT with the offset of where in the file they begin and how long each sample is.  I have left the reference numbers and offsets in Hex code since this is how the program references them.  The offsets are left &amp;quot;as is&amp;quot; so one needs to read them in reverse order (B8 01 is 01B8).--[[User:Morgan525|Tycho]] 03:56, 4 March 2012 (EST)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ref#	offset		 length	        Description&lt;br /&gt;
&lt;br /&gt;
00	B8 01  	          02 2B	        Snakeman slither&lt;br /&gt;
01	BD 2C  	          63 01  	not used (empty in 1.2, garbage in 1.4)&lt;br /&gt;
02	23 2E  	          19 2F  	big gun shot&lt;br /&gt;
03	3F 5D  	          57 19  	normal door open&lt;br /&gt;
04	99 76  	          FF 22  	rifle/pistol shot&lt;br /&gt;
05	9B 99  	          2B 51  	large explosion&lt;br /&gt;
06	C9 EA  	          0C 3E  	muton scream&lt;br /&gt;
07	D8 28 01  	  B4 33  	celatid scream&lt;br /&gt;
08	8F 5C 01  	  61 38  	snakeman/silacoid scream&lt;br /&gt;
09	F3 94 01 	  28 2F  	ethereal/chryssalid scream&lt;br /&gt;
0A	1E C4 01 	  3E 2B  	sectoid/floater/reaper scream&lt;br /&gt;
0B	5F EF 01  	  43 27  	laser shot&lt;br /&gt;
OC	A5 16 02  	  A2 39  	small explosion&lt;br /&gt;
0D	4A 50 02 	  29 25  	ammo hit w/metal thunk&lt;br /&gt;
0E	76 75 02  	  48 2C  	standard tank move&lt;br /&gt;
OF	C1 A1 02  	  64 3C  	flying movement warble&lt;br /&gt;
10	28 DE 02 	  02 2B  	celatid move (~snakeman slither)&lt;br /&gt;
11	2D 09 03 	  99 0D  	reload clicking&lt;br /&gt;
12	C9 16 03 	  8D 2A  	plasma shot&lt;br /&gt;
13	59 41 03  	  6C 34  	laser/plasma hit&lt;br /&gt;
14	C8 75 03  	  1C 33  	ufo door open1&lt;br /&gt;
15	E7 A8 03 	  76 21  	ufo door open2&lt;br /&gt;
16	60 CA 03 	  97 34  	pistol/rifle hit&lt;br /&gt;
17	FA FE 03 	  B0 5B  	sectopod/cyberdisc scream (machine death)&lt;br /&gt;
18	AD 5A 04          55 07  	footstep on metal 1&lt;br /&gt;
19	05 62 04 	  66 0A  	footstep on metal 2&lt;br /&gt;
1A	6E 6C 04          AF 06  	footstep on ground1&lt;br /&gt;
1B	20 73 04  	  6B 08  	footstep on ground2&lt;br /&gt;
1C	8E 7B 04  	  F3 0E  	footstep on mars1&lt;br /&gt;
1D	84 8A 04 	  F8 0B  	footstep on mars2&lt;br /&gt;
1E	7F 96 04  	  E3 06  	footstep on mud1&lt;br /&gt;
1F	65 9D 04 	  A8 08  	footstep on mud2&lt;br /&gt;
20	10 A6 04  	  9F 11  	footstep in sand1&lt;br /&gt;
21	B2 B7 04  	  0D 0E 	footstep in sand2&lt;br /&gt;
22	C2 C5 04 	  D3 09  	footstep in snow1&lt;br /&gt;
23	98 CF 04  	  E2 09  	footstep in snow2&lt;br /&gt;
24	7D D9 04 	  BA 48  	mindcontrol zing &lt;br /&gt;
25	3A 22 05 	  34 59  	mindprobe hum&lt;br /&gt;
26	71 7B 05 	  23 09  	item drop thunk&lt;br /&gt;
27	97 84 05  	  4E 0B  	item toss swish&lt;br /&gt;
28	E8 8F 05  	  45 45  	hovertank/cyberdisk move hum&lt;br /&gt;
29	30 D5 05 	  64 26  	male scream 1&lt;br /&gt;
2A	97 FB 05  	  D9 32  	male scream 2&lt;br /&gt;
2B	73 2E 06  	  1E 21  	male scream 3&lt;br /&gt;
2C	94 4F 06  	  D9 28  	female scream 1&lt;br /&gt;
2D	70 78 06  	  94 20  	female scream 2&lt;br /&gt;
2E	07 99 06  	  52 26  	female scream 3&lt;br /&gt;
2F	5C BF 06 	  0D 4D  	rock drag and scraping (silacoid move)&lt;br /&gt;
30	6C 0C 07  	  7A 39  	reaper/zombie attack growl&lt;br /&gt;
31	E9 45 07  	  8E 39  	chryssalid attack growl&lt;br /&gt;
32	7A 7F 07 	  78 35  	Silacoid attack growl&lt;br /&gt;
33	F5 B4 07  	  E9 3A  	celatid attack scream&lt;br /&gt;
34	E1 EF 07  	  F0 3A  	rocket launch&lt;br /&gt;
35	D4 2A 08 	  ED 39 	blaster bomb/stun launcher&lt;br /&gt;
36	C4 64 08  	  EC 31 	zap sound (stun rod)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAMPLE.CAT==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &lt;br /&gt;
Ref#	Begin Offset	Length	Description&lt;br /&gt;
00	70 00 		1B 08  	Button push 1&lt;br /&gt;
01	8E 08  		67 28  	Window Close&lt;br /&gt;
02	F8 30  		7D 11  	Window open 1&lt;br /&gt;
03	78 42  		B8 16  	Window open 2&lt;br /&gt;
04	33 59  		CD 22  	Cannon fire&lt;br /&gt;
05	03 7C  		43 27  	Missile launch&lt;br /&gt;
06	49 A3  		1B 08  	Button push 2&lt;br /&gt;
07	67 AB  	        1D 32  	FB Launch&lt;br /&gt;
08	87 DD  	        70 2C  	Laser Cannon&lt;br /&gt;
09	FA 09 01 	D2 58  	Plasma Cannon&lt;br /&gt;
0A	CF 62 01 	CB 26  	UFO Hit&lt;br /&gt;
0B	9D 89 01 	67 57  	UFO Explosion&lt;br /&gt;
0C	07 E1 01 	22 1B  	X-Com Craft Hit&lt;br /&gt;
0D	2C FC 01 	52 61 	X-com Craft Explosion?&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Files]]&lt;br /&gt;
[[Category:Game Folders]]&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63000</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=63000"/>
		<updated>2015-02-19T04:32:48Z</updated>

		<summary type="html">&lt;p&gt;Volutar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;Tab&#039;&#039;/&#039;&#039;Shift+Tab&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;Shift&#039;&#039; and &#039;&#039;Ctrl&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Selected PCKs are exported as PNG image with sprites of 32x40 pixels size, placed side by side, 10 in row. PNG is saved as 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17f (2015-02-19) ([http://volutar.eu5.org/_mcdedit117f.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62999</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62999"/>
		<updated>2015-02-19T04:31:25Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 1.17f */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;&#039;Shift&#039;&#039;&#039; and &#039;&#039;&#039;Ctrl&#039;&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;&#039;Tab&#039;&#039;&#039;/&#039;&#039;&#039;Shift+Tab&#039;&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;&#039;Shift&#039;&#039;&#039; and &#039;&#039;&#039;Ctrl&#039;&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Selected PCKs are exported as PNG image with sprites of 32x40 pixels size, placed side by side, 10 in row. PNG is saved as 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17f (2015-02-19) ([http://volutar.eu5.org/_mcdedit117f.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62998</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62998"/>
		<updated>2015-02-19T04:29:58Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 2015-02-19 v1.17f */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-09 v1.17c====&lt;br /&gt;
* Added &amp;quot;Append MCD&amp;quot; (File menu) - chosing another MCD file to be added to the end of current (including PCK and all necessary reference values). MCD count shouldn&#039;t exceed 255.&lt;br /&gt;
* Added command line options, which override corresponding .lyt file values during the start (case sensitive):&lt;br /&gt;
  -custom_mcd [true/false, if it&#039;s custom MCD mode or not]&lt;br /&gt;
  -game_type [1/2]&lt;br /&gt;
  -pal_idx [0-4]&lt;br /&gt;
  -mcd_pref [full path to mcd folder]&lt;br /&gt;
  -selectedfilename [mcd/pck/tab filename without extension]&lt;br /&gt;
  -SelectMCD [selected mcd ID]&lt;br /&gt;
* Added special file (MCD_Saved.dat), which will receivereach saved file absolute path and filename (without extension).&lt;br /&gt;
* RMB click to MCD list doesn&#039;t selcet clicked MCD anymore.&lt;br /&gt;
* Added multiple MCD selection (shift, ctrl)&lt;br /&gt;
* Added delete/clear/copy/paste MCDs throughout selected.&lt;br /&gt;
* Paste MCDs works in two modes: 1. Only one MCD is selected during paste - it will override MCDs sequentially from the buffer; 2. Multiple MCDs are selected during paste (as targets) - it will run through selected MCDs and will override them from the buffer, if buffer run out of MCDs - it will start from first in the buffer (so if copy 1, and paste to 10 will clone it);&lt;br /&gt;
* When multiple MCDs are selected, it becomes possible to modify values of selected MCDs at once (works only for data values, no SCANG, sprite or LOFT). If values are different throughout the selection, it will show &amp;quot;mix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
** Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
====2015-02-18 v1.17e====&lt;br /&gt;
* Added aggregation of SCANG, PCK numbers (animation) and LOFTs for multiple selected MCDs, and multiple modification.&lt;br /&gt;
* When there&#039;s no multiple selected MCDs, it will paste MCD only for single selection (previously paste worked sequentially).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** More informative PCK deletion error.&lt;br /&gt;
** Fixed png import with untouched palette (they were still re-converted for first 16 columnts).&lt;br /&gt;
** Added copy/paste into/from clipboard of multiple PCKs&lt;br /&gt;
** Added export/import from PNG of multiple PCKs (the way similar to sheet - side by side, 10 in row)&lt;br /&gt;
&lt;br /&gt;
====2015-02-19 v1.17f====&lt;br /&gt;
* Added multiple MCDs adding to menu (1,5 and 15)&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
* Added multiple PCKs adding to menu (1,5 and 15)&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62997</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62997"/>
		<updated>2015-02-18T12:22:56Z</updated>

		<summary type="html">&lt;p&gt;Volutar: 1.17e&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-09 v1.17c====&lt;br /&gt;
* Added &amp;quot;Append MCD&amp;quot; (File menu) - chosing another MCD file to be added to the end of current (including PCK and all necessary reference values). MCD count shouldn&#039;t exceed 255.&lt;br /&gt;
* Added command line options, which override corresponding .lyt file values during the start (case sensitive):&lt;br /&gt;
  -custom_mcd [true/false, if it&#039;s custom MCD mode or not]&lt;br /&gt;
  -game_type [1/2]&lt;br /&gt;
  -pal_idx [0-4]&lt;br /&gt;
  -mcd_pref [full path to mcd folder]&lt;br /&gt;
  -selectedfilename [mcd/pck/tab filename without extension]&lt;br /&gt;
  -SelectMCD [selected mcd ID]&lt;br /&gt;
* Added special file (MCD_Saved.dat), which will receivereach saved file absolute path and filename (without extension).&lt;br /&gt;
* RMB click to MCD list doesn&#039;t selcet clicked MCD anymore.&lt;br /&gt;
* Added multiple MCD selection (shift, ctrl)&lt;br /&gt;
* Added delete/clear/copy/paste MCDs throughout selected.&lt;br /&gt;
* Paste MCDs works in two modes: 1. Only one MCD is selected during paste - it will override MCDs sequentially from the buffer; 2. Multiple MCDs are selected during paste (as targets) - it will run through selected MCDs and will override them from the buffer, if buffer run out of MCDs - it will start from first in the buffer (so if copy 1, and paste to 10 will clone it);&lt;br /&gt;
* When multiple MCDs are selected, it becomes possible to modify values of selected MCDs at once (works only for data values, no SCANG, sprite or LOFT). If values are different throughout the selection, it will show &amp;quot;mix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
** Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
====2015-02-18 v1.17e====&lt;br /&gt;
* Added aggregation of SCANG, PCK numbers (animation) and LOFTs for multiple selected MCDs, and multiple modification.&lt;br /&gt;
* When there&#039;s no multiple selected MCDs, it will paste MCD only for single selection (previously paste worked sequentially).&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** More informative PCK deletion error.&lt;br /&gt;
** Fixed png import with untouched palette (they were still re-converted for first 16 columnts).&lt;br /&gt;
** Added copy/paste into/from clipboard of multiple PCKs&lt;br /&gt;
** Added export/import from PNG of multiple PCKs (the way similar to sheet - side by side, 10 in row)&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62996</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62996"/>
		<updated>2015-02-18T12:10:52Z</updated>

		<summary type="html">&lt;p&gt;Volutar: 1.17e&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. You can select multiple MCDs with &#039;&#039;&#039;Shift&#039;&#039;&#039; and &#039;&#039;&#039;Ctrl&#039;&#039;&#039;, it will aggregate MCD data, and it&#039;s possible to change multiple values through selected (different values are displayed as &amp;quot;mix&amp;quot;). &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;&#039;Tab&#039;&#039;&#039;/&#039;&#039;&#039;Shift+Tab&#039;&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
You also can select multiple PCKs with &#039;&#039;&#039;Shift&#039;&#039;&#039; and &#039;&#039;&#039;Ctrl&#039;&#039;&#039;. &#039;&#039;&#039;RMB&#039;&#039;&#039; opens a context menu (&#039;&#039;PCK (numbers of selected) / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCKs&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Selected PCKs are exported as PNG image with sprites of 32x40 pixels size, placed side by side, 10 in row. PNG is saved as 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;. If only one is selected - it will export PCK under the cursor (it can be different from the selected).&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Copy to clipboard&#039;&#039; mode works similarly, but it stores selected images as text in the clipboard (it can be even stored as text file).&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17e (2015-02-18) ([http://volutar.eu5.org/_mcdedit117e.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62956</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62956"/>
		<updated>2015-02-09T19:52:52Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 1.17d */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;&#039;Tab&#039;&#039;&#039;/&#039;&#039;&#039;Shift+Tab&#039;&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
&#039;&#039;&#039;RMB&#039;&#039;&#039; on each PCK opens a context menu (&#039;&#039;PCK Edit-info / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCK&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Single PCKs are exported as png images at 32x40 resolution, 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;.&lt;br /&gt;
When importing an image to a PCK, it takes the top-left 32x40 pixels, everything else will be ignored.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17d (2015-02-10) ([http://volutar.eu5.org/_mcdedit117d.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62955</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62955"/>
		<updated>2015-02-09T19:51:55Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 2015-02-10 v1.17d */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
** Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
** Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62954</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62954"/>
		<updated>2015-02-09T19:51:30Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 2015-02-10 v1.17d */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-10 v1.17d====&lt;br /&gt;
* Added multiple PCK selection (shift, ctrl)&lt;br /&gt;
* Added deletion of multiple PCKs.&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62945</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62945"/>
		<updated>2015-02-08T19:30:07Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Main screen */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCDs / Paste MCDs / Insert MCD / Add MCD / Delete MCDs / Clear MCDs&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;&#039;Tab&#039;&#039;&#039;/&#039;&#039;&#039;Shift+Tab&#039;&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
&#039;&#039;&#039;RMB&#039;&#039;&#039; on each PCK opens a context menu (&#039;&#039;PCK Edit-info / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCK&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Single PCKs are exported as png images at 32x40 resolution, 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;.&lt;br /&gt;
When importing an image to a PCK, it takes the top-left 32x40 pixels, everything else will be ignored.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17c (2015-02-09) ([http://volutar.eu5.org/_mcdedit117c.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62944</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62944"/>
		<updated>2015-02-08T19:28:17Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCD / Paste MCD / Insert MCD / Add MCD / Delete MCD / Clear MCD&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;&#039;Tab&#039;&#039;&#039;/&#039;&#039;&#039;Shift+Tab&#039;&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
&#039;&#039;&#039;RMB&#039;&#039;&#039; on each PCK opens a context menu (&#039;&#039;PCK Edit-info / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCK&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Single PCKs are exported as png images at 32x40 resolution, 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;.&lt;br /&gt;
When importing an image to a PCK, it takes the top-left 32x40 pixels, everything else will be ignored.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;[&#039;&#039; - toggle sprite contours.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17c (2015-02-09) ([http://volutar.eu5.org/_mcdedit117c.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62943</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62943"/>
		<updated>2015-02-08T19:22:52Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 1.17d */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCD / Paste MCD / Insert MCD / Add MCD / Delete MCD / Clear MCD&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;&#039;Tab&#039;&#039;&#039;/&#039;&#039;&#039;Shift+Tab&#039;&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
&#039;&#039;&#039;RMB&#039;&#039;&#039; on each PCK opens a context menu (&#039;&#039;PCK Edit-info / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCK&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Single PCKs are exported as png images at 32x40 resolution, 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;.&lt;br /&gt;
When importing an image to a PCK, it takes the top-left 32x40 pixels, everything else will be ignored.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17c (2015-02-09) ([http://volutar.eu5.org/_mcdedit117c.7z download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62942</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62942"/>
		<updated>2015-02-08T19:22:10Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 2015-02-09 v1.17c */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====2015-02-09 v1.17c====&lt;br /&gt;
* Added &amp;quot;Append MCD&amp;quot; (File menu) - chosing another MCD file to be added to the end of current (including PCK and all necessary reference values). MCD count shouldn&#039;t exceed 255.&lt;br /&gt;
* Added command line options, which override corresponding .lyt file values during the start (case sensitive):&lt;br /&gt;
  -custom_mcd [true/false, if it&#039;s custom MCD mode or not]&lt;br /&gt;
  -game_type [1/2]&lt;br /&gt;
  -pal_idx [0-4]&lt;br /&gt;
  -mcd_pref [full path to mcd folder]&lt;br /&gt;
  -selectedfilename [mcd/pck/tab filename without extension]&lt;br /&gt;
  -SelectMCD [selected mcd ID]&lt;br /&gt;
* Added special file (MCD_Saved.dat), which will receivereach saved file absolute path and filename (without extension).&lt;br /&gt;
* RMB click to MCD list doesn&#039;t selcet clicked MCD anymore.&lt;br /&gt;
* Added multiple MCD selection (shift, ctrl)&lt;br /&gt;
* Added delete/clear/copy/paste MCDs throughout selected.&lt;br /&gt;
* Paste MCDs works in two modes: 1. Only one MCD is selected during paste - it will override MCDs sequentially from the buffer; 2. Multiple MCDs are selected during paste (as targets) - it will run through selected MCDs and will override them from the buffer, if buffer run out of MCDs - it will start from first in the buffer (so if copy 1, and paste to 10 will clone it);&lt;br /&gt;
* When multiple MCDs are selected, it becomes possible to modify values of selected MCDs at once (works only for data values, no SCANG, sprite or LOFT). If values are different throughout the selection, it will show &amp;quot;mix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=File:Mcdedit_pckedit.png&amp;diff=62932</id>
		<title>File:Mcdedit pckedit.png</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=File:Mcdedit_pckedit.png&amp;diff=62932"/>
		<updated>2015-02-07T17:17:14Z</updated>

		<summary type="html">&lt;p&gt;Volutar: Volutar uploaded a new version of &amp;amp;quot;File:Mcdedit pckedit.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PCK Editor&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62922</id>
		<title>MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=MCDEdit&amp;diff=62922"/>
		<updated>2015-02-07T11:33:52Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 1.17b */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Disclamer: This page is dedicated not to the great old [http://www.strategycore.co.uk/files/mcdedit/ MCDView (MCDEdit) tool by Koralt] ([http://openxcommods.weebly.com/mcdedit.html manual]), but for another one, written by [[User:Volutar|Volutar]] for [[OpenXcom]], though still suitable for xcom1/2.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= MCD Edit tool =&lt;br /&gt;
The application title bar shows which file is opened, whether it is vanilla or custom, and in custom mode, the path to the file.&lt;br /&gt;
&lt;br /&gt;
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. [[Image_Formats|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.&lt;br /&gt;
&lt;br /&gt;
== Main screen ==&lt;br /&gt;
[[File:Mcdedit_113.png|400px|thumb|right|Main screen]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Custom&#039;&#039;&#039; button opens custom MCD set (tileset automatically fetches all *.mcd files from specified folder) - same as &#039;&#039;File-&amp;gt;Open custom MCD ...&#039;&#039;. If you open an MCD from the vanilla folder (as defined in the config file) - it will switch to vanilla mode.&lt;br /&gt;
* &#039;&#039;&#039;Tileset&#039;&#039;&#039; switches between different MCDs in the folder. Don&#039;t forget to save the current MCD if you don&#039;t want to lose your work (&#039;&#039;File-&amp;gt;Save MCD+PCK+TAB&#039;&#039; or &#039;&#039;File-&amp;gt;Save MCD+PCK+TAB as...&#039;&#039;. The &#039;*&#039; sign indicates it&#039;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.&lt;br /&gt;
* &#039;&#039;&#039;Checkered&#039;&#039;&#039; button changes the image background from black (or underwater background) to checkered, just to highlight any holes you&#039;ve made. Kinda handy when dealing with dark sprites.&lt;br /&gt;
* &#039;&#039;&#039;UFO/TFTD&#039;&#039;&#039; changes gametype. Vanilla mode will switch between game folders and re-read &#039;&#039;&#039;Tilesets&#039;&#039;&#039;. In &#039;&#039;&#039;custom MCD&#039;&#039;&#039; mode it will simply change associated [[LOFTEMPS|LOFT]] and [[SCANG.DAT|SCANg]] (and will treat tiles as of another game type). It doesn&#039;t affect anything else.&lt;br /&gt;
* &#039;&#039;&#039;Palette&#039;&#039;&#039; 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). [http://mtpaint.sourceforge.net/ mtPaint] is a recommended external free tool to edit paletted png files in indexed mode.&lt;br /&gt;
* &#039;&#039;&#039;Edit PCKs&#039;&#039;&#039; opens [[#PCK_editor|PCK editor]] window with first PCK of current MCD, from which you can manipulate with PCKs, and edit them quite handy way.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD. &#039;&#039;&#039;RMB&#039;&#039;&#039; calls the context menu for the clicked MCD (&#039;&#039;Copy MCD / Paste MCD / Insert MCD / Add MCD / Delete MCD / Clear MCD&#039;&#039;) - same as in the &#039;&#039;&#039;Edit&#039;&#039;&#039; menu. If you are not allowed to change the number of MCDs (ie: in vanilla mode) these menu entries will be greyed out.&lt;br /&gt;
&lt;br /&gt;
Below are 16 small images showing the different light levels of the tile (so you can preview how will it look). &#039;&#039;&#039;LMB&#039;&#039;&#039; on these small shaded sprites toggles animation mode (off by default).&lt;br /&gt;
&lt;br /&gt;
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). &#039;&#039;&#039;LMB&#039;&#039;&#039; on a particular image opens the &#039;&#039;PCK selection&#039;&#039; screen. If next frames are &amp;quot;greyed&amp;quot;, their values are also changed, so it looks like changing &amp;quot;Keyframe&amp;quot;. RMB calls for context menu with &#039;&#039;&#039;Edit PCK&#039;&#039;&#039; entry which opens [[#PCK_editor|PCK editor]] for this frame.&lt;br /&gt;
&lt;br /&gt;
At the right of them is the animated zoomed tile and a voxelized 3D representation. Hold &#039;&#039;&#039;LMB&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
The rightmost part is the heap of voxel slices or [[LOFTEMPS|LOFTs]]. &#039;&#039;&#039;LMB&#039;&#039;&#039; click on particular layer image to open LOFT sheet and change it.&lt;br /&gt;
&lt;br /&gt;
The bottom part is the main MCD fields editor. When editing a field, a description shows in the box at the right. &#039;&#039;&#039;Tab&#039;&#039;&#039;/&#039;&#039;&#039;Shift+Tab&#039;&#039;&#039; jumps between fields.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[SCANG.DAT|SCANg]] icon is clickable and opens the minimap image selection. &lt;br /&gt;
&lt;br /&gt;
You can also create the new tileset (MCD+PCK+TAB) by clicking &#039;&#039;File-&amp;gt;New MCD&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
== PCK editor ==&lt;br /&gt;
[[File:mcdedit_pckedit.png|400px|thumb|right|PCK edit]]&lt;br /&gt;
&lt;br /&gt;
At the top of this window is the PCK preview/selection line with the bar. Red highlighted PCKs are &amp;quot;orphans&amp;quot; - they aren&#039;t used in the MCDs. You can use the mouse wheel to scroll this list, and &#039;&#039;cursor key/home/end/pgup/pgdown&#039;&#039; to change the selected MCD.&lt;br /&gt;
&#039;&#039;&#039;RMB&#039;&#039;&#039; on each PCK opens a context menu (&#039;&#039;PCK Edit-info / Copy to clipboard (TXT) / Paste from clipboard (TXT) / Import as PNG / Export as PNG / Insert PCK / Add PCK / Delete PCK&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Single PCKs are exported as png images at 32x40 resolution, 8bit color (with current palette). Color 0 is &amp;quot;invisible&amp;quot;.&lt;br /&gt;
When importing an image to a PCK, it takes the top-left 32x40 pixels, everything else will be ignored.&lt;br /&gt;
&lt;br /&gt;
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&#039;t be used because they are used for PCK encoding. For TFTD palettes it also don&#039;t use colors of group 9 (144..159) and colors below 16 - they are treated as system thus also not used.&lt;br /&gt;
&lt;br /&gt;
If it&#039;s a paletted PNG, and the palette isn&#039;t changed, and matches the current selection - it keeps every pixel index intact (it won&#039;t re-convert and won&#039;t add ambiguity). But if it&#039;s PCK of TFTD, it won&#039;t allow import of system colors (groups 9 and 0) - it will replace these indexes with closest allowed versions.&lt;br /&gt;
&lt;br /&gt;
If even a single color is changed, or doesn&#039;t match the current palette, it treats it as a &amp;quot;different&amp;quot; palette, and re-converts whole image as if it&#039;s RGB+alpha.&lt;br /&gt;
&lt;br /&gt;
PNG sheets (&#039;&#039;Menu-&amp;gt; Export PNG sheet / Import PNG sheet&#039;&#039;) 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&#039;t fit in the rightmost part it just skips it. Last empty images (at the tail of the sheet) are ignored.&lt;br /&gt;
&lt;br /&gt;
Slightly below of the selection line there&#039;s a toolbar where you can &#039;&#039;&#039;save changes&#039;&#039;&#039; (they will immedately reflect in &#039;&#039;MCD Editor&#039;&#039; screen).&lt;br /&gt;
Next to it &amp;quot;mode&amp;quot; buttons: &#039;&#039;Pixel selection&#039;&#039;, &#039;&#039;Rectangle selection&#039;&#039;,  &#039;&#039;Lasso selection&#039;&#039;, &#039;&#039;Color selection&#039;&#039;, &#039;&#039;Area selection&#039;&#039; and &#039;&#039;Drawing&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;under&amp;quot;), checkered background, regular pixel grid, isometric template, and show surroundings.&lt;br /&gt;
&lt;br /&gt;
Palette dropdown selector is at the right (you can&#039;t change its value with mouse wheel or cursor keys).&lt;br /&gt;
&lt;br /&gt;
Top part of the palette is the current Foreground (&#039;&#039;&#039;LMB&#039;&#039;&#039;) and Background (&#039;&#039;&#039;RMB&#039;&#039;&#039;) colors (with hex and decimal index values).&lt;br /&gt;
&lt;br /&gt;
Palette works as color picker for both &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039;. 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
At the right of the palette is &amp;quot;Confirm&amp;quot; checkbox (saving changes of sprites without confirm window), the color/group modification tool. It changes colors of selected part of sprite either as shadow level (moving colors within color group), or changing the color group itself.&lt;br /&gt;
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).&lt;br /&gt;
After xcom .map import you can adjust MCD offset for current MCD file, to fit map indexes.&lt;br /&gt;
&lt;br /&gt;
At the bottom right corner is the MAP preview window showing all surroundings. By clicking LMB PCK editor switches into &amp;quot;preview surroundings&amp;quot; mode. Window header shows current map coord and sub-tile index.&lt;br /&gt;
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 &amp;quot;Show surroundings&amp;quot; mode (or with key &amp;quot;Q&amp;quot; down) you will see all surroundings in the main editor window.&lt;br /&gt;
Blue dotted outline represents current tile, Red outline is showing &amp;quot;foreground&amp;quot; part (all pixels will be drawn under it). Thin violet contours are showing borders between sprites. You can use &amp;quot;Space&amp;quot; key over the sprite to switch to it.&lt;br /&gt;
&amp;quot;Underlayer dots&amp;quot; at the center of each pixel indicate &amp;quot;underlying&amp;quot; hidden pixels.&lt;br /&gt;
&lt;br /&gt;
In the Menu &amp;quot;Preview map resize ...&amp;quot; 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 &amp;quot;border&amp;quot; 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&#039;s Z adjustment.&lt;br /&gt;
&lt;br /&gt;
==== Controls ====&lt;br /&gt;
* &#039;&#039;Mouse wheel scrolling&#039;&#039; - change foreground color within color group.&lt;br /&gt;
* &#039;&#039;Ctrl+Z&#039;&#039; - undo last action (number of current undo levels are shown in the status bar)&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+Z&#039;&#039; - redo actions.&lt;br /&gt;
* &#039;&#039;Ctrl+A&#039;&#039; - select all.&lt;br /&gt;
* &#039;&#039;Ctrl+D&#039;&#039;,&#039;&#039;Esc&#039;&#039; - deselect.&lt;br /&gt;
* &#039;&#039;Shift+Ctrl+D&#039;&#039; - reselect last selection.&lt;br /&gt;
* &#039;&#039;Ctrl+Shift+I&#039;&#039; - invert selection.&lt;br /&gt;
* &#039;&#039;Ins&#039;&#039; - fill selected area with foreground (LMB) color.&lt;br /&gt;
* &#039;&#039;Del&#039;&#039; - fill selected area with background (RMB) color (ie clears).&lt;br /&gt;
* &#039;&#039;Cursor keys&#039;&#039; - move selected area, or pasted fragment. Affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode.&lt;br /&gt;
* &#039;&#039;LMB Dragging&#039;&#039; - over selected pixels move selected area or pasted fragment. Also affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Enter&#039;&#039; - Apply pasted fragment.&lt;br /&gt;
* &#039;&#039;Ctrl+S&#039;&#039; - save sprite into the memory.&lt;br /&gt;
* &#039;&#039;Ctrl+X&#039;&#039; - cut selection into the clipboard, as text (same as copy in clipboard + delete).&lt;br /&gt;
* &#039;&#039;Ctrl+C&#039;&#039; - copy selection into the clipboard, as text, which is interchangable with &#039;&#039;&#039;Copy/Paste as TXT&#039;&#039; from the PCK selection line.&lt;br /&gt;
* &#039;&#039;Ctrl+V&#039;&#039; - paste selection. Pasted fragment temporarily is in the &amp;quot;second layer&amp;quot; mode (&#039;&#039;&#039;Paste mode&#039;&#039;&#039; in the status bar), and can be repositioned with &#039;&#039;ctrl+cursor&#039;&#039; or &#039;&#039;ctrl+lmb drag&#039;&#039;. Any other action applies it to the sprite.&lt;br /&gt;
* &#039;&#039;Ctrl&#039;&#039; - modifier for &#039;&#039;&#039;scissors&#039;&#039;&#039; 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 &amp;quot;Paste mode&amp;quot; and affected by &#039;&#039;&#039;Wrap scrolling&#039;&#039;&#039; mode. &#039;&#039;Ctrl&#039;&#039; is not necessary to hold to continue dragging.&lt;br /&gt;
* &#039;&#039;F1&#039;&#039; - pixel selection.&lt;br /&gt;
* &#039;&#039;F2&#039;&#039; - rectangle selection.&lt;br /&gt;
* &#039;&#039;F3&#039;&#039; - lasso selection.&lt;br /&gt;
* &#039;&#039;F4&#039;&#039; - color selection.&lt;br /&gt;
* &#039;&#039;F5&#039;&#039; - area selection.&lt;br /&gt;
* &#039;&#039;F6&#039;&#039; - draw mode.&lt;br /&gt;
* &#039;&#039;.&#039;&#039;(period) - toggle checkered background.&lt;br /&gt;
* &#039;&#039;&amp;amp;#39;&#039;&#039;(single quote) - toggle pixel grid.&lt;br /&gt;
* &#039;&#039;;&#039;&#039;(semicolon) - toggle isometric template.&lt;br /&gt;
* &#039;&#039;,&#039;&#039;(comma) - toggle underlaying dots for preview surroundings.&lt;br /&gt;
* &#039;&#039;Q&#039;&#039; - when held, toggle &amp;quot;show surroundings&amp;quot; state.&lt;br /&gt;
* &#039;&#039;Space&#039;&#039; - 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.&lt;br /&gt;
&lt;br /&gt;
In selection modes you can use &#039;&#039;Shift&#039;&#039; to add to the selection (cursor gets &#039;+&#039; sign), &#039;&#039;Alt&#039;&#039; to subtract from the selection (cursor gets &#039;-&#039; sign), or both &#039;&#039;Shift+Alt&#039;&#039; to cross-select (deselects outside of the selected area). Without these modifiers selection just renews.&lt;br /&gt;
&lt;br /&gt;
====Drawing mode====&lt;br /&gt;
&#039;&#039;Alt&#039;&#039; key switches into color picker/highlighter mode, &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; are respectively changes colors assiciated with those mouse keys. Same modifier key marks all pixels of same color index. In palette selector &#039;&#039;Color picker&#039;&#039; works without &#039;&#039;Alt&#039;&#039; pressed.&lt;br /&gt;
&lt;br /&gt;
Pixels are drawn with &#039;&#039;&#039;LMB&#039;&#039;&#039; and &#039;&#039;&#039;RMB&#039;&#039;&#039; of respective colors. It works in &amp;quot;smart&amp;quot; drawing mode, when diagonally &amp;quot;touched&amp;quot; neighbour pixels aren&#039;t changed (as is often a problem with pixel-based editors).&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;Shift&#039;&#039; key pressed it will draw lines with fixed angles, aligned by 45°(straight and diagonals) or 26.565° (isometric 1:2 angle).&lt;br /&gt;
&lt;br /&gt;
When an area is selected, drawing is limited to within its borders (drawing outside of selection is simply ignored).&lt;br /&gt;
&lt;br /&gt;
== MCDEdit.txt ==&lt;br /&gt;
The config file contains paths to the game folders for &#039;&#039;&#039;ufo&#039;&#039;&#039; and &#039;&#039;&#039;tftd&#039;&#039;&#039; and optionally folders for &amp;quot;alternative&amp;quot; versions. &lt;br /&gt;
&lt;br /&gt;
Setting alternative folders switches MCDEdit into &#039;&#039;compare mode&#039;&#039; - if MCD values are different, they will be shown at the right of the current values in red.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;boxpat&#039;&#039; entries are defining &amp;quot;isometric template&amp;quot;, you can modify it if you want.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
Current version 1.17b (2015-02-07) ([http://volutar.eu5.org/_mcdedit117a.7b download])&lt;br /&gt;
&lt;br /&gt;
= Technical =&lt;br /&gt;
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 [https://www.winehq.org/ Wine] (or a similar tool).&lt;br /&gt;
&lt;br /&gt;
[[Category:Enemy Unknown/UFO Defense]]&lt;br /&gt;
[[Category:TFTD]]&lt;br /&gt;
[[Category:OpenXcom]]&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62921</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62921"/>
		<updated>2015-02-07T11:31:38Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* 2015-02-07 v1.17b */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
====2015-02-07 v1.17b====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Show surrounding outlines&amp;quot; button, to hide dotted contours around tiles in &amp;quot;show neighbour&amp;quot; mode. With shortcut &amp;quot;[&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62829</id>
		<title>Talk:MCDEdit</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:MCDEdit&amp;diff=62829"/>
		<updated>2015-01-28T12:33:55Z</updated>

		<summary type="html">&lt;p&gt;Volutar: /* History 1.17a */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===History===&lt;br /&gt;
&lt;br /&gt;
====2014-04-21 v1.1====&lt;br /&gt;
* &#039;&#039;&#039;the first public version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====2014-04-29 v1.11====&lt;br /&gt;
* rearranged main screen - moved loft to the right, in vertical manner (it feels more natural).&lt;br /&gt;
* added palette helper with ambiguous colors highlighted.&lt;br /&gt;
* 3D LOFT/animation image is now &amp;quot;rotatable&amp;quot; with mouse button held (rotates 3D LOFT model by steps of 45 degrees, and after releasing button - it returns back to 0), the angle can also be changed with the trackbar (it will be kept).&lt;br /&gt;
* added gamedata path and the config file.&lt;br /&gt;
* added PCK single image/sheet export into the PNG. Saved using current palette.&lt;br /&gt;
* added PCK single image import from the PNG. Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette are also imported (as RGBA images), but most probably it could cause color ambiguity. RGB without alpha are ignored.&lt;br /&gt;
* added &amp;quot;orphan&amp;quot; PCK color tagging (they are red-yellow). Lots of them can be found in the TFTD.&lt;br /&gt;
* added insert of blank PCK, and delete of &amp;quot;orphan&amp;quot; PCK (when trying to delete used one, it will tell you which MCDs are using it). MCD+PCK integrity is kept (other PCKs referenced in other MCDs of same tileset are updated).&lt;br /&gt;
* fixed working folder change issue (relative paths were changed after getting into other folder in file selector).&lt;br /&gt;
&lt;br /&gt;
====2014-05-01 v1.12====&lt;br /&gt;
* added custom MCD open (&amp;quot;Menu-&amp;gt;Open MCD&amp;quot; or with checkbox &amp;quot;Custom&amp;quot;).&lt;br /&gt;
* in the &amp;quot;Custom mode&amp;quot; you can freely choose gametype, and palette for opened tileset (because it doesn&#039;t know what game this tileset for).&lt;br /&gt;
* MCD values list externalized into the config file (MCDEdit.txt), each value discription text is given for the data fields.&lt;br /&gt;
* vanilla tilesets are now marked with * in the list. They are &amp;quot;most preserved&amp;quot; - adding/deleting of MCDs is disallowed, to keep number of MCD in each tileset intact.&lt;br /&gt;
* added &amp;quot;Add MCD&amp;quot; item (adds new MCD at the end).&lt;br /&gt;
* &amp;quot;Checkered&amp;quot; background also affects on MCD list view.&lt;br /&gt;
&lt;br /&gt;
====2014-07-22 v1.13====&lt;br /&gt;
* compare mode (set with second path in the config).&lt;br /&gt;
* PNG sheet import (in the PCK edit screen). Empty sprites at the end are ignored.&lt;br /&gt;
* added context menu in the MCD selection bar (the same as in the &amp;quot;Edit&amp;quot; menu).&lt;br /&gt;
* added shaded stripe to preview different light levels (with animation on/off by LMB).&lt;br /&gt;
* fixed PNG import (system colors of palette was used for TFTD, by mistake).&lt;br /&gt;
* added &amp;quot;Edit-&amp;gt;Save As&amp;quot;.&lt;br /&gt;
* improved &amp;quot;Custom MCD&amp;quot; mode with list of neighbour MCDs from same folder and switch to &amp;quot;vanilla mode&amp;quot; if opened the MCD from vanilla folder.&lt;br /&gt;
&lt;br /&gt;
====2014-08-01 v1.14====&lt;br /&gt;
* added &amp;quot;modified&amp;quot; asterix sign at the header, and warning message before closing/switching to another tileset without saving.&lt;br /&gt;
* added Quick save button.&lt;br /&gt;
&lt;br /&gt;
====2014-08-10 v1.15====&lt;br /&gt;
* Added context menu &amp;quot;Edit PCK&amp;quot; for zoomed animation sprites.&lt;br /&gt;
* Changed &amp;quot;checkered&amp;quot; to toggle button, reviewed &amp;quot;global&amp;quot; status of it (it&#039;s not global in the child windows).&lt;br /&gt;
* &amp;quot;Copy MCD&amp;quot; is now works through the clipboard (as text information), so you can copy/paste them between two running copies of MCDEdit.&lt;br /&gt;
* Currently selected &#039;&#039;&#039;SCANg&#039;&#039;&#039; or &#039;&#039;&#039;PCK&#039;&#039;&#039; is scrolled to view.&lt;br /&gt;
* Added &amp;quot;Edit PCKs&amp;quot; at main screen (button at right top). Similar to PCK selection, but in this mode instead choosing of PCK it opens &amp;quot;PCK Editor&amp;quot;.&lt;br /&gt;
* Added &amp;quot;PCK Edit&amp;quot; window:&lt;br /&gt;
** Introducing &amp;quot;Smart drawing&amp;quot; (to skip unnecessary 4-neighbour diagonals).&lt;br /&gt;
** Fast motion drawing works with bresenham filling of intermediates.&lt;br /&gt;
** Introduced isometric template as grid overlay. Interesting thing, that some vanilla tiles are shifted up by 1 pixel, so you can observe they are slightly off. It&#039;s not a bug.&lt;br /&gt;
** Introduced UNDO engine for PCK Editor only.&lt;br /&gt;
** Introduced preview of 4 adjacent tiles (handy to interactively see how seamless walls/grounds).&lt;br /&gt;
&lt;br /&gt;
====2014-08-17 v1.16====&lt;br /&gt;
* Changed text format for text copy/paste of PCKs and selections (now it&#039;s more compact).&lt;br /&gt;
* PCK editor:&lt;br /&gt;
** Undo buffer size is increased up to 500 actions.&lt;br /&gt;
** Introduced selection modes: pixel, rectangle, lasso, color. &#039;&#039;Shift&#039;&#039; is to add to selection, &#039;&#039;alt&#039;&#039; is to subtract.&lt;br /&gt;
** &#039;&#039;Ctrl+shift+i&#039;&#039; inverts selection (line in Photoshop), &#039;&#039;ctrl+a&#039;&#039; - select all, &#039;&#039;esc&#039;&#039; - clears selection, cursor keys moves selection.&lt;br /&gt;
** Color selection mode also works for palette.&lt;br /&gt;
** Delete selected (filled with background color of RMB) - &#039;&#039;del&#039;&#039; key, and filling selected (color of LMB) with &#039;&#039;ins&#039;&#039; key.&lt;br /&gt;
** Added simple color manipulation for selection: group change (by 16), shade change (by 1), with clamping of values.&lt;br /&gt;
** Introduced copy/paste mode (textual form through the clipboard), shortcuts - &#039;&#039;ctrl+c&#039;&#039;, &#039;&#039;ctrl+v&#039;&#039;.&lt;br /&gt;
** Introduced cut action of selection, like in Photoshop (&#039;&#039;ctrl&#039;&#039;+mouse drag, or &#039;&#039;ctrl&#039;&#039;+cursor keys).&lt;br /&gt;
** Added &amp;quot;wrap&amp;quot; trigger - it works for scrolling of selections and pasted fragments.&lt;br /&gt;
&lt;br /&gt;
====2014-09-08 v1.16a====&lt;br /&gt;
* Fixed bug with edit-&amp;gt;paste.&lt;br /&gt;
* Fixed bug with transparency for SCANg.&lt;br /&gt;
* Optimized animation of shaded stripe.&lt;br /&gt;
&lt;br /&gt;
====2014-09-18 v1.16b====&lt;br /&gt;
* Added support of larger PCKs (more than 65536+), by ignoring of TAB indexes. In case of going beyond of that index in TAB, it will warn, but still allows for saving. OpenXcom is capable of loading PCKs with screwed TAB indexes. &lt;br /&gt;
* Added checking of PCK count going beyond 256, and MCD count going beyond 255.&lt;br /&gt;
* Fixed import of PNG-&amp;gt;PCK images, which are using &amp;quot;system&amp;quot; colors (after accidental hit into &amp;quot;forbidden&amp;quot; part).&lt;br /&gt;
&lt;br /&gt;
====2014-12-23 v1.17====&lt;br /&gt;
&lt;br /&gt;
* MCD Edit:&lt;br /&gt;
* PCK Selector is now just PCK selector, like LOFT and SCANG, without any other functions (like import/export).&lt;br /&gt;
* PCK Selector now caches the sheet image, so it should work faster.&lt;br /&gt;
* PCK Selector checkered/palette doesn&#039;t affect on respective MCD Edit values, it also increases speed.&lt;br /&gt;
* &amp;quot;Edit PCKs&amp;quot; button now opens PCK Editor instead of PCK Selector, with PCK from selected MCD.&lt;br /&gt;
* Saving layout: last opened MCD file, selected MCD, PCK, trackbar and positions.&lt;br /&gt;
* Shutting down OS now leads to requester with timer, automatically saving if no reaction for 5 seconds.&lt;br /&gt;
* MCD file name is now shown without extension (no need to).&lt;br /&gt;
* Optimized PCK/MCD list rendering. Now it updates only changed parts.&lt;br /&gt;
* When changing animation sprite the MCD Edit can dynamically change &amp;quot;orphan&amp;quot; red tag in opened PCK editor.&lt;br /&gt;
* &amp;quot;Repeated&amp;quot; animation PCKs are now checkered-transparent, and values are greyed, so you can see key frames as normal.&lt;br /&gt;
* When changing &amp;quot;Key frame&amp;quot; PCK, it also replaces every other &amp;quot;repeated&amp;quot; PCK, so you can change ALL images of static MCD with one click.&lt;br /&gt;
* Switching MCD file after making changes in PCKs now asks for saving changes.&lt;br /&gt;
* When switching between MCD files it resets current MCD and PCK (if opened) to 0.&lt;br /&gt;
* Updated MCD field descriptions.&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Mouseover color palette and colorpicker will show actual color even for tftd system palette part. Though they are still unselectable.&lt;br /&gt;
**   Window is no longer modal, and having its own taskbar button.&lt;br /&gt;
**   Added sprite stripe to switch between PCKs, and import/export/copy/paste from context menu.&lt;br /&gt;
**   Added main menu.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode fragment is visually displayed as &amp;quot;hovering&amp;quot; above.&lt;br /&gt;
**   In &amp;quot;Paste&amp;quot; mode now it&#039;s possible to change &amp;quot;foreground&amp;quot;/&amp;quot;background&amp;quot; apply mode (new button).&lt;br /&gt;
**   Buttons/Controls rearrangement.&lt;br /&gt;
**   &amp;quot;Enter&amp;quot; - apply current Paste&lt;br /&gt;
**   &amp;quot;Confirm&amp;quot; checkbox - silently saving changes when switching PCK or closing window.&lt;br /&gt;
**   Fixed: Insert/Delete didn&#039;t update palette &amp;quot;info dots&amp;quot;.&lt;br /&gt;
**   Ctrl+S - saving PCK (the same as &amp;quot;Save to memory&amp;quot;).&lt;br /&gt;
**   Ctrl+X - cut selected fragment.&lt;br /&gt;
**   Fixed: Ctrl+C/X doesn&#039;t clear the clipboard buffer if nothing is selected.&lt;br /&gt;
**   &amp;quot;Paste&amp;quot; mode now doesn&#039;t destroy pixels outside of sprite until applied (you can move beyond the sprite and back).&lt;br /&gt;
**   Ctrl+D - deselect. Esc as well.&lt;br /&gt;
**   Shift+Ctrl+D - &amp;quot;Reselect&amp;quot;. Selects previously selected area (before it was deselected).&lt;br /&gt;
**   Dynamic changing status of Undo-Redo and Reselect in Menu.&lt;br /&gt;
**   First undo (ctrl+Z) was ignored before some delay.&lt;br /&gt;
**   Ctrl is not necessary to move pasted fragment. Either for cursor keys, or mouse (pointer has to be over it, and it should be paste mode).&lt;br /&gt;
**   Map preview window with ability to choose every PCK sprite and vertical offset for each.&lt;br /&gt;
**   Preview map scrolling with control buttons.&lt;br /&gt;
**   Can select empty sprite, which will get max+1 PCK index upon save.&lt;br /&gt;
**   When PCK is selected through the preview, it switches into &amp;quot;Show surroundings&amp;quot; mode (hotkey &amp;quot;Q&amp;quot;).&lt;br /&gt;
**   Trigger to disable/enable dots in the center of pixels, representing &amp;quot;covered pixels&amp;quot; (hotkey &amp;quot;,&amp;quot;).&lt;br /&gt;
**   Sprites of surroundings are drawn with purple borders, so you can see where they are overlapping each other.&lt;br /&gt;
**   &amp;quot;Space&amp;quot; - switch to the PCK from the surrounding (in zoomed view) under mouse pointer.&lt;br /&gt;
**   Import of Xcom1/2 MAP files as preview, with &amp;quot;mcd offset&amp;quot; value to arrange pck indexes (all indexes out of range are filtered out)&lt;br /&gt;
**   Added shortcuts F1-F5 for edit/draw mode select, and &amp;quot;&#039;&amp;quot;, &amp;quot;;&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; for view mode triggers.&lt;br /&gt;
**   Fixed mouse pointer changing during popup menues and hold&#039;n&#039;draw.&lt;br /&gt;
**   Preview map size adjustment dialog window.&lt;br /&gt;
**   Short click without move clears selection.&lt;br /&gt;
&lt;br /&gt;
====2015-01-28 v1.17a====&lt;br /&gt;
* PCK Edit:&lt;br /&gt;
**   Added &amp;quot;Area selection&amp;quot; (Wand tool), working in 4-connected mode. Shortcut is F5, so Drawing tool shortcut is changed to F6 (from F5).&lt;br /&gt;
**   Added Shift+Draw for drawing straight/diagonal/isometric lines (fixed angles).&lt;br /&gt;
&lt;br /&gt;
===Wishes===&lt;/div&gt;</summary>
		<author><name>Volutar</name></author>
	</entry>
</feed>