Additional information on the Civics screen?

Ninja2

Great Engineer
Joined
Nov 17, 2005
Messages
1,142
Location
Denmarkia
Is it possible for you BUGgers to add more information to the Civics screen?

For example, when choosing civics it's nice to know how many cottages/hamlets/villages/towns/workshops/watermills/windmills/military units one has, to better estimate what effect certain civics have on the economy.
 
I have thought of this in the past, and it's a great idea. Many of the other civics could benefit from it as well. The trick is presenting the information in a sane manner on that screen.

If someone can mock up (draw program or text, whatever really) what it could look like, that goes a long way to making it more likely to be done. ;)
 
There is one level of information, which would always be nice to have present as a general information: Total Production, total commerce, total science, total culture and total unhappiness. I would suggest that these totals are displayed below the civics in a single row, for reference. This should give a nice overview of how my civ would look, if all civics were at their lowest level (but should include current happiness bonuses from resources and buildings/wonders, i.e. I want to see current number of angry citizens that don't work in the form of a number of angry smilies).

As a general observation, I think there's not much information in the hovertext for each civic. I mean, I can see when hovering the mouse over a civic what it does, but I can't see the effect on my civ in this particular game. So if it's possible, I would suggest to change this hovertext, so it actually DOES show what the effect is on my CIV. Not all civics have any meaningful extra information to show, however, e.g. Police State, Slavery, Serfdom, Organized Religion and Theocracy only influence future builds and don't have any immediate effect.

The hover text should at least include the specific effect of the civic. So, for instance, if I select Hereditary Rule, the text should read "+1 happy face per military unit in city" and then display the number of happy faces this would generate. It could be just the happy smiley and a number in a parenthesis. Then, I could match that figure to my net unhappiness, and see if this setting still gives me unhappiness. Granted, if the numbers are even, that doesn't guarantee me no happiness, as some cities could be unhappy. But at least I'll know that as a whole, my military currently in cities is large enough to generate enough smilies to eliminate unhappiness, but I might need to shuffle some troops or simply build some more.

I've listed all the civics, which I think require extra information, including an example of what could be shown in bold. Remember, the idea is that you see the EFFECT:

Government:
Hereditary Rule: +1 happy face per military unit in city (+X :))
Representation: +3 beakers per specialist (+X :science:), +3 happy faces in Civ's 5 largest cities (+X :))
Universal Suffrage: +1 production from towns (+X :hammers:)

Legal:
Vassalage: ...lower unit support costs (+X :gold: per turn)
Bureaucracy: +50% commerce & production in capital (+X :commerce:, +X :hammers:)
Nationhood: ...+2 happy faces per barracks (+X :)), +25% espionage (+X :espionage:)
Free Speech: +2 commerce from towns (+X :commerce:), +100% culture in all cities (+X :culture:)

Labor:
Caste System: ...+1 hammer from workshop (+X :hammers:)
Emancipation: +100% growth for cottages, hamlets & villages (X non-towns)
Mercantilism: ...no foreign trade routes (-X :commerce:), +1 free specialist per city (X cities)
Free Market: +1 trade routes per city (+X :commerce:), -25% main. from corps. (+X :gold:)
State Property: No distance maintenance (+X :gold:), +1 food from workshops & watermills (+X :food:)
Environmentalism: ... +1 happy face from jungles and forests (+X :)), +25% maint. for corps. (-X :gold:)

Religion:
Pacifism: ...+1 commerce support cost per military unit (-X :gold: per turn)
Free Religion: +1 happy face per religion in each city (+X :)), +10% research in all cities (+X :science:)

Now, I realize that some civics affect others. For example, Mercantilism gives one free specialist per city, and this specialist will give an increase in some area. But since I don't get to make that decision until I actually choose this civic and go through Anarchy, I don't think it's really relevant in this screen to show any potential benefits from these specialists. I think the important thing is to show the effects on the situation HERE AND NOW.

Comments are welcome! :)
 
@Ninja2 - Very detailed listing. Nice work. :goodjob:

Changing the hovers for the civics would require modifying the DLL. So far BUG has stayed away from that, mainly so that people can use their own DLL with BUG (unofficial patches, other mods, etc). However, as you have to click "Revolution" before anything takes effect, it should be okay to show the effects of the selected new civics -- just the ones that would be changed.

Now that I've said that, I think it actually changes the screen when you hover over a civic. Doesn't it show the effects not in a hover but below the list? If so, we can do the same thing: show the effects while you hover.

Selecting civics would allow you to see the rare cases where civics combine. The prime example is switching to Mercantilism and Representation together. While it can't know which specialists you will choose -- and thus will say +X specialists -- it can determine that you'll be getting +3:science: * (X + current specialists) for sure.

I would also like to see it display what you will be losing by switching civics as well. The question is whether or not to combine like values.

For example, say you are switching from Hereditary Rule (+18:)) to Representation (+15:)). Should it show +15:) -18:) or simply -3:)? Now that I see it, I prefer combining them. If you really want to know the individual values that make up a total, you can easily select one civic at a time.

The calculations that I am unsure of are the free units from Vassalage and the military unit cost of Pacifism. I understand what the civics say, but I have never found the end result to line up with the rules. This just requires looking in the C++ code of the DLL to verify the math. All the others are clear and produce expected values.

So to do this will require coding all of the calculations up in Python, plus some utility methods for scanning your tiles to count various improvements and your cities to sum a few key values. How's your Python? ;)

It's complicated by the fact that the rule for, say, Representation is not +3:science: per specialist. Rather any civic can specify any amount of "extra commerce per specialist", including multiple types of commerce, and possibly yields, too. So you can easily mod Representation to give +2:science:, +1:culture: just using XML. To be truly compatible with future changes and other mods, the code should use the actual XML rules and not hard code any rules for specific civics.

I have a lot on my plate right now and would love to see someone take this on. If anyone wants to get their hands dirty, I'd be glad to provide some coding guidance along the way. That goes for any feature, but I think this one is more approachable by someone with minimal Python skills than some of the other features I have planned.

A companion feature for this is a CDA page that simply displays the number of each improvement type in each city. I haven't done this merely because what I really want is the total for your whole empire, both worked and not-yet-worked, and CDA doesn't do totals . . . yet.
 
As far as I recall, the effect for each civic shows up in a panel under the civic choices. And this information is displayed both when civics are hovered over, or clicked. This is where I think the information is best displayed.

What I propose is not really to show a calculation of what is lost and what is gained (not that I don't find it interesting though! :)). Showing that, I think, requires that you explicitly shows the calculation, just like you did going from HR to Rep. And because the effects of the civics are so diverse, I think find it hard to imagine a format for all possible effects which at the same time is relevant and easy to understand. I just want to show the effect (so (+18:)) for HR, move the cursor and you see (+15:)) at Rep. Another example is going from HR with (+18:)) to a civ with no happiness bonus. Do you need to see that you lose the 18:)? Maybe you do, but if you can see the base line of angry citizens at the bottom, and that perhaps reads 5 angry citizens, you'll know that a) using HR is providing more happy faces than you need, and b) going to a civic with no happy faces means that you should build some happiness buildings somewhere. Exactly where then becomes interesting, but I think it's impossible to get into that detail on the civics screen. Suffice that you know that unhappiness will happen, when you switch to civics with no happiness bonus...

That's why are I think it's a good idea to show the empire totals, unmodified by civics at the bottom, because then you can more easily see the base line and then in the panel below the civics see the bonuses for each (except for espionage). [Man, I really need a screenshot to draw on! I'll do that tonight! :D]

Ideally, when you click the civics screen button, it opens up with your current selections, and their specific effects below each category. As you click (or hover) over a different selection, that panel changes to show the new effect. The best thing about this approach, I think, is that it doesn't require a new information area, apart from the totals row. You utilize that space below the civic choices, which is currently showing not-so-important information.

Or maybe you already see what I mean, and totally agree? :D

I think I've verified the unit support cost at some point, and found that they made sense... but I can't recall at the moment what that calculation is. I also understand what you mean about the rules, and the possibililties for changing civics bonuses in the XML. I think a step one for this could be to develop it for BTS as it is, if that's easier than coding a general screen, and then step two could be to move to the general approach? As for my skills... I'm no programmer, I can't do this. I can merge mods, but not program anything. I also happen to have three little kids, which means too little time for CIV already! :p But the idea is fairly well fleshed out in my mind, so I'll be happy to test and provide input!
 
Alright, I managed to put together a screenshot! :D In the picture below, I've typed in the additions I'm talking about, circled in yellow. The formatting obviously isn't perfect, but you should be able to get the general idea. At the bottom, I see my empire's totals (and these are just random numbers, based on an imaginary 8 cities). The totals are BEFORE civic bonuses, but including all building bonuses, i.e. a snapshot of my civ when I enter the screen. If I exit and change the tiles being worked, or specialists in any city, these totals will be different.

In the panels below the civic choices, there are still the descriptions of what they do. But I've included the specific effects that my empire gains from this particular choice. In the first panel with Universal Suffrage, I can see that I get 16 extra hammers from my towns (so I can gather that I have a total of 16 towns being worked in my empire). In the second panel with Free Speech, I can see that I gain an extra 100 culture from the 100% bonus, as the 100 is my base. I also gain 32 extra commerce from towns, as there were 16 towns being worked. In the third panel, I'm informed that there are 24 cottages/hamlets/villages which will grow faster because of Emancipation. In the fourth panel with Free Market, I can see that I am not influenced by corporations, as I don't have any, and I gain 32 extra commerce due to 8 bonus trade routes of 4 commerce per city. In the final panel with Free Religion, I get 4 happy faces from non-state religions (so four cities have two religions. Or should that then be 12 happy faces? Not sure about the math here...). I also get 35 extra beakers, as 350 beakers is my base science output.


civicskl3.jpg
 
:bump: So what do the experts think? Can this be done?
 
All of the necessary rules are in C++ and can be ported to Python. The real burden is that you want to show the pre- and post-effects of the civics, but the game will only calculate the current state of the game.

For example, let's consider Universal Suffrage which provides +1:hammers: for every Town being worked.

  • If you are running it already, there's no easy way to determine the base :hammers: without the civic. You'll have to code all of the yield calculations and production modifiers in Python.
  • Otherwise, you'll need a different set of calculations to determine the effect of switching to it. You don't want to just put the number of Towns you have because that ignores the effects of modifiers (Forge, Factory, Power, etc).
This is why I suggested a simpler angle. In this case, it would show only how many Towns you are working.

Other civics have varying degrees of the same difficulty. An idea to try would be to actually set the civics in the screen and ask the game to give you the numbers. I think this would work as you can call setCivic() on a player that bypasses the anarchy I believe.

It would start by setting all civics to the basic ones (e.g. Despotism and Barbarism), calculate the various values you want. As you clicked or hovered over each civic, it would set that civic and recalculate. Only when you close the screen would it reset to what you really have and then do the revolution or not.

This process isn't as fast as the current hovering as it adjusts any cities using the citizen/specialist governors. This will take longer as your empire gets bigger, but it's not huge.

Again, this would have to be tested as I haven't looked at any of the civic-changing code in the SDK. This is all conjecture on my part. You might want to ask Zebra 9 as he has a zCivics mod that extends this screen pretty heavily. He may be familiar with the civics Python functions.
 
FWIW, The one time I tried setting the civics via Python (using the Python console) just to see what would happen, it did indeed change without Anarchy but it also triggered the log message about the switch (complete with the ding-dong) just as if you had done it "properly". It's not necessarily a big deal, but if you are effectively switching in and out of things a dozen different times looking at the various combinations, that might get kinda annoying.
 
Yes, and looking at the code now I see that it also posts those messages to the replay. Even if that wasn't annoying, setCivics() also updates AI diplomacy which would result in resetting the diplo modifiers for using their favorite civic which increase over time as you keep the civic.

So that is not an option. Either we'd need to code all of the calculations into Python -- a fairly monumental and error-prone task -- or modify the SDK to create a setCivics() function that skips those extra steps.

Even with that, the code only sets a dirty bit saying that the game needs to reassign citizens on the next game update slice. I don't know if that update will happen while the civics screen is up or not.
 
Back
Top Bottom