OpenXcom Forum

OpenXcom => Open Feedback => Topic started by: Chris StarShade on October 24, 2014, 06:38:59 pm

Title: UFO Battlescape Damage not working as remembered
Post by: Chris StarShade on October 24, 2014, 06:38:59 pm
I have searched the forums trying to find an answer to this, but as yet no luck. 

For some reason, UFO power source explosions are not functioning in openxcom the way I remember them from vanilla.  This is leading to annoying situations like an apparently undamaged UFO yielding me no elerium (I killed all the aliens before I could see if there was damage in the engine compartment). 

When I start checking the roof of the UFOs I am starting to notice the tell-tale signs, such as the hole in the roof, however, the power core explosion did no damage to any of the internal bulkheads nine times out of ten. 

I clearly remember in the vanilla game if a power core on a large scout exploded bad enough to destroy a 4x4 chunk of the ceiling, the internal bulkheads would be mostly collapsed and you'd have a smoke-filled craft.  That isn't happening in openxcom. 
I have searched the forums and can't find another topic about this.  Did I miss something about openxcom?  Is there some mod that will bring back vanilla destruction?  Is it being done this way because trying to use vanilla power core explosions is creating a glitch where no aliens survive the medium scout crash? 

Would appreciate an answer and a fix.  Thanks.

Also, first post!  Some of you may remember me from about a decade ago on the xcomufo forums.  Once upon a time I also created a modded obdata file for tftd because I thought gauss weapons weren't strong enough for their UFOpedia flavor text.  I don't think it was very popular on the forum though.  I guess the weak gauss guns went with the weak conventional guns in that game.  Just didn't seem right to me.

Title: Re: UFO Battlescape Damage not working as remembered
Post by: redv on October 24, 2014, 08:33:02 pm
Explosion in OXC differs significantly from vanilla Xcom. For instance in OXC explosion is 3D versus flat in vanilla Xcom.
Therefore result will be different.

The code: https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/TileEngine.cpp#L1119

But.
OXC has a bug "by design", where even if a PS is not exploded, the PS may not have Elerium.
In vanilla Xcom you always can get Elerium from undamaged PS.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: Warboy1982 on October 24, 2014, 08:37:47 pm
OXC has a bug "by design", where even if a PS is not exploded, the PS may not have Elerium.

no it doesn't? the only power source in the game that doesn't get fuel is in the alien base, and it's only 1 of 2 in that map block.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: yrizoud on October 24, 2014, 08:47:05 pm
Explosion in OXC differs significantly from vanilla Xcom. For instance in OXC explosion is 3D versus flat in vanilla Xcom.
I thought the default Explosion Height was "0", to replicate the behavior of vanilla UFO/TFTD ?

Title: Re: UFO Battlescape Damage not working as remembered
Post by: NoelBuddy on October 24, 2014, 08:49:57 pm
OXC has a bug "by design", where even if a PS is not exploded, the PS may not have Elerium.

I thought this only happens when there are two or more Power Sources near each other and one blows up with enough power to destroy the E-115 of the other but not enough power to destroy the other Power Source.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: Warboy1982 on October 24, 2014, 08:55:10 pm
I thought this only happens when there are two or more Power Sources near each other and one blows up with enough power to destroy the E-115 of the other but not enough power to destroy the other Power Source.

yeah, it's quite common and most noticable in the supply ship... if the middle power source blows up, there will be no elerium, even if the other two remain intact, hell there's even a ufopaedia article about it...
https://www.ufopaedia.org/index.php?title=UFO_Crash_Recovery#Power_Source_Explosions_and_Elerium_Recovery (https://www.ufopaedia.org/index.php?title=UFO_Crash_Recovery#Power_Source_Explosions_and_Elerium_Recovery)

but they absolutely DO get filled with elerium before any exploding happens

modding the elerium item's "armor" value to the same as the power source will make it more resilient to these explosions, but i wouldn't do that myself... increasing the recovery rate decreases the inherent value of what is supposed to be a rare and limited resource... i mean compare it with alien alloys... you end up with so much of that, that it's a completely mundane item 2 missions in. recovering 200 alloys is just a "meh whatever" experience, but destroying an alien base and getting 200 elerium... THAT'S something to get excited about

as for answering the concerns in the original post... welcome to the forums! grab the nightly, and remember that the power of any given explosion is RANDOMIZED and results may vary.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: redv on October 24, 2014, 09:25:29 pm
I thought this only happens when there are two or more Power Sources near each other and one blows up with enough power to destroy the E-115 of the other but not enough power to destroy the other Power Source.

Is it possible in vanilla Xcom?
Title: Re: UFO Battlescape Damage not working as remembered
Post by: Warboy1982 on October 24, 2014, 09:28:59 pm
the ufopaedia article wasn't written about us :P
Title: Re: UFO Battlescape Damage not working as remembered
Post by: redv on October 24, 2014, 11:09:55 pm
yeah, it's quite common and most noticable in the supply ship... if the middle power source blows up, there will be no elerium, even if the other two remain intact, hell there's even a ufopaedia article about it...
https://www.ufopaedia.org/index.php?title=UFO_Crash_Recovery#Power_Source_Explosions_and_Elerium_Recovery (https://www.ufopaedia.org/index.php?title=UFO_Crash_Recovery#Power_Source_Explosions_and_Elerium_Recovery)

Two remain PSs isn't intact, they destroyed in vanilla Xcom.
Quote
So there are three possible scenarios with PSs left: only the left-most PS left, only the right-most PS left, or all 3 PSs left.

Therefore in vanilla Xcom all undestroyed PSs always have elerium.

But because OXC has different explosion model, possible different situations: only the left-most PS exploded, only the right-most PS exploded, or exploded only PS in the center. In this case neighboring PSs has't elerium.

Therefore OXC has a bug "by design", where even if a PS is not exploded, the PS may not have Elerium.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: Chris StarShade on October 24, 2014, 11:43:05 pm
Has anyone released a mod to get the vanilla PS explosion algorithm back?  I thought encountering a burning husk of a large scout was rather fun on occasion.  Now they all look "normal" and less interesting. 
Title: Re: UFO Battlescape Damage not working as remembered
Post by: Warboy1982 on October 24, 2014, 11:51:17 pm
you're misinterpreting...

Quote
So there are three possible scenarios with PSs left:
there is also the possibility of NONE left, and this doesn't say anything about the elerium being untouched.

Therefore in vanilla Xcom all undestroyed PSs always have elerium.

nonsense. did you even look at the data table?
look at the 5th example in it:

PS Explodes     PSs    Odds for PS ...      Cum.   E115
L    M    R          Left     L       M       R       Odds    Left
N    Y    N            0     0.25  0.75  0.25    .047    0.00

only the middle one explodes, yet there is 0.00 chance of elerium left.

an explosion can enter a square, destroy the items on the floor (elerium) and not have enough damage to destroy the object (engine) considering the armor value of the elerium is 20, and the HE blockage for the engine is 30 and the armor is 50, it is entirely possible for an explosion to destroy the elerium without scratching the engine.

there's no bug, the explosion model is identical in the nightly, you're tilting at windmills.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: redv on October 25, 2014, 12:28:38 am
It's a fact.
If some PSs left, then possible only three scenarios in vanilla Xcom.
Quote
So there are three possible scenarios with PSs left: only the left-most PS left, only the right-most PS left, or all 3 PSs left.

If some PSs left, then PSs have elerium in vanilla Xcom.
It's a fact too.

Only in OXC possible situation, when a PS left, but hav't elerium. It's by design.

For example: big explosion near a tank. The tank still untouched, but his fuel vanished. It's a bug.

Therefore if a PS undamaged but havnt an Elerium, then it's a bug by design.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: Warboy1982 on October 25, 2014, 12:46:43 am
Has anyone released a mod to get the vanilla PS explosion algorithm back?

grab the nightly build, the explosion algorithm was revised since 1.0

If some PSs left, then possible only three scenarios in vanilla Xcom.
yes, IF SOME are left, there are only three possible scenarios, but that doesn't mean that none remaining isn't also a possibility. think about it for one second: if each power source has a 75% chance of exploding, there's a chance all three will explode. the sample they are talking about excluded that possibility, but that doesn't mean it doesn't exist.

If some PSs left, then PSs have elerium in vanilla Xcom.
It's a fact too.
no, it most certainly isn't, and for the exact reasons i explained earlier.

Only in OXC possible situation, when a PS left, but hav't elerium. It's by design.
it's a possible situation in vanilla too, it's easily confirmed, hell it's included in the data table, it's literally the first entry.
there's no bug. volutar and i have been over it a dozen times and compared every result to vanilla, it's 100% identical.
you're wrong, and i'm done trying to convince you. you have the data, you can see for yourself.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: redv on October 25, 2014, 04:50:31 am
If all PS exploded it's not interesting case. It's trivial. No PS, no elerium.

About explosion of PS you contradict yourself.

In vanilla Xcom possible several cases:
1. Exploded only left PS.    In vanilla Xcom it kills the middle PS. Remained only right PS and 50 elerium.

2. Exploded only middle PS.    In vanilla Xcom it kills left and right PS. No PS, no elerium.

3. Exploded only right PS.    In vanilla Xcom it kills the middle PS. Remained only left PS and 50 elerium.

4. Exploded right and left PSs.    In vanilla Xcom it kills the middle PS. No PS, no elerium.

5. All PSs stays intact.    3 PS and 150 elerium.

The conclusion:
If some PSs left, then possible only three scenarios in vanilla Xcom: only the left-most PS left, only the right-most PS left, or all 3 PSs left.

You confirm it. It's good.
Quote
yes, IF SOME are left, there are only three possible scenarios, but that doesn't mean that none remaining isn't also a possibility. think about it for one second: if each power source has a 75% chance of exploding, there's a chance all three will explode. the sample they are talking about excluded that possibility, but that doesn't mean it doesn't exist.


In the another hand, in OXC possible several more situations:
6. Exploded only left PS, but middle PS is not destroyed.    Remained 2 PSs and 50 elerium in right PS.

7. Exploded left and middle PSs, but right PS is not destroyed.    Remained 1 PSs and no elerium.

8. Exploded only middle PS, but left and right PSs is not destroyed.    Remained 2 PSs and no elerium.

9. Exploded only right PS, but middle PS is not destroyed.    Remained 2 PSs and 50 elerium in the left PS.

10. Exploded middle and right PSs, but left PS is not destroyed.    Remained 1 PSs and no elerium.

You said:
Quote
it's a possible situation in vanilla too, it's easily confirmed, hell it's included in the data table, it's literally the first entry.
But this is contradict your words above.

Cases 6-10 impossible in vanilla Xcom.
It's never happened to me. It's never happened to you. It's never happened to anyone. It's not described in ufopedia.
It's just a fact.

The conclusion:
If some PSs left, then each PS filled by elerium in vanilla Xcom.
Explosion in OXC is not 100% identical with vanilla Xcom.
Explosion in OXC has a bug by design.

By the way, in my opinion not 100% identically is not a problem in this case. Because the bug has easy workaround.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: Warboy1982 on October 25, 2014, 05:32:09 am
believe what you want. i believe you are mistaken.
it was, is, and always will be possible for an explosion to destroy the elerium and not the power source.
you don't like it? feel free to make it exactly how you remember it in your personal build.
i'm not going to discuss this any further.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: volutar on October 25, 2014, 09:37:22 am
You will regret that you dare to doubt in OpenXcom.

redv, you've stated cases 6-10 as possible in OpenXcom.
You can make debug=true in options, use Ctrl+D to reveal whole map, and make a save and put in in here. I challenge you.

As for my arguments there are screens of all possible scenarios with MINUMUM damage of 180.
Even with 180 damage neighbour power source also got destroyed. Always. And destroyed power source can't cause another explosion. So there's no possibility of two neighbour power sources are destroyed.

Capish? ;)

Before posting these complains like "it was different" please gather at least some evidences, except for your speculations. Otherwise your words are dramatically losing any weight for any further "reports".

In the attachments - 4 possible scenarios in OXC with damage 180. And one with damage 220, to prove that damage won't go to second neighbour (10 tiles limit stops it). Colored mosaic is damage field taken with special debug tool.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: redv on October 25, 2014, 02:36:22 pm
You will regret that you dare to doubt in OpenXcom.
Glad to see you again, volutar :)

redv, you've stated cases 6-10 as possible in OpenXcom.
You can make debug=true in options, use Ctrl+D to reveal whole map, and make a save and put in in here. I challenge you.
As i understand, Warboy also stated that cases 6-10 is possible in OpenXcom. But he don't want talk clear about his position. I see a contradiction in his words.
Before we can continue, i need to understand your position about battlegenerator.

If some PSs left, then this PSs always filled by elerium in vanilla Xcom. Is it true or not?

In OXC possible situation, when a PS left, but hasn't elerium. Is it true or not?

Calculation of explosion differs between OXC and vanilla Xcom. Is it true or not?
Title: Re: UFO Battlescape Damage not working as remembered
Post by: volutar on October 25, 2014, 03:00:33 pm
As i understand, Warboy also stated that cases 6-10 is possible in OpenXcom. But he don't want talk clear about his position. I see a contradiction in his words.
I see no contradictions. The code of explosion damage was written by me and Warboy didn't deeply investigate this matter as I did (by making dozens of tests, dumping explosion field data, comparing and tuning).
Explosion pattern depends on layout and obstacles. In exact that layout, when neighbour PSs are apart of each other by 6 tiles - 6-10 cases are not possible, and they look exactly as in vanilla. To totally destroy power source you need to apply 120 damage to that tile (50+70). You see these colored damage dumps, I don't have to explain that. If you will make them 7 tiles apart - they will be slighly different (half destroyed PSs). In some circumstances, when damage is less than 50, Elerium item will be destroyed, but PS tile will stay intact. In some UFO layouts that COULD be possible. But not in vanilla.

Quote
If some PSs left, then this PSs always filled by elerium in vanilla Xcom. Is it true or not?
No. Elerium is an item, like any other thrown object. It's spawned inside of PS tile. You can destroy PS with plasma, and elerium item will be lying on the ground. Or you can make "weak" explosion enough to destroy elerium, but not enough to destroy PS.

Quote
In OXC possible situation, when a PS left, but hasn't elerium. Is it true or not?
As above. The logic is the same.

Quote
Calculation of explosion differs between OXC and vanilla Xcom. Is it true or not?
Not quite. Current tile destruction function should work as in vanilla. The only difference here is PROBABLY bigwall divergence point. Because in OXC we introduced more accurate outer wall mechanics. In vanilla they are always treated as square objects, and even explosion can't pass-by diagonally. But it's mostly about the outer side.

In short. In 1.0 milestone it is possible that PS will be intact but won't carry any elerium inside. This is not applied to nightly.

PS. It would really help if SEED string (or something like that) be available as input field in mission generation, just to make battlescapes totally replicable for different people.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: redv on October 25, 2014, 03:43:44 pm
OK. Again.
I don't talk about events during battle.
As i said, i need to understand your position about battlegenerator. I cannot continue if i don't undertand you.

If some PSs left, then this PSs always filled by (spawned inside if you want) elerium in vanilla Xcom (during generate a battle). Is it true or not?

In OXC possible situation, when a PS left, but hasn't elerium (during generate a battle). Is it true or not?
Title: Re: UFO Battlescape Damage not working as remembered
Post by: volutar on October 25, 2014, 04:17:07 pm
OK. Again.
I don't talk about events during battle.
Crash explosions are actually happening during the battle, just before first turn. They are not "simulated".
Quote
As i said, i need to understand your position about battlegenerator. I cannot continue if i don't undertand you.
You should learn to become more unerstandable with your questions.

Quote
If some PSs left, then this PSs always filled by (spawned inside if you want) elerium in vanilla Xcom (during generate a battle). Is it true or not?
In OXC possible situation, when a PS left, but hasn't elerium (during generate a battle). Is it true or not?
First of all, what is "PSs left"? Left after what?
Second of all, there are modified UFO maps with plenty of extra PSs INITIALLY without elerium.
Elerium is an item and it can be destroyed by smallest EXPLOSION damage. While PS is damaged at least with value of 50 (no matter which type of damage). There are plenty of explosion damage variations between 1 and 49 which will cause damage of elerium without damaging PS.
Title: Re: UFO Battlescape Damage not working as remembered
Post by: redv on October 25, 2014, 07:53:21 pm
First of all, what is "PSs left"? Left after what?
Literally. That PSs what is left. After explosions, obviously. After explosions during generate a battle.

Second of all, there are modified UFO maps with plenty of extra PSs INITIALLY without elerium.
I know nothing about modified UFO because I never used this mod (or mods).