Repository navigation
OpenCiv4 option: Quick enemy moves - #137
Closed
MortenLyhr wants to merge 9 commits into
Closed
MortenLyhr wants to merge 9 commits into
MortenLyhr wants to merge 9 commits into
Conversation
… OpenCiv4's own options on their own tab The original keeps the player options in its player profile and sends them to the active player at the start of every game, new or loaded (CvGame::sendPlayerOptions); OpenCiv4 used the XML's defaults for a new game and the save's own after a load, and never wrote them to profile.ini. Now Utility holds the profile's (profile.ini player.N), a choice sent from the options screen goes into it and is written at once. The options screen's check boxes get the theme's GFC_Control_StandardCheckBox_Style, as the custom game screen's; W A S D, idle turns and edge scrolling move to an OpenCiv4 tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rges cleanly with bssth#85) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ly with bssth#85) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…abs, GFC's box layout Measured on the original's options screen (Wine, BUG + BULL): the standard window's title bar with the title at the left, tabs as wide as their words from the left (the theme's tab skins, the chosen one lighter, a baseline under them), 31 px rows (GFC's default control height), 16 px text, a box's children as wide as they need with the rest to those that expand (the two columns of player options) or to the spacers (Language at the panel's foot), Restore Defaults and Exit centred under the panel. Empty panels take no room. CyGTabCtrl's setActiveTab/getActiveTab work, so a script can open a tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…owed Before the player options were kept as choices, the options screen wrote every player option it had shown, and it showed those the profile did not have as off. Such a profile has Wait at End of Turn off (and advisor pop-ups, Sid's tips) though the player never chose it; with Wait at End of Turn off the game core ends each turn by itself once a unit has moved, so turns seemed to end on their own. The profile now has a version (2). One without it gets, once, the XML's default for the options that are on by default and off there; every other choice stays, and from then on off is the player's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Show Enemy Moves / Show Friendly Moves on, the game core gives a group whose move ends where the player sees it a mission timer (4 game updates, and one more a plot moved), tells the camera to look at it, and moves nothing else of that player while it is busy: one group at a time, a stack as one, the camera on each. The timer counts game updates, and the turn worker ran the others' updates flat out for 100 ms at a time, so every timer ran out at once and all units jumped together. Now, while a non-human player whose turn it is has a busy unit, the worker stops after that update and the next one runs a slice (250 ms) later; the window stays live meanwhile and draws each step, the camera going to each shown move. With nothing shown (the options off, moves out of sight) the updates run flat out as before. The game itself is unchanged: the same updates in the same order (the 100-turn checksums are equal). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…original Measured in the original under Wine: a game update every 0.26 s and a shown move every 4 updates (about 1 s); OpenCiv4 ran the next move in the update that ended the timer (0.75 s). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nstead of 1 s The original has no such option (its Quick Moves speeds up only the player's own units). With it on, the turn worker waits 150 ms between the other civilizations' updates while one of their moves is shown, instead of the original's 250 ms: a move every 0.6 s, the camera still on each. Off by default, on the options' OpenCiv4 tab, kept in profile.ini as quickEnemyMoves. The game is unchanged (checksums equal). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #87 (
fix/options-screen, the options' OpenCiv4 tab) and #124 (fix/show-moves, the shown moves' pacing); merge after both. This PR's own change is the last commit,7033d63.Why
With Show Enemy Moves or Show Friendly Moves on, the original shows each of the other civilizations' moves for about 1 s (#124). With many units their turn gets long. The original's Quick Moves speeds up only the player's own units. The user asked for a quicker option that still lets them follow each move.
The change
profile.iniasquickEnemyMoves.D7D43800), and ctest passes 14/14 (the options test now expects four OpenCiv4 options).Test
The test map with barbarians and Vikings next to a Roman city, the turn ended with Show Enemy Moves on:
With #127 (multi-plot walk)
#127 walks an AI unit's order in 1.0 s. With this option on, that walk should take 0.5 s so it ends before the next move; the play branch does this in its merge. Once both are in master, a small follow-up makes
Entities::ExecuteMoveuse 0.5 s for the others' units when the option is on.🤖 Generated with Claude Code