aliens

Author Topic: Invisible FloorOb corpse item hides stacks of items on that tile?  (Read 353 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 608
  • "It implores you to listen to its arguments..."
    • View Profile
I noticed that if I try to make a unit leave no corpse by giving the corpse item a blank image for the FloorOb image it kind of works in that it can no longer be seen, but any other items on that tile are hidden behind the invisible corpse FloorOb.

Example, the cursor is over a corpse item FloorOb that is covering a stack of items:
Spoiler:

Example invisible corpse images for BigOb, FloorOb, HandOb:
Spoiler:




Is there a way that units can be setup to drop no corpse item on death?
« Last Edit: May 02, 2022, 05:19:55 am by The Martian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 7361
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #1 on: May 02, 2022, 10:51:21 am »
Is there a way that units can be setup to drop no corpse item on death?

Not at the moment.

Overkill feature can vaporize the body, but there is no (sane) way to apply it to just one unit.

Offline Nord

  • Commander
  • *****
  • Posts: 1408
  • The Gate is open.
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #2 on: May 03, 2022, 02:54:08 am »
Because heaviest item shows on top, maybe just make invisible corpse weight = 0?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 7361
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #3 on: May 03, 2022, 10:45:28 am »
Because heaviest item shows on top, maybe just make invisible corpse weight = 0?

not in oxce

Offline Finnik

  • Colonel
  • ****
  • Posts: 383
  • Finnik#0257
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #4 on: May 03, 2022, 01:29:10 pm »
Probably, this is off-topic, but why do you need an invisible item?

Offline The Martian

  • Commander
  • *****
  • Posts: 608
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #5 on: May 14, 2022, 01:03:20 pm »
Probably, this is off-topic, but why do you need an invisible item?

For units that explode, vaporize, disintegrate or otherwise blink out of existence during their death animation and don't leave a corpse.

Overkill feature can vaporize the body, but there is no (sane) way to apply it to just one unit.

I saw "BattleUnit.getOverKillDamage" in the openxcom.log file's list of script commands, can Overkill be triggered by a script on the units death?

Alternatively is there perhaps a way via scripting that I can just make the unit be deleted/removed from the battlescape on death skipping both the corpse creation and death animation completely?

At the moment it seems I can only limit a unit's death animation via deathFrames: to a minimum of 1 frame of animation and there is a slight pause when the unit dies that would be really nice to skip in some cases.

Because heaviest item shows on top, maybe just make invisible corpse weight = 0?
not in oxce

Is there a variable in OXCE to control FloorOb draw order? (Like how listOrder: controls the item order in GeoScape menus.)

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 7361
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #6 on: May 14, 2022, 02:18:44 pm »
I saw "BattleUnit.getOverKillDamage" in the openxcom.log file's list of script commands, can Overkill be triggered by a script on the units death?

I already said it's not feasible to use the current overkill feature for your use case.
Don't know what else do you expect me to say...

Alternatively is there perhaps a way via scripting that I can just make the unit be deleted/removed from the battlescape on death skipping both the corpse creation and death animation completely?

no

Is there a variable in OXCE to control FloorOb draw order? (Like how listOrder: controls the item order in GeoScape menus.)

no, that would make the performance even worse than in OXC; the whole point of the oxce change was to increase performance, not decrease it

Offline Yankes

  • Commander
  • *****
  • Posts: 2677
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #7 on: May 14, 2022, 04:14:40 pm »
Right now most of scripts are caped on 0 when you can current health, one way as hack is set `overKill` in armor to negative value, but this will have side effect like items in inventory start getting damage when your hp is very low and game start consider it "overkill".

I think one better solution is allow for script to set negative hp for unit. But this could clash with normal damage processing that could force 0 as lower limit.

Offline The Martian

  • Commander
  • *****
  • Posts: 608
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #8 on: May 14, 2022, 05:13:09 pm »
I think I may have a possible solution so long as the unit is civilian or alien, it won't work for a X-Com unit as the player could remove the required item from their inventory.

If an auto-primed grenade is placed in the units backpack with RadiusReduction: 100.0 and damageAlter: setup to only provide damage via ToItem: in theory the grenade will clean up the invisible corpse so long as the blast exceeds the corpse item's armor: value.

The negative of this approach that I can see is that the player's camera will snap to that location briefly when the grenade explodes which could accidentally trick the player into thinking there is alien activity in that section of the map.

I haven't tried it yet, but I think it could work.

I already said it's not feasible to use the current overkill feature for your use case.
Don't know what else do you expect me to say...

I was hoping that your previous message was only covering the changes possible via the existing .rul yaml variables and not the advanced scripting.

Thank you for confirming that there is no script command to trigger the Overkill state on demand, that saves me a lot of trial and error.

Right now most of scripts are caped on 0 when you can current health, one way as hack is set `overKill` in armor to negative value, but this will have side effect like items in inventory start getting damage when your hp is very low and game start consider it "overkill".

If I set the equipment carried by the unit to have an unusually high armor: value would that negate the problem with a negative Overkill value on the armor setting destroying the units equipment?




Additional question: can Overkill be triggered by a death caused by fatal wounds or negative health recovery on the unit's armor or is an Overkill only able to occur from direct weapon damage?
« Last Edit: May 14, 2022, 05:15:10 pm by The Martian »

Offline Yankes

  • Commander
  • *****
  • Posts: 2677
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #9 on: May 14, 2022, 05:39:32 pm »
Only from direct damage, "fatal wounds" is handled separately. But as it end of turn processing could be detected by script there.

I think I will allow negative health for script setter to allow arbitrary "Overkill".

Offline The Martian

  • Commander
  • *****
  • Posts: 608
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #10 on: May 14, 2022, 06:14:24 pm »
Thank you for the information, I'll plan around that when trying to make use of Overkill.

Offline Yankes

  • Commander
  • *****
  • Posts: 2677
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #11 on: May 14, 2022, 08:40:58 pm »
In new nightly you should be able use `setHealthWithOverkill` in scripts to set negative values.

btw I check code and I saw that wounds and fire already support "overkill", this mean when you set `overKill: 0.0` then bleeding and fire will remove corpse too.

Offline The Martian

  • Commander
  • *****
  • Posts: 608
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Invisible FloorOb corpse item hides stacks of items on that tile?
« Reply #12 on: May 15, 2022, 01:02:44 pm »
Thank you for checking that, it is working great.