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

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9088
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #585 on: July 08, 2020, 09:51:38 pm »
With invalid corpse item, the game didn't even try to recover the live alien, so it didn't crash. The crashing part was skipped.

With a valid corpse item, the game tried to recover the live alien... but crashed on not existing "live alien item".

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9088
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #586 on: July 08, 2020, 10:03:58 pm »
This is the "old" (1.4) armor definition. STR_CYBERWEB_SPACE_TECHNOMAD_CORPSE exists. This crashes the game.

In the old 1.4 that I downloaded from mod.io, STR_CYBERWEB_SPACE_TECHNOMAD_CORPSE does not exist.
Same as in 1.4a

So you have either added it and forgot about it, or there are multiple versions of XCF 1.4 in circulation.

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #587 on: July 08, 2020, 10:19:23 pm »
I meant 

Code: [Select]
STR_CYBERWEB_TECHNOMAD_CORPSE
instead of

Code: [Select]
STR_CYBERWEB_SPACE_TECHNOMAD_CORPSE
in 1.4. STR_CYBERWEB_SPACE_TECHNOMAD_CORPSE does indeed not exist, while STR_CYBERWEB_TECHNOMAD_CORPSE does.

Sorry, I think this is a mess-up on my side. I checked the old/archived versions I have saved, and none of them actually list STR_CYBERWEB_TECHNOMAD_CORPSE under the SPACE_TECHNOMAD armor. They only list the none-existing STR_CYBERWEB_SPACE_TECHNOMAD_CORPSE item.

 ???

No idea how this happended, but this explains why it wasn't reproducible. Again, sorry for the confusion.

Just to double-check: the game initially checks for a valid corpsebattle/corpseitem entry and only recovers live aliens if these actually exist? Meaning valid corpsebattle/corpseitem are necessary to recover live alien units?
« Last Edit: July 08, 2020, 10:23:34 pm by krautbernd »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9088
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #588 on: July 08, 2020, 10:37:05 pm »
Just to double-check: the game initially checks for a valid corpsebattle/corpseitem entry and only recovers live aliens if these actually exist? Meaning corpsebattle/corpseitem are necessary to recover live alien units?

Yes, OXC and OXCE first check "corpse item" and its "recover" flag when recovering both dead aliens and live aliens.
After this check, more stuff happens.


E.g. to recover a live sectoid or a dead sectoid, the game checks STR_SECTOID_CORPSE in both cases.
A dead sectoid is then recovered as STR_SECTOID_CORPSE and a live sectoid is recovered as STR_SECTOID_SOLDIER or STR_SECTOID_MEDIC, etc.

If any of these things is missing, the game may, should and mostly will crash.


For example, if you would:
1. add STR_ZOMBIE_CORPSE item to vanilla OXCE and make it recoverable
2. and allow a vanilla OXCE zombie to surrender or to be mind-controlled with psionic capture option enabled...

...the game would crash (because of missing STR_ZOMBIE item).

PS: I have added a condition to check this and ignore the OXCE live alien transformation feature instead of crashing: https://github.com/MeridianOXC/OpenXcom/commit/20ff2957130f2035d4fa16c0a6e24daee3a72cc9
« Last Edit: July 08, 2020, 11:03:53 pm by Meridian »

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #589 on: July 08, 2020, 10:43:08 pm »
Okay, thanks again for clearing this up  :)

I probably should have checked the old archives first  :P

Offline Ham

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #590 on: July 09, 2020, 01:40:03 am »
Hi Meridian While I was away, I got a good and useful idea for the next update (if it was possible and not discussed)

The fact is that when the ship returned to the base, it was first refueled, then the weapon was reloaded, and then repaired.

I had frequent cases when the ship is more or less in good condition, but its repair will last 1-2 days, there is no ammunition and there is nothing to destroy the enemy, because it is first repaired, then refueled and only then rebooted. weapons (although refueling is fast enough)

Is it possible (more precisely, it is possible) to change the order of these actions in order to simplify the war with the enemies of the Emperor? (yes, chaos got me. there are many of them)

Thank you in advance!

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9088
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #591 on: July 09, 2020, 09:20:42 am »
It would be possible to change it.

But I don't want to change it, I want to stay compatible with the original.

Offline Ham

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #592 on: July 11, 2020, 02:53:22 am »
Meridian! I have one more suggestion ... This will be useful for mods.

Can you make certain armor or weapons available only to a soldier with the appropriate rank? “As an example: in a 40K mod, Astartes with the title Captain can wear captain's armor when an ordinary Battle Brother cannot.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9088
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #593 on: July 11, 2020, 12:12:13 pm »
I'll consider it if the 40k modders show interest in it.

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #594 on: July 16, 2020, 10:23:53 pm »
Quick question, since I haven't found anything in the reference:

Is it possible to modify movement costs on a per-armor basis, especially the amount of TUs it takes to transition from ground to air and movement costs while in the air/hovering?
« Last Edit: July 16, 2020, 10:25:55 pm by krautbernd »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9088
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #595 on: July 16, 2020, 11:32:27 pm »
Is it possible to modify movement costs on a per-armor basis, especially the amount of TUs it takes to transition from ground to air and movement costs while in the air/hovering?

No, movement cost depends on what you're walking on/flying through/swimming through.
Who is walking makes no difference.

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #596 on: July 17, 2020, 05:54:55 pm »
How hard woudl it be to implement an armor-based modifier that adds or substracts a certain amount of TUs based on the movement/transitions? Would that even be feasible?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: OXCE (OpenXcom Extended) main thread
« Reply #597 on: July 17, 2020, 06:27:23 pm »
I suppose it would have to be a multiplier of the movement cost. Still, considering how low these numbers are (4 or 6 TUs, not even counting running), it would probably lead to weird effects if the multiplier isn't chosen carefully.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9088
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #598 on: July 17, 2020, 07:57:27 pm »
How hard woudl it be to implement an armor-based modifier that adds or substracts a certain amount of TUs based on the movement/transitions? Would that even be feasible?

Hard and VERY frustrating.

Just unhardcoding the kneel/unkneel/turn costs is on my todolist for years. And I didn't have the mental strength to start it yet.
« Last Edit: July 17, 2020, 07:59:53 pm by Meridian »

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #599 on: July 17, 2020, 08:25:03 pm »
I suppose it would have to be a multiplier of the movement cost. Still, considering how low these numbers are (4 or 6 TUs, not even counting running), it would probably lead to weird effects if the multiplier isn't chosen carefully.
I was thinking more about a bonus/malus instead of an actual multiplier (as in, movement on the ground costs +2, flying +4) for that very reason, I might have worded that badly. I am trying to mod a flying armor that is downsized and takes more time to traverse from walking to flying and isn't quite as fast in the air.

I have no idea if this can be done via scripts instead. I was hoping I simply missed something in the reference, but seeing how niche this is I'll shelve this idea for the time being. Thanks for the explanation Meridian  :)
« Last Edit: July 17, 2020, 08:36:07 pm by krautbernd »