Quick Python Question...

Agent 009

Civ 4 Addict
Joined
Mar 28, 2006
Messages
346
Location
In a virtual Civ 4 Environment.
For my mod, I have the unit strengths go up to 250 max. As a direct result every unit that has a 3 digit stength, when displayed in the bottom left of the main screen, shows up something like this. 20.../20... :confused:

I am assuming that this is caused by python. Probably has to do with number of digits being displayed or something. However, I cannot figure out where this is defined, and I don't want to change the unit powers at all.

Is there anyone who might know where this value is defined?

Any help will be much appreciated. :)
 
Python/Screens/CvMainInterface.py is where all that stuff is done. The method where this is done is updateInfoPaneStrings
 
I've made quite a few changes to some of the parameters in that file in hopes that it would fix the problem and yet I am still getting 107.1/1... or whatever, after a battle is fought.

I even changed some of the SMALL_FONT numbers in there in the hopes that it would allow for the rest of the characters to show up, but no luck.

It's working fine in the popup, but not in the bottom left corner info box. I'm totally baffled.:confused:
 
Just a guess, but it may be running out of space in the column given to the numbers (that whole area is a table)
 
Yeah I understand that it is a table, however, I don't see how it can be running out of space. I mean there is a big space from the word "Strength" untill the numbers.

Let's say I have a unit with a total strength of 180. That 180 appears without incident. However, once the unit attacks and sustains some damage, what gets displayed instead would be something like 109.6/1...

I think it makes no sense that it is done like that.

109.6/180 or
109.6/1...

See how it's just about the same length? Why not add the rest of the numbers. There is plenty of space in that box. :p

Anyways, I hope I can fix it or someone knows exaclty what line manages that display to help me with it. :)
 
Well, the stuff for the Str line is on lines 2436-2444 in CvMainInterface.py.
 
Back
Top Bottom