OpenXcom Forum

Modding => Help => Topic started by: robin on August 05, 2022, 02:45:12 pm

Title: unit without corpse (and more)
Post by: robin on August 05, 2022, 02:45:12 pm
I want to create a unit that leaves no corpse behind when killed.
I could make the corpse unrecoverable + use an invisible (AKA empty) floor sprite, that is not a problem.
But, is there a more straightforward way?

Bonus question: how to make a firearm with "flat" accuracy? I want to create a weapon with X% of accuracy regardless of the unit accuracy.

Thanks.
Title: Re: unit without corpse (and more)
Post by: Meridian on August 05, 2022, 03:13:17 pm
I want to create a unit that leaves no corpse behind when killed.
I could make the corpse unrecoverable + use an invisible (AKA empty) floor sprite, that is not a problem.
But, is there a more straightforward way?

`overKill: 0.0` on armor?
just guessing, didn't test

Bonus question: how to make a firearm with "flat" accuracy? I want to create a weapon with X% of accuracy regardless of the unit accuracy.

override the calculation formula using `accuracyMultiplier`

Code: [Select]
- type: STR_PISTOL
   accuracyMultiplier:
     firing: 0.0
     flatHundred: 1.0
Title: Re: unit without corpse (and more)
Post by: robin on August 05, 2022, 03:54:14 pm
Even with overKill: 0.0, I would still have to define the corpse, otherwise game would not start, I think.
I'll just define the corpse, invisible, not a big deal.

I did not realize I could use flatHundred there.

Thanks!

Title: Re: unit without corpse (and more)
Post by: Yankes on August 05, 2022, 05:56:46 pm
Even with overKill: 0.0, I would still have to define the corpse, otherwise game would not start, I think.
I'll just define the corpse, invisible, not a big deal.

I did not realize I could use flatHundred there.

Thanks!
Yes as you can "neutralize" units without killing them. As there is multiple conditions when this can happens only good solution is always require corpse.
Probably you need create only one corpse like this and share it for every unit that do not need corpse.