Python file for city bar hover info?

EmperorFool

Deity
Joined
Mar 2, 2007
Messages
9,637
Location
Mountain View, California
I'm making a few alterations to various parts of Ruff Hi's excellent mod compilation and can't find the Python code that draws the info that pops up in the lower left corner of the main interface when you hover over a city bar. Does anyone know where this is?

I'm adding the number of turns until completion of a culture pop and a great person. This is the same info on the city screen in the mod, but I don't want to have to open it to see it.

Much thanks and happy modding!
 
Along the same lines, where is the code to generate the hover text for the commerce yields (science, culture, gold) on the city screen itself.

For example, when you mouse over the gold for a city, it shows you the gross commerce plus 50% for capital, the value after multiplying by the slider, effect of specialists and buildings, and the net total.

I'd like to fix a bug in Sevo's Raw Commerce mod that shows the Raw Plot Commerce including the 50% for the capital under the Bureaucracy civic.
 
After some more research, I've figured out that these hover popups are triggered by assigning a WidgetType when adding/modifying on-screen elements.

For example, when setting the label text showing the total number of beakers a city produces, the WidgetType is set to WIDGET_COMMERCE_MOD_HELP with an additional value detailing which commerce type (science, gold, culture).

The UI must then use the WidgetType to determine what to display on mouseover. However, I can't find this binding anywhere.

Are there any mods that display their own hover overlays?
 
After some more research, I've figured out that these hover popups are triggered by assigning a WidgetType when adding/modifying on-screen elements.

For example, when setting the label text showing the total number of beakers a city produces, the WidgetType is set to WIDGET_COMMERCE_MOD_HELP with an additional value detailing which commerce type (science, gold, culture).

The UI must then use the WidgetType to determine what to display on mouseover. However, I can't find this binding anywhere.

Are there any mods that display their own hover overlays?
widget types is defined in SDK, so if you want change anything related with any widget type, you must change SDK,
at short: it cannot be done in python
 
Thanks for the info. That's a bummer, especially given how extremely moddable the game is. Yes, I could modify the SDK, but that's a bit extreme given the small change and that I'd have to keep merging my change into new version of BetterAI.
 
Back
Top Bottom