Author Topic: Outdoor maps height question  (Read 5425 times)

Offline NeoWorm

  • Colonel
  • ****
  • Posts: 104
    • View Profile
Outdoor maps height question
« on: June 26, 2017, 01:08:34 am »
Just a quick question I hope. I would like to make all outdoor maps higher than in vanilla. Preferably 10 tiles high like in Pirates to give flying units little more space. Can it be done from rulesets or just by modifying maps? If the latter how to do that most effectively?

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Outdoor maps height question
« Reply #1 on: June 26, 2017, 01:25:39 am »
Just a quick question I hope. I would like to make all outdoor maps higher than in vanilla. Preferably 10 tiles high like in Pirates to give flying units little more space. Can it be done from rulesets or just by modifying maps? If the latter how to do that most effectively?

It needs to be done through rulesets, on the alienDeployment entries for each type of mission. The height listed there is the one used by the game when building the Battlescape. If the maps are lower than that value it simply adds empty space on top. But if the map files have heights superior than the ones listed on alienDeployment then OpenXcom will crash.

Offline NeoWorm

  • Colonel
  • ****
  • Posts: 104
    • View Profile
Re: Outdoor maps height question
« Reply #2 on: June 26, 2017, 01:35:10 am »
It needs to be done through rulesets, on the alienDeployment entries for each type of mission. The height listed there is the one used by the game when building the Battlescape. If the maps are lower than that value it simply adds empty space on top. But if the map files have heights superior than the ones listed on alienDeployment then OpenXcom will crash.
That sounds leagues simplier than I hoped. I am going to just add height, so it should be fine. Thanks

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: Outdoor -AND INDOOR- maps height question
« Reply #3 on: March 31, 2018, 12:18:03 pm »
necromancy!

What to do when i have terrains with different map heights assigned to the same alienDeployment and I don't want empty layers added?
I have a terrain with height 4, and another terrain with height 1: they're interior terrains so I don't want empty layers added on top. The obvious solution would be to "pad" the shorter terrain with layers full of "concrete" block so it become as high as the higher.. is it the only option?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Outdoor -AND INDOOR- maps height question
« Reply #4 on: March 31, 2018, 12:49:44 pm »
necromancy!

What to do when i have terrains with different map heights assigned to the same alienDeployment and I don't want empty layers added?
I have a terrain with height 4, and another terrain with height 1: they're interior terrains so I don't want empty layers added on top. The obvious solution would be to "pad" the shorter terrain with layers full of "concrete" block so it become as high as the higher.. is it the only option?

Unfortunately I don't think there is another solution. Unless Ohartenstein23 comes up with a script to add solid block fillers where needed, but I don't know if it's possible.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: Outdoor maps height question
« Reply #5 on: March 31, 2018, 02:01:51 pm »
That sounds leagues simplier than I hoped. I am going to just add height, so it should be fine. Thanks

Don't add too many... otherwise you might get into performance issues.

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: Outdoor maps height question
« Reply #6 on: March 31, 2018, 02:12:43 pm »
Out of curiosity: Is there also some sort of line of sight distance in height? Something like 10 levels, not more can be seen for a unit? So in essence, making it possible to fly behind enemy lines unseen?

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: Outdoor -AND INDOOR- maps height question
« Reply #7 on: March 31, 2018, 02:45:06 pm »
Unfortunately I don't think there is another solution. Unless Ohartenstein23 comes up with a script to add solid block fillers where needed, but I don't know if it's possible.
Thanks. It's not really a bad solution, extremely easy to implement for the mapper.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Outdoor -AND INDOOR- maps height question
« Reply #8 on: March 31, 2018, 03:33:53 pm »
Unfortunately I don't think there is another solution. Unless Ohartenstein23 comes up with a script to add solid block fillers where needed, but I don't know if it's possible.

The script option already exists in verticalLevels - if you make a 10x10x1 "concrete fill" map, then you can have that pad the short maps out:
Code: [Select]
mapScripts:
  - type: INDOOR_MAP
    commands:
    #...
    - type: addBlock
      size: [1, 1, 4] # if map height is 4
      verticalLevels:
      - type: ground
        # whatever blocks or groups you want, but make sure the heights are defined in terrains as well as the widths/lenghts
      - type: middle
        size: [1, 1, 1]
        # the blocks or groups that correspond to the 10x10x1 filler map block
      #...

This should fill out any short 10x10 blocks.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Outdoor maps height question
« Reply #9 on: March 31, 2018, 05:25:49 pm »
Out of curiosity: Is there also some sort of line of sight distance in height? Something like 10 levels, not more can be seen for a unit? So in essence, making it possible to fly behind enemy lines unseen?

According to UFOPaedia.org in the original game height had no effect on a unit's visual range, so a unit will see 21 tiles on every direction regardless of the height of the tiles

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: Outdoor maps height question
« Reply #10 on: March 31, 2018, 05:42:11 pm »
According to UFOPaedia.org in the original game height had no effect on a unit's visual range, so a unit will see 21 tiles on every direction regardless of the height of the tiles

I can confirm this is still true in OpenXcom.
LOS-related distance calculations ignore Z-levels.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Outdoor maps height question
« Reply #11 on: March 31, 2018, 06:36:24 pm »
LOS-related distance calculations ignore Z-levels.

This would mean that in a map with 1000 height, a unit on level 0 would be able to see only 20 tiles on the x/y-axis and 999 levels on the z-axis

Another fine piece of XCom physics: light has unlimited speed in the z-axis


Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: Outdoor maps height question
« Reply #12 on: March 31, 2018, 07:53:07 pm »
OK, then I imagined that right. Was just curious, if there had been any change on Openxcom.