View Full Version : TechWindow
Roamty Feb 10, 2006, 06:40 PM Updated TechWindow to Version: TechWindow 1.g1 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.g1 works with Vanilla, Warlords and BTS. This has Caesium corrected error fix at line 291. Use 1.g1 or 1.g. now Thankyou Caesium for the fix. Now has the Civilopedia text starting on two lines later thanks to Caesium. "Allows:" as been change to "Units" "Buildings Enabled" "Improvements" made possible by Gaurav. Thankyou Gaurav.
Techwindow 1.g1 small screen
TechWindow 1.g we need help with fixing the background glow for the large icon as it is now, we do not have glow.
TechWindow 1.g Almost whole screen
http://www.civfanatics.net/uploads12/TechWindow_1.g.zip
http://www.civfanatics.net/uploads12/TechWindow_1.g1.zip
Enhance TechWindow
This mod improves the TechWindow which is shown When you get a new Tech.
This mod is based on the original Tech-Erforscht-Screen by SirRethcir, and made into a mod by me.
Tech-Erforscht-Screen change to TechWindow by me.
OblivionOdyssey Feb 10, 2006, 09:24 PM I like it- nice and simple.
Rabbit, White Feb 11, 2006, 07:31 AM Downloading it right now. Small but great addition to the game. :goodjob:
spincrus Feb 11, 2006, 11:56 AM A nice little tweak. Good mod component.
tombeef Feb 14, 2006, 06:02 PM Should as use this as a mod by putting it in the mods folder, or put it in a custom assets folder. Thanks. Otherwise a nice, helpful little addition.
"If you want the rainbow, you have to put up with the rain."
"He who limps is still walking."
"Life is like a box of chocolates, after a while it starts to get old."
"The man who thinks he can and the man who thinks he can't are both right."
The answer to life, the universe, and everything, will always be 42.
Caesium Mar 22, 2006, 02:49 PM Would you give your permission to add this to my mod?
Roamty Mar 23, 2006, 12:29 PM Techwindow is free to add to any and all mods.
Amra Apr 23, 2006, 06:38 AM @Roamty,
Love the mod. Will you be updating this for version 1.61? I see a small note at the bottom of your first post that this works with version 1.61, and indeed it does when I merge it into my mod. However, it is generating a python exception when playing. something to do with the "noMovies" item in the code. See the bolded line in the code below
# globals
gc = CyGlobalContext()
class TechWindow:
def onTechAcquired(self, argsList):
'Tech Acquired'
iTechType, iTeam, iPlayer, bAnnounce = argsList
# Note that iPlayer may be NULL (-1) and not a refer to a player object
# Show tech splash when applicable
#----if-Abfrage: bAnnounce-Test ausgeklammert by SirRethcir ----------------------------
if (iPlayer > -1 and not CyInterface().noMovies()): #and bAnnounce
if (gc.getGame().isFinalInitialized() and not gc.getGame().GetWorldBuilder2Mode()):
if ((not self.bMultiPlayer) and (iPlayer == CyGame().getActivePlayer())):
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTT ONPOPUP_PYTHON_SCREEN)
popupInfo.setData1(iTechType)
popupInfo.setText(u"showTechSplash")
popupInfo.addPopup(iPlayer)
if (not self.__LOG_TECH):
return
CvUtil.pyPrint('%s was finished by Team %d'
%(PyInfo.TechnologyInfo(iTechType).getDescription( ), iTeam))
Here is the error that it generates
File"Tech Window", line 20, in onTech Acquried
Attribute Error'CyInterface', object has no attribute 'noMovies'
I think that the "noMovies" attribute was removed in version 1.61.
Again, love the mod, any help you can give is appreciated :D
Padmewan Apr 24, 2006, 11:18 AM That's great, Roamty. Would you be interested in helping us (me) with a tweak in a different direction on the tech popup window? I was hoping to use the tech popup in our Mod as a way to lay out the story of colonizing a planet, and since we don't have movie-making skills (and, as Amra points out, they removed that part anyway), I was thinking of doing it through the tech popup quote, e.g. instead of there being a quote, there would more of a story like:
String Theory
"...so this mathematical framework has proven to be more than an abstract concept. In fact, the practical applicatons are quite astounding."
"For example?"
"For example: string theory's fifth corollary has provided us with the science we needed to begin designing what ApPhys Team Beta has dubbed 'Resonance Shielding.' Our models suggest that this Shielding will protect standard electronic devices against the effects of the Lattice."
(Excited murmurs.)
"Very well, Dr. Chamdra. You have your funding to continue your research."
One option would be to make the text part of this window bigger, and either put this in the quote or in the 'pedia entry and display one or both. Another would be simply to put a link to the 'pedia entry for the tech with a customizable text key -- for example, the quote could be the beginning of the story, and there would be a "continue reading..." link so people who want to skip this can (and probably most would, my fiction-writing desires notwithstanding :P)
Any thoughts on that?
Roamty Apr 26, 2006, 02:55 PM Thankyou Amra the fix is a small one. The File "TechWindow" on line 20, I change "no Movies" to "noTechSplash". Also line 22 I change to this
if ((not CyGame().isNetworkMultiPlayer()) and (iPlayer == CyGame().getActivePlayer())):
from this
if ((not self.bMultiPlayer) and (iPlayer == CyGame().getActivePlayer())):
Roamty Apr 26, 2006, 03:21 PM You are free to change Techwidow. All I did was make it into a mod. The credit goes to SirRethcir. SirRethcir can be found Here:
http://www.civforum.de/showthread.php?t=29214
Amra Apr 26, 2006, 05:13 PM Thankyou Amra the fix is a small one. The File "TechWindow" on line 20, I change "no Movies" to "noTechSplash".
Thanks for updating it. It is much appreciated :goodjob:
mikezang May 01, 2006, 06:56 PM Does v1.a still support v1.52?
tigerblow May 02, 2006, 08:08 AM It‘s great
Roamty May 02, 2006, 03:33 PM For Mikezang no TechWindow 1.a does not support 1.52 it is for patch 1.61 use TechWindow for the patch 1.52
Spocko May 02, 2006, 05:03 PM Hi Roamty,
I get the Python exception:
CyGame object has no attribute GetWorldBuilder2Mode
... and I see that CyGame does have the attribute "GetWorldBuilderMode"
I'm going to remove the "2" and see if it runs.
Cheers,
Spocko
PS: this mod for 1.52 was great - looking forward to using it in 1.61
PPS: Also, I commented out the check on self_LOG or whatever... and then finally I used only the CvTechSplash file to modify my 1.61 version of the file (ignored TechWindow.py) and it works fine. When I tried using TechWindow, the TechSplash appeared twice - that and the fact I had to comment out the code at the bottom where it writes to the LOG plus removing the "2", I figured I didn't need the TechWindow.Py file :)
While I sound ungrateful - I'm not! In fact, I need your help with a question :) How could I make the TechSplash window wider (almost touching both sides of the screen) so that more improvements can be shown horizontally without the little scroll bar underneath being needed?
PPPS: Got it. Here's the relevant XML code (I'm using a 1280x1024 screen...)
def __init__(self, iScreenID):
self.nScreenId = iScreenID
self.iTech = -1
self.nWidgetCount = 0
# widget names
self.WIDGET_ID = "TechSplashScreenWidget"
self.SCREEN_NAME = "TechSplashScreen"
self.EXIT_ID = "TechSplashExit"
self.X_SCREEN = 17 # 117 # Spocko 205
self.Y_SCREEN = 27
self.W_SCREEN = 1400 # 1200 # Spocko 1024
self.H_SCREEN = 768
self.Z_BACKGROUND = -1.1
self.Z_CONTROLS = self.Z_BACKGROUND - 0.2
self.DZ = -0.2
self.Z_HELP_AREA = self.Z_CONTROLS - 2
self.W_HELP_AREA = 200
# Panels
self.iMarginSpace = 15
self.X_MAIN_PANEL = 17 # 117 # Spocko 205
self.Y_MAIN_PANEL = 55
self.W_MAIN_PANEL = 996 #796 # Spocko 620
self.H_MAIN_PANEL = 545
# Upper Panel
self.X_UPPER_PANEL = self.X_MAIN_PANEL + self.iMarginSpace
self.Y_UPPER_PANEL = self.Y_MAIN_PANEL + self.iMarginSpace
self.W_UPPER_PANEL = self.W_MAIN_PANEL - (self.iMarginSpace * 2)
self.H_UPPER_PANEL = 200
self.X_TITLE = self.X_MAIN_PANEL + (self.W_MAIN_PANEL / 2)
self.Y_TITLE = self.Y_UPPER_PANEL + 12
self.W_ICON = 64 # 90
self.H_ICON = 64 # 90
self.X_ICON = self.X_UPPER_PANEL + 134 # Spocko 56 # 23 #42
self.Y_ICON = self.Y_UPPER_PANEL + (self.H_UPPER_PANEL / 2) - (self.H_ICON / 2) + 17
self.X_ICON_PANEL = self.X_UPPER_PANEL + self.iMarginSpace + 2
self.Y_ICON_PANEL = self.Y_UPPER_PANEL + self.iMarginSpace + 33
self.W_ICON_PANEL = 300 # 200 per Roamty # Spocko was 140
self.H_ICON_PANEL = 135 # self.H_MAIN_PANEL - (self.iMarginSpace * 2)
self.X_QUOTE = self.X_UPPER_PANEL + self.W_ICON_PANEL + (self.iMarginSpace * 2)
self.Y_QUOTE = self.Y_UPPER_PANEL + self.iMarginSpace + 36
self.W_QUOTE = 500 # Spocko was 400
self.H_QUOTE = self.H_UPPER_PANEL - (self.iMarginSpace * 2) - 38
Roamty May 03, 2006, 12:44 PM Remove the file
Spocko May 03, 2006, 04:55 PM For Spocko try version TechWindow 1.a with your changes it did work for me with no TechSplash or Python error.
Thanks Roamty,
Actually, I did use v1.a, and had different results than you (and I have about 35 other modpacks cooked into my own fusion mod, so I may have interference from another mod - but still, there's only that one call from my eventmanager...). Everything works great just by incorporating CvTechSplash.py into my mod, and the screen is even more satisfying now that I've made it wider.
What is the purpose of the TechWindow file? From my limited understanding of Python, it seems to be concerned mostly with determining whether or not the game is an MP game... I'd like to know more about this file, for I know you would not have worked so hard on the code just to check for whether the game was MP :blush:
Great mod and thanks for your time developing it!
Spocko
Roamty Jul 30, 2006, 10:21 AM TechWindow 1.c works with new patch 1.61, and with Warlords.
Amra Jul 30, 2006, 10:23 AM TechWindow 1.c works with new patch 1.61, and with Warlords.That's great to hear! Thanks for the good work. :goodjob:
Caesium Jul 30, 2006, 12:53 PM Corrected an error:
In line 291 it must be screen.attachImageButton( panelName3, "", CyGlobalContext().getBuildInfo(j).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_IMPROVEMENT, CyGlobalContext().getBuildInfo(j).getImprovement() , 1, False ) CyGlobalContext().getBuildInfo(j).getImprovement() instead of screen.attachImageButton( panelName3, "", CyGlobalContext().getBuildInfo(j).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_IMPROVEMENT, j+2, 1, False ) j+2
Attached corrected file.
Roamty Jul 30, 2006, 04:24 PM Remove the file
Roamty Aug 03, 2006, 03:22 PM Remove the file
Gaurav Aug 03, 2006, 04:06 PM 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.
Roamty Aug 03, 2006, 04:13 PM 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)
Caesium Aug 03, 2006, 04:54 PM 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.
Roamty Aug 03, 2006, 06:23 PM Remove the file
Caesium Aug 03, 2006, 06:26 PM 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.
Impaler[WrG] Aug 03, 2006, 06:48 PM How about incressing the Height of that Window so we dont get the scroller
Caesium Aug 03, 2006, 07:35 PM 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 ;)
Gaurav Aug 04, 2006, 12:04 AM ']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 (http://www.civfanatics.net/uploads12/TechWindow_1f1_Spocko.zip)
http://img75.imageshack.us/img75/8981/techwindow1f1spockobe2.th.jpg (http://img75.imageshack.us/my.php?image=techwindow1f1spockobe2.jpg)
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.
Impaler[WrG] Aug 04, 2006, 10:01 AM 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?)
Gaurav Aug 04, 2006, 12:44 PM ']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.
']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.
']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?
Caesium Aug 05, 2006, 07:15 AM The Techwindows appears to be too wide... a little smaller would be nice, with this size, we could also link to the pedia ;)
Gaurav Aug 05, 2006, 09:34 AM 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.
Caesium Aug 05, 2006, 11:33 AM 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...
Gaurav Aug 05, 2006, 03:07 PM 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...
The pedia doesn't have the quote.
Gaurav Aug 06, 2006, 09:50 PM Impaler, since you didn't get back to me I went with size 96 and a taller techwindow. Now, it's almost the whole screen if you play at 1024x768.
I couldn't figure out how to change the size of the glow around the main icon, so it is gone for now.
http://img444.imageshack.us/img444/2898/techwindow1gspockoxx6.th.jpg (http://img444.imageshack.us/my.php?image=techwindow1gspockoxx6.jpg)
TechWindow 1.g (Unofficial) (http://www.civfanatics.net/uploads12/TechWindow_1.g.zip)
darkedone02 Aug 21, 2006, 01:22 PM More details on the tech, this is good.
frankcor Nov 28, 2006, 09:12 AM 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:
Roamty Nov 28, 2006, 12:03 PM Original CvTechSplashScreen file. Can be reinstalled from your original civ IV disk. I don't think it right to give out Original main files.
frankcor Nov 28, 2006, 12:55 PM Yeah, you're probably right. I'll reinstall CivIV, then patch it, then apply your Mod only to Mod folders next time. Thanks!
Your work is greatly appreciated -- I really like the improvement your splash screens offer.
Rabbit, White Nov 28, 2006, 01:02 PM 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:
Well you could reinstall the game, if you backup the right files you won't even loose any of your settings (and saves are not deleted anyway) so it's just a lost half an hour or so.
Or perhaps a kind soul will post the file here so you can download it (I'm not at home so I can't do that). :)
Btw, I don't know if warlords changed the tech screen file or not but just to be on the safe side, specify what version of civ (vanilla warlords, latest patch) you're running. That is if you'd like somebody to post the file.
Oh and I trust you will never ever make that mistake again. You know what they say - every time a mod overwrites installation files an angel looses his wings. :D
Edit: Darn it Roamty! There is no place for prompt, succinct and to the point posts on these boards, take that stuff elsewhere. :lol:
frankcor Nov 28, 2006, 01:20 PM LOL, Rabbit, White!
Roamty is right -- it would feel kinda smarmy to grab an original installation file off the forum here. The reinstall, repatch will work fine for me.
And please, no more lectures about backups! ;) :)
|
|