OpenXcom Forum

Modding => Work In Progress => Topic started by: kikimoristan on February 19, 2015, 03:04:59 am

Title: Map failed to fully generate - converting TFTD map to UFO
Post by: kikimoristan on February 19, 2015, 03:04:59 am
Guys I need help.

I created a new alien deployment and terrain and a map that is 70 x 50. Whenever I try new battle I get Map Failed to Fully Generate.

The map is fixed and should not randomly generate.

Any thoughts?
Title: Re: Map failed to fully generate
Post by: Warboy1982 on February 19, 2015, 03:07:05 am
impossible to diagnose without the ruleset and pictures of the map blocks.
Title: Re: Map failed to fully generate
Post by: kikimoristan on February 19, 2015, 03:16:34 am
ooops . so sorry i forgot

this is just the section that deals with the map/mission deployment. all other elements are working out. the map is working out too. is imported from tftd a cargo ship. i wanna do a random ship terror mission see if is possible. I modified the MCD and changed the palette and i am gonna change up scan map after. i borrowed the route and fixed it up. should work fine.

i have a feeling the problem is skyranger cannot be placed on the map. or the map is too big?

Code: [Select]
alienDeployments:
  - type: STR_CARGO_TERROR_MISSION
    data:
      - alienRank: 5
        lowQty: 4
        highQty: 6
        dQty: 1
        percentageOutsideUfo: 70
        itemSets:
          -
            - STR_BLASTA_PISTOL
          -
            - STR_BLASTA_RIFLE
            - STR_SONIC_PULSER
          -
            - STR_BLASTA_CANNON
            - STR_SONIC_PULSERDE
      - alienRank: 4
        lowQty: 1
        highQty: 2
        dQty: 0
        percentageOutsideUfo: 20
        itemSets:
          -
            - STR_BLASTA_PISTOL
          -
            - STR_BLASTA_RIFLE
          -
            - STR_BLASTA_CANNON
      - alienRank: 3
        lowQty: 1
        highQty: 1
        dQty: 1
        percentageOutsideUfo: 20
        itemSets:
          -
            - STR_BLASTA_PISTOL
          -
            - STR_BLASTA_RIFLE
          -
            - STR_SMALL_LAUNCHER
            - STR_STUN_BOMB
            - STR_STUN_BOMB
            - STR_STUN_BOMB
      - alienRank: 2
        lowQty: 1
        highQty: 2
        dQty: 0
        percentageOutsideUfo: 20
        itemSets:
          -
            - STR_BLASTA_PISTOL
          -
            - STR_BLASTA_RIFLE
          -
            - STR_BLASTA_CANNON
            - STR_SONIC_PULSER
      - alienRank: 1
        lowQty: 1
        highQty: 1
        dQty: 0
        percentageOutsideUfo: 0
        itemSets:
          -
            - STR_BLASTA_PISTOL
          -
            - STR_BLASTA_RIFLE
          -
            - STR_BLASTA_CANNON
            - STR_BLASTA_CANNON
      - alienRank: 6
        lowQty: 1
        highQty: 3
        dQty: 2
        percentageOutsideUfo: 50
        itemSets:
          -
            []
          -
            []
          -
            []
      - alienRank: 7
        lowQty: 1
        highQty: 3
        dQty: 2
        percentageOutsideUfo: 50
        itemSets:
          -
            []
          -
            []
          -
            []
    width: 70
    length: 50
    height: 4
    civilians: 16
    terrains:
      - CARGO
    briefing:
      palette: 2
      music: GMENBASE

terrains:
  - name: CARGO
    mapDataSets:
      - BLANKS
      - SEA
      - CARGO1
      - CARGO2
      - XBITS
    mapBlocks:
      - name: CARGO00
        width: 70
        length: 50
Title: Re: Map failed to fully generate
Post by: Warboy1982 on February 19, 2015, 03:48:20 am
well, your dimensions are completely wrong for one thing, your map is 70x50 and you've defined the block as 70x50, but it's 30x70, also, it has no script. you need to define where the craft goes, as well as the map block you want to add, including the size, assuming it's not 10x10.
Title: Re: Map failed to fully generate
Post by: kikimoristan on February 19, 2015, 03:58:57 am
thanks warboy. im gonan check it out ill be back with results. i was reading the ufopaedia on rulesets and i deff  need to make the mapBlocks groups : 1 and add a manual add craft script . brb ill test these out. 
Title: Re: Map failed to fully generate
Post by: Warboy1982 on February 19, 2015, 04:05:00 am
no, you don't need to add it to a group...

Code: [Select]
    - type: addCraft
      rects:
        - [1,0,1,2]
    - type: addBlock
      size: [3,7]

is all you need
Title: Re: Map failed to fully generate
Post by: kikimoristan on February 19, 2015, 04:12:37 am
WORKS!

I got another error:_vector_M_range_check .
Title: Re: Map failed to fully generate
Post by: Warboy1982 on February 19, 2015, 04:19:27 am
that's a slightly less helpful error message i'll grant you, but i'd recommend double checking your deployment data "STR_SONIC_PULSERDE" for example i don't think is a thing
Title: Re: Map failed to fully generate
Post by: kikimoristan on February 19, 2015, 04:24:23 am
seems going towards the center of the ship gives this crash i assume something to do with mcd data or some other obscure thing .  it works though for 1 turn.
Title: Re: Map failed to fully generate
Post by: kikimoristan on February 19, 2015, 04:29:27 am
proof is working
Title: Re: Map failed to fully generate
Post by: Hobbes on February 19, 2015, 04:33:52 am
seems going towards the center of the ship gives this crash i assume something to do with mcd data or some other obscure thing .  it works though for 1 turn.

Usually that is caused because the game can't visualize something that is supposed to, either with terrains, units or weapons.
Title: Re: Map failed to fully generate
Post by: kikimoristan on February 19, 2015, 04:37:31 am
thanks Warboy. Thanks a lot for your help. I love this community :)

thanks hobbes.

I think there is are some tile types that are either broken or OpenXcom can't read well due to TFTD differences or who knows? I m gonna try to edit out the map until I can make it work. Maybe there are some subtle MCD differences between the two games. 
Title: Re: Map failed to fully generate
Post by: volutar on February 19, 2015, 05:18:22 am
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.
Title: Re: Map failed to fully generate
Post by: Hobbes on February 19, 2015, 05:27:47 am
I think there is are some tile types that are either broken or OpenXcom can't read well due to TFTD differences or who knows? I m gonna try to edit out the map until I can make it work. Maybe there are some subtle MCD differences between the two games.

How are you converting the PCK images from TFTD to the UFO Battlescape palette?
Title: Re: Map failed to fully generate
Post by: Warboy1982 on February 19, 2015, 06:36:16 am
yeah i remember that, one map works, the other has garbage data
Title: Re: Map failed to fully generate
Post by: kikimoristan 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
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: Warboy1982 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
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: kikimoristan 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 .
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: Warboy1982 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.
Title: Re: Map failed to fully generate
Post by: Hobbes 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.
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: kikimoristan 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.
Title: Re: Map failed to fully generate
Post by: kikimoristan 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.
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: kikimoristan 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
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: Hobbes 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. 
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: kikimoristan 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.
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: Hobbes 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?
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: kikimoristan 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.
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: Hobbes 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.
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: kikimoristan 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!
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: Hobbes 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.
Title: Re: Map failed to fully generate - converting TFTD map to UFO
Post by: kikimoristan on February 19, 2015, 10:23:28 pm
Once TFTD is implemented then it is possible to suggest a feature to allow choosing between ScanGs for the terrain files.


 i posted something in suggestions but i m not gonna lse any sleep about it im happy it works thus far ;)