aliens

Author Topic: [DONE][Suggestion] Death Tile/ Gravitic death  (Read 10234 times)

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
[DONE][Suggestion] Death Tile/ Gravitic death
« on: December 10, 2019, 11:41:54 pm »
Dunno if is talked already, but i´m in a need  :P

is there a way to make "a death tile". So if you step on a tile your unit or Ai units die automatically , i Know there´s a way around like placing prox granades or making a fire , but that way will be simple and without gimmicks, something like:
      - name: DESERT10
        width: 10
        length: 10
                deathtile:
            - [7, 7, 0]
            - [7, 8, 0]

Also is it possible to have gravitic fall damage?


To translate to the game i want to give a new angle on map environment

« Last Edit: October 17, 2020, 10:29:24 am by Meridian »

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: [Suggestion] Death Tile/ Gravitic death
« Reply #1 on: December 11, 2019, 04:44:30 am »
is there a way to make "a death tile". So if you step on a tile your unit or Ai units die automatically

If the tile was instead linked to an item which was setup like a weapon the effect could be further customized allowing other outcomes than instant death, examples:
- Walking on tile builds up stun.
- Increase fatal wounds when stepped on.
- Decrease morale when stepped on.
- The effect could be resisted by configuring units armor to be immune to the damage type being inflicted by the tile.
-- Useful if aliens need to cross the tile during their patrol but you don't want the player units to do so.
-- Or if technology can be researched to allow crossing that obstacle safely.
- Sounds FX could trigger on effect hit.
- Visual effects can be triggered when the tile is stepped on using the hitAnimation: images.
- Basically anything that could be configured on an items: weapon could occur when the tile was crossed by the player's unit or alien units.


So for instance in Bulletdesigner's example the unit could fall through the ice onto the effect linked tile triggering the item STR_WATER_DEATH which plays a visual splash animation while a related sound FX triggers and the unit is hit with a lethal amount of damage.
Code: [Select]
      - name: DESERT10
        width: 10
        length: 10
                deathtile: STR_WATER_DEATH
            - [7, 7, 0]
            - [7, 8, 0]

Also is it possible to have gravitic fall damage?

I'm not against the idea of taking damage when falling, but wouldn't the current pathfinding potentially walk your unit off roofs/etc if that was the fastest way to the ground thus killing that unit unintentionally?
« Last Edit: December 11, 2019, 05:16:44 am by The Martian »

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Re: [Suggestion] Death Tile/ Gravitic death
« Reply #2 on: December 11, 2019, 09:52:38 am »
For now you can place an invisible mine to that tile, but this is one-time solution. :(

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: [Suggestion] Death Tile/ Gravitic death
« Reply #3 on: December 11, 2019, 02:21:34 pm »
For now you can place an invisible mine to that tile, but this is one-time solution. :(

... in that case would the solution be granting the Proximity Grenade type equipment an items: variable that configures if the item is consumed when it is activated / exploded?
(I can think of several additional uses for such a feature.)

I'm not sure if a Proximity Grenade detects when a unit falls directly onto it though, or if it just activates when they step onto a tile near it at the same elevation?
(It would be weird to fall through the ice and then have to take an extra step for the unit to die.)

i Know there´s a way around like placing prox granades or making a fire , but that way will be simple and without gimmicks

I believe Bulletdesigner is looking for a way to quickly select sections of the map to have a death tile without placing each individual prox grenade, so the above wouldn't remove that setup process.

Unless there is a way to place large fields of Proximity Grenade type items and not just set the coordinates of each individual mine?

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: [Suggestion] Death Tile/ Gravitic death
« Reply #4 on: January 06, 2020, 11:27:54 am »
+10 :P

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: [Suggestion] Death Tile/ Gravitic death
« Reply #5 on: October 14, 2020, 08:38:31 pm »
To translate to the game i want to give a new angle on map environment

This is very vague, I don't understand what you want to do.
Please explain this example better.

Also is it possible to have gravitic fall damage?

What would it be used for?
Is it just to make pathfinding harder (to avoid all falls) or does it actually have a different purpose?

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: [Suggestion] Death Tile/ Gravitic death
« Reply #6 on: October 14, 2020, 10:07:11 pm »
With bit of hacking this could be possible today, scripts can access to `SpecialTileType` of floor or object type. You can set some big value there, that is not used by engine for other things, and then check on next turn script to apply damage to unit if it on this tile.

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: [Suggestion] Death Tile/ Gravitic death
« Reply #7 on: October 15, 2020, 12:35:50 pm »
This is very vague, I don't understand what you want to do.
Please explain this example better.

What would it be used for?
Is it just to make pathfinding harder (to avoid all falls) or does it actually have a different purpose?


well makes player takes a decision to hit the ice or some bridge/platform  with lava below adding a new way to kill enemy units, also player will think twice before crossing on ice or unsteady bridge/platform for example.
Units can not cross this tiles since the tile is 255 to movement, the issue is they getting killed when drooping from above

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: [Suggestion] Death Tile/ Gravitic death
« Reply #8 on: October 17, 2020, 10:29:08 am »
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: October 17, 2020, 10:49:42 am by Meridian »

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: [DONE][Suggestion] Death Tile/ Gravitic death
« Reply #9 on: October 17, 2020, 03:01:35 pm »
wow very nice, cant w8 to try it out

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Re: [DONE][Suggestion] Death Tile/ Gravitic death
« Reply #10 on: October 17, 2020, 10:52:57 pm »
It is outstanding!

thePaleone

  • Guest
Re: [DONE][Suggestion] Death Tile/ Gravitic death
« Reply #11 on: October 18, 2020, 12:02:37 pm »
Can true gravity be also simulated? I have seen extreme explosion that wipe out the first level of a building, then left the other floors floating or hanging above the mission map. If there are no supporting walls, the floating floors should fall onto the ground.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: [DONE][Suggestion] Death Tile/ Gravitic death
« Reply #12 on: October 18, 2020, 12:31:49 pm »
Can true gravity be also simulated? I have seen extreme explosion that wipe out the first level of a building, then left the other floors floating or hanging above the mission map. If there are no supporting walls, the floating floors should fall onto the ground.

No.

Offline Kato

  • Captain
  • ***
  • Posts: 51
  • ASHU is coming
    • View Profile
Re: [DONE][Suggestion] Death Tile/ Gravitic death
« Reply #13 on: October 19, 2020, 12:09:07 pm »
Hmmm...

1. Modder made an alien base with death tiles to trap x-com soldiers.
2. Hidden Movement phase.
3. MANY aliens stepped at death tiles and died without even being spotted by x-com.

How to avoid this situation? Can AI be tweaked by some boolean in alienDeployments? True - aliens know about death tiles and not stepping at 'em. False - both player and AI are not informed what tiles are traps.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: [DONE][Suggestion] Death Tile/ Gravitic death
« Reply #14 on: October 19, 2020, 01:14:56 pm »
Death traps are death traps, for xcom, aliens and civilians alike.

Works exactly according to the original request/specification.