Conversation
|
Either I'm blind or the implementation is somewhere else? What is |
Edit: For roman-style campaigns it shows the "You have successfully completed chapter X." screen after ending the game. |
Flamefire
left a comment
There was a problem hiding this comment.
Awesome, the last bit for campaigns! Review inline.
General hint: Try to make best use of the type system. E.g. "unsigned char" is/should be a (text-)character (although only since C++11 introduced uint8_t) And using this narrow width number-type as parameters likely introduces overhead (registers are wider so often need to be masked) so it is even faster to just use unsigned there.
Similar for string which should be text. It can be stored in the config as a string for brevity but converted during load/save to a more appropriate type, especially when (scoped) enums can be used.
In general I like the changes, thanks! :)
|
|
||
| BOOST_FIXTURE_TEST_CASE(Chapters0and1AreEnabledByDefault, CampaignSaveDataFixture) | ||
| { | ||
| saveData[uid] = CampaignSaveCodes::defaultChaptersEnabled; |
There was a problem hiding this comment.
So the default is to enable the first 2 chapters? Why that? Wouldn't (only) the first one be a more sensible default?
I'm also a bit confused as you seem to be using indices and 1-based values for chapters
Maybe stick to indices and use an optional instead of zero
|
Rework in progress - converting to draft, will notify when ready for review. Resolving some conversations since they will not be relevant. |
… fix it (M1) Merged kubaau's campaign_status branch (upstream PR Return-To-The-Roots#1681) and fixed what the upstream review and our own tests found: - world mission scripts completed/enabled 1-based chapters (winning Europe marked Africa conquered); luaFolder back to "" (upper case breaks Linux) - a CONFIG.INI without [campaigns] was thrown away and replaced by defaults - save string padded with NUL bytes instead of '0' - onHumanWinner fired for the wrong winner (IsWinnerHuman team-mask bug); now fires for the announced winner only, also without a GUI - victory screen showed "chapter 0", and a pending one leaked into the next game; progress is saved as soon as the game is left - default chapters stay playable after scripts changed other chapters Tested: unit tests (settings roundtrip, old config, save format, every shipped mission completes its own chapter, CheckObjective winner cases) and local ctest CoopCampaign_* that finishes all 19 official missions headless and checks the recorded progress. Reviewed by Codex (GPT-6 Sol): winner attribution fixed; one finding rejected (MISS209 does not enable a chapter 10). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for this PR — we merged it into our fork (jarvis-jhk/s25coop, a coop-campaign fork) and found a few things while testing it; feel free to take any of it: jarvis-jhk@07bf3205a
Tests we added: settings roundtrip/old config/save format, a check that every shipped mission script completes its own chapter index, and CheckObjective winner cases in testLua. |

Adds support for Roman-style (video) campaigns and the world campaign (video).
Fixed world campaign scripts to unlock the same continents as it was in S2.
Related to issues #1639 and #1177