OpenXcom Forum
OpenXcom Forks => OXCE Bugs => OpenXcom Extended (OXCE) => OXCE Bugs FIXED => Topic started by: DSeyka on May 30, 2024, 10:58:52 am
-
So depending on whether last enemy is killed or bleeds out, the loot recovered after missions is different. Using OpenXcom Extended 7.12.8 (v2024-05-18).
Save game is provided, the only relevant mod is X-Com Files (I'm using the latest master version from https://github.com/SolariusScorch/XComFiles/archive/refs/heads/master.zip)
To reproduce:
1. Load saved game.
2. Shoot the anthropod with an aimed rifle shot with the active soldier (Leonel Pagano /T).
3. Note the received loot (1x Disruptor Rifle, 1x Heavy Disruptor, 3x Anthropod Corpse).
4. Load saved game again.
5. End the turn.
6. Note the received loot (1x Disruptor Rifle, 1x Acid Bolt, 2x Anthropod Corpse).
I also did not receive a live Anthropod which I assume I should have, unless it overbled or something? But I'd expect to receive a corpse and its equipment anyway in that case.
Thanks for your time.
-
Both Heavy Disruptor and Acid Bolt are consumables. Thus, they're affected by the "Statistical Bullet Conservation" optional feature. What you're experiencing is not a bug, but normal randomness in regards to recovering consumables.
-
I see. Why does the corpse disappear in second case though?
-
Maybe because you used too strong of a weapon and vaporised it.
-
Second test case is just ending the turn and letting the alien bleed out. Should overbleeding be able to vaporize a corpse?
-
Yeah, something seems off here. I tried, and if you let the third Anthropod bleed out, you never get their corpse or the big gun. But you do get both if you shoot the alien in the face. Sometimes the Acid Bolt disappears, as explained by Delian.
Not sure if it matters that the save was made via BOXCE. The end result is identical with both BOXCE 8.5.4 and plain OXCE 7.12.8.
-
This is most likely a game issue.
Normaly, when a unit loses enough hp/gains stun to drop, game starts falling animation, at the end of which unit is marked as dead/unconcious, corpse is created and items drop from inventory. When battle ends, animation does not get to play, but this is known behaviour, and debriefing screen handles unmarked but dead units in a same way, so it is all good.
However XCF uses enviro effects. Even if they are not defined for hostiles and neutrals, they still cause another checkForCasualties run with parameters, that cause units to be marked as dead instantly as a side effect. So debriefing does not get to do it's thing.
Setting ecEnabledHostile and ecEnabledNeutral to false in save will give third corpse and heavy disruptor as a loot.
Setting globalChance: 0 for hostile and neutral environmentalConditions for all enviro effects in mod is possible, if quick fix is required.
Also, thank you Meridian and Yankes for maintaining the game. This is seriously complicated.
-
Nice find, zRrr! This does indeed seem like the cause of issue. Reported to mod author, feel free to close this thread if this is deemed a content (non-engine) issue.
-
Actually, this doesn't seem like a mod issue. Please correct me if I'm wrong, but I can't see how I could fix it on my end... Maybe with stupidly extensive armour lists in enviro effects, but I can't say I understand the problem well.
-
By what I've understood from zRrr's explanation, the workaround rather than a fix that you can implement is to add
STR_HOSTILE:
globalChance: 0
STR_NEUTRAL:
globalChance: 0
to every single enviroEffects you've defined, under the environmentalConditions parameter, before or after the definition for STR_FRIENDLY.
With this said, I agree that this appears to be more an issue with how these effects are being handled and is not exclusive to this mod, but to any that uses enviroEffects. If the issue is as described, the workaround will work for your mod because you don't define any effects for those two factions and thus we can "disable" them without losing any of the mod's features.
As for what's happening, again based on zRrr's explanation and my understanding of it and the topic's title, is that when the last standing hostile unit dies from bleeding, probably from other DoT too, and environment effects are active, that part of the code will mark said unit as dead, but is not performing the part where a corpse item is generated nor is it dropping the unit's items to the ground effectively vanishing from the debriefing. If this is the case, this could happen with more than one unit, but rarely since they would all have to die on the same turn. When the game ends the mission without the environment effects it handles this last death properly by generating the corpse (or capture if it fell unconcious) and all of its equipment.
-
This is most likely a game issue.
Normaly, when a unit loses enough hp/gains stun to drop, game starts falling animation, at the end of which unit is marked as dead/unconcious, corpse is created and items drop from inventory. When battle ends, animation does not get to play, but this is known behaviour, and debriefing screen handles unmarked but dead units in a same way, so it is all good.
However XCF uses enviro effects. Even if they are not defined for hostiles and neutrals, they still cause another checkForCasualties run with parameters, that cause units to be marked as dead instantly as a side effect. So debriefing does not get to do it's thing.
Setting ecEnabledHostile and ecEnabledNeutral to false in save will give third corpse and heavy disruptor as a loot.
Setting globalChance: 0 for hostile and neutral environmentalConditions for all enviro effects in mod is possible, if quick fix is required.
Also, thank you Meridian and Yankes for maintaining the game. This is seriously complicated.
Fixed this corner case here: https://github.com/MeridianOXC/OpenXcom/commit/37466af118041d8175bf7a43f5a15f5da6e84225
But Debriefing is death and there are for sure more bugs lurking in the shadows.