New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TripleA 2.6.895 gives this error - Could not find step name #10647
Comments
So it's referring to steps in a battle. The list of steps the engine has in that situation is:
So "Russians select casualties" is not one of them. I guess there's some customization of the step names somewhere and some code might not expecting for that to be the case and is looking for a normal casualties step? |
The step name comes from It does a remapping of a step name, for example: Because the original string wasn't in the list of:
But the step name it returns is also not in the list! I'm really not familiar with this code, so maybe @trevan could chime in or @DanVanAtta who reviewed the above PR? |
This is the first time/map I have used canNotTarget and if I comment out its use the map runs without error. As an aside
Forest (EDIT & Mountain) are isInfrastructure units with no attack or defence, so should they even be in this list? It might also be worth looking at canNotBeTargetedBy in the above context ? |
Indeed, The distinct step names above (e.g. "Russians units Mountain fire") are generated by I agree that the result doesn't make sense given the units don't ever fire or participate in combat! But I'm not sure how exactly the logic changed here in 2.6 and what's the right fix (I mean, we can bandaid it by filtering units, but seems like there might be a more fundamental assumptions mismatch between different parts of the battle code). I'm hoping @trevan could chime in. |
That error pops up in a bunch of different locations. It existed before my changes and, as this bug shows, still shows up. It actually doesn't break anything. What is happening is that when a step occurs, the UI tries to match the step from the engine with the step in the UI. They are supposed to match but are created at two different times. The UI steps are created at the very beginning of the battle while the engine creates each step as it is needed. It is possible for the UI to have steps that the engine doesn't have and vice versa. When the engine has a step that the UI doesn't have, that error will occur. But, you can press "OK" and keep going and nothing will break. The |
Dupe of #11617 |
(Repro is very simple on the above map, just play as a human and attack Finns in Ladoga.) |
This was happening because the code to generate step names was not excluding units that would not participate in combat, resulting in infrastructure units getting their own steps (which later did not match what the engine generated once the filtering took place). Uses the same logic as what's done for the battle to exclude units. Fixes: triplea-game#10647
The following PR appears to fix this: #11773 I need to do more testing and add a unit test. |
This was happening because the code to generate step names was not excluding units that would not participate in combat, resulting in infrastructure units getting their own steps (which later did not match what the engine generated once the filtering took place). Uses the same logic as what's done for the battle to exclude units. This change required adjusting a bunch of tests that were previously not careful about which had mistakes in setting up mock battles where the units didn't match the territory (in terms of sea vs. land). Also makes the tests to mock game data properties leniently, so that only the ones being set to true need to be specified (removing lots of LOC). Includes a unit test. Fixes: #10647 Note: Doesn't fix #11617, as the root cause of that error is different, despite the actual error being the same. I will fix that in a separate PR.
This map works without error in 2.5
But 2.6.895 has the error below, by taking the defaults, it does not get past round 1.
With 2.6 it does not give me a proper error message or clue me where to look, please take a look. The step error should work with uppercase Finns and Russians, yes?
Map
WW2_Russia_Finland_1939.zip
The text was updated successfully, but these errors were encountered: