TechWindow

Corrected an error:
In line 291 it must be
PHP:
screen.attachImageButton( panelName3, "", CyGlobalContext().getBuildInfo(j).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_IMPROVEMENT, CyGlobalContext().getBuildInfo(j).getImprovement(), 1, False )
Code:
CyGlobalContext().getBuildInfo(j).getImprovement()
instead of
PHP:
screen.attachImageButton( panelName3, "", CyGlobalContext().getBuildInfo(j).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_IMPROVEMENT, j+2, 1, False )
Code:
j+2

Attached corrected file.
 

Attachments

  • TechWindow 1.d.zip
    5.3 KB · Views: 213
Roamty said:
TechWindow 1.f

CvTechSplashScreen is all you need to make this work in any mod that out there. Just add the folders Assets,Python,Screens,with CvTechSplashScreen being in the Screens folder to any mod. TechWindow 1.f works with new patch 1.61, and with Warlords. Has Caesium fix for line 291, shows Quote for the Tech, also Civilopedia text while you hear the Quote for the Tech. Got idea from Genghis Khan Warlords, CvTechSplashScreen.

http://www.civfanatics.net/uploads12/TechWindow_1.f.zip

I think the Civilopedia text should start on a new line.
 
I need help with starting Civilopedia text on a new line. I don't know how to code it to show up on a new line.


# Tech Icon
screen.addDDSGFC(self.getNextWidgetName(), techInfo.getButton(), self.X_ICON, self.Y_ICON, self.W_ICON, self.H_ICON, WidgetTypes.WIDGET_PEDIA_JUMP_TO_TECH, self.iTech, -1 )

screen.addMultilineText( "Text", techInfo.getQuote () + techInfo.getCivilopedia(),
self.X_QUOTE, self.Y_QUOTE + self.iMarginSpace*2, self.W_QUOTE - (self.iMarginSpace * 2), self.H_QUOTE - (self.iMarginSpace * 2), WidgetTypes.WIDGET_GENERAL, -1, -1, CvUtil.FONT_CENTER_JUSTIFY)

# screen.addMultilineText( "Text", techInfo.getQuote () + techInfo.getCivilopedia(),
# self.X_SPECIAL_PANEL+10, self.Y_SPECIAL_PANEL+5, self.W_SPECIAL_PANEL-20, self.H_SPECIAL_PANEL-20, WidgetTypes.WIDGET_GENERAL, -1, -1, CvUtil.FONT_CENTER_JUSTIFY)
 
I think, this will be, what you were looking for:
screen.addMultilineText( "Text", techInfo.getQuote () + "\n" + techInfo.getCivilopedia(),

While the number of \n is the number of new lines... but I didn't test it...

Edit: Tested it and it works, but you should use + "\n\n" oder + "\n\n\n". It looks better than only one new line.
 
No problem, it's also good for my mod, if I can help you to get your ideas to work :D
Because these are quite good.
 
How about incressing the Height of that Window so we dont get the scroller
 
I don't think, that we'll need a higher window, because, if we want to have more info, we can also click on the icon and get to the pedia, where this text is shown in an a lot bigger window ;)
 
Impaler[WrG] said:
How about incressing the Height of that Window so we dont get the scroller

Hi, I took Spocko's (extra wide) modification to TechWindow 1.b, as included in my mod, merged in the important changes since 1.b, then played around with the constants to make the top panel taller so some more text would fit. I also left justified the text since the indentation looks weird when the text is centered. Then I stripped out the code I have to make it possible to disable it, renamed it back to CvTechSplashScreen.py, and here you are. What do you think?

TechWindow 1.f1 Spocko.zip



By the way, that clock in the top right in the screenshot is from Not Just Another Clock Mod by TheLopez. Not included. :)

I didn't test this in Warlords yet, but I don't see why there would be any issues if the other ones work.

The scrollbar will of course still appear when the Civilopedia text is long enough.

Sorry about the popup, this was the first screenshot of my mod I've ever taken.
 
I think that looks nicer and it looks large enough to hold 90% of the Pedias without scrolling.

Additional thoughts:

The Icon of the Tech Being discovered now looks a bit small, what about blowing it up by 4 times to see how it would look.

Also the 3 bands under Allows, could the spacing between them be incressed to match that between LeadsTo and Specials and for more specific labels of the boxes (Allows Training:, Allows Construction:, Allows ?? um what is the 3rd bar for anyways?)
 
Impaler[WrG] said:
I think that looks nicer and it looks large enough to hold 90% of the Pedias without scrolling.

Thanks. :) I don't think its 90%, a lot of them have more than one paragraph. The XML file directly includes all the formatting.

Impaler[WrG] said:
Additional thoughts:

The Icon of the Tech Being discovered now looks a bit small, what about blowing it up by 4 times to see how it would look.

Edit W_ICON and H_ICON to taste, keeping it square, and let me know what you decide on. We may have to fix the margins, glow, etc. I think Roamty et al. set it up not to need (much) fixing, but I'm not sure. It is 64 pixels now, which is pretty big already. 4 times the area would mean 128, which would definitely be too big. The size of the main icons in the Sevopedia is 96, if I recall correctly from back when I wrote the air unit fix.

Impaler[WrG] said:
Also the 3 bands under Allows, could the spacing between them be incressed to match that between LeadsTo and Specials and for more specific labels of the boxes (Allows Training:, Allows Construction:, Allows ?? um what is the 3rd bar for anyways?)

The third bar is for worker plot improvements.

Which would you think is better, an even taller panel or smaller icons?
 
The Techwindows appears to be too wide... a little smaller would be nice, with this size, we could also link to the pedia ;)
 
Caesium said:
The Techwindows appears to be too wide... a little smaller would be nice, with this size, we could also link to the pedia ;)

Hi, Caesium. Back with version 1.b, Roamty offered two choices. I think the 'Spocko' version was supposed to be that wide. People could always stick to the 'official' version if they preferred.

I figured I was writing an update for the 'Spocko (extra wide)' version, which I had preferred, and so had included in my mod. I was also taking Impaler's suggestions. I also thought if I was going to show the pedia text, I should try to show as much of it as possible.

The link to the pedia is already there, regardless. ;) But even with the glow, it isn't obvious to the newbie that there's a link. You'll notice by reading my thread that my mod attract newbies more than any other mod here.
 
Gaurav said:
Hi, Caesium. Back with version 1.b, Roamty offered two choices. I think the 'Spocko' version was supposed to be that wide. People could always stick to the 'official' version if they preferred.

I figured I was writing an update for the 'Spocko (extra wide)' version, which I had preferred, and so had included in my mod. I was also taking Impaler's suggestions. I also thought if I was going to show the pedia text, I should try to show as much of it as possible.

The link to the pedia is already there, regardless. ;) But even with the glow, it isn't obvious to the newbie that there's a link. You'll notice by reading my thread that my mod attract newbies more than any other mod here.
What I intended to say that we don't need a techwindow... we could also let start the pedia instead of the tech window if we put more things in it...

just to think of...
 
Forgive me if this is the wrong place to post my question:

I installed TechWindow and I really like the improvement! Unfortunately, I installed it in my game directory, not a mod directory. Naturally, it worked just fine until I attempted to load a succession savegame and got the "locked assets" warning and the game exited.

Where can I find a copy of the original CvTechSplashScreen file? You guessed it -- I didn't make a backup copy when I installed; I just overwrote the original. :cry:
 
Top Bottom