Skip to content

Tech advisor as the original's, and popups that wait for it (cherry-picks of #111 and #96) - #5

Open
mickmik wants to merge 4 commits into
tech-tree-buttonfrom
tech-screen-original
Open

mickmik wants to merge 4 commits into
tech-tree-buttonfrom
tech-screen-original

Conversation

@mickmik

@mickmik mickmik commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Stacked on #4 (base tech-tree-button), so the AppImage gets it.

What it does

Four commits by MortenLyhr, cherry-picked with -x from two upstream pull requests that are not merged yet. Each applied without a conflict, and the authors are kept.

Upstream Commits What
bssth#111 1fe377d, 0483e5a Popups wait while a screen of their own is up, or a talk. The research question no longer sits on top of the tech advisor that its "Big Picture" button opened.
bssth#96 (closed, now in bssth#150) 8a0fdf3, d562307 The tech advisor as the original's: parchment behind the techs, known techs in green, the researched and queued ones tinted and numbered with their turns, and the screen follows the research as it changes.

When bssth#111 and bssth#150 are merged upstream, these come in with them. They are not to be proposed upstream again.

Checked

  • The rules have not moved. The parity bench (tools/parity.sh, 8 games, run on the AppImage's own oc4core): all 8 games the same.
  • In a game (Xvfb, lavapipe), from the research question:
    • "Let's see the Big Picture..." opens the advisor, and the question waits behind it.
    • Hunting and Mysticism, which the civilization knows, are green.
    • A click on Monotheism shows "1. Masonry (8)", "2. Polytheism (10)" and "3. Monotheism (13)", tinted. The research bar says Masonry.
    • Exit goes back to the map with the research chosen.

🤖 Generated with Claude Code

MortenLyhr and others added 4 commits December 2, 2026 10:28
When the tech being researched is discovered, the original shows only
its splash screen: the civic and "what to research next" questions come
after it is closed, so Esc closes the splash first (Wine, BUG + BULL).
OpenCiv4 showed the popups at once under the splash, and Esc closed the
popup underneath. The game's queued popups now wait while a screen of
its own (an advisor, a splash, a wonder's movie) is up, as wonder movies
already did; what is opened at once (the game's menu, a script's popup)
still shows over it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 1fe377d)
With the tech being researched given in a trade, OpenCiv4 showed "What
would you like to research next?" over the leader's talk. The original
holds the game's queued popups while a talk is up and shows them after
it closes (Wine, BUG + BULL: the research question queued at a turn's end
waits under the AI's first-contact talk and comes after Farewell). The
game's queued popups now wait for the talk as they wait for a screen of
its own; what is opened at once still shows over it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0483e5a)
…hown

Three pieces, found with BUG's tech advisor in Wine (BUG + BULL):

- A panel's colour from setPanelColor tints the layers its theme style tints by the
  panel's own inner colour (FactorColor GFC_Control_Panel_Color_Inner, Modulate):
  Panel_Tech_Style's tech_panel01. Known techs are green, the one researched and
  the queued cyan, the others blue, as in the original; they were all blue.
- The tech advisor is told when the active player's research changes (a tech
  clicked, Shift-clicked into the queue, learnt, a new turn), as the original
  engine calls CvScreensInterface.forceScreenUpdate for it, and redrawn when it
  comes up (the turns left show at once). A click did choose the tech, but the
  screen never showed it.
- addScrollPanel draws no panel: the engine's GScrollPanel is transparent
  (Civ4Theme_ScrollPanel.thm, GFC_CF_TRANSPARENT). The techs lie on the
  advisor's parchment, not the external style's blue; the city screen's right
  column loses a blue block Wine does not have.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 8a0fdf3)
…link)

oc4core links the game core through its import library on Windows, where only
its exported functions can be called; CvTeam::isHasTech, getResearchProgress,
CvPlayer::getQueuePosition, calculateResearchRate and
CvGlobals::getNumTechInfos are not (LNK1120 on windows-x64). The research state
the tech advisor is told about is now read by oc4screens.researchState through
the scripts' CyPlayer and CyTeam, as a string compared each frame. The same
values, the same behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit d562307)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants