Repository navigation
City bar: the original's art, layout, placement and size at every zoom - #64
Closed
MortenLyhr wants to merge 3 commits into
Closed
MortenLyhr wants to merge 3 commits into
MortenLyhr wants to merge 3 commits into
Conversation
The city bar is drawn from the game's CityBar.nif layout and textures: the banner (CityBar_Base) with the growth and production bars in its halves, the capital's star or the circle in the population's colour, the production symbol (what the city builds, else the cancel button, cut round by ProductionIconMask under ProductionIconBevel) for the active team's cities, the name and what it builds in the banner's halves, and buildCityBillboardIconString's icons above it. It is placed and sized as the original's CITYBILLBOARD faders (CIV4DetailManager) place it, measured in the original at camera distances of 12 to 102 plots: out from the city towards the bottom of the screen and raised, its size levelling off at 0.67. It is no longer hidden beyond 45 plots, and a click on it is a click on its city (the city screen opens), over any unit figure under it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…LLBOARD_RADIUS The size came from a fit to zooms from the start view out, which grew without end closer in. It is now the star's width as measured in the original at 5 to 102 plots (1.39 points a model unit up close to 0.69 far out). The bar's top sits on the ground south of the city by CITYBILLBOARD_RADIUS (90 units up close, no closer than 70), as the original's plot grid shows, not twice that and raised. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onIcon The host may call only the game core's exports on Windows: the order queue and GC's info getters are not, so the Windows build did not link. getCityBillboardProductionIcon is the engine's own call for the symbol: the player's button for a unit, and INTERFACE_BUTTONS_NOPRODUCTION when nothing is built (as the original shows), not the cancel button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 20, 2026
Closed
Contributor
Author
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.
The city bar was a simple pill ("6 □ Roma", the star missing from the font) floating over the city and hidden beyond 45 plots. It is now drawn from the game's own city bar,
Art/Interface/CityBar/CityBar.nif, with its layout in the model's units:CityBar_Base.dds, 128 × 32) with the growth bar in its upper half and the production bar in its lower halfCityBar_Star.tga) or the circle (CityBar_Circle.tga), ingetCityBillboardSizeIconColors' coloursCvCity::getCityBillboardProductionIcon(the button of what the city builds, elseINTERFACE_BUTTONS_NOPRODUCTION), cut round byProductionIconMask.tgaunderProductionIconBevel.tgabuildCityBillboardIconString's icons above (CityTextMarker,ProductionTextMarker,IconTextMarkerTop)Placement and size follow CIV4DetailManager.xml's
CITYBILLBOARD_*faders, checked against the original (BtS 3.19 in Wine) at camera distances of 5 to 102 plots and with the city near the screen's edges:CITYBILLBOARD_RADIUS: 90 units up close, no closer than 70. With the plot grid on, it lies on the city plot's south edge in both games.CITYBILLBOARD_SCALE's 1.5 up close to its 0.67 far out. It matches Wine's within 1.5 points at every distance measured.A click on the bar is a click on its city (the city screen opens), over any unit figure under it, as in the original; hovering it gives the city's plot help.
Start view, zoom 0.45 and zoom 0.9:
Close up (zoom 0.1, plot grid on) and with the city near the left edge:
These were taken with #62 (camera) and #63 (scenario free units) applied, so that the views line up. What still differs:
"+"in a wide format (%s), which reads right on Windows' 2-bytewchar_tbut fails on macOS, so the text is dropped. A separate fix.Checked:
ctest13/13.--turns 100 --map Fractal --size STANDARD --seed 7checksums match master on every turn.Note (2026-11-20): a single click on the city bar opening the city screen is replaced in #113: as in the original, one click on the bar selects the city and a double click opens it.
🤖 Generated with Claude Code