aliens

Author Topic: [DONE] Recoverable civilians  (Read 5597 times)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
[DONE] Recoverable civilians
« on: January 03, 2017, 02:50:05 pm »
I would like to make a special civilian unit that, if survives the battle, is transported to the base like a stunned alien.

Is this possible without new code?
« Last Edit: November 22, 2020, 04:23:27 pm by Meridian »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Recoverable civilians
« Reply #1 on: January 03, 2017, 02:55:38 pm »
I would like to make a special civilian unit that, if survives the battle, is transported to the base like a stunned alien.

Is this possible without new code?

I don't think so. I've assigned Sectoids as civilian units to see if they were recovered after battle but it didn't work.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8596
    • View Profile
Re: Recoverable civilians
« Reply #2 on: January 03, 2017, 03:30:04 pm »
I have volunteered to implement that: https://openxcom.org/forum/index.php/topic,4520.msg68451.html#msg68451

But nobody was interested... so instead I did soldier manufacturing, which was a hype back then (and still unused to date).
« Last Edit: January 03, 2017, 03:32:59 pm by Meridian »

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Recoverable civilians
« Reply #3 on: January 03, 2017, 03:46:44 pm »
I have volunteered to implement that: https://openxcom.org/forum/index.php/topic,4520.msg68451.html#msg68451

But nobody was interested... so instead I did soldier manufacturing, which was a hype back then (and still unused to date).

Not unused, it's in Piratez now, and I'm planning on using it. I think I'd find use for recoverable civilians too, now that my mod plans are becoming more concrete.

Offline Nord

  • Commander
  • *****
  • Posts: 1625
  • The Gate is open.
    • View Profile
Re: Recoverable civilians
« Reply #4 on: January 03, 2017, 06:49:44 pm »
What it will be, if you use unit race: CIVILIAN and corpse recover: true? And create additional item, for live civilian body, like with common aliens?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8596
    • View Profile
Re: Recoverable civilians
« Reply #5 on: January 27, 2017, 04:12:59 pm »
I would like to make a special civilian unit that, if survives the battle, is transported to the base like a stunned alien.

Code: [Select]
units:
  - type: MALE_CIVILIAN
    civilianRecoveryType: STR_SCIENTIST # +1 scientist in transfer (24 hours)
    civilianRecoveryType: STR_ENGINEER # +1 engineer in transfer (24 hours)
    civilianRecoveryType: STR_SOLDIER_S # +1 soldier of type STR_SOLDIER_S in transfer (24 hours)
    civilianRecoveryType: STR_SECTOID_MEDIC # +1 prisoner (if available prison space; otherwise nothing (no corpse))
    civilianRecoveryType: STR_RIFLE # +1 item in stores
    race: STR_CIVILIAN
...

PS: works only on civilians (i.e. NEUTRAL faction)... not other units
PS2: OXCE+ needed
« Last Edit: January 27, 2017, 04:26:15 pm by Meridian »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Recoverable civilians
« Reply #6 on: January 27, 2017, 04:22:19 pm »
Code: [Select]
units:
  - type: MALE_CIVILIAN
    civilianRecoveryType: STR_SCIENTIST # +1 scientist in transfer (24 hours)
    civilianRecoveryType: STR_ENGINEER # +1 engineer in transfer (24 hours)
    civilianRecoveryType: STR_SOLDIER_S # +1 soldier of type STR_SOLDIER_S in transfer (24 hours)
    civilianRecoveryType: STR_SECTOID_MEDIC # +1 prisoner (if available prison space; otherwise nothing (no corpse))
    civilianRecoveryType: STR_RIFLE # +1 item in stores
    race: STR_CIVILIAN
...

PS: works only on civilians... not other units

OXCE+?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8596
    • View Profile
Re: Recoverable civilians
« Reply #7 on: January 27, 2017, 04:23:33 pm »
OXCE+?

Yup.
Sorry, I keep forgetting I should add that remark on non-oxce subforums.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Recoverable civilians
« Reply #8 on: January 27, 2017, 05:46:15 pm »
Thank you, you're the best.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8596
    • View Profile
Re: [DONE] Recoverable civilians
« Reply #9 on: November 22, 2020, 04:26:47 pm »
Added also possibility to name to recovered soldiers.

And to specify custom soldier attributes in a similar way as in:
- manufacturing: https://openxcom.org/forum/index.php/topic,8615.msg132649.html#msg132649
- and events: https://openxcom.org/forum/index.php/topic,7215.msg132650.html#msg132650

Attributes `spawnedPersonName` and `spawnedSoldier`: https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#AI_Units_.28Aliens.2FCivilians.29