Civic Option (Python Screen)

MrPinchyPants

Chieftain
Joined
Dec 13, 2004
Messages
61
How can you add another civic option type? I have created the entry in CIV4CivicOptionInfos.xml, CIV4CivicInfos.xml and GlobalDefines.xml but I don't know how to add it in the python screen.

All it shows is the 5 civic options but it seems to cut off before it gets to the other civic option type.

Please help!
 
Try mucking around with the values at the top of the python file. self.HEADINGS_WIDTH is the one that matters in this case IIRC.
 
Do you know what the specific values I would have to change to have 6 option types?

EDIT: Would I have to change the width of 500 to 600. I can't see it being the 1024 value because it's not divisible by 5...
 
As I said, I think it's self.HEADINGS_WIDTH though I'm not sure.

Easiest way to test it is to open up the game, alt-tab out, edit and save the file, then go back in open the civics screen and see what the change you made did. Then you just close the civics screen, and do the same again until it looks right.
 
It was indeed the self.HEADINGS_WIDTH and the total width of 1024 (augmented it so that I could fit 6 in without squishing the window)
 
Go to this folder: \Assets\Python\Screens

Then Open this file: CvCivicsScreen.py

Find these parameters:

self.HEADINGS_WIDTH = 199
self.HEADINGS_TOP = 70
self.HEADINGS_SPACING = 5
self.HEADINGS_BOTTOM = 280
self.HELP_TOP = 350
self.HELP_BOTTOM = 610
self.TEXT_MARGIN = 15
self.BUTTON_SIZE = 24
self.BIG_BUTTON_SIZE = 64
self.BOTTOM_LINE_TOP = 630
self.BOTTOM_LINE_WIDTH = 1014
self.BOTTOM_LINE_HEIGHT = 60

self.X_EXIT = 994
self.Y_EXIT = 726

self.X_CANCEL = 552
self.Y_CANCEL = 726

self.X_SCREEN = 500
self.Y_SCREEN = 396
self.W_SCREEN = 1024
self.H_SCREEN = 768
self.Z_SCREEN = -6.1
self.Y_TITLE = 8
self.Z_TEXT = self.Z_SCREEN - 0.2


These are the values that need to be adjusted... they are more or less self-explainatory. If you need any further help I can explain in more detail.

I suggest you run the game in 1024*768 while re-adjusting this file to get it right in that resolution. This way it will be good for all resolutions and not the higher one you adjusted it for. ;)
 
I had the same problem.

I changed one parameter: self.TEXT_MARGIN (from 15 to 13). 6 items in one civic option fit perfectly now. :)
 
Back
Top Bottom