Author Topic: (Solved)How does one create a working door and add it to a tileset?  (Read 10087 times)

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
SOLVED How does one create a working door and add it to a tileset?
« Reply #15 on: July 10, 2017, 09:34:41 pm »
SOLVED

After some more fiddling I finally got custom door sets to work
updating Hobbes instructions.

To add/remove/edit entries on the MCD files you need
--volutar's MCDEdit (https://www.ufopaedia.org/index.php/MCDEdit). It also comes included with a PCK editing tool,
PCKView can only be used to add/remove/edit the images on .PCK files,
To change the attributes of how the images are used you'll need to edit the MCD files.

Since MCD Edit controls the behavior of doors, it is useful to study another file such as XBASE1 for sliding doors  and BARN for traditional doors.

Sliding doors
=UFO door:30 1 (original 0)

Traditional door
=Door:35 1 (original 0)

Alt_MCD:46   Set this to swap the door graphics (IMPORTANT)
I.E. set up the door graphics in Edit PCKs and in their MCD animation. 
Follow an example MCD to set it up(you can copy and past from another MCD to get the LOFTs and other settings.
When done in MCD there should be TWO MCD frames for the door.
(not to be confused with the large frame below which PCKs are assigned to create the
MCD frame)
Once the MCD frames  are created; say 39 and 40,
for MCD 39 the Alt_MCD:46 is 40.
For MCD 40 the Alt_MCD:46 is 39.

For a sliding door typically MCD 39 would consist of 4 to 8 PCK frames
In 4  frames such as the LIGHTNIN door the last 4 pck frames repeat.
For  MCD 40 one of the above PCK frames is used (probably the last opened door frame)

Tile_type:53 should be set to either west wall 1  or north wall 2 depending upon orientation.

If doors fail to open, in my instance, I did not quite understand how Alt_MCD:46 worked.

Once that was learned, then the doors opened.

FYI check Die_MCD:44
If 0 the standard game graphic will be used, if your door is destroyed, if some other number corresponding to an MCD then that tile will appear.  If your attributes were copied from another MCD,  this may display an entirely unsuitable tile if your door  is destroyed.


-----------------------

edit


Hi Steam,

Thanks for documenting your progress :) Getting into map editing does seem more daunting than sprite editing!

Have you installed the universal patch and looked at the map bits that fix certain components of the ufo map tiles?

http://www.openxcom.com/mod/darkened-ufo-vanilla-variants

https://openxcom.org/download/extras/universal-patch.zip

May be of use :)

BTW thanks for these, yes the patch actually downloads on the nightlies, the LIGHNIN was of particular interest since they updated a few things to cover the holes in it from its first release in the 90's.
« Last Edit: July 10, 2017, 10:32:20 pm by SteamXCOM »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: (Solved)How does one create a working door and add it to a tileset?
« Reply #16 on: July 13, 2017, 08:51:58 pm »
I see you got it working but I wanted to offer my short explanation: The easiest way to make a door work correctly is to copy a working door and change the image. But you can also look at working doors to figure out how they work. MCDEdit has notes by the numbers which help you make sense of them. The most important bits are that it is a wall tile and has the door setting on it. You can set it as a wall tile type in MCDEdit but that only sorts it in MapView. You must actually place it as a wall for it to function as a door.



I made a double door for the Lightning a while back, and I got the graphic fixed so it has just one X-Com decal in the center and it opens smoothly. Then I duplicated it in the opposite direction, and added the Avenger doors with tweaks to make them fit the Lightning, also going both ways. I tweaked the shading to fit the different directions. I'm about to make a few changes to the doors: I'm going to fix some alignment issues as well as better define them so they look more like doors than walls. I might also try to swap the south door onto the other wall tile--it currently has that awkward slot on it.

In addition to the doors, I have added several other things:
  • ramp and mirrored ramp
  • mirrored stairs as well as north and west stairs
  • a power source that comes in 4 sections
  • thin walls for use on the interior (graphics taken from Avenger walls)
  • interior doors (graphic taken from grey UFO door, changed color to salmon)
  • wall+floor pieces for putting the craft wall on the ground level
  • just last night I added a blue lift tile with animated blue dots moving up


I'm making somewhat of a collection of items for the Lightning tileset which I have dubbed LIGHTNIA, and I'll share it here after I make those door fixes. My goal is to make a tileset that gives players the freedom to make custom craft maps of varying design. Hopefully I can add more interior doodads as well as any other things it needs. And I'm going to try and see if I can make the walls act more like walls instead of big blocks. I hope you'll like my tileset, it might save you time in the future and allow you to focus on making maps.

edit: Here's the tileset plus an image:
« Last Edit: July 13, 2017, 10:09:51 pm by The Reaver of Darkness »

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: (Solved)How does one create a working door and add it to a tileset?
« Reply #17 on: July 14, 2017, 03:16:25 am »
THANKS for this!!!