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

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3206
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #945 on: January 21, 2022, 10:48:34 pm »
Thanks for the update. There is only one oddity:

Code: [Select]
[21-01-2022_18-54-25] [INFO] Supressed Error for 'STR_BIODRONE_TERRORIST': This unit has a corresponding item to recover, but still isn't recoverable. Reason: (the unit is marked with 'capturable: false'). Consider marking the unit with 'liveAlien: ""'.
I don’t understand what this could be and whether it should be corrected, since BIODRONE, like all robots, is immune to any form of telepathy and stunning, that is, it is impossible to capture it.

Problem is there contradiction, there is `liveAlien:` (default value)  but you can't recover it because of `capturable: false`, if your goal is to make this unit impossible to capture then its mean that you need add `liveAlien: ""` to mark that is no way to recover this unit and `capturable: false` is not error.

Offline Xolvix

  • Sergeant
  • **
  • Posts: 24
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #946 on: January 22, 2022, 09:52:26 am »
Oh man...

- Hotkeys to close event popups (Esc/Enter): https://openxcom.org/forum/index.php/topic,10321.0.html

I made the above suggestion, but the responses suggested that not only had it been considered in the past and dismissed already, but even the idea of implementing it was probably more effort than it was worth, and I got ashamed for thinking I was making an unreasonable request... so I ended up deleting the thread. :)
« Last Edit: January 22, 2022, 09:58:31 am by Xolvix »

Offline Ethereal

  • Commander
  • *****
  • Posts: 625
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #947 on: January 22, 2022, 10:17:00 am »
Yankes, Meridian Thanks for the help, I figured it out and corrected. The error message no longer appears.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8613
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #948 on: January 22, 2022, 11:19:57 am »
I don’t understand what this could be and whether it should be corrected, since BIODRONE, like all robots, is immune to any form of telepathy and stunning, that is, it is impossible to capture it.

OK, this will be a long post, but I want to answer all potential questions.

Question 1: why did we add this validation?

We added the validation, because issues/crashes with live unit recovery were constantly reported by players and were hard to identify, both for modders and for developers.
The validation should help identify potential typos, mistakes and oversights.

Question 2: do I need to fix these validation errors? Will the game still start if I don't?

OXCE will still start, potential errors will be reported only in the log file.
If we could clearly identify the intention of the modder, we would create a blocking validation, this is however not possible in this case.
It's the modder who needs to check it and decide how to fix it... because there are multiple different solutions.

Question 3: what does this validation even do?

The validation checks whether the attributes related to live unit recovery are configured consistently.

To simplify the explanation: there are 2 competing attributes:
1. attributes saying if the unit can be recovered alive or not
2. attribute saying what should be recovered, in case a recovery is attempted

There are 4 combinations:

Case A (YES-YES): attributes say that a live unit is recoverable, and a recovery item is defined.
- this is the normal scenario, everything is fine, and there is nothing written in the log

Case B (NO-NO): attributes say that a live unit is not recoverable, and a recovery item is not defined.
- this is also a normal scenario, everything is fine, and there is nothing written in the log

Case C (YES-NO): attributes say that a live unit is recoverable, but a recovery item is not defined.
- this is wrong and the game will 100% crash, if it tries to recover such a live unit
- it is of course possible that the modder made sure that a unit cannot be recovered by some other means... for example by not using the unit at all, or by using it only as a civilian faction... but we can't know that and it's safer to define the attributes consistently also in these cases
- the validation will identify such cases and will report a message in the log file saying something like this:

Code: [Select]
[21-01-2022_09-12-36] [INFO] Supressed Error for 'CIVILIAN_CASTAWAY_GAL': This unit can be recovered (in theory), but there is no corresponding item to recover.

The proper fix is to either make the live unit not recoverable (i.e. convert it into case B) or define the recovery item (i.e. convert it into case A).

Case D (NO-YES): attributes say that a live unit is not recoverable, but a recovery item is defined.
- this will not crash the game (at the moment), but it may crash the game in the future (when more features are added for example)
- the problem is again the consistency and the inability of the developers to know if the modder wanted this live unit to be recoverable or not (we still can't read minds :) )
- the validation will identify such cases and will report a message in the log file saying something like this:

Code: [Select]
[21-01-2022_09-12-36] [INFO] Supressed Error for 'STR_LOST_SOUL_MALE': This unit has a corresponding item to recover, but still isn't recoverable. Reason: (the first 'corpseBattle' item of the unit's armor is marked with 'recover: false'). Consider marking the unit with 'liveAlien: ""'.

or this:

Code: [Select]
[21-01-2022_09-12-36] [INFO] Supressed Error for 'STR_FIELD_GUN_TERRORIST': This unit has a corresponding item to recover, but still isn't recoverable. Reason: (the unit is marked with 'capturable: false'). Consider marking the unit with 'liveAlien: ""'.

The proper fix is to either make the live unit recoverable (i.e. convert it into case A) or un-define the recovery item (i.e. convert it into case B).
In most cases, conversion to case B is what needs to be done, the message even suggests it by saying "Consider marking the unit with 'liveAlien: ""'."; but it is possible that converting to case A is also what the original intention was.
Again, only the modder can say for sure.

Question 4: what are the attributes that say whether a live unit is recoverable or not?

There are 2 main attributes, that are considered during the validation:
#1. the `recover` flag on the item that is used in `corpseBattle` attribute on the unit's armor

Example for a Sectoid (1x1 unit):

Code: [Select]
armors:
  - type: SECTOID_ARMOR0
    corpseBattle:
      - STR_SECTOID_CORPSE         # <----- this item is checked

items:
  - type: STR_SECTOID_CORPSE
    battleType: 11
    recover: true                  # <----- this flag is checked
    recoveryPoints: 5

Example for a Reaper (2x2 unit):

Code: [Select]
armors:
  - type: REAPER_ARMOR
    corpseBattle:
      - REAPER_CORPSE_1             # <----- this item is checked
      - REAPER_CORPSE_2             # <----- NOT relevant
      - REAPER_CORPSE_3             # <----- NOT relevant
      - REAPER_CORPSE_4             # <----- NOT relevant
    corpseGeo: STR_REAPER_CORPSE    # <----- NOT relevant

items:
  - type: REAPER_CORPSE_1
    battleType: 11
    recover: true                  # <----- this flag is checked
    recoveryPoints: 3

We recommend using this method when converting from case C/D to case A/B.

#2. the 'capturable' flag on the unit

An example of this could be a vanilla Cyberdisc, which is not capturable.
Not capturable unit are automatically also not recoverable as live aliens.
We do not recommend using this flag to convert from case C/D into case A/B, because it has also side effects: when such unit is stunned, it is automatically insta-killed.
We recommend using option #1.

Question 5: is this check final or will it change in the future?

The check covers a lot of cases now, but not 100% of cases.
There are still corner cases that are not fully covered; for example logic around zombie-like units, just to name one.
We may improve this check in the future if we see there are still issues in the mods; or if we add new OXCE features.

Thank you for your attention, and if you made it this far, congratulations!
« Last Edit: January 22, 2022, 11:26:59 am by Meridian »

Offline Ethereal

  • Commander
  • *****
  • Posts: 625
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #949 on: January 22, 2022, 05:51:15 pm »
Thanks for the clarification and congratulations.  :D
I have another question: where did "bigSprite" for items with "specialUseEmptyHand" go?

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8613
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #950 on: January 23, 2022, 09:38:21 am »
Thanks for the clarification and congratulations.  :D
I have another question: where did "bigSprite" for items with "specialUseEmptyHand" go?

Modders didn't like it, so it now also needs `specialUseEmptyHandShow: true`

Offline Ethereal

  • Commander
  • *****
  • Posts: 625
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #951 on: January 23, 2022, 10:04:53 am »
Modders didn't like it, so it now also needs `specialUseEmptyHandShow: true`

Understand, thanks. I just didn't see it in the description.

Offline Komandos

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #952 on: January 25, 2022, 05:00:27 pm »
When drawing maps, the size of 10x10 (10x20) is often small, and the size of 20x20, although suitable, takes up 1/3-1/2 of the area from the total block of the 6x6 map. (Screenshot)
I assume that there were similar requests, but I did not find them anywhere.
Request: Create the possibility of using a SET of large terrain blocks (20x20) to compile from such blocks a general map with a size of 6x6 blocks.
(The game currently supports using a set of 10x10 terrain blocks to create an overall 6x6 block map from those blocks).

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8613
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #953 on: January 25, 2022, 05:17:45 pm »
Request: Create the possibility of using a SET of large terrain blocks (20x20) to compile from such blocks a general map with a size of 6x6 blocks.

already doable with the standard map script features

Offline Komandos

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #954 on: January 26, 2022, 07:07:29 pm »
Can 2x2 tanks crush 1x1 infantry???

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8613
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #955 on: January 26, 2022, 07:46:16 pm »
Can 2x2 tanks crush 1x1 infantry???

Only if the tank falls on them and they cannot step aside.

Offline Ethereal

  • Commander
  • *****
  • Posts: 625
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #956 on: January 27, 2022, 07:10:27 pm »
Meridian, I would like to return to the issue of the counter of stunned enemies. Now when "soldierDiaries: false" the stats button disappears and space is made for the stun counter.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8613
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #957 on: February 03, 2022, 01:00:49 pm »
Meridian, I would like to return to the issue of the counter of stunned enemies. Now when "soldierDiaries: false" the stats button disappears and space is made for the stun counter.

added

there is not enough space, but I leave that problem to you

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8613
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #958 on: February 05, 2022, 12:34:54 pm »
New OXCE v7.5.3 is up.

2022-02-07
QoL:
- Crafts in the TTV (by EttyKitty)
- Track/show soldier stuns when soldier diaries are disabled: https://openxcom.org/forum/index.php/topic,6586.msg143763.html#msg143763

Features:
- Added validation of layered armor definitions (only active when lazy loading is off; for modders use) added in OXCE v7.4.9, removed in OXCE v7.5.2, will be added later
- Craft deployment preview (from Craft Soldiers GUI): https://openxcom.org/forum/index.php/topic,10370.0.html
- Craft deployment preview - players can save a custom xcom deployment for real craft with real units
- Craft deployment preview - modders can define allowed start tiles per craft type: https://openxcom.org/forum/index.php/topic,10370.msg144057.html#msg144057
- Craft deployment preview - modders can define custom preview maps per craft type: https://openxcom.org/forum/index.php/topic,10370.msg144056.html#msg144056
- Base facilities preview (left-click on an Access Lift): https://openxcom.org/forum/index.php/topic,10372.0.html
- Craft-type deployment table in-game modding (from Stats for Nerds GUI) - for players: https://openxcom.org/forum/index.php/topic,10371.0.html

Modding:
- Armor transformation for HWPs and summoned units: https://openxcom.org/forum/index.php/topic,4444.msg143797.html#msg143797
- Cosmetic units, attribute `cosmetic`: https://openxcom.org/forum/index.php/topic,10352.0.html
- Units ignored by the AI, attribute `ignoredByAI`: https://openxcom.org/forum/index.php/topic,10353.0.html
- Overrides for difficulty coefficient effects, `difficultyCoefficientOverrides`: https://openxcom.org/forum/index.php/topic,10354.0.html

Bugfixes:
- Armor transformation size checks (cannot switch into a bigger armor size!)
- `craftInventoryTile` can now be used also on craft that don't use `deployment`, for example the Skyranger


Download: https://openxcom.org/forum/index.php/topic,5258.0.html

Ruleset validator was updated.
Wiki ruleset reference was updated.
Auto-update available on Windows.
« Last Edit: February 12, 2022, 10:24:35 am by Meridian »

Offline Komandos

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #959 on: February 05, 2022, 12:56:34 pm »
How can you increase the landscape of the battlefield to 70x60
(80×60) withh the help of scripts, if the craft of the player is 20x20 (30x30)?