UI changes

Joined
Oct 26, 2005
Messages
4,612
Location
Kansas City, MO
I am wanting to upgrade my UI look. What do I need to do to access this. I can't find it. >< Anyone know this? I am wanting to add stone pillars and similar graphics to the bottom and top menus. Thanks for any information.
 
Its all in the python files.
 
Yup - python all the way.

Most of the interface is done by styling. Using styles you can change the colour of the interface, but not much else. You will have to make your own .DDS files and get the python to call these instead of the styled panels if you want a truly custom UI.

Which interface screens are you interested in editing? The main screen, and the city screen are controlled in CvMainInterface.py, and all the other screens are controlled by their own python files.
 
I have DDS converter 2. Will I be able to make the customized files in mspaint and then convert them and have them work? Would it be best to copy/paste the used ones onto the desktop and edit them? (for correct size)

I mostly want to edit the bottom menu with the unit commands and flag and unit preview. Also the top one with the gold (amount +GPT) in the actualgame. The main screen menu I am not worried about. Although, I wouldnt mind changing the city menu screen as well. If this effects the main menu at startup as a result that is fine.

Added thought: Is there any way to make it so that the chinese have a different interface than say if you play the persians? I will be looking into this more once I have completed a UI change. I am guessing this will involve the SDK to assign new values for the python scripts but I am just guessing. If anyone has any tips on this I would love the extra information. ;)

Sorry I am not real versed in Python, hopefully it is as easy as XML. :(
 
King Flevance said:
Added thought: Is there any way to make it so that the chinese have a different interface than say if you play the persians? I will be looking into this more once I have completed a UI change. I am guessing this will involve the SDK to assign new values for the python scripts but I am just guessing. If anyone has any tips on this I would love the extra information. ;)

Sorry I am not real versed in Python, hopefully it is as easy as XML. :(
That's a cool concept and would add much flavor to the game, but it would require the SDK as well as python to really run smoothly.

Come to think of it, what could be done is a new tag in CIV4CivilizationInfos.xml for each civ that is like the civilizations city-style graphics, except it will be their UI-style graphics. Then you could set different UIs for culture groups (like Asian, Roman, European, etc.) instead of for every civilization. That's something I'de like to see.

Python isn't as easy as XML. As someone pointed out recently, XML is pretty much just text editing, whereas Python is "real" coding/programming. If you're exposed to it enough, though, it's not difficult to learn.
 
Groovy. thanks, Shqype. I like your idea better of the culture based UIs better than mine for individual civilizations. Hopefully if I play with it or download some mod that deals in python I can figure out how the code works by comparing the mod to the original game file. Thanks for the elaborated idea along with the information. :goodjob:
 
Actually, I don't think it would be too difficult if you know what you're doing (one of the "Python-Gods" perhaps?) and just follow a similar style as already done to give city-style graphics for the UI graphics.

Come to think of it, this would be very useful for Ffh 2. Off to the thread :D
 
Shqype said:
That's a cool concept and would add much flavor to the game, but it would require the SDK as well as python to really run smoothly.

Come to think of it, what could be done is a new tag in CIV4CivilizationInfos.xml for each civ that is like the civilizations city-style graphics, except it will be their UI-style graphics. Then you could set different UIs for culture groups (like Asian, Roman, European, etc.) instead of for every civilization. That's something I'de like to see.

Python isn't as easy as XML. As someone pointed out recently, XML is pretty much just text editing, whereas Python is "real" coding/programming. If you're exposed to it enough, though, it's not difficult to learn.
Actually Shqype, it shouldn't need the SDK at all... It could just be done through an INI file.
 
Well then that's even better :)
 
As TheLopez said - it can be easily configurable through the .ini file.

The changes you are looking to make are in CvMainInterface.py. The sizings are controlled not by the size of the .dds files but buy the pixel sizes determined by the python file - it will shrink or enlarge your image to fit.

In most cases with the python all you will have to do is replace:
Code:
screen.addPanel( "InterfaceCenterLeftBackgroundWidget", u"", u"", True, False, 0, 0, 258, yResolution-149, PanelStyles.PANEL_STYLE_STANDARD )
screen.setStyle( "InterfaceCenterLeftBackgroundWidget", "Panel_City_Left_Style" )
with
Code:
screen.addDDSGFC( "InterfaceCenterLeftBackgroundWidget", ArtFileMgr.getInterfaceArtInfo("INTERFACE_CITY_LEFT").getPath(), 0, 0, 258, yResolution-149, WidgetTypes.WIDGET_GENERAL, -1, -1 )
Where the art file is defined in CIV4ArtDefines_Interface.xml. You have to keep the names consistant.

Most of the ones you want to change will be quite near the start, under def interfaceScreen

I was going to make a template for this, but unfortunetly it's quite tricky to change the styled panels into .dds format, so you'd have to want to change everything for the template to work.
 
I was going to make a template for this, but unfortunetly it's quite tricky to change the styled panels into .dds format, so you'd have to want to change everything for the template to work.
Are these .nif files or something else? I was just assuming they were .dds's but you trying to convert them to dds has me a bit riddled. I have still yet to check out all of this info though. I know if I start digging, I will get into it and I have to go out of town later today. :(
Hopefully, I can dig in on Sunday evening. It will give me something to do throughout the week. I have a couple other fixes I wouldn't mind looking at later this week as well.

Right now I am actually in a game and can't put it down. I am putting the hurt on Mansa with the Chinese atm. Then its time to attack France. Then maybe England. hehe. Also checking out the new scale mod (ship scale) and trying to get into the frigates at least :) It looks great so far.
 
The standard styled panels aren't anything you can access.

You can change the colours & transparency of them quite easily though.
 
Top Bottom