Map Objective on Load with Flip Emitters

Started by exy, November 27, 2016, 01:41:58 PM

Previous topic - Next topic

exy

Maybe not a bug so much as a curiosity in the engine, but...

Suppose that a map's objective is 'destroy all structures'.

Suppose that once destroyed, the objective switches to 'collect all items to finish map'.

IF, during that time, an enemy lathe flips an emitter from blue to red, it will not count toward the objective, and collecting all items will still finish the map.

HOWEVER, if the player loads the game to a point after the emitter is flipped, the objective will once again be to destroy all structures, and any flipped emitters must be dealt with to finish.

Relli

Fascinating. I've got one question that may or may not narrow down the cause and perhaps the solution. What happens if you load the game after flipping everything to blue, but without anything being flipped back to red? Does it remain properly on Collection, or does it still skip back to Destroy, perhaps even preventing the game from being winnable?

exy

Actually, after typing out a post with some data, I went back to perform more experiments, and I believe I have created a test that illustrates the core issue.

Imagine starting with this scenario.
If you destroy the red emitter, the game will proceed to Collect, and you may win by collecting the Omni, before or even after the blue emitter gets flipped.

BUT, allow the lathe to flip your starting emitter first.
From there, if you destroy the red emitter, the game will still proceed as before UNLESS you save/load after it is flipped, regardless of whether the red emitter was destroyed.  In that case, the flipped emitter must also be dealt with.

From this, I believe the core issue is that there is a distinction between a 'Blue Emitter that has been flipped', and a 'Red Emitter'.  If I had to guess, I would speculate that when the game saves it looks only at the current state of an emitter, as opposed to what it started as.  This might also explain the anomalies I experienced in my preliminary testing, written below.

Is this data sufficient, or should I continue testing?






you can probably ignore this section now
Spoiler
To clarify, I encountered this behavior on Custom Map #373, wherein I destroyed a Progenitor, destroying all enemy structures, but leaving enemy lathe ships alive to flip my starting emitters.  It is in this map that I have done my testing, the results of which were:

Regardless of how many times the emitters were flipped back and forth (if at all), when I would save and load the game
-If all flip emitters were blue, the game would load with the objective Collect.
-If any emitters were red, the game would load with the objective Destroy.

Assuming that it is intended that the objective should remain on collect, this leads me to suspect that when the game loads, it determines the objective by looking at the map state, as opposed to remembering what it was when the game was saved.

Alternatively, if it is intended that the objective should revert when an emitter is flipped, that for some reason the game isn't checking/updating when a flip emitter is flipped, but only when the objective has already switched to Collect.


Spoiler
However, I am reluctant to admit that might not be the whole story here.  I also encountered two anomalies.

Once, the objective switched to Collect despite there still being one red emitter remaining.
Once, the objective being Destroy and all items collected, the map completed despite one red emitter remaining.

At first I suspected this might be due to some of the emitters being flagged as mission goals and some not, but no matter in what combination I lathed them, I was ultimately unable to reproduce this issue at will.

Without knowing how to open the mission in an editor, nor to debug/check logs, I am unsure how to investigate this further.
[close]

Additionally, I performed a quick test in the editor to confirm that this behavior was not limited to one map, which it is not.
[close]