aliens

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

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
USING MAPVIEW
How does one  create a working  door and add it  to a tileset?
I want to make doubledoors that open close for one of the lightning mods I uploaded (for the tank to travel out)

Added the graphics in the PCK VIEW but they do not appear in the TILE VIEW
Also, how to assign the function of a door to the newly added graphic once it is visible?
Thanks
« Last Edit: July 10, 2017, 09:34:59 pm by SteamXCOM »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #1 on: June 10, 2017, 01:41:37 am »
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, which is much better than PCKView (which I used for years before switching to MCDEdit). PCKView can only be used to add/remove/edit the images on .PCK files, to change how the images are used you'll need to edit the MCD files.

To set entries to act as doors, you'll need to set either byte 30 (for 'sliding' type doors) or byte 35 (for traditional doors). For both you'll also need to define using byte 46 the number of the MCD entry that will be used when the door has been opened. For 'sliding' doors you'll also need to assign the different PCK images to the 8 possible animation sequences (see attached image below)

« Last Edit: June 10, 2017, 01:50:07 am by Hobbes »

Offline Wolfstarr

  • Colonel
  • ****
  • Posts: 248
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #2 on: June 10, 2017, 01:43:27 am »
Hi SteamXCOM,

There used to be some videos on youtube by one of the modders on here on youtube but I can't find it now, not sure if they were taken down :( I do have them on my machine somewhere and I'll post when I find time as this is something I want to get into to.

There is some further information here that might help: http://openxcommods.weebly.com/general-map-creation.html

Nice work on the lightning btw!

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #3 on: June 10, 2017, 05:13:39 am »
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, which is much better than PCKView (which I used for years before switching to MCDEdit). PCKView can only be used to add/remove/edit the images on .PCK files, to change how the images are used you'll need to edit the MCD files.

To set entries to act as doors, you'll need to set either byte 30 (for 'sliding' type doors) or byte 35 (for traditional doors). For both you'll also need to define using byte 46 the number of the MCD entry that will be used when the door has been opened. For 'sliding' doors you'll also need to assign the different PCK images to the 8 possible animation sequences (see attached image below)

THANK YOU
I at last obtained the correct version of MCEDIT and opened the MCD data file and added the settings(yes not to be confused with the DOS version still in abundance).
https://www.ufopaedia.org/index.php?title=MCDEdit
Now the graphic appears where I can add it in MAPVIEW.
However, while it seems animated in the MCDEDIT, when I add the door to the craft it does not animate, though it allows passage otherwise.

The settings are copied from the door that already exits for the LIGHTNING.

This byte 46, it was marked as 0 for the default door...


« Last Edit: June 10, 2017, 06:11:56 am by SteamXCOM »

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #4 on: June 10, 2017, 08:05:19 am »
Hi SteamXCOM,

There used to be some videos on youtube by one of the modders on here on youtube but I can't find it now, not sure if they were taken down :( I do have them on my machine somewhere and I'll post when I find time as this is something I want to get into to.

There is some further information here that might help: http://openxcommods.weebly.com/general-map-creation.html

Nice work on the lightning btw!

Thank you for that link.  I think I shall restart the map and re-import the graphics  in MCD edit as before I simply opened up an existing MCD file.
There is no "clean" way to switch files and have a  tile set with new stuff work into an already existing map?  I gather one must have the map open and bring additional items in.

Yes, only wanted small changes on the Lightning, do not think it needs a whole lot,  thanks for the input!

--- posts merged - Solarius Scorch ---

Here is what I got when I loaded the tileset on a LIGHTNING map without doing anything else to the map yet.
This was with MCDedit with added PNGs for the additional doors.

 As seen the new tileset dropped the doors on the map  and created  holes in the floor of the craft and there is no transparency on the added doors.

MAPEDIT did the same thing EXACTLY when I imported a tileset that I started to make with it then finished in MCDedit to create the animation from MAPview  except there was transparency on the doors with the imported BMPs (both files were resaved in PHOTOSHOP).

I think I can fix transparency (MAPview exporting / importing BMPs have no issue with transparency),

however, How can I import items into an existing tileset and not monkey up the map?
Thanks

« Last Edit: June 10, 2017, 12:14:40 pm by Solarius Scorch »

Offline Wolfstarr

  • Colonel
  • ****
  • Posts: 248
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #5 on: June 10, 2017, 12:53:24 pm »
So I found the video and uploaded it to my Dropbox, it was by bombbloke originally not sure how active he is on here but if he wants me to take it down I will.

https://www.dropbox.com/sh/rjdg8vj5m5h0y8l/AADU1TVWuTsOO-jmUf2bS_Hza?dl=0

Should help you :)

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #6 on: June 10, 2017, 09:01:58 pm »
So I found the video and uploaded it to my Dropbox, it was by bombbloke originally not sure how active he is on here but if he wants me to take it down I will.

https://www.dropbox.com/sh/rjdg8vj5m5h0y8l/AADU1TVWuTsOO-jmUf2bS_Hza?dl=0

Should help you :)

yes thank you!

--- posts merged ---

Right now I'm guessing its like this,

--One cannot add a new tile an existing map, it throws off the sequence of the already existing tiles (unless there is some trick to it).
--A new map has to be created to work with the altered tileset
--One CAN edit an exisiting tile by importing new BMPs or PNGs whatever (watch the transparency).

In the case of the LIGHTNING for a double door, for the proper illusion, two tiles have to  be sacrificed
one of which is the single passage door.

However since no other tile is avaiable, the door has to be altered (if left alone and  animated there is a post in the middle where the two doors meet making it odd that the tank can drive through it.

Have the double door to the stair not animate (as now ) but passible.

Edit the door tile to see if the "post" can be made to disappear

Recreate the LIGHTNING on a new map or delete all on an existing map and recreate?  Which seems best to keep things spawnable?


 
« Last Edit: June 10, 2017, 09:27:03 pm by Solarius Scorch »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #7 on: June 11, 2017, 03:03:50 am »
--One cannot add a new tile an existing map, it throws off the sequence of the already existing tiles (unless there is some trick to it).

For modifying existing maps, create a new tileset with the extra tiles you created and add the tileset (MCD + PCK + TAB files) to the bottom of the list of tilesets already assigned to the map. Keep in mind that there's a 255 tile limit that can be displayed/edit in MapView because of size limitations of the MAP files


Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #8 on: June 11, 2017, 07:54:05 pm »
For modifying existing maps, create a new tileset with the extra tiles you created and add the tileset (MCD + PCK + TAB files) to the bottom of the list of tilesets already assigned to the map. Keep in mind that there's a 255 tile limit that can be displayed/edit in MapView because of size limitations of the MAP files

THIS seems promising.

As an experiment I duplicated LIGHTNIN MCD + PCK + TAB files and added LIGHTNIN01 MCD + PCK + TAB files in the terrain folder.

In MapView there appears to be image files there
However the duplcated LIGHTNIN01 is not there
How to assign new tiles  to a map?

Thanks

« Last Edit: June 11, 2017, 07:56:08 pm by SteamXCOM »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #9 on: June 11, 2017, 08:50:03 pm »
In MapView there appears to be image files there
However the duplcated LIGHTNIN01 is not there
How to assign new tiles  to a map?

Thanks

It's supposed to be through the Image Files tab on the pic you posted but that never worked very well unless it has been fixed. So you'll have to add the new tilesets manually to MapView.

1.Just open the /settings folder of MapView and then open the Images.dat file with Notepad or Notepad++
2. Add the name of the tileset on the same format as the existing ones the list and save Images.dat
3. Copy the necessary files to the /TERRAIN folder
4. Restart MapView and the new tileset will be available to assigned to maps

Btw I wrote the attached guide on how to make maps for UFO2000 a long time ago. Some of it doesn't apply to OpenXCom but you might find it useful since it answers many of the questions you posted on this thread
« Last Edit: June 11, 2017, 08:56:46 pm by Hobbes »

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #10 on: June 11, 2017, 11:03:25 pm »
YES that images.dat edit worked into getting the tileset into MAPVIEW,

THANKS


(EDITING the data file found in it setting folder)
images.dat
LIGHTNIN:${var1}
LIGHTNIN01:${var1}  <<<< added line

mapedit.dat  (no editing, it updated on its own)
files:XCom
      PLANE:plane
      AVENGER:AVENGER
      LIGHTNIN:LIGHTNIN LIGHTNIN01
      
   And your guide helped me to realize in order to get the tile into the game, another edit had to be made, and sure enough crafts.rul needed to be tackled:   
      
      craft.rul edit required
            mapDataSets:
        - BLANKS
        - LIGHTNIN
        - LIGHTNIN01  <<<<<<< added line
      
      
Just black squares otherwise!
      
Thanks again Hobbes!!!

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #11 on: June 11, 2017, 11:09:27 pm »
mapedit.dat  (no editing, it updated on its own)

Mapedit.dat contains the definitions for all .MAP files loaded into MapView, so it will automatically change every time you add a new map or change the tilesets order. Y

ou can also manually edit it instead of using MapView's GUI, which is handy when you are adding a terrain that contains a lot of individual maps. You should make a backup copy first though because it is easy to mess up the list and you'll have to start again using MapView with only the vanilla maps loaded.
« Last Edit: June 11, 2017, 11:11:12 pm by Hobbes »

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #12 on: June 12, 2017, 11:50:46 pm »
A couple of other questions
What is the best way for workflow?

It seems that MAPview is best used setup for paths to the default game UFO folder. 
Once done I copy the terrain, map and route file the the appropriate mod folder
(geeze is there a batch file I can use that does this automatically?)
Then update the RUL file.
Then play the game (quick battle gets the craft into the game to see its changes)

I'd rather do it all in the game folders then copy into the mod at the end (unless a batch file  I can somehow create) but the issue is I cannot find the .rul files ;
there is a "standard" and "data" folder but when I changed the .rul from either one it does not reflect in the game.


MAPVIEW seems to have issues with these files

UFO000 UFO01a  UFO010
The walls look all scrambled even the scout with a pile of walls from the other UFOs,
Is there a fix somewhere to those maps?


thanks

Offline Wolfstarr

  • Colonel
  • ****
  • Posts: 248
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #13 on: June 13, 2017, 01:34:48 am »
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 :)

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: How does one create a working door and add it to a tileset?
« Reply #14 on: June 13, 2017, 01:41:15 am »
A couple of other questions
What is the best way for workflow?

It seems that MAPview is best used setup for paths to the default game UFO folder. 
Once done I copy the terrain, map and route file the the appropriate mod folder
(geeze is there a batch file I can use that does this automatically?)
Then update the RUL file.
Then play the game (quick battle gets the craft into the game to see its changes)

I'd rather do it all in the game folders then copy into the mod at the end (unless a batch file  I can somehow create) but the issue is I cannot find the .rul files ;
there is a "standard" and "data" folder but when I changed the .rul from either one it does not reflect in the game.

For UFO Defense the .rul files are located in the OXC installation folder, on \openxcom\standard\xcom1. There's no /data folder in the nightlies (which I assume you are using?)

For me, I've always used 3 separate folders:
* One for MapView (contains the full original game)
* One for MCDEdit (contains only the terrain files)
* The OpenXCom mod folder

The terrain files first created/modified in MCDEdit, then copied to MapView to use in new/existing maps, then the terrain files and maps are copied to the mod folder for final testing. One of the reasons why I prefer this setup is that if you decide to revert back work while working on MCDEdit/MapView, you can simply go back to the mod folder and copy back the old files.

Quote
MAPVIEW seems to have issues with these files

UFO000 UFO01a  UFO010
The walls look all scrambled even the scout with a pile of walls from the other UFOs,
Is there a fix somewhere to those maps?

UFO000 and UFO010 are incomplete maps that can included with the original game - no one knows which tiles they were supposed to use, so the MapView developer assigned them the UFO ones. You can have an idea of how they *might* look on this page: https://www.ufopaedia.org/index.php/Talk:MAPS

UFO01a is the Small Scout but for some reason MapView doesn't display it correctly