aliens

Author Topic: Small Map Pack preview and a question about water tiles.  (Read 1286 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Small Map Pack preview and a question about water tiles.
« on: May 11, 2023, 08:07:52 am »
The map pack is coming along. As well as the alien crafts I now have several new terror site maps that I'm hoping to add to the mix.

However after building this map I realized that I may have created a problem with the layout:
Spoiler:


I don't accidentally want to softlock the game by having aliens hidden underneath the waves.

What happens if an alien or X-Com soldier falls onto this water tile from above?

Also to prevent some of the terrain from being destroyed I gave it an armor value of 255 and DeathId matching its own number. I'm hoping that this will this be enough to assure the walkways/etc don't get destroyed preventing proper navigation of the map.

Here is the tile terrain configuration for OFFSHORE, the custom terrain files are included in the .zip.
Code: [Select]
      - SEA
      - CARGO1_ARMORED
      - CARGO2_ARMORED
      - XBITS
      - CARGO3_ARMORED
      - GRUNGE4_PIPES_NO_REC_ARMORED
      - MOSTLY_PIPES_ARMORED

And here are the map files for the curious, it is currently untested ingame so please let me know if anything goes wrong:
Offshore Rig (V0-46).zip
« Last Edit: May 11, 2023, 08:09:37 am by The Martian »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Small Map Pack preview and a question about water tiles.
« Reply #1 on: May 12, 2023, 01:42:58 pm »
Very cool.

I don't accidentally want to softlock the game by having aliens hidden underneath the waves.

What happens if an alien or X-Com soldier falls onto this water tile from above?

If the tile is impassable, the alien can't get on it. It can fall into it if you kill/stun it, though (but it's not a problem IMO).

Also to prevent some of the terrain from being destroyed I gave it an armor value of 255 and DeathId matching its own number. I'm hoping that this will this be enough to assure the walkways/etc don't get destroyed preventing proper navigation of the map.

Yeah, it's not an ideal solution, but I can't suggest anything better without a terrain collapsing engine.

(Alternatively the objects may explode with enough force to trigger explosion of the object above, but that wouldn't make sense here.)

Here is the tile terrain configuration for OFFSHORE, the custom terrain files are included in the .zip.
Code: [Select]
      - SEA
      - CARGO1_ARMORED
      - CARGO2_ARMORED
      - XBITS
      - CARGO3_ARMORED
      - GRUNGE4_PIPES_NO_REC_ARMORED
      - MOSTLY_PIPES_ARMORED

And here are the map files for the curious, it is currently untested ingame so please let me know if anything goes wrong:
Offshore Rig (V0-46).zip

Great, thank you! I might steal it. :)

Offline Alex_D

  • Colonel
  • ****
  • Posts: 482
    • View Profile
Re: Small Map Pack preview and a question about water tiles.
« Reply #2 on: May 12, 2023, 08:09:31 pm »
If the tile is impassable, the alien can't get on it. It can fall into it if you kill/stun it, though (but it's not a problem IMO).
Please correct me if I'm wrong, is this the solution used for the 0-G missions in XPZ ?
Like the bottom is a layer of invisible and impassable terrain. Stun or injured units that collapsed cannot be retrieved unless the mission ends as a win.

I was thinking on how to simulated moving terrain, like a mission on a train (like a train heist or so), where all the tiles outside the train are exit points when the mission ends, but aren't walkable. But this is a topic for another thread.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Small Map Pack preview and a question about water tiles.
« Reply #3 on: May 13, 2023, 10:27:39 am »
Please correct me if I'm wrong, is this the solution used for the 0-G missions in XPZ ?
Like the bottom is a layer of invisible and impassable terrain. Stun or injured units that collapsed cannot be retrieved unless the mission ends as a win.

Yes, with the extra steps you mentioned.

I was thinking on how to simulated moving terrain, like a mission on a train (like a train heist or so), where all the tiles outside the train are exit points when the mission ends, but aren't walkable. But this is a topic for another thread.

I've had such thought as well. :) And mid-air boarding actions. :)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Small Map Pack preview and a question about water tiles.
« Reply #4 on: May 13, 2023, 01:39:24 pm »
Great, thank you! I might steal it. :)

Anything I upload to the forum is always up for grabs, please feel free to make use of it.


If the tile is impassable, the alien can't get on it. It can fall into it if you kill/stun it, though (but it's not a problem IMO).
Like the bottom is a layer of invisible and impassable terrain.

To setup a tile as impassable do I just set TuWalk, TuSlide, TuFly to 255 in McdView or is there another setting I need to adjust to prevent the units from falling into the ocean?





I just remembered another possible solution.

What if all ocean tiles had a Death Tile under them as described in this post by Meridian:
https://openxcom.org/forum/index.php/topic,7671.msg132978.html#msg132978

Spoiler:
Added.

You can use the "Target_Type/SpecialType" MCD attribute (byte #59) to mark a tile part as a death trap.
Any value between 200 and 254 will work.
255 will also work, but please don't use it.
See attached screenshots from MCDView1 and MCDView2.

The tile part must be used as a FLOOR part in the map editor.
Walls and objects don't do anything.

If a unit walks into a tile with death trap floor, or if a unit falls into such a tile, the game will generate a death trap and activate it.
The death trap is an item with type "STR_DEATH_TRAP_XXX", where XXX is the number you have used as "SpecialType" in the MCD.

For 2x2 units, all 4 tiles are checked for death traps, but only 1 will trigger.

There are two types of death traps:
1. proximity grenades: work as classic proxy grenades, create AOE damage
2. melee items: highly experimental, create non-AOE damage

Examples:

1. proxy (battle type = 5)

Code: [Select]
items:
  - type: STR_DEATH_TRAP_250
    battleType: 5           # proxy
    damageType: 3
    power: 50
    damageAlter:
      FixRadius: 1          # minimum for nice explosion animation
      RandomType: 3
      ArmorEffectiveness: 0.0
      ToHealth: 20.0
      ToTile: 0.0
    weight: 3
    bigSprite: 21
    floorSprite: 21
    size: 0.1
    costSell: 400

2. melee (battle type = 3)

Code: [Select]
items:
  - type: STR_DEATH_TRAP_251
    battleType: 3           # melee
    damageType: 7
    power: 50
    damageAlter:
      RandomType: 3
      ArmorEffectiveness: 0.0
      ToHealth: 10.0
      ToTile: 0.0
    invWidth: 0             # hidden
    invHeight: 0            # hidden
    recover: false          # don't recover!
    hiddenOnMinimap: true   # hidden
    weight: 6
    bigSprite: 26
    floorSprite: 26         # use a blank sprite here
    handSprite: 80
    meleeSound: 54
    accuracyMelee: 100
    tuMelee: 30
    clipSize: -1
    size: 0.1
    costSell: 945
« Last Edit: May 13, 2023, 05:03:22 pm by The Martian »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Small Map Pack preview and a question about water tiles.
« Reply #5 on: May 13, 2023, 05:45:19 pm »
What if all ocean tiles had a Death Tile under them as described in this post by Meridian:

Yep, good idea. :)