Author Topic: Map failed to fully generate - converting TFTD map to UFO  (Read 13959 times)

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: Map failed to fully generate
« Reply #15 on: February 19, 2015, 12:50:54 pm »
How are you converting the PCK images from TFTD to the UFO Battlescape palette?

 i am using two methods

i am using volutars mcd edit really handy and i am exporting PNG sheet as TFTD palette then i switch to UFO palette and import the sheet back and i save as MCD into openxcom/data/terrain

this gives me the raw kinda direct aproximation of TFTD colors in UFO

then i am using photoshop and the original TFTD PNG sheet then i tweak it until i get something i'm happy with then import the sheet back into the new MCD

however I noticed the SCANg data is still that of old TFTD. I have to manually rebuild each MCD ported by copying and pasting MCD data into a blank UFO MCD file.

second I will try to rebuild the entire ship from scratch  if the above doesn't work.



@warboy/volutar
yeah i remember that, one map works, the other has garbage data
Warboy, remember, we got a ingame crash because of map mess somewhere at the kitchen of the cargo ship. I think it's the issue. But I don't remember what exactly was the issue and how was it fixed.
i'm gonna keep an eye out
« Last Edit: February 19, 2015, 12:53:57 pm by tollworkout »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #16 on: February 19, 2015, 01:25:00 pm »
make sure you're using the correct loftemps.dat as well (or at least adjust the port-holes to use the older ones), copying the ones (yes that's plural, there are two) from tftd will help

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #17 on: February 19, 2015, 01:51:59 pm »
make sure you're using the correct loftemps.dat as well (or at least adjust the port-holes to use the older ones), copying the ones (yes that's plural, there are two) from tftd will help

How do i adjust port-holes to us older ones? What is port-holes? I know loftemps dat the LOF templates for fake 3D line of fire. And I assume there is something to do with that as the error seems to be generated based on distance M vector which probably is LOF related M probably map and vector is probably how 3D coordinates are stored for LOF calculations

I have a feeling if i create a new map from scratch may help figure out the problem as I am going to test it as I go.

Thanks for your help thus far is been really fruitful.

Eventually is gonna be a 2 part terror mission for my new mod that uses TFTD elements albeit in a different way to complement UFO .  This missions will be long and annoying and is gonna make the game challenging .
« Last Edit: February 19, 2015, 01:53:38 pm by tollworkout »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #18 on: February 19, 2015, 01:58:27 pm »
there are 111 in xcom and 113 in tftd. portholes are windows on a boat. the portholes use lofts 112 and 113, and if you're using the xcom 1 loftemps.dat, it will crash when something looks at it.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Map failed to fully generate
« Reply #19 on: February 19, 2015, 02:26:56 pm »
i am using two methods

i am using volutars mcd edit really handy and i am exporting PNG sheet as TFTD palette then i switch to UFO palette and import the sheet back and i save as MCD into openxcom/data/terrain

this gives me the raw kinda direct aproximation of TFTD colors in UFO

then i am using photoshop and the original TFTD PNG sheet then i tweak it until i get something i'm happy with then import the sheet back into the new MCD

however I noticed the SCANg data is still that of old TFTD. I have to manually rebuild each MCD ported by copying and pasting MCD data into a blank UFO MCD file.

second I will try to rebuild the entire ship from scratch  if the above doesn't work.

We're using the same method :)

If you want to easy replace the sea tiles (those gave me a headache to convert to UFO) check the SEABITS.MCD file that is on my UFO Redux mod. I've used it on the Port terrain to replace the water tiles.

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #20 on: February 19, 2015, 02:36:47 pm »
there are 111 in xcom and 113 in tftd. portholes are windows on a boat. the portholes use lofts 112 and 113, and if you're using the xcom 1 loftemps.dat, it will crash when something looks at it.

THATS IT. WORKS! You're a lifesaver WB. First turn without crash. Problem is 112 and 113 were set on the circular O (Oh)  boat windows which are not available in old UFO. I simply put 0  (zero) on one line only to fake a smaller opening.

For future reference M vector is a variable from LOS and LOF templates calculations.

Now i have to approximate the SCANg data.

Speaking of which. I know this is not on your plate so to speak but volutar mentioned it may be possible to extend SCANg textures using PNGs without having to modify the scang.dat file. Although I wonder would it be easier to use custom scang.dat file or simply externalize all scang.dat textures into png/gif files? Anyway. My experiment was a success (so far). I will hopefully have this new mod with 2 level missions soon online map and missions is all that is left.

ALSO If anyone wants these maps /MCD data converted let me know i'll add a zip. My water I gotta say looks pretty and realistic not same color but then again TFTD has different palette. UFO has more blues and so I took advantage of that. Some items are off like bathtubs are yellow but i'm gonna make them grayscale with a bit of yellow instead. I'm not just approximating colors I am making them look UFOish.

hobbes. In your terrain mod the MCDs you ported from TFTD do you keep them split up or you combine them in one MCD? I am tempted to do this but I am afraid MCDs can't get too big.

Thanks for your help everyone.
« Last Edit: February 19, 2015, 02:58:00 pm by tollworkout »

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: Map failed to fully generate
« Reply #21 on: February 19, 2015, 02:40:14 pm »
We're using the same method :)

If you want to easy replace the sea tiles (those gave me a headache to convert to UFO) check the SEABITS.MCD file that is on my UFO Redux mod. I've used it on the Port terrain to replace the water tiles.
|

Hobbes, after trying many color combinations this is my final water that I am happy with. Looks most realistic and almost better than TFTD.

EDIT: I was actually looking for that conversion you did :)) I couldn't find it so I made my own. I remember reading that you ported PORT (no pun intended) and water and I wanted to see what colors you used.  Thanks. Sea MCD was the most annoying thing to port.
« Last Edit: February 19, 2015, 02:52:26 pm by tollworkout »

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #22 on: February 19, 2015, 03:05:58 pm »
Visual representation of what i did to fix it as per WARBOY suggestions.

So far no crash. use 37 for 112 and 38 for 113

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #23 on: February 19, 2015, 04:29:48 pm »
hobbes. In your terrain mod the MCDs you ported from TFTD do you keep them split up or you combine them in one MCD? I am tempted to do this but I am afraid MCDs can't get too big.

Thanks for your help everyone.

The MCD limit of 256 tiles (entries) applies only when designing map blocks MapView since OXC can go well over this number. And there are ways to design MCD files so that you can use more than 256 tiles on MapView but that's another matter.

My advice is, in general, to keep the same file structure if you're porting MCD files from TFTD, unless you are designing new terrains. 

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #24 on: February 19, 2015, 05:48:58 pm »
I had a feeling is gonna be limited to a certain number.  I'll keep it to original structure. i don't wanna mess things up.

hobbes, should we standardize colors for TFTD MCDs converted to UFO palette?  we may have similar tiles but with different colors.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #25 on: February 19, 2015, 06:58:04 pm »
I had a feeling is gonna be limited to a certain number.  I'll keep it to original structure. i don't wanna mess things up.

hobbes, should we standardize colors for TFTD MCDs converted to UFO palette?  we may have similar tiles but with different colors.

That should be a nice resource for the community.

Are you going to convert the other 2 ships?

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #26 on: February 19, 2015, 07:07:30 pm »
yes. Then i'll post the zip here in case ppl need : - )

For now I am still trying to make the cargo ship terror mission work and appear in the game and still have a few more things to do. but I'll come back to the liner after I get things sorted out.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #27 on: February 19, 2015, 07:27:53 pm »
yes. Then i'll post the zip here in case ppl need : - )

For now I am still trying to make the cargo ship terror mission work and appear in the game and still have a few more things to do. but I'll come back to the liner after I get things sorted out.

Thank you. I've only converted the Port terrains so far using MCDEdit.

I'm going eventually to add both ships to the Terrain Pack, although I'm not planning to add the 2nd part of the mission.

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #28 on: February 19, 2015, 08:20:46 pm »
Thank you. I've only converted the Port terrains so far using MCDEdit.

I'm going eventually to add both ships to the Terrain Pack, although I'm not planning to add the 2nd part of the mission.

I m gonna do 2 part missions.

So far most annoying thing is the SCANg textures are a bit off  Ah well. Is good enough!

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Map failed to fully generate - converting TFTD map to UFO
« Reply #29 on: February 19, 2015, 09:41:24 pm »
I m gonna do 2 part missions.

So far most annoying thing is the SCANg textures are a bit off  Ah well. Is good enough!

Once TFTD is implemented then it is possible to suggest a feature to allow choosing between ScanGs for the terrain files.