Help modding the city screen

robbyextreme

Prince
Joined
Oct 4, 2003
Messages
310
Hi there I have already read the sticky topics but most of the links/images are not working. Messed around in BUG's files to see how they did it but no luck.

First I'm trying to double the size of the unit box to fill up the red square.




and I'd like to change what units/buildings show when clicking these mini icons.

 
I'm not sure what mod you're working on (A new Dawn?), so I'll only give some rather vague (and untested) advice. I'll assume you know how to edit python files.

For the first question, you want to edit CvMainInterface.py. The box with the unit buttons appears to be called "BottomButtonContainer" (in my BUG-based mod, might be changed for yours, although that seems unlikely). It is constructed in the following line:
Code:
screen.addMultiListControlGFC( "BottomButtonContainer", u"", iMultiListXL, yResolution - 113, xResolution - (iMultiListXL+iMultiListXR), 100,
        4, 48, 48, TableStyles.TABLE_STYLE_STANDARD )
The fourth parameter "yResolution - 113" controls the vertical position, and the sixth parameter "100" controls the height of the box. Decrementing the former and incrementing the latter by some value should make the box higher. This alone will probably make the box overlap with other components (like the selected unit buttons), so you'll have to move around some other components, but this should give you a start.

I can't answer the second question, those buttons seem to be a feature of your specific mod. Try asking in the respective subforum.
 
Top Bottom