aliens

Author Topic: [DONE] [Suggestion] Medikit targets  (Read 4253 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9106
    • View Profile
[DONE] [Suggestion] Medikit targets
« on: November 29, 2019, 03:57:06 pm »
Item attribute 'allowSelfHeal' is now deprecated and will be removed in the next version, use attribute 'medikitTargetSelf' instead.

New attributes:

Code: [Select]
items:
  - type: STR_MEDI_KIT
    medikitTargetSelf: true       # default false
    medikitTargetImmune: true     # default false
    medikitTargetMatrix: 31       # default 63

'medikitTargetSelf' says whether a medikit can be used on the unit using it. Ignores other settings.

'medikitTargetImmune' says whether a medikit can be used on units otherwise immune to medikiting (i.e. tanks, aliens, etc.). Stunned 2x2 units are still completely immune.

'medikitTargetMatrix' says what targets are allowed. It is a composite attribute (a bit map), individual parts:
1 = friendly on the ground
2 = friendly standing
4 = neutral on the ground
8 = neutral standing
16 = hostile on the ground
32 = hostile standing

So, for example:
0 = cannot use on anyone
3 (1+2) = can use only on friendlies
31 (1+2+4+8+16) =  can use on everyone except on standing enemies
63 = can use on everyone
etc.

Offline BlackStaff

  • Colonel
  • ****
  • Posts: 336
    • View Profile
Re: [DONE] [Suggestion] Medikit targets
« Reply #1 on: November 29, 2019, 08:50:26 pm »
Big thanks !  :)

misterx

  • Guest
Re: [DONE] [Suggestion] Medikit targets
« Reply #2 on: November 29, 2019, 09:03:57 pm »
That means finally it's possible for the user to heal himself?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9106
    • View Profile
Re: [DONE] [Suggestion] Medikit targets
« Reply #3 on: November 29, 2019, 09:17:08 pm »
That means finally it's possible for the user to heal himself?

That was possible for a long time already.

This update just gives more specific control over other targets.

wcho035

  • Guest
Re: [DONE] [Suggestion] Medikit targets
« Reply #4 on: November 29, 2019, 09:38:40 pm »
This apply to medikit only? Can it be adapted for something else? Like item with script hooks for stat boosters?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9106
    • View Profile
Re: [DONE] [Suggestion] Medikit targets
« Reply #5 on: November 29, 2019, 09:48:43 pm »
This apply to medikit only? Can it be adapted for something else? Like item with script hooks for stat boosters?

I refuse to answer such questions... the description is explicit and complete.

It does what it says, not more, not less.

wcho035

  • Guest
Re: [DONE] [Suggestion] Medikit targets
« Reply #6 on: November 29, 2019, 09:59:12 pm »
Very well. I thought it would be. I was hoping it can be more.

Offline BlackStaff

  • Colonel
  • ****
  • Posts: 336
    • View Profile
Re: [DONE] [Suggestion] Medikit targets
« Reply #7 on: November 30, 2019, 01:28:38 am »
Did I translate your instructions correctly?  :-[
Sorry if that's not the case!

If I have translated correctly, the soldier heals himself and the other instructions are ignored ('medikitTargetImmune' and 'medikitTargetMatrix').
So if a soldier is unconscious, no one can cure him?


*** Translated with www.DeepL.com/Translator ***

Offline N7Kopper

  • Captain
  • ***
  • Posts: 61
    • View Profile
Re: [DONE] [Suggestion] Medikit targets
« Reply #8 on: January 02, 2020, 05:44:44 pm »
Did I translate your instructions correctly?  :-[
Sorry if that's not the case!

If I have translated correctly, the soldier heals himself and the other instructions are ignored ('medikitTargetImmune' and 'medikitTargetMatrix').
So if a soldier is unconscious, no one can cure him?
Not quite. medikitTargetSelf is just not a part of medikitTargetMatrix.

1 = friendly on the ground
2 = friendly standing
4 = neutral on the ground
8 = neutral standing
16 = hostile on the ground
32 = hostile standing

If you want a medikit item to be able to do one of these things, you add the number next to what action you wish the medikit to be able to perform to medikitTargetMatrix.

For example, if medikitTargetMatrix was 33, that item would only work on conscious aliens or unconscious X-Com. If it was 12, it would work on conscious and unconscious civilians, but not aliens or X-Com.

So, if all of your medikit items have a medikitTargetMatrix of 42, then you would be unable to use them on unconscious units.

medikitTargetSelf isn't part of this variable, and can be true or false depending on if you want the user to be able to heal himself or not.

medikitTargetImmune allows you to have certain medikit items be usable on units that you normally cannot use medikits on.
« Last Edit: January 02, 2020, 05:48:20 pm by N7Kopper »