Technology Screen

ruff_hi

Live 4ever! Or die trying
Joined
Oct 24, 2005
Messages
9,134
Location
an Aussie in Boston
The BUG team has looked at the technology screen (or technology chooser) a few times and done a little bit with it (widen, GG preferences, etc). We recently saw this suggestion ...

I'm surprised this hasn't been implemented. As per this post:

http://forums.civfanatics.com/showpost.php?p=8745918&postcount=1468


While the request is made in the Legends of Revolution thread, the user's request is not specific to the Legends of Revolution mod; and since LoR uses the BUG UI, it would certainly benefit from such a feature. For those who don't want to check the post, basically the user wants an easy way to know what specific techs belong to what eras. The easiest way to do this would be to implement a color code scheme in the tech tree I'd imagine. It also seems such a color coding system would be pretty easy to implement.

That seems pretty easy (assuming that we can get the era from the tech :)).

Edit: which you can ... CvTechInfo.getEra()

This has already been done in Rise of Mankind.:D

Could you please post the file Assets/Python/Screens/CvTechChooser.py from that mod?

Be warned, RoM's tech tree looks vastly different from Standard BTS. I like the changes, personally.

View attachment 238087

Had a quick look at the file and it looks like the non researched techs are color coded. The current tech and known techs still have the same color as vanilla BtS. My thought was to put a shadow like border (prob about 3 to 5 pixels depending on how it looks) around the techs and color code that off the 'clock era' colors. That way, all techs have a related era color.

Edit:
I know how to change the color of text ... szText = localText.changeTextColor(szText, gc.getInfoTypeForString("COLOR_YELLOW"))
I know how to change the color of a panel ... screen.setPanelColor(szTechRecord, 160, 100, 160)

Anyone know how to change 'COLOR_YELLOW' into its 3 integers for setPanelColor?
Code:
szColor = "COLOR_YELLOW"
iColor = gc.getInfoTypeForString(szColor)
if iColor != -1:
    color = gc.getColorInfo(iColor)
    if color:
        rgb = color.getColor() # NiColorA object
        if rgb:
            screen.setPanelColor(szTechRecord, rgb.r, rgb.g, rgb.b)
(above from EF)
cool - thx. I'll mock up some options and start a new thread later this week.

Another option would be to color just the header part of the tech card where the icon, name, and icons for AND prereq techs go and leave the body colored by whether or not it is researched, in the queue, or otherwise.

... which sounds pretty good. I've got a few ideas that I will post later.
 
For reference, here is a screenshot of the vanilla tech screen ...



Here are two ideas to indicate the era that a tech belongs to ...

A)


B)

Spoiler :
I know it isn't modern, just mocking something up :mad:. Also, those red things look very square, but we'll use Civ4 panels (just like the tech panels) to create some form of shadow. The color of the shadow panel will be controlled by the era color selected by the user. I am actually thinking of putting in both options.
 
I would like to see what it would look like if that top half was color coded by era, and the bottom was left with the Researched/Queued/Unresearched colors. By top half I mean that 2/5ths size section above the line that runs through all the individual tech panes that currently "shines".
 
I would like to see what it would look like if that top half was color coded by era, and the bottom was left with the Researched/Queued/Unresearched colors. By top half I mean that 2/5ths size section above the line that runs through all the individual tech panes that currently "shines".
I'm pretty sure the answer to that is 'no can do'. The tech panel has the style 'PanelStyles.PANEL_STYLE_TECH' which I am assuming creates that 50/50 color shine thing you are talking about. As such, it is all one color and relies on the style to get the line down the middle.
 
done - revision 2057.

 
While I'm happy to see that BUG gets era colors for techs, still I probably can't used it in my own modpack 'as is' (rev 2057) because the shadow layer is too wide for my modpack's techscreen as it has more techs vertically than the regular BtS screen (See RoM techscreen) and there's only couple pixels between techs. So I'm hoping you'd give other options from which you could choose from the look of tech screen (like city specialist choice). :)

By the way, the clock era colors are not ideal choice for tech screen, I tried them when I made the color changes to the techscreen (the one Afforess posted) and I had to use more bright colors to make the tech texts shown better (don't know how colorblinded people see this screen).
 
While I'm happy to see that BUG gets era colors for techs, still I probably can't used it in my own modpack 'as is' (rev 2057) because the shadow layer is too wide for my modpack's techscreen as it has more techs vertically than the regular BtS screen (See RoM techscreen) and there's only couple pixels between techs. So I'm hoping you'd give other options from which you could choose from the look of tech screen (like city specialist choice). :)

By the way, the clock era colors are not ideal choice for tech screen, I tried them when I made the color changes to the techscreen (the one Afforess posted) and I had to use more bright colors to make the tech texts shown better (don't know how colorblinded people see this screen).
Fair enough. Use the concept / code that I've added but change it so that the ERA panel sticks out the right only ... may as well make it a half height small little box that juts out from the top right of the tech panel.
 
I've merged this into the RevDCM SVN, and the latest release of LoR, and it looks great. Nice job Ruff hi.
 
What do you think of the GP Tech Pref hover? I must admit I'm finding it not very useful. I think that I need to trim down the displayed techs. I think I'll limit the two buttons on the right (current and future) to showing only the techs you can research immediately (after researching your queue for the future button) instead of all unresearched techs.

If you want to see the entire order of techs, you can hover over the first button--the GP himself.

Has anyone played with this yet?
 
I didn't notice...
 
I've been meaning to look at it (maybe next year). I am hoping that the techs you cannot bulb (ie don't have a pre-req) are included in the hover but with a different color.
 
There's no control over the images of any sort short of size that I can find. I considered making researchable techs larger, but it would look funny. Maybe that's okay. You can give it a shot easily enough. There's a function near the top of CvTechChooser.py that builds the list. Just search for "img".

There are three hovers for each GP type:

  • All: Every tech ignoring anything you have researched and your queue
  • Current: Techs you have not researched
  • Future: Techs you have not researched or placed in your queue
I'm thinking to change the last two to make them omit unresearchable techs.
 
Maybe a new tab on the screen ... I was thinking of something like this ...

you hi-light a Great Prophet and you get a list like this ...
Meditation <known>
Polytheism <known>
Priesthood <known>
Monotheism <known>
Theology <known>
Divine Right
Mysticism <known>
Masonry
Code of Laws
Civil Service <blocked by CoL>
Monarchy
Literature
Music
Writing
Philosophy
Printing Press
Drama
Aesthetics (BTS)
Alphabet
Paper
Education
Liberalism
Calendar
Masonry (Vanilla & unpatched Warlords)
Animal Husbandry
Construction
Future Tech

So the first tech that isn't known or blocked is the bulb tech. You click on either a tech that is blocking something (ie mark it as researched) and the list updates. Click on the bulb tech in question (ie mark it as researched) and the list updates. That way, you can play around with techs to see what you shouldn't research if you want to lightbulb something big (ie CService).
 
Top Bottom