Author Topic: OXCE (OpenXcom Extended) main thread  (Read 445732 times)

Offline Ethereal

  • Commander
  • *****
  • Posts: 619
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #765 on: March 26, 2021, 04:56:53 pm »
Dear Meridian, could you expand the numeric value for the oxceAutoNightVisionThreshold option to 16?
What for? To enable and disable the Night Vision mode in battle. At least in the settings. And it would be better if there was another hotkey, but this is not necessary.
Backlighting with a "space" is enough for me, and with forced automation, the entire atmosphere of the original disappears in night battles.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8597
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #766 on: March 26, 2021, 05:00:10 pm »
Dear Meridian, could you expand the numeric value for the oxceAutoNightVisionThreshold option to 16?
What for? To enable and disable the Night Vision mode in battle. At least in the settings. And it would be better if there was another hotkey, but this is not necessary.
Backlighting with a "space" is enough for me, and with forced automation, the entire atmosphere of the original disappears in night battles.

You can use value 15 to disable the night vision.

Values 16, 17, 18, and so on would only do the same as 15.

Offline Ethereal

  • Commander
  • *****
  • Posts: 619
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #767 on: March 26, 2021, 05:23:13 pm »
Unfortunately, there are maps with 15 shading. And these are the settings of the original. Try it yourself.
UFO - UBASE, MARS.
TRTD - GRUNGE, ENTRY, ALSHIP, LEVEL, CRYPT.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8597
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #768 on: March 26, 2021, 05:28:06 pm »
Unfortunately, there are maps with 15 shading. And these are the settings of the original. Try it yourself.
UFO - UBASE, MARS.
TRTD - GRUNGE, ENTRY, ALSHIP, LEVEL, CRYPT.

I know.

Setting 15 means "darker than 15", "relevant for shade higher than 15", "relevant for shade > 15", "relevant for shade higher or equal than 16" or "relevant for shade >= 16".
Hope that clarifies it.

With setting 15, OXCE will *not* automatically turn on night vision under any circumstance.
Just try it yourself.
« Last Edit: March 26, 2021, 05:32:15 pm by Meridian »

Offline Ethereal

  • Commander
  • *****
  • Posts: 619
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #769 on: March 26, 2021, 05:38:10 pm »
Understood thanks. Found a mistake in myself, there were maps with shading 16. I will fix it.

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #770 on: April 26, 2021, 04:58:01 pm »
Not sure if this is the right place, but I have recently run into trouble with prison types in XCF.

Cyberweb robotic units - robosphere/turret (or rather their respective items upon recovery) - don't have an assigned prison type. They die upon recovery if no alien containment unit exists. They however do not take up any prisoner slot in the containment unit and are not trasferred to a base having a containment unit either.

I am not sure this intended or a fall back for "vanilla" units (i.e. those without a separate prison type). What would be the correct way to define a recoverable alien unit that takes up no prison slot/type?
« Last Edit: April 26, 2021, 05:01:06 pm by krautbernd »

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8597
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #771 on: April 26, 2021, 05:05:20 pm »
There is always a prison type, default is 0.

Check if you have correctly set the `liveAlien` flag.

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #772 on: April 26, 2021, 05:12:13 pm »
There is always a prison type, default is 0.

Check if you have correctly set the `liveAlien` flag.

No, those units don't have that flag set (on purpose I guess, since they are robotic). Do all recoverd units check for a matching/existing prison type, regardless of the flag? Is it possible to skip that check?
« Last Edit: April 26, 2021, 05:14:42 pm by krautbernd »

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8597
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #773 on: April 26, 2021, 05:23:48 pm »
It's simple.

Stuff with `liveAlien: false` goes into stores.
Stuff with `liveAlien: true` goes into alien containment.
Nothing else depends on this flag.
This is its only purpose, by design.

Once it has been determined that an item belongs to an alien containment... then the `prisonType` attribute kicks in and says to which particular alien containment facility should it go.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: OXCE (OpenXcom Extended) main thread
« Reply #774 on: April 26, 2021, 05:36:59 pm »
Sorry, it's my fault. I'll fix the problem soon.

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #775 on: April 26, 2021, 05:37:13 pm »
It's simple.

Stuff with `liveAlien: false` goes into stores.
Stuff with `liveAlien: true` goes into alien containment.
Nothing else depends on this flag.
This is its only purpose, by design.

Once it has been determined that an item belongs to an alien containment... then the `prisonType` attribute kicks in and says to which particular alien containment facility should it go.
But that is not how it works, apparently. Regardless of the flag setting the units die if no facility with 'prisonType: 0' exists:

Code: [Select]
  - type: STR_CYBERWEB_ROBOSPHERE_TERRORIST
    categories: [STR_HUMAN_TECH, STR_ROBOTS]
    size: 0.0
    recover: true
    costSell: 50000
    listOrder: 144710

dies during recovery when no alien containment exists.

Code: [Select]
  - type: STR_CYBERWEB_ROBOSPHERE_TERRORIST
    categories: [STR_HUMAN_TECH, STR_ROBOTS]
    size: 0.0
    recover: true
    costSell: 50000
    listOrder: 144710
    liveAlien: false

also dies.

Hence my question regarding the proper way to define a recoverable alien unit/item that does not require a prison type.

Addendum to this:
The only way to recover them is to also set an existing (i.e. already built) prison type:
Code: [Select]
  - type: STR_CYBERWEB_ROBOTURRET_TERRORIST
    categories: [STR_HUMAN_TECH, STR_ROBOTS]
    size: 0.0
    recover: true
    costSell: 20000
    listOrder: 144720
    liveAlien: false
    prisonType: 1

Recovers correctly if a 'prisonType: 1' facility exists at any base.
« Last Edit: April 26, 2021, 05:41:43 pm by krautbernd »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: OXCE (OpenXcom Extended) main thread
« Reply #776 on: April 26, 2021, 05:50:50 pm »
Actually I want to add prison type 4 (robots), but put it on general stores, so you don't need yet another building.

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #777 on: April 26, 2021, 05:56:33 pm »
Actually I want to add prison type 4 (robots), but put it on general stores, so you don't need yet another building.
Isn't the issue that the flag does not work correctly? Setting 'liveAlien: false' should enable players to recover them as items.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: OXCE (OpenXcom Extended) main thread
« Reply #778 on: April 26, 2021, 07:38:06 pm »
Isn't the issue that the flag does not work correctly? Setting 'liveAlien: false' should enable players to recover them as items.

Even if, I'd rather do this the "proper" way. :)

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8597
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #779 on: April 26, 2021, 07:46:43 pm »
But that is not how it works, apparently. Regardless of the flag setting the units die if no facility with 'prisonType: 0' exists:

If everything is right, you get a live alien item.
If anything is wrong, you get a corpse item.

Hence my question regarding the proper way to define a recoverable alien unit/item that does not require a prison type.

All recoverable units need a liveAlien flag and optionally a prisonType (defaults to 0 if not defined).
Same as in OXC.
There is no such thing as "without a prison type"... that's simply not a thing.
Ask differently if you think I didn't understand the question... but the only answer to "can I have an item without a prison type" is "does not compute".

If you want to recover something completely else than a unit, there are (several) other ways how to do it.