I need a hero...and brillant python guy for ?'s

micmc

Warlord
Joined
Apr 17, 2004
Messages
179
Location
atlanta ga usa
can someone (in idiot proof terms) tell me the numbers (and where they are) to play with to get the following?

1. the religion screen to scroll "right" (making more religions visible)
2. the religion icons on the top right of the city screen and how to squeeze them together to add more religions or add a 2nd line...

3. same basic things but with civics.

I have read and read (and winmerged) mods that modify these files, but shoot me in the head if I can figure out how to apply it, short of using the actual mod-component..which I'm also apparently not bright enough to smash the bits together
 
They're in one of the python files from memory (been a long time since I've played in there ;) ). CvMainInterface.py I think. Somewhere in the screens files.

Dale
 
Phew:

VOID addPanel(STRING szName, STRING title, STRING helpText, BOOL bVerticalLayout, BOOL bScrollable, INT iX, INT iY, INT iWidth, INT iHeight, PanelStyle eStyle)
void ( string szName, wstring title, wstring helpText, bool bVerticalLayout, bool bScrollable, int iX, int iY, int iWidth, int iHeight, PanelStyles eStyle )

Change the 5. argument (BOOL bScrollable) from False to True for the right panel, I guess it's the one on line 152 in CvReligionScreen.py. Then, you'll probably have to change line 161 too. Either from SetImageButton (which is a static position) to SetImageButtonAt or to AttachImageButton (which are both relative to another object, i.e. the panel the image button is attached to. This is necessary for scrolling). You'll have to add/remove some arguments both ways, check the API for more details. Civics are in CvCivicsScreen.py.

For the city screen you'll have to edit CvMainInterface.py. Lines 2158-2160 seem to control the placement of the religious icons.

Code:
				i = 0
				for i in range(gc.getNumReligionInfos()):
					xCoord = xResolution - 242 + (i * 34)
					yCoord = 42

to

Code:
				i = 0
				for i in range(gc.getNumReligionInfos()):
					xCoord = xResolution - 242 + (i % 6)* 34
					yCoord = 42 + 34 * (i // 6)

might do the trick. Oh, the same code is also on lines 478-480.
 
Back
Top Bottom